Controlling the marquee: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
(Created page with "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|REG_LED...")
(No difference)

Revision as of 05:58, 14 November 2017

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_LEDDATA and REG_LEDLATCHES registers for more details.

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

<synthaxhighlight> 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 </syntaxhighlight>

<synthaxhighlight> wait: 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 </syntaxhighlight>