To call the firmware through these vectors, use an NOT1 EXT,0 instruction
immediately followed by a JMPF to the entry vector. This will switch in the
firmware and continue execution at the correct location. When the firmware
is done, execution will resume at the indicated exit address.
Input/output variables are located in RAM bank 1.
This call writes 128 bytes of data into the FLASH ROM at a specified
location. B, C, TRH, TRL, XBNK and memory location 0 are scratched.
Input variables:
- 07C
- Finalize flag. 1 = wait indefinitely for last byte to stabilize
- 07D-07F
- Start address (24 bits big endian) (must be divisible by $80)
- 080-0FF
- Data to write
Output variables:
- ACC
- 0 = write ok, $FF = illegal write (only allowed to write inside mini-game file)
Exit address: 105
This call verifies 128 bytes of data in the FLASH ROM at a specified
location. TRH, TRL and memory location 0 are scratched.
Input variables:
- 07D-07F
- Start address (24 bits big endian) (must be divisible by $80)
- 080-0FF
- Data to verify
Output variables:
- ACC
- 0 = verify ok, not 0 = verify failed
Exit address: 115
This call reads 128 bytes of data from the FLASH ROM at a specified
location. ACC, TRH, TRL and memory location 0 are scratched.
Input variables:
- 07D-07F
- Start address (24 bits big endian) (must be divisible by $80)
Output variables:
- 080-0FF
- Data read
Exit address: 125
This call should be made whenever a Timer 1 interrupt (vector 001B)
occurs. It updates the system date/time, and performs other housekeeping
duties.
Exit address: 139
This call exits game mode (and proceeds to clock mode). It should be
made when the user presses the MODE button, or when the least significant
bit of P7 is high. This call never returns.
Note that these variables are located in RAM bank 0.
Address | Description |
010-015 |
Buffer used by clock mode to convert current date and time to BCD (Binary Coded Decimal) |
017 |
Current date, year (high byte) |
018 |
Current date, year (low byte) |
019 |
Current date, month |
01A |
Current date, day |
01B |
Current time, hour |
01C |
Current time, minute |
01D |
Current time, second |
01E |
Current time, halfsecond (0 or 1) |
01F |
Current time, leapyear (odd = leapyear, even = not leapyear) |
031 |
Clock initialized flag. $FF means date set, $00 means date not set. |
050 |
Current date, year divided by four (high byte) |
051 |
Current date, year divided by four (low byte) |
060 |
Cursor position, column (0-7) |
061 |
Cursor position, row (0-3) |
06D |
Last block used by mini-game |
06E |
Battery check flag. $FF = disable automatic battery check, $00 = enable automatic battery check. |
080-0FF |
Stack |
|
Dreamcast Programming by Marcus Comstedt
Last modified: Mon Mar 27 17:16:32 MEST 2000