-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPLAYER_START.txt
52 lines (42 loc) · 2.2 KB
/
PLAYER_START.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
The PLAYER_START subroutine and You
===================================
The PLAYER_START subroutine is called by the System ROM if one of the Start
buttons is pressed while the corresponding player has enough credits or when
the time runs out while the game's title is being displayed.
(If using custom logic for starting the game, use CREDIT_CHECK and CREDIT_DOWN.
More information on this will be necessary, but I don't know it yet.)
The player who pressed Start is noted in the BIOS_START_FLAG ($10FDD2, byte):
76543210
||||||||
xxxx|||+- Player 1
||+-- Player 2
|+--- Player 3
+---- Player 4
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 bytes for each player:
$10FDB6.b for P1 (BIOS_PLAYER1_MODE)
$10FDB7.b for P2 (BIOS_PLAYER2_MODE)
$10FDB8.b for P3 (BIOS_PLAYER3_MODE)
$10FDB9.b for P4 (BIOS_PLAYER4_MODE)
The values in BIOS_START_FLAG are dependent on the BIOS_COUNTRY_CODE ($10FD83):
| START_FLAG Lower 4 bits
BIOS_COUNTRY_CODE | P1 Start | P2 Start
------------------+----------+-------------
0 (Japan) | 0001 | 0011
1 (USA) | 0001 | 0010
2 (Europe) | 0001 | 0011
Japanese and European cabinets will join both players if P2 Start is pressed.
US cabinets will only join Player 2.
In a situation where joining mid-game isn't possible (e.g. a vs. sports title),
a machine running in USA mode requires a way to select the number of players.
After returning, the System ROM deducts credits according to BIOS_START_FLAG.
SNK docs:
"When the game is in progress, an extension of play time or the addition of lives
is available at the player's option, and participation from the middle of play
should be available. If these options are not possible, or if it is a game like
Mah-Jong, which allows only one player to play, return after changing the
applicable bit to '0'.
If any of the START_FLAG bits is returned with 1, the system deducts credit.
Therefore, be sure to perform the start processing, etc. Furthermore, be sure to
keep the USER_MODE at 2, or the game may be switched to another game."