Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. OpTable:
  2. bra.w Op_GetWordRAM ; Give WordRAM to Sub-CPU ;$01
  3. bra.w Op_JumpTo ; Jump to a certain location in A1 ;$02
  4. bra.w Op_EnableInts ; Enable interrupts ;$03
  5. bra.w Op_DisableInts ; Disable interrupts ;$04
  6. bra.w Op_VDPControl_w ; VDP Control Write (word) ;$05
  7. bra.w Op_VDPControl_l ; VDP Control Write (dword) ;$06
  8. bra.w Op_VDPData_w ; VDP Data Write (word) ;$07
  9. bra.w Op_VDPData_l ; VDP Data Write (dword) ;$08
  10. bra.w Op_DMAVWrite ; VDP DMA - from 68k mem to VRAM ;$09
  11. bra.w Op_DMAVFill ; VDP DMA - fill VRAM with given value ;$0A
  12. ;---------------------------------------------------------------------
  13.  
  14. Op_DMAVFill:
  15. lea $C00004,a5
  16. move.w #$8174,(a5) ; enable interrupts
  17. move.w #$8F01,(a5) ; change auto-increment
  18. moveq #0,d0
  19. ; Prepare values first
  20. ; - length (0xXX00)
  21. move.w d1,d0
  22. andi.w #$FF00,d0
  23. lsr.w #8,d0
  24. ori.w #$9400,d0
  25. swap d0
  26. ; - length (0x00XX)
  27. move.w d1,d0
  28. andi.w #$FF,d0
  29. ori.w #$9300,d0
  30. move.l d0,(a5) ; send length
  31. move.w #$9780,(a5)
  32. moveq #0,d0
  33. ; - loc
  34. move.w d2,d0
  35. andi.w #$3FFF,d0
  36. ori.w #$4000,d0
  37. swap d0
  38. move.w d2,d0
  39. andi.w #$C000,d0
  40. ; lsr.w #14,d0
  41. lsr.w #14-8,d0
  42. lsr.w #8,d0
  43. ori.w #$80,d0
  44. move.l d0,(a5)
  45. ; - value
  46. move.w d3,$C00000 ; send value to fill
  47. - move.w (a5),d1 ; wait for DMA to complete
  48. btst #1,d1
  49. bne.s -
  50. move.w #$8F02,(a5) ; re-set auto-increment
  51. rts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement