BIOS RAM locations: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
==Game Related==
{| class="regdef"
{| class="regdef"
| '''Address'''
| '''Address'''
Line 6: Line 8:
| '''Description'''
| '''Description'''
|-
|-
|$10FCEE
|$10FD84~$10FD93
|?
|BIOS_GAME_DIP
|16 bytes
|BIOS
|[[Software DIPs]] values
|-
|$10FDAE
|BIOS_USER_REQUEST
|byte
|byte
|GAME
|BIOS
|Z80/M ROM check pass
|Request for the [[USER subroutine]]. 0:Init, 1:Boot animation, 2:Demo, 3:Title
|-
|-
|$10FCEF
|$10FDAF
|BIOS_SLOTCHECK
|BIOS_USER_MODE
|byte
|byte
|BIOS
|Game
|[[Slot check]] passed if non-zero
|Used by the game to tell what it's doing: 0:Init/Boot animation, 1:Title/Demo, 2:Game
Game selection can only be done on MVS systems when this byte is < 2
|-
|$10FDB0
|BIOS_CREDIT_DEC
|4 bytes
|Game
|Credit decrement value for each player when calling [[CREDIT DOWN]].
|-
|-
|$10FD00~10FD1F
|$10FDB4
|GAME_LIST
|BIOS_START_FLAG
|32 bytes
|byte
|BIOS
|BIOS
|Game list (NGHID.w $XXXX)
|Used when calling the [[PLAYER START subroutine]]. Last 4 bits correspond to the player who pushed start.
|-
|-
|$10FD00~10FD1F
|$10FDB6
|GAME_LIST_DATE
|BIOS_PLAYER_MOD
|32 bytes
|4 bytes
|BIOS
|Game
|Game list date creation (YYMMDDdd)
|Sets player status. 0:Never played, 1:Playing, 2:Continue option being displayed, 3:Game over
|}
 
 
==System Related==
 
{| class="regdef"
| '''Address'''
| '''DEF name'''
| '''Size'''
| '''Set by'''
| '''Description'''
|-
|-
|$10FD80
|$10FD80
Line 48: Line 74:
|0:Japan, 1:USA, 2:Europe
|0:Japan, 1:USA, 2:Europe
|-
|-
|$10FD84~$10FD93
|$10FE80
|BIOS_GAME_DIP
|BIOS_DEVMODE
|16 bytes
|byte
|BIOS
|BIOS/GAME
|[[Software DIPs]] values
|0 : Normal mode, 1 : Developer mode
|}
 
 
==Joypad Related==
 
{| class="regdef"
| '''Address'''
| '''DEF name'''
| '''Size'''
| '''Set by'''
| '''Description'''
|-
|-
|$10FD94
|$10FD94
Line 119: Line 156:
|BIOS
|BIOS
|Select P4, Start P4, Select P3, Start P3, Select P2, Start P2, Select P1, Start P1 (positive logic)
|Select P4, Start P4, Select P3, Start P3, Select P2, Start P2, Select P1, Start P1 (positive logic)
|-
|}
|$10FDAE
 
|BIOS_USER_REQUEST
 
|byte
==Memory Card Related==
|BIOS
 
|Request for the [[USER subroutine]]. 0:Init, 1:Boot animation, 2:Demo, 3:Title
See [[CARD]] for more explanation on those variables.
|-
 
|$10FDAF
{| class="regdef"
|BIOS_USER_MODE
| '''Address'''
|byte
| '''DEF name'''
|Game
| '''Size'''
|Used by the game to tell what it's doing: 0:Init/Boot animation, 1:Title/Demo, 2:Game
| '''Set by'''
Game selection can only be done on MVS systems when this byte is < 2
| '''Description'''
|-
|$10FDB0
|BIOS_CREDIT_DEC
|4 bytes
|Game
|Credit decrement value for each player when calling [[CREDIT DOWN]].
|-
|$10FDB4
|BIOS_START_FLAG
|byte
|BIOS
|Used when calling the [[PLAYER START subroutine]]. Last 4 bits correspond to the player who pushed start.
|-
|$10FDB6
|BIOS_PLAYER_MOD
|4 bytes
|Game
|Sets player status. 0:Never played, 1:Playing, 2:Continue option being displayed, 3:Game over
|-
|$10FDBE
|BIOS_MESS_POINT
|longword
|Game
|[[MESS_OUT]] buffer pointer
|-
|$10FDC2
|BIOS_MESS_BUSY
|byte
|Game
|0:Allow MESS_OUT, 1:Skip MESS_OUT
|-
|-
|$10FDC4
|$10FDC4
Line 167: Line 174:
|byte
|byte
|BIOS or Game
|BIOS or Game
|Command to execute, see [[CARD]]
|Command to execute,
|-
|-
|$10FDC6
|$10FDC6
Line 173: Line 180:
|byte
|byte
|BIOS
|BIOS
|Answer code for the command, see [[CARD]]
|Answer code for the command
|-
|-
|$10FDC8
|$10FDC8
Line 179: Line 186:
|longword
|longword
|BIOS or Game
|BIOS or Game
|Pointer to data, see [[CARD]]
|Pointer to data
|-
|-
|$10FDCC
|$10FDCC
Line 185: Line 192:
|word
|word
|BIOS or Game
|BIOS or Game
|Size of data, see [[CARD]]
|Size of data
|-
|-
|$10FDCE
|$10FDCE
Line 191: Line 198:
|word
|word
|BIOS or Game
|BIOS or Game
|Game NGH number, see [[CARD]]
|Game NGH number
|-
|-
|$10FDD0
|$10FDD0
Line 197: Line 204:
|byte or word
|byte or word
|BIOS or Game
|BIOS or Game
|Game Subnumber, see [[CARD]]
|Game Subnumber
|}
 
 
==MESS OUT Related==
 
See [[MESS_OUT]] to know how to use this routine.
 
{| class="regdef"
| '''Address'''
| '''DEF name'''
| '''Size'''
| '''Set by'''
| '''Description'''
|-
|$10FDBE
|BIOS_MESS_POINT
|longword
|Game
|buffer pointer
|-
|$10FDC2
|BIOS_MESS_BUSY
|byte
|Game
|0:Allow MESS_OUT, 1:Skip MESS_OUT
|}
 
 
==Calendar Related==
 
Those value are updated when [[READ_CALENDAR]] is called
 
{| class="regdef"
| '''Address'''
| '''DEF name'''
| '''Size'''
| '''Set by'''
| '''Description'''
|-
|-
|$10FDD2
|$10FDD2
|BIOS_STARTUP_DATE
|BIOS_YEAR
|8 byte
|byte
|BIOS
|BIOS
|YYMMDDdd HHMMSSss
|Current year
|-
|$10FDD3
|BIOS_MONTH
|byte
|BIOS
|Current month
|-
|$10FDD4
|BIOS_DAY
|byte
|BIOS
|Current day
|-
|$10FDD5
|BIOS_WEEKDAY
|byte
|BIOS
|Current weekday (Sunday = 00, Monday = 01 ... Saturday = 06)
|-
|$10FDD6
|BIOS_HOUR
|byte
|BIOS
|Current hour (24h format)
|-
|$10FDD7
|BIOS_MINUTE
|byte
|BIOS
|Current minute
|-
|$10FDD8
|BIOS_SECOND
|byte
|BIOS
|Current minute
|}
 
 
==Other==
 
{| class="regdef"
| '''Address'''
| '''DEF name'''
| '''Size'''
| '''Set by'''
| '''Description'''
|-
|$10FCEE
|?
|byte
|GAME
|Z80/M ROM check pass
|-
|$10FCEF
|BIOS_SLOTCHECK
|byte
|BIOS
|[[Slot check]] passed if non-zero
|-
|$10FD00~10FD1F
|GAME_LIST
|32 bytes
|BIOS
|Game list (NGHID.w $XXXX)
|-
|$10FD00~10FD1F
|GAME_LIST_DATE
|32 bytes
|BIOS
|Game list date creation (YYMMDDdd)
|-
|-
|$10FE88
|$10FE88
Line 225: Line 341:


<pre>
<pre>
; Calendar, only on MVS (in BCD)
*BIOS_YEAR      equ $10FDD2 ;last 2 digits of year
*BIOS_MONTH      equ $10FDD3
*BIOS_DAY        equ $10FDD4
*BIOS_WEEKDAY    equ $10FDD5 ;Sunday = 00, Monday = 01 ... Saturday = 06
*BIOS_HOUR      equ $10FDD6 ;24 hour time
*BIOS_MINUTE    equ $10FDD7
*BIOS_SECOND    equ $10FDD8
*BIOS_SELECT_TIMER equ $10FDDA ;Byte: game start countdown
*BIOS_SELECT_TIMER equ $10FDDA ;Byte: game start countdown
*BIOS_DEVMODE      equ $10FE80 ;Byte: non-zero for developer mode


; Upload to DRAM
; Upload to DRAM

Revision as of 05:53, 20 October 2012

Game Related

Address DEF name Size Set by Description
$10FD84~$10FD93 BIOS_GAME_DIP 16 bytes BIOS Software DIPs values
$10FDAE BIOS_USER_REQUEST byte BIOS Request for the USER subroutine. 0:Init, 1:Boot animation, 2:Demo, 3:Title
$10FDAF BIOS_USER_MODE byte Game Used by the game to tell what it's doing: 0:Init/Boot animation, 1:Title/Demo, 2:Game

Game selection can only be done on MVS systems when this byte is < 2

$10FDB0 BIOS_CREDIT_DEC 4 bytes Game Credit decrement value for each player when calling CREDIT DOWN.
$10FDB4 BIOS_START_FLAG byte BIOS Used when calling the PLAYER START subroutine. Last 4 bits correspond to the player who pushed start.
$10FDB6 BIOS_PLAYER_MOD 4 bytes Game Sets player status. 0:Never played, 1:Playing, 2:Continue option being displayed, 3:Game over


System Related

Address DEF name Size Set by Description
$10FD80 BIOS_SYSTEM_MODE byte BIOS 0:BIOS wants vblank (system mode), $80:ok to use vblank (game mode)
$10FD82 BIOS_MVS_FLAG byte BIOS 0:AES, 1:MVS
$10FD83 BIOS_COUNTRY_CODE byte BIOS 0:Japan, 1:USA, 2:Europe
$10FE80 BIOS_DEVMODE byte BIOS/GAME 0 : Normal mode, 1 : Developer mode


Joypad Related

Address DEF name Size Set by Description
$10FD94 BIOS_P1STATUS byte BIOS 0:No connection, 1:Normal joypad, 2:Expanded joypad, 3:Mahjong controller, 4:Keyboard
$10FD95 BIOS_P1PREVIOUS byte BIOS Previous frame DCBA Right Left Bottom Top (positive logic)
$10FD96 BIOS_P1CURRENT byte BIOS Current frame DCBA Right Left Bottom Top (positive logic)
$10FD97 BIOS_P1CHANGE byte BIOS Active edge DCBA Right Left Bottom Top (positive logic)
$10FD98 BIOS_P1REPEAT byte BIOS Active edge + repeat every 8 frames after 16 frames. DCBA Right Left Bottom Top (positive logic)
$10FD99 BIOS_P1TIMER byte BIOS Countdown ?
$10FD9A~$10FD9F Same for P2 5 bytes BIOS See above
$10FDA0~$10FDA6 Same for P3 5 bytes BIOS See above
$10FDA7~$10FDAB Same for P4 5 bytes BIOS See above
$10FDAC BIOS_STATCURNT byte BIOS Select P4, Start P4, Select P3, Start P3, Select P2, Start P2, Select P1, Start P1 (positive logic)
$10FDAD BIOS_STATCHANGE byte BIOS Select P4, Start P4, Select P3, Start P3, Select P2, Start P2, Select P1, Start P1 (positive logic)


Memory Card Related

See CARD for more explanation on those variables.

Address DEF name Size Set by Description
$10FDC4 BIOS_CARD_COMMAND byte BIOS or Game Command to execute,
$10FDC6 BIOS_CARD_ANSWER byte BIOS Answer code for the command
$10FDC8 BIOS_CARD_START longword BIOS or Game Pointer to data
$10FDCC BIOS_CARD_SIZE word BIOS or Game Size of data
$10FDCE BIOS_CARD_FCB word BIOS or Game Game NGH number
$10FDD0 BIOS_CARD_SUB byte or word BIOS or Game Game Subnumber


MESS OUT Related

See MESS_OUT to know how to use this routine.

Address DEF name Size Set by Description
$10FDBE BIOS_MESS_POINT longword Game buffer pointer
$10FDC2 BIOS_MESS_BUSY byte Game 0:Allow MESS_OUT, 1:Skip MESS_OUT


Calendar Related

Those value are updated when READ_CALENDAR is called

Address DEF name Size Set by Description
$10FDD2 BIOS_YEAR byte BIOS Current year
$10FDD3 BIOS_MONTH byte BIOS Current month
$10FDD4 BIOS_DAY byte BIOS Current day
$10FDD5 BIOS_WEEKDAY byte BIOS Current weekday (Sunday = 00, Monday = 01 ... Saturday = 06)
$10FDD6 BIOS_HOUR byte BIOS Current hour (24h format)
$10FDD7 BIOS_MINUTE byte BIOS Current minute
$10FDD8 BIOS_SECOND byte BIOS Current minute


Other

Address DEF name Size Set by Description
$10FCEE ? byte GAME Z80/M ROM check pass
$10FCEF BIOS_SLOTCHECK byte BIOS Slot check passed if non-zero
$10FD00~10FD1F GAME_LIST 32 bytes BIOS Game list (NGHID.w $XXXX)
$10FD00~10FD1F GAME_LIST_DATE 32 bytes BIOS Game list date creation (YYMMDDdd)
$10FE88 longword BIOS Frame counter, updated by SYSTEM_IO
$10FEE4 byte BIOS Frame counter (internal)
$10FEBF BIOS_BRAM_USED byte BIOS 0 : BRAM not currently used, 1 : Currently used
*BIOS_SELECT_TIMER equ $10FDDA ;Byte: game start countdown

; Upload to DRAM
*BIOS_UPDEST     equ $10FEF4 ;longword: destination address (!)
*BIOS_UPSRC      equ $10FEF8 ;longword: source address
*BIOS_UPSIZE     equ $10FEFC ;longword: size
*BIOS_UPZONE     equ $10FEDA ;byte: zone (0=PRG, 1=FIX, 2=SPR, 3=Z80, 4=PCM, 5=PAT)
*BIOS_UPBANK     equ $10FEDB ;byte: bank