-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MEGA65: introduce faster, shorter, more compatible, easy to maintain/understand/modify/follow memory and I/O decoding #209
Comments
There are some questions here, I was always unsure (or forget?) about. Maybe this wasn't even correct till now in Xemu, so with a memory decoding rewrite, it's a nice thing to sort out these as well. And should be btw., since it's always hard to patch things later than knowing all the constraints before and plan then implement it that way :) Questions to clear
|
Q1. The $D640 -- $D67F registers that set things like ROM protection are only visible in the Hypervisor mode. |
New branch "mem" has been created for the work. |
Breaking news: new findings how memory management works on C65, and how MEGA65 should behave as well: #378 |
So far, "ethernet I/O mode" (much like VIC-4 I/O mode but with Ethernet registers in the high 2K of I/O space) was largely ignored by Xemu. This commit tries to introduce a more-or-less correct support. Note, this alone still not enough to have working ethernet emulation again (see issue #242 for that ...).
branch |
Plus a 'shade' command to set the transparency of the matrix background.
It seems to work without too much testing yet. The bad news though: it's seems to a be a bit slower than the old one :( I expected to opposite. This also uses the baking/mapping behaviour as mentioned in #378
More optimizations and modifications: * It seems the old method is superior: using linear addresses to the actual slot backend readers/writers * Introducing optional data-pointer driven mechanism for further emulation performance * Unfinished "memory-watch" mode * Various minor modifications and/or optimizations
It seems to work, currently in the |
This quite big change rewrites the MEGA65 emulation memory decoder subsystem. Some of the reasons: * Create a new, not overcomplicated decoder which can be understood at all without major headache, and can be also faster as per #209 * Taking account some new findings about how C65 worked (both Xemu and MEGA65 was wrong here) and adopted since then by MEGA65 as per #378 * More about the future (not ready in this commit): allow functionality for debugger implementation "watchmem" which can monitor about every memory r/w events debugger want to check as per #11 This commit is quite big as was mentioned, and may introduce some regressions. So it's important to have feedback in those cases. Also it changes the behaviour of memory decoding (#378). The new decoder seems to be already faster than the old one and more easy to understand and maintain. Also there is some room for future improvements still in every areas, including optimizations. The "memwatch" part currently is not usable though, but the basis are there to be able to implement that at all (wouldn't be possible with the older scheme).
Current memory decoding inside the MEGA65 emulator is horrible. Slow, overcomplicated, almost impossible to maintain and modify, especially for outsiders, but even for myself ... Fun fact, that it was written in the hope to have a better approach in the past, but in overall, it became a "monster" and maybe even worse than the previous one :( The current plan:
Things like issue #202 (emulation of 32 bit opcodes) is hard now, because it would be extremely slow, also very complex, partly because the issues described here.
Also #29 (VIC-IV stuff) is better to do after messing up significant amount of the code base ;)[DONE]Breaking news: new findings how memory management works on C65, and how MEGA65 should behave as well: #378
The text was updated successfully, but these errors were encountered: