26 lines
640 B
NASM
26 lines
640 B
NASM
module player
|
|
|
|
; -----------------------------
|
|
; -----------------------------
|
|
; OPN register dump output
|
|
; in: HL - registers in (reg:data) byte pairs, reg==0xFF - return
|
|
reg_out:
|
|
ld bc, 0xFFFD
|
|
ld de, 0x00C0 ; 0xFFBF compensated for outi
|
|
|
|
; select 1st chip
|
|
ld a, 0b11111000
|
|
out (c), a
|
|
.loop:
|
|
ld b, d
|
|
ld a, [hl]
|
|
inc a ; test for 0xFF terminator
|
|
ret z
|
|
outi
|
|
ld b, e
|
|
outi
|
|
dup 4: nop : edup ; delay
|
|
jp .loop
|
|
|
|
|
|
endmodule |