1

Every 1/60 second the Neo Geo Dev Kit calls an I/O routine at C0044AH from the end of the vertical blank interrupt routine. The I/O routine takes about 4-5 display lines to execute

Here's what i says about it in the official Neo Geo documentation

SYSTEM-IO

C0044AH

Input and output operations from the system program.
This subroutine should be called every 1/60 of a second during the game
program. When it is called outside of the interrupt-handling routine, and if
the program needs to access the I/O besides the screen using the interrupt-
handling routine, prohibit the interrupt request while SYSTEM-IO is
executed, which takes about 300 micro seconds on average.

This subroutine executes the following:

1. Senses joystick-input status.
2. Detects coins inserted in the slot (MVS only). If required COIN_SOUND(134H) is called.
3. Checks the start button. If required, PLAYER - START(128H) is
called.
4. Checks the game selection (MVS only). If necessary, DEMO END(l2EH) is called and the game is selected.
5. Timers used by the system are counted up or down.

To detect the coin input precisely, this routine needs to be called every
1/60 of a second. In general, it is recommended that this routine be called
at the end of the interrupt-1 handler routine. However, if this is called
from the main routine and not from the interrupt-1 handler routine due to
the V-RAM output and such, be sure that the processing does not overflow.
Since the coin-input detection routine also controls the credit status, that the
game program does not have to execute any coin-related tasks.
Status of the joystick is stored in the work area, INPUT_1(10FD94H), and
the game routine can read the status from this work area rather
reading it directly from I/O.


It just seems that 4-5 display times is a lot of time for an I/O routine. Or is it doing much more work than I realize?

I tried to disassemble it in MAME but it seems to jump around a lot. Isn't this slow in itself? I only have a modest understanding of 68000 but I will try to understand it more

Code snippet :

C0044A: 4EF9 00C1 167A jmp $c1167a.l C1167A: 4BF9 0010 F300 lea $10f300.l, A5 C11680: 52AD 0B88 addq.l #1, ($b88,A5) C11684: 4EBA 102E jsr ($102e,PC); ($c126b4) C11688: 4EBA 6E84 jsr ($6e84,PC); ($c1850e) C1168C: 4A79 00C1 16C6 tst.w $c116c6.l C11692: 6600 0002 bne $c11696 C11696: 4A2D 0BE1 tst.b ($be1,A5) C1169A: 6B16 bmi $c116b2 C1169C: 6706 beq $c116a4 C1169E: 532D 0BE1 subq.b #1, ($be1,A5) C116A2: 600E bra $c116b2 C116A4: 4A2D 0A80 tst.b ($a80,A5) C116A8: 6A08 bpl $c116b2 C116AA: 4EBA 001C jsr ($1c,PC); ($c116c8) C116AE: 4EBA 018C jsr ($18c,PC); ($c1183c) C116B2: 4A2D 0A82 tst.b ($a82,A5) C116B6: 670C beq $c116c4 C116B8: 0C2D 0002 0AAF cmpi.b #$2, ($aaf,A5) C116BE: 6604 bne $c116c4 C116C0: 4EBA 1524 jsr ($1524,PC); ($c12be6) C116C4: 4E75 rts