PLAYER START subroutine: Difference between revisions
Jump to navigation
Jump to search
m (Created page with "The PLAYER_START subroutine is called if one of the start buttons are pressed while the corresponding player has enough credits or when the time runs out while the game's title i...") |
mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The PLAYER_START subroutine is called if one of the start buttons are pressed while the corresponding player has enough credits or when the time runs out while the game's title is displayed. | The PLAYER_START subroutine is called by the [[System ROM]] if one of the start buttons are pressed while the corresponding player has enough credits or when the time runs out while the game's title screen is being displayed. | ||
BIOS_START_FLAG ($10FDB4.b) indicates which player(s) pushed start (active high): | |||
{{8BitRegister|-|4|P4|1|P3|1|P2|1|P1|1|}} | |||
This subroutine needs to leave these bits to "1" if the game can be started, or clear them if not. | This subroutine needs to leave these bits to "1" if the game can be started, or clear them if not. | ||
When the game is started, it has to set to "1" the corresponding | When the game is started, it has to set to "1" (playing status) the corresponding PLAYER_MODE byte for each player: | ||
*10FDB6.b for P1 | *10FDB6.b for P1 | ||
Line 12: | Line 13: | ||
*10FDB8.b for P3 | *10FDB8.b for P3 | ||
*10FDB9.b for P4 | *10FDB9.b for P4 | ||
After returning, the System ROM deducts credits according to BIOS_START_FLAG. | |||
[[Category:Code]] | [[Category:Code]] |
Latest revision as of 19:04, 14 May 2017
The PLAYER_START subroutine is called by the System ROM if one of the start buttons are pressed while the corresponding player has enough credits or when the time runs out while the game's title screen is being displayed.
BIOS_START_FLAG ($10FDB4.b) indicates which player(s) pushed start (active high):
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Def | - | P4 | P3 | P2 | P1 |
This subroutine needs to leave these bits to "1" if the game can be started, or clear them if not.
When the game is started, it has to set to "1" (playing status) the corresponding PLAYER_MODE byte for each player:
- 10FDB6.b for P1
- 10FDB7.b for P2
- 10FDB8.b for P3
- 10FDB9.b for P4
After returning, the System ROM deducts credits according to BIOS_START_FLAG.