I found Blargg's cpu test roms on the "Emulator Tests" page of the wiki - the test are at: http://blargg.8bitalley.com/parodius/ne ... est-v3.zip
I thought these would be perfect for testing my cpu core. I ran into a strange problem, was wondering if anyone could explain it to me. I started with the "official_only.nes" file, but quit on that because it uses mapper #1 (SxROM), buy my emulator is very new and only handles NROM. So I moved on to the individual tests, and started with "01-implied.nes" which is in fact NROM. This was great, I found several bugs, but eventually I got segfaults in my emulator when the ROM accessed memory address $6000. This is the Save RAM area. Based on the iNES specification in the wiki, bit 4 of flags_10 in the iNES header determines if there is any RAM located at address $6000. This ROM has the value of 0 in flags_10 - so no RAM. I therefore didn't allocate any, and when the rom went to read it I got a segfault.
My question is: Should this ROM have bit 4 in flags_10 set? Am I misinterpreting? I looked at older iNES specifications (before flags_10 existed) and it sort of implied that bit 1 of flags_6 was used to indicate the existence of SRAM - the ROM in question has this set to 0 as well though.
I already know that:
- my emulator should support SxROM
- my emulator should not crash if a ROM claims to not have SRAM, yet writes to it anyway
I thought these would be perfect for testing my cpu core. I ran into a strange problem, was wondering if anyone could explain it to me. I started with the "official_only.nes" file, but quit on that because it uses mapper #1 (SxROM), buy my emulator is very new and only handles NROM. So I moved on to the individual tests, and started with "01-implied.nes" which is in fact NROM. This was great, I found several bugs, but eventually I got segfaults in my emulator when the ROM accessed memory address $6000. This is the Save RAM area. Based on the iNES specification in the wiki, bit 4 of flags_10 in the iNES header determines if there is any RAM located at address $6000. This ROM has the value of 0 in flags_10 - so no RAM. I therefore didn't allocate any, and when the rom went to read it I got a segfault.
My question is: Should this ROM have bit 4 in flags_10 set? Am I misinterpreting? I looked at older iNES specifications (before flags_10 existed) and it sort of implied that bit 1 of flags_6 was used to indicate the existence of SRAM - the ROM in question has this set to 0 as well though.
I already know that:
- my emulator should support SxROM
- my emulator should not crash if a ROM claims to not have SRAM, yet writes to it anyway