USER subroutine: Difference between revisions
mNo edit summary |
m (→Command 0) |
||
Line 9: | Line 9: | ||
Viewpoint, which has its game save pointer set to $100000 (header $10E) and game save size set to $0200 (header $112) does this: | Viewpoint, which has its game save pointer set to $100000 (header $10E) and game save size set to $0200 (header $112) does this: | ||
< | <syntaxhighlight> | ||
move.b #$00,BIOS_USER_MODE | move.b #$00,BIOS_USER_MODE | ||
lea $100000,a0 ;Start of game save block | lea $100000,a0 ;Start of game save block | ||
Line 23: | Line 23: | ||
... | ... | ||
jmp BIOSF_SYSTEM_RETURN | jmp BIOSF_SYSTEM_RETURN | ||
</ | </syntaxhighlight> | ||
==Command 1== | ==Command 1== |
Revision as of 13:47, 14 March 2012
The USER subroutine (not called, always jumped to by the BIOS) needs to perform actions according to the command value set in USER_REQUEST ($10FDAE.b).
Command 0
Initilization of the soft/debug DIPs in the 68k user RAM. Used only once, when the game is started for the first time on a MVS system (probably when the BIOS doesn't find the game's NGH number in the backup RAM).
(The DIPs settings in RAM should then be copied to backup RAM by calling what function ?)
Initilization of the rest of the user RAM, the display, and I/O.
Viewpoint, which has its game save pointer set to $100000 (header $10E) and game save size set to $0200 (header $112) does this:
move.b #$00,BIOS_USER_MODE
lea $100000,a0 ;Start of game save block
move #$001F,d1 ;32*4 longword writes = 512 bytes
moveq #0,d0
.cl:
move.l d0,(a0)+
move.l d0,(a0)+
move.l d0,(a0)+
move.l d0,(a0)+
dbf d1,.cl
move.b d0,REG_WATCHDOG
...
jmp BIOSF_SYSTEM_RETURN
Command 1
Show the game's own boot logo animation (when $114 = 1).
Command 2
Show demo. Jump to SYSTEM_RETURN when finished.
Command 3
Show title. SELECT_TIMER ($10FDDA.b) is used as a count-down timer.