Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ---------------------------------------------------------------------------
- ; Subroutine for issuing all VDP commands that were queued
- ; (by earlier calls to QueueDMATransfer)
- ; Resets the queue when it's done
- ; ---------------------------------------------------------------------------
- ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
- ; sub_14AC: CopyToVRAM: IssueVDPCommands: Process_DMA:
- Process_DMA_Queue:
- ProcessDMAQueue:
- movea.w (VDP_Command_Buffer_Slot).w,a1
- jmp .jump_table-VDP_Command_Buffer(a1)
- ; ---------------------------------------------------------------------------
- .jump_table:
- rts
- rept 6
- trap #0 ; Just in case
- endm
- ; ---------------------------------------------------------------------------
- c := 1
- rept QueueSlotCount
- lea (VDP_control_port).l,a5
- lea (VDP_Command_Buffer).w,a1
- if c<>QueueSlotCount
- bra.w .jump0 - c*8
- endif
- c := c + 1
- endm
- ; ---------------------------------------------------------------------------
- rept QueueSlotCount
- move.l (a1)+,(a5) ; Transfer length
- move.l (a1)+,(a5) ; Source address high
- move.l (a1)+,(a5) ; Source address low + destination high
- move.w (a1)+,(a5) ; Destination low, trigger DMA
- endm
- .jump0:
- ResetDMAQueue
- rts
- ; End of function ProcessDMAQueue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement