-
Notifications
You must be signed in to change notification settings - Fork 112
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
Unstable E7 mapper debuging #1017
Comments
Yes, the debugger has problems with E7, but at least for me it never crashes. Which Stella version are you using? |
I'm using 6.7.1 now after I saw the problem in an earlier version. but it is doing the same still. and when I said "crashes on boot" I mend when the debugger is set to start up when the emulator loads up the rom. |
@sa666666 Can you reproduce the problem under Linux? |
I don't get crashes in Linux. But I notice in 6.7.1 that once the display gets near the bottom and starts drawing the red control area by tracing scanlines, the disassembly doesn't show up anymore. This doesn't happen in the most recent code; it shows the disassembly for the entire frame. So something has changed in the codebase since 6.7.1, and it may fix this issue. I guess we won't know until we release, or get the reporter to test it against 7.0_pre. |
Starting in debug mode also shows weirdness in the disassembly, which is fine in the latest code. So there was definitely some new code that affected this issue. |
well. I'll gladly look into it more if the next release make it more stable where I can test things out. for at the moment it's unusable on my end with that mapper for development. |
Opening the debugger (current git) on the elite demo triggers the UBSAN trace below, although do not get any crash. Thiis seems consistent with the screenshot above:
|
All the problems described in the issue are the result of using code which was meant for 4K ROMs only (DiStella) and trying to base Stella's disassembler on it. Also Stella's disassembler was originally aimed at simple 4K banking. E7 is most different here. The whole disassembler code base is quite messed up and needs a major rewrite. The fix doesn't hurt, but it only cures another symptom. |
@DirtyHairy I have reverted your changes and tried another fix, which is closer to the original problem. Can you check this one, please? BTW: This describes all mirrors. As you can see, the RIOT mirrors are "rather complex". |
Yeah, that one works, too. I think the correct approach for the "mirrors" is not enumerating them in a switch, but to go through the address decoding sequence. |
Like I said above, this is up for a major rewrite. Volunteers welcome! 😉 |
While it's true that the disassembler is basically DiStella which was designed for 4K ROMs, it should still work. After all, the 2600 only sees 4K of address space at a time, so there's no reason why this wouldn't work. I don't think a major rewrite is in order. |
Yes and no. DiStella is not able to refer to addresses outside its current address range, because it only sees the currently disassembled bank (which can be of any size up to 4K). Therefore this information has to be provided by our own disassembler class. And there it gets complicated. |
When debugging an E7 mapper game, there's a high chance that the emulator will crash. it happens on boot, randomly when entering the debugger after boot, when banks change before entering the debugger and other cases aswell.
there's a demo program that can be tested with from Atariage, for both ntsc and pal.
the demo will run fine on the emulator as long you don't try and touch the debugger at all.
Running the emulator on Linux Mint 21.3 Virginia, Kernel: 5.15.0-94-generic x86_64 bits
The text was updated successfully, but these errors were encountered: