Backup RAM: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 16: Line 16:
|$D00000
|$D00000
|$D0000F
|$D0000F
|$F
|15
|$00
|$00
|Unused, fill with $00
|Unused, fill with $00
Line 22: Line 22:
|$D00010
|$D00010
|$D0001F
|$D0001F
|$F
|15
|"BACKUP RAM OK!Ç"
|"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
|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
Line 34: Line 34:
|$D00034
|$D00034
|$D00035
|$D00035
|$2
|2
|$00
|$00
|"Internal" credit counters for player 1 and player 2 (BCD), used by BIOS only.
|"Internal" credit counters for player 1 and player 2 (BCD), used by BIOS only.
Line 40: Line 40:
|$D0003A
|$D0003A
|$D00045
|$D00045
|$C
|12
|$01010102010101030000303B0000
|
|the init_backupram routine ($C125F4) will copy $C data from $C1F000 there.
|Cab settings.
;$D0003A: Coins needed for crediting player 1 (initialized to $01)
;$D0003B: Credits added to player 1 (initialized to $01)
;$D0003C: Coins needed for crediting player 2 (initialized to $01)
;$D0003D: Credits added to player 2 (initialized to $02)
;$D00042: Game select (1=Free, 0=Only when credited) (initialized to 0)
;$D00044: Game start compulstion (seconds in BCD) (initialized to $30)
;$D00046: Demo sound (1=Without) (initialized to 0)
|-
|-
|$D00046
|$D00046
|$D00046
|$D00046
|$1
|1
|SOUND_STOP
|SOUND_STOP
|No sound at all if non-zero
|No sound at all if non-zero
Line 52: Line 59:
|$D00047
|$D00047
|$D00047
|$D00047
|$1
|1
|SLOT NUMBER
|SLOT NUMBER
|Number of detected slots (2 for slot1)
|Number of detected slots (2 for slot1)
Line 64: Line 71:
|$D0005A
|$D0005A
|$D0005D
|$D0005D
|$4
|4
|HHMMSSMM
|HHMMSSMM
|Current time, hour is mult by 4 (???), MM is the milliseconds.
|Current time, hour is mult by 4 (???), MM is the milliseconds.
Line 76: Line 83:
|$D00104
|$D00104
|$D00107
|$D00107
|$4
|4
|YYMMDDdd
|YYMMDDdd
|Current date
|Current date
Line 88: Line 95:
|$D0010A
|$D0010A
|$D0010D
|$D0010D
|$4
|4
|
|
|Detailed game start book address
|Detailed game start book address
Line 94: Line 101:
|$D0010E
|$D0010E
|$D00111
|$D00111
|$4
|4
|
|
|Total game start book address
|Total game start book address
Line 100: Line 107:
|$D00112
|$D00112
|$D00115
|$D00115
|$4
|4
|
|
|Detailed cabinet coin book address (sub 0x240 for the start book one)
|Detailed cabinet coin book address (sub 0x240 for the start book one)
Line 106: Line 113:
|$D00116
|$D00116
|$D00119
|$D00119
|$4
|4
|
|
|Current month cabinet coin book address (sub 0xC for the start book one)
|Current month cabinet coin book address (sub 0xC for the start book one)
Line 118: Line 125:
|$D00122
|$D00122
|$D00123
|$D00123
|$2
|2
|$23
|$23
|The init_backupram routine write $23 there, purpose unknown.
|The init_backupram routine write $23 there, purpose unknown.
Line 124: Line 131:
|$D00124
|$D00124
|$D00127
|$D00127
|$4
|4
|Slot-1 [[NGH number]] and game name ID (see below)
|Slot-1 [[NGH number]] and game name ID (see below)
|If not present $0000 as NGH and $FFFF as game name ID
|If not present $0000 as NGH and $FFFF as game name ID
Line 130: Line 137:
|$D00128
|$D00128
|$D0012B
|$D0012B
|$4
|4
|Slot-2 [[NGH number]] and game name ID (see below)
|Slot-2 [[NGH number]] and game name ID (see below)
|If not present $0000 as NGH and $FFFF as game name ID.
|If not present $0000 as NGH and $FFFF as game name ID.
Line 137: Line 144:
|$D0012C
|$D0012C
|$D0012F
|$D0012F
|$4
|4
|Slot-3 [[NGH number]] and game name ID (see below)
|Slot-3 [[NGH number]] and game name ID (see below)
|If not present $0000 as NGH and $FFFF as game name ID
|If not present $0000 as NGH and $FFFF as game name ID
Line 143: Line 150:
|$D00130
|$D00130
|$D00133
|$D00133
|$4
|4
|Slot-4 [[NGH number]] and game name ID (see below)
|Slot-4 [[NGH number]] and game name ID (see below)
|If not present $0000 as NGH and $FFFF as game name ID
|If not present $0000 as NGH and $FFFF as game name ID
Line 149: Line 156:
|$D00134
|$D00134
|$D00137
|$D00137
|$4
|4
|Slot-5 [[NGH number]] and game name ID (see below)
|Slot-5 [[NGH number]] and game name ID (see below)
|If not present $0000 as NGH and $FFFF as game name ID
|If not present $0000 as NGH and $FFFF as game name ID
Line 155: Line 162:
|$D00138
|$D00138
|$D0013B
|$D0013B
|$4
|4
|Slot-6 [[NGH number]] and game name ID (see below)
|Slot-6 [[NGH number]] and game name ID (see below)
|If not present $0000 as NGH and $FFFF as game name ID
|If not present $0000 as NGH and $FFFF as game name ID
Line 161: Line 168:
|$D0013C
|$D0013C
|$D0013F
|$D0013F
|$4
|4
|Slot-7 [[NGH number]] and game name ID (see below)
|Slot-7 [[NGH number]] and game name ID (see below)
|If not present $0000 as NGH and $FFFF as game name ID
|If not present $0000 as NGH and $FFFF as game name ID
Line 167: Line 174:
|$D00140
|$D00140
|$D00143
|$D00143
|$4
|4
|Slot-8 [[NGH number]] and game name ID (see below)
|Slot-8 [[NGH number]] and game name ID (see below)
|If not present $0000 as NGH and $FFFF as game name ID
|If not present $0000 as NGH and $FFFF as game name ID
Line 173: Line 180:
|$D00144
|$D00144
|$D00147
|$D00147
|$4
|4
|YYMMDDdd
|YYMMDDdd
|Slot-1 book creation time YEAR-MONTH-DAY-day number
|Slot-1 book creation time YEAR-MONTH-DAY-day number
Line 179: Line 186:
|$D00148
|$D00148
|$D0014B
|$D0014B
|$4
|4
|YYMMDDdd
|YYMMDDdd
|Slot-2 book creation time YEAR-MONTH-DAY-day number
|Slot-2 book creation time YEAR-MONTH-DAY-day number
Line 191: Line 198:
|$D00150
|$D00150
|$D00153
|$D00153
|$4
|4
|YYMMDDdd
|YYMMDDdd
|Slot-4 book creation time YEAR-MONTH-DAY-day number
|Slot-4 book creation time YEAR-MONTH-DAY-day number
Line 197: Line 204:
|$D00154
|$D00154
|$D00157
|$D00157
|$4
|4
|YYMMDDdd
|YYMMDDdd
|Slot-5 book creation time YEAR-MONTH-DAY-day number
|Slot-5 book creation time YEAR-MONTH-DAY-day number
Line 203: Line 210:
|$D00158
|$D00158
|$D0015B
|$D0015B
|$4
|4
|YYMMDDdd
|YYMMDDdd
|Slot-6 book creation time YEAR-MONTH-DAY-day number
|Slot-6 book creation time YEAR-MONTH-DAY-day number
Line 209: Line 216:
|$D0015C
|$D0015C
|$D0015F
|$D0015F
|$4
|4
|YYMMDDdd
|YYMMDDdd
|Slot-7 book creation time YEAR-MONTH-DAY-day number
|Slot-7 book creation time YEAR-MONTH-DAY-day number
Line 215: Line 222:
|$D00160
|$D00160
|$D00163
|$D00163
|$4
|4
|YYMMDDdd
|YYMMDDdd
|Slot-8 book creation time YEAR-MONTH-DAY-day number
|Slot-8 book creation time YEAR-MONTH-DAY-day number
Line 221: Line 228:
|$D001A4
|$D001A4
|$D002A7
|$D002A7
|$4
|4
|
|
|Current month game start book
|Current month game start book
Line 227: Line 234:
|$D001A8
|$D001A8
|$D002AB
|$D002AB
|$4
|4
|
|
|?
|?
Line 233: Line 240:
|$D002A0
|$D002A0
|$D002AF
|$D002AF
|$F
|15
|
|
|Game Name 0
|Game Name 0
Line 239: Line 246:
|$D002B0
|$D002B0
|$D002BF
|$D002BF
|$F
|15
|
|
|Game Name 1
|Game Name 1
Line 245: Line 252:
|$D002C0
|$D002C0
|$D002CF
|$D002CF
|$F
|15
|
|
|Game Name 2
|Game Name 2
Line 251: Line 258:
|$D002D0
|$D002D0
|$D002DF
|$D002DF
|$F
|15
|
|
|Game Name 3
|Game Name 3
Line 257: Line 264:
|$D002E0
|$D002E0
|$D002EF
|$D002EF
|$F
|15
|
|
|Game Name 4
|Game Name 4
Line 263: Line 270:
|$D002F0
|$D002F0
|$D002FF
|$D002FF
|$F
|15
|
|
|Game Name 5
|Game Name 5
Line 269: Line 276:
|$D00300
|$D00300
|$D0030F
|$D0030F
|$F
|15
|
|
|Game Name 6
|Game Name 6
Line 275: Line 282:
|$D00310
|$D00310
|$D0031F
|$D0031F
|$F
|15
|
|
|Game Name 7
|Game Name 7

Revision as of 19:28, 8 October 2011

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 15 $00 Unused, fill with $00
$D00010 $D0001F 15 "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 $D00021 2 Coin deposit related (rising edge finding ?)
$D00034 $D00035 2 $00 "Internal" credit counters for player 1 and player 2 (BCD), used by BIOS only.
$D0003A $D00045 12 Cab settings.
$D0003A
Coins needed for crediting player 1 (initialized to $01)
$D0003B
Credits added to player 1 (initialized to $01)
$D0003C
Coins needed for crediting player 2 (initialized to $01)
$D0003D
Credits added to player 2 (initialized to $02)
$D00042
Game select (1=Free, 0=Only when credited) (initialized to 0)
$D00044
Game start compulstion (seconds in BCD) (initialized to $30)
$D00046
Demo sound (1=Without) (initialized to 0)
$D00046 $D00046 1 SOUND_STOP No sound at all if non-zero
$D00047 $D00047 1 SLOT NUMBER Number of detected slots (2 for slot1)
$D00048 $D00059 ?
$D0005A $D0005D 4 HHMMSSMM Current time, hour is mult by 4 (???), MM is the milliseconds.
$D0005E $D00103 ?
$D00104 $D00107 4 YYMMDDdd Current date
$D00108 $D00109 ?
$D0010A $D0010D 4 Detailed game start book address
$D0010E $D00111 4 Total game start book address
$D00112 $D00115 4 Detailed cabinet coin book address (sub 0x240 for the start book one)
$D00116 $D00119 4 Current month cabinet coin book address (sub 0xC for the start book one)
$D0011A $D00121 ?
$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
$D001A4 $D002A7 4 Current month game start book
$D001A8 $D002AB 4 ?
$D002A0 $D002AF 15 Game Name 0
$D002B0 $D002BF 15 Game Name 1
$D002C0 $D002CF 15 Game Name 2
$D002D0 $D002DF 15 Game Name 3
$D002E0 $D002EF 15 Game Name 4
$D002F0 $D002FF 15 Game Name 5
$D00300 $D0030F 15 Game Name 6
$D00310 $D0031F 15 Game Name 7
$D00320 $D0131F $1000 Game 1 data
$D01320 $D0231F $1000 Game 2 data
$D02320 $D0331F $1000 Game 3 data
$D03320 $D0431F $1000 Game 4 data
$D04320 $D0531F $1000 Game 5 data
$D05320 $D0631F $1000 Game 6 data
$D06320 $D0731F $1000 Game 7 data
$D07320 $D0831F $1000 Game 8 data