Backup RAM

From NeoGeo Development Wiki
Jump to navigation Jump to search

The backup RAM is a battery-powered 64KiB RAM space used by MVS systems to store game scores, cab infos and income logs. Access is handled by the BIOSes.

Memory region: $D00000~$D0FFFF (Mirrored up to $DFFFFF ?).

Data structure

All offset are taken from the sp-s2.bin bios.

Start End Size Data Description
$D00000 $D0000F $F $00 Unused, fill with $00
$D00010 $D0001F $F "BACKUP RAM OK!Ç" The routine at $C125C8 will check if this string is present, if not it will test the ram (using the test_ram routine at $C13134) and re-init the backupram
$D00020 $D00039 $19 $00 Unused, fill with $00
$D00046 $D00046 $1
$D00047 $D00047 $1 SLOT NUMBER Number of detected slots (2 for slot1)
$D0003A $D00045 $C $01010102010101030000303B0000 the init_backupram routine ($C125F4) will copy $C data from $C1F000 there.
$D00104 $D0017 $4 YYMMDDdd Current date
$D00122 $D00123 $2 $23 The init_backupram routine write $23 there, purpose unknown.
$D00124 $D00127 $4 Slot-1 NGH number and game name ID (see below) If not present $0000 as NGH and $FFFF as game name ID
$D00128 $D0012B $4 Slot-2 NGH number and game name ID (see below) If not present $0000 as NGH and $FFFF as game name ID.

On a slot1 always unset (slot1 are slot2 with the second one empty)

$D0012C $D0012F $4 Slot-3 NGH number and game name ID (see below) If not present $0000 as NGH and $FFFF as game name ID
$D00130 $D00133 $4 Slot-4 NGH number and game name ID (see below) If not present $0000 as NGH and $FFFF as game name ID
$D00134 $D00137 $4 Slot-5 NGH number and game name ID (see below) If not present $0000 as NGH and $FFFF as game name ID
$D00138 $D0013B $4 Slot-6 NGH number and game name ID (see below) If not present $0000 as NGH and $FFFF as game name ID
$D0013C $D0013F $4 Slot-7 NGH number and game name ID (see below) If not present $0000 as NGH and $FFFF as game name ID
$D00140 $D00143 $4 Slot-8 NGH number and game name ID (see below) If not present $0000 as NGH and $FFFF as game name ID
$D00144 $D00147 $4 YYMMDDdd Slot-1 book creation time YEAR-MONTH-DAY-day number
$D00148 $D0014B $4 YYMMDDdd Slot-2 book creation time YEAR-MONTH-DAY-day number
$D0014C $D0014F $4 YYMMDDdd Slot-3 book creation time YEAR-MONTH-DAY-day number
$D00150 $D00153 $4 YYMMDDdd Slot-4 book creation time YEAR-MONTH-DAY-day number
$D00154 $D00157 $4 YYMMDDdd Slot-5 book creation time YEAR-MONTH-DAY-day number
$D00158 $D0015B $4 YYMMDDdd Slot-6 book creation time YEAR-MONTH-DAY-day number
$D0015C $D0015F $4 YYMMDDdd Slot-7 book creation time YEAR-MONTH-DAY-day number
$D00160 $D00163 $4 YYMMDDdd Slot-8 book creation time YEAR-MONTH-DAY-day number
$D002A0 $D002AF $F Game Name 0
$D002B0 $D002BF $F Game Name 1
$D002C0 $D002CF $F Game Name 2
$D002D0 $D002DF $F Game Name 3
$D002E0 $D002EF $F Game Name 4
$D002F0 $D002FF $F Game Name 5
$D00300 $D0030F $F Game Name 6
$D00310 $D0031F $F Game Name 7
  • $D00000~$D0000F: Nothing ($00)
  • $D00010: "BACKUP RAM OK !",$80
  • $D00020.l: ?
  • $D00021.b: btst 0,1,2,3,4
  • $D00024.l: adresse ?
  • $D00034.l: adresse ?
  • $D00038.w: ? bit 4 tst
  • $D0003A: Start of ? (13 bytes)
  • $D00042.b: tst ?
  • $D00043.b: tst ?
  • $D00044.w: ?
  • $D00046.b: SOUND_STOP, No sound at all if non-zero
  • $D00047.b: Number of detected slots
  • $D00048.l: ?
  • $D0004C.b: ? ($3B)
  • $D00058.b: First valid slot
  • $D0005E.b: Something to do with tested slot? tst
  • $D0005A.b: heure ?
  • $D00060.w: multi-slot flag
  • $D00104: year,month,day ? (3 bytes) Modify date
  • $D00108.b: Selected tested slot
  • $D00109.b: Compared with 8
  • $D0011A: Start of ?
  • $D00122.b: ? ($23)
  • $D00124: adresses ? (4 bytes * nb of slots ?)
  • $D00144: Date (Year, Month, Day, ? *8 ?) Creation date
  • $D001AC.l: $F0F0F0F0
  • $D001B0.w: $FFFF
  • $D002A0: Title of game (16 bytes *8 ?)
  • $D00320: ?