Controlling the marquee

From NeoGeo Development Wiki
Jump to: navigation, search

You should let the system ROM be in charge of controlling the marquee. But if you want to try things, here's how it goes:

See the bit definitions of the Reg.png REG_LEDDATA and Reg.png REG_LEDLATCHES registers for more details.

The system ROM uses ~35us delays done with fall-through calls to NOPs.

move.b #$FF, REG_LEDLATCHES  ; Set clock high
jsr    wait
not.b  d0                    ; The panel # is sent inverted
move.b d0, REG_LEDDATA       ; Set panel #
move.b #$F7, REG_LEDLATCHES  ; Set clock low (latch panel #)
jsr    wait
move.b #$FF, REG_LEDLATCHES  ; Set clock back high
movem.l d0-d7/a0-a5,-(a7)    ; 120 cycles
movem.l (a7)+,d0-d7/a0-a5    ; 124 cycles
movem.l d0-d7/a0-a5,-(a7)    ; 120 cycles
movem.l (a7)+,d0-d7/a0-a5    ; 124 cycles, total = 488 cycles = 40.7us