-
Notifications
You must be signed in to change notification settings - Fork 114
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
ROM "corruption" in emulator? (3E+ with PlusROM) #1058
Comments
There are numbers problems in the debugger when it comes to bank switching. Most likely you have found another one. Which ROM were you using? |
This is a new (and very broken in its own right) ROM I'm working-on, I will try to reduce it to a minimum viable test case today and upload it here, if you'd like. Thank you! |
That would be very helpful. |
3Eplus-ROM-with-RESVEC-wrong.a26.gz I had to GZip to appease GitHub … This ROM should, in its current form, start up, send a 4-byte "HELO" ping to the PlusROM server at http://delving.interworldly.com/plus and then show "all the colors" flashing with two black bars (PF2) The correct reset vector is $ff00, and if I enter with I've intentionally used the expanded RAM for the background color counter, so this test should be doing very many of the things that a real game would do. |
@brpocock Today I did some analysis on the problem Stella has with Delving. After a lot of debugging I noticed that the last This causes an unforeseen situation, where the code assumes extended RAM (e.g. SuperChip) and peeks to RAM for $1fc0..$1fff. This address range contains the startup vector, which now becomes random. The game will not work and the debugger will show the random garbage you noticed. After finding the bug, the fix was dead simple. 😄 |
When I open my ROM image, which is a 32kiB 3E+ file, in Stella, I see the following "garbage" data at the end of the ROM.
However, the actual ROM file ends like so:
ROM bank 0 ($0000 - $03ff file-relative offsets)
ROM bank $1f ($7800-$7fff file-relative offsets)
The relevant CPU vectors are in the ROM file at both offsets, to be paranoid, but Stella does report that $fc00 = bank 0, so the ones at $03f0 (file) should be at $1ff0 = $fff0 (mapped)
I am a bit mystified by the way the 3E+ bank switchers display in the Cartridge 3E+ widget — in particular, the allegation that $fe00 is mapped to $0400 (file-relative, I presume?) which doesn't make much sense to me — nor does it appear to be true.
If I command bank 0 to map into another segment in ROM (e.g. here it's at $f400) I see the correct bytes at what I can only assume are $f7f0 or so:
The last few bytes beginning at $03f0 & $7ff0 (binary-relative) mapping into $1ff0 = $fff0 seem to have been replaced by … something. I've searched the binary itself and there's no occurrence of the sequence anywhere in the file, so it's not just copying or remapping from elsewhere in the ROM image. In fact — not only does that byte sequence not exist in the ROM, but there are actually no occurrences of the bytes $be nor $27 in the entire file.
I'd be grateful for any assistance.
The text was updated successfully, but these errors were encountered: