SYSTEM INT1: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
m (2 revisions: Import from wikkii)
mNo edit summary
Line 1: Line 1:
== [[BIOSF_VBL]] ($C0044A): Multiple purpose VBL routine ==
== [[SYSTEM_INT1]] ($C0044A): Multi-purpose VBL call ==


Sets values in RAM according to buttons states, checks CDDA commands, probably other things... Always (?) called each frame by games.
Needs to be called at the beginning of the [[68k interrupts|vblank]] period. Sets values in RAM according to buttons states, checks [[CDDA]] commands, calls [[MESS_OUT]], and probably other things...
 
If called outside of vblank, interrupts need to be disabled before.


Memory locations set (all 8bit):
Memory locations set (all 8bit):
<pre>
<pre>
BIOS_P1CURRENT    $10FD95 Joystick 1 state
BIOS_P1CURRENT    ;$10FD95 Joystick 1 state
BIOS_P1PREVIOUS    $10FD96 Previous joystick 1 state
BIOS_P1PREVIOUS    ;$10FD96 Previous joystick 1 state
BIOS_P1CHANGE      $10FD97 Joystick 1 state change (edges)
BIOS_P1CHANGE      ;$10FD97 Joystick 1 state change (edges)
BIOS_P1REPEAT      $10FD98 Joystick 1 repeat (edge, and strobe if held more than ? calls)
BIOS_P1REPEAT      ;$10FD98 Joystick 1 repeat (edge, and strobe if held more than ? calls)


BIOS_P2CURRENT    $10FD9B Joystick 2 state
BIOS_P2CURRENT    ;$10FD9B Joystick 2 state
BIOS_P2PREVIOUS    $10FD9C Previous joystick 2 state
BIOS_P2PREVIOUS    ;$10FD9C Previous joystick 2 state
BIOS_P2CHANGE      $10FD9D Joystick 2 state change (edges)
BIOS_P2CHANGE      ;$10FD9D Joystick 2 state change (edges)
BIOS_P2REPEAT      $10FD9E Joystick 2 repeat (edge, and strobe if held more than ? calls)
BIOS_P2REPEAT      ;$10FD9E Joystick 2 repeat (edge, and strobe if held more than ? calls)


BIOS_STATCURNT    Joystick 1/2 start/select state
BIOS_STATCURNT    ;Joystick 1/2 start/select state
BIOS_STATCHANGE    Previous Joystick 1/2 start/select state
BIOS_STATCHANGE    ;Previous Joystick 1/2 start/select state
</pre>
</pre>


Bit definitions: see [[Joypad]]
Bit definitions: see [[Joypad]]


[[Category:BIOS calls]]
[[Category:Code]]

Revision as of 12:58, 5 July 2011

SYSTEM_INT1 ($C0044A): Multi-purpose VBL call

Needs to be called at the beginning of the vblank period. Sets values in RAM according to buttons states, checks CDDA commands, calls MESS_OUT, and probably other things...

If called outside of vblank, interrupts need to be disabled before.

Memory locations set (all 8bit):

BIOS_P1CURRENT     ;$10FD95 Joystick 1 state
BIOS_P1PREVIOUS    ;$10FD96 Previous joystick 1 state
BIOS_P1CHANGE      ;$10FD97 Joystick 1 state change (edges)
BIOS_P1REPEAT      ;$10FD98 Joystick 1 repeat (edge, and strobe if held more than ? calls)

BIOS_P2CURRENT     ;$10FD9B Joystick 2 state
BIOS_P2PREVIOUS    ;$10FD9C Previous joystick 2 state
BIOS_P2CHANGE      ;$10FD9D Joystick 2 state change (edges)
BIOS_P2REPEAT      ;$10FD9E Joystick 2 repeat (edge, and strobe if held more than ? calls)

BIOS_STATCURNT     ;Joystick 1/2 start/select state
BIOS_STATCHANGE    ;Previous Joystick 1/2 start/select state

Bit definitions: see Joypad