Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include "pgsdz80_support.asm"
- ; LoadPGSD [TODO add a0/a1 as DAC tables ptrs]
- LoadPGSD:
- movem.l d0/a0/a1,-(sp)
- move.w #$100,($A11100).l ; bus req on
- move.w #$100,($A11200).l ; reset off
- lea __PGSDZ80,a0
- move.l #$A00000,a1
- move.w __PGSDZ80End-__PGSDZ80,d0 ; TODO -1?
- -
- move.b (a0)+,(a1)+
- dbf d0,-
- move.b ($A10001).l,d0 ; get flag state for NTSC/PAL
- move.b d0,(__PGSD_NewPlaying)
- move.w #0,($A11200).l ; reset on
- move.w #0,($A11100).l ; bus req off
- move.w #$100,($A11200).l ; reset off
- move.l (sp)+,d0/a0/a1
- rts
- ; PlaySong (a0 -- ) - play song at address a0
- PlaySong:
- movem.l a0/a1,-(sp)
- move.w #$100,($A11100).l ; bus req on
- -
- btst #1,($A11100).l
- beq.s -
- move.l #__PGSD_PointerFrom68000,a1 ; write pointer
- move.b a0,(a1)-
- REPT 3
- lsr.l #4,a0
- move.b a0,(a1)-
- ENDM
- move,b #1,(__PGSD_NewPlaying).l ; mark to play music!
- move.w #0,($A11100).l ; bus req off
- movem.l (sp)+,a0/a1
- rts
- ; PlaySFX (a0 -- ) - play SFX at address a0
- PlaySFX:
- ; TODO
- rts
- __PGSDZ80:
- binclude "pgsdz80.bin"
- __PGSDZ80End:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement