Home | Forums | What's new | Resources | |
Any gotchas with save game RAM? |
slobu - Aug 31, 2011 |
ExCyber | Aug 31, 2011 | |||
Are you talking about designing your own cartridge, or using an existing one (or emulators/copiers)? |
Chilly Willy | Sep 1, 2011 | |||||||
If you use the Tototek carts, you have four banks of 32KB of sram accessed on odd bytes from 0x200001 to 0x20FFFF. If your game is 2MB or smaller, enable the sram in the cart init code and just read/write the sram without worry. If you cart is over 2MB, then you need to disable ints, enable the sram, read/write the byte(s), disable the sram, and finally enable ints. Remember that words and longs maybe be read/written to sram using the movep.w movep.l opcodes on the 68000. Bytes just use the regular move.b instructions. enable sram (write-enabled)
Code:
disable sram
Code:
|