-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathUSER.txt
89 lines (73 loc) · 3.2 KB
/
USER.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
The USER subroutine and You
===========================
USER is always jumped to by the BIOS.
It's meant to respond to the value in BIOS_USER_REQUEST.
After doing so, jump to SYSTEM_RETURN so the BIOS can resume operation.
Neo-Geo Dev wiki example code
-----------------------------
JT_User:
dc.l StartupInit
dc.l EyeCatcher
dc.l Game
dc.l Title
User:
move.b d0,REG_DIPSW
clr.l d0
move.b BIOS_USER_REQUEST,d0
lsl.b #2,d0
lea JT_User,a0
movea.l (a0,d0),a0
jsr (a0)
jmp BIOSF_SYSTEM_RETURN
USER_REQUEST Command 0 (StartupInit)
------------------------------------
Initialize the soft/debug DIPs in the 68K user RAM.
Used on first time starting up on a MVS system.
* Set BIOS_USER_MODE to 0
* Init user RAM, display, IO
* any game initialization crap?
SNK docs:
"Initialize only the part defined by the address $10E-$113 as the backup area
of the work area used for the game. Normally, use this area for high scores,
rankings, etc. On the MVS, this command is called only once: when the cartridge
is inserted into the main board for the first time. Initialize the work area,
excluding the backup area, screen displays, and I/O, etc. every time USER is
entered."
USER_REQUEST Command 1 (EyeCatcher)
-----------------------------------
Shows the game's boot logo animation if the Eye catcher anim flag ($114) is 1.
By default, only run on AES systems.
(todo: find out more information, like what games use command 1)
Games that use Command 1:
* NAM-1975
* Poker Night? (most likely)
Questionable:
* Do GIGA POWER games use Command 1?
USER_REQUEST Command 2 (Game)
-----------------------------
Either show the game's demo (attract mode sequence), or perform gameplay.
SNK docs:
"A demonstration of the title and the game is performed when a request is made.
Jump to SYSTEM_RETURN when the demonstration is over and the game has yet not
been started. Or, if the game has been started, jump to SYSTEM_RETURN after the
game is over."
USER_REQUEST Command 3 (Title)
------------------------------
Show the game's title screen.
Only called on MVS systems when a coin is inserted. Not used on AES.
SNK docs:
"Only the game title is displayed. This command is requested only in the mode
with the MVS-forced start. At this point, the SELECT_TIMER ($10FDDA, B) gives
the remaining time in BCD, so please display this on the screen. When the time
runs out, instructions come from the system to start the game. Therefore, there
is no need for the game side to return to the SYSTEM_RETURN. Everything else is
the same as in the Command 2 game demo. (Please note that if the Game Start
Compulsion is not set for compulsion time, then the SELECT_TIMER is not used.)"
Razoola:
"Some games write 0x01 to 0x10FEC5 [BIOS_TITLE_MODE] in this routine. It stops
the BIOS calling command 3 twice after Game Over if credits are already in the
system (attract mode skipped). When 0x00, the BIOS will initiate another command
3 a few frames after the first. This causes the title page to draw twice. This
could be a BIOS bug which SNK fixed by adding this variable in a later BIOS
revision (needs confirming)."
[BIOS_TITLE_MODE is the name in freemlib's ram_bios.inc for 0x10FEC5]