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...")
 
m (Balise typo)
Line 5: Line 5:
The system ROM uses ~35us delays done with fall-through calls to NOPs.
The system ROM uses ~35us delays done with fall-through calls to NOPs.


<synthaxhighlight>
<syntaxhighlight>
move.b #$FF, REG_LEDLATCHES  ; Set clock high
move.b #$FF, REG_LEDLATCHES  ; Set clock high
jsr    wait
jsr    wait
Line 15: Line 15:
</syntaxhighlight>
</syntaxhighlight>


<synthaxhighlight>
<syntaxhighlight>
wait:
wait:
movem.l d0-d7/a0-a5,-(a7)    ; 120 cycles
movem.l d0-d7/a0-a5,-(a7)    ; 120 cycles

Revision as of 05:59, 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.

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
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