Hi.....
This rom expansion isn't working. I expanded the rom from 2MB to 4MB, inserting 0xFF at the end of the file.
The game starts ok and I can see the intro, but before the gameplay starts the game freezes.
I'm using Regen, and when the game freezes the debugger windows appears, and I can see that the A0 and A1 registers has values CEA24EFA and CEA24EF9 (something wrong right?).
When I run the 2MB version, at the same place the values are BDBF7 and BDBF9.
The only difference between the two roms are the 0xFFs at the end.
I tried to change the header, changing the Rom End Address from 0x1FFFFF to 0x3FFFFF but it's the same.
Someone knows why is this happening?
Thanks
November 20, 2012, 12:15:49 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I changed the 0xFFs to 0x00s and the game worked (no more that crazy values at A0 and A1). But after adding some code after 0x200000 some strange stuff happened, like some strange Save Game appering, and others anomalies.
I did some debugging and I saw that in some points there are a lot of reads to addresses higher than 0x200000, but the original rom only goes to 0x1FFFFF.
Searching the Genesis memory map I found this:
Start address End address Description
$000000 $01FFFF MegaCD BIOS ROM
$020000 $03FFFF MegaCD "Program RAM" Bank Access
$200000 $23FFFF MegaCD "WORD RAM"
$A12000 $A120XX MegaCD "Gate Array"
$FFFD00 $FFFDFF MegaCD Interrupt/Exception vectors
(more details in
http://en.wikibooks.org/wiki/Genesis_Programming)
So addresses 200000 to 23FFFF are this MegaCD "WORD RAM". Debugging the game I saw that there is no read from 240000 to 3FFFFF.
The reads stays between 200000 and 23FFFF, so the game seems to use this MegaCD "WORD RAM".
I put my code after 240000 and now everything is working fine (I hope).
Someone knows why this MegaCD "WORD RAM" are being used?
November 20, 2012, 01:21:19 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Reading the page
http://cgfm2.emuviews.com/txt/gen-hw.txtwe can see that Phantasy Star 4 has a similar behaviour. Some games seems to map Ram inside Rom space. Phantasy Star 4 also uses addresses from 200000 to 23FFFF.
I'm not sure if this is relate to MegaCD "WORD RAM" anymore.