Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OpTable:
- bra.w Op_GetWordRAM ; Give WordRAM to Sub-CPU ;$01
- bra.w Op_JumpTo ; Jump to a certain location in A1 ;$02
- bra.w Op_EnableInts ; Enable interrupts ;$03
- bra.w Op_DisableInts ; Disable interrupts ;$04
- bra.w Op_VDPControl_w ; VDP Control Write (word) ;$05
- bra.w Op_VDPControl_l ; VDP Control Write (dword) ;$06
- bra.w Op_VDPData_w ; VDP Data Write (word) ;$07
- bra.w Op_VDPData_l ; VDP Data Write (dword) ;$08
- bra.w Op_DMAVWrite ; VDP DMA - from 68k mem to VRAM ;$09
- bra.w Op_DMAVFill ; VDP DMA - fill VRAM with given value ;$0A
- ;---------------------------------------------------------------------
- Op_DMAVFill:
- lea $C00004,a5
- move.w #$8174,(a5) ; enable interrupts
- move.w #$8F01,(a5) ; change auto-increment
- moveq #0,d0
- ; Prepare values first
- ; - length (0xXX00)
- move.w d1,d0
- andi.w #$FF00,d0
- lsr.w #8,d0
- ori.w #$9400,d0
- swap d0
- ; - length (0x00XX)
- move.w d1,d0
- andi.w #$FF,d0
- ori.w #$9300,d0
- move.l d0,(a5) ; send length
- move.w #$9780,(a5)
- moveq #0,d0
- ; - loc
- move.w d2,d0
- andi.w #$3FFF,d0
- ori.w #$4000,d0
- swap d0
- move.w d2,d0
- andi.w #$C000,d0
- ; lsr.w #14,d0
- lsr.w #14-8,d0
- lsr.w #8,d0
- ori.w #$80,d0
- move.l d0,(a5)
- ; - value
- move.w d3,$C00000 ; send value to fill
- - move.w (a5),d1 ; wait for DMA to complete
- btst #1,d1
- bne.s -
- move.w #$8F02,(a5) ; re-set auto-increment
- rts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement