Drivers for the MNT ZZ9000 graphics and ARM coprocessor card for classic Amigas.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

188 lines
2.3 KiB

  1. ; ifd DEBUG
  2. ; XDEF _AbsExecBase
  3. ; XDEF _LVORawDoFmt
  4. ; XDEF _LVORawPutChar
  5. ; XDEF _LVORawMayGetChar
  6. ; XDEF _AbsExecBase
  7. ; endif
  8. ifnd _LVORawDoFmt
  9. _LVORawDoFmt equ -$20a
  10. endc
  11. ifnd _LVORawPutChar
  12. _LVORawPutChar equ -$204
  13. _LVORawIOInit equ -$1f8
  14. _LVORawMayGetChar equ -$1fe
  15. endc
  16. ;
  17. ;
  18. ;
  19. ifne DEBUG
  20. XREF _KPrintF
  21. WRITEDEBUG macro
  22. movem.l d0/d1/a0/a1,-(sp)
  23. ifnb \9
  24. move.l \9,-(sp)
  25. endif
  26. ifnb \8
  27. move.l \8,-(sp)
  28. endif
  29. ifnb \7
  30. move.l \7,-(sp)
  31. endif
  32. ifnb \6
  33. move.l \6,-(sp)
  34. endif
  35. ifnb \5
  36. move.l \5,-(sp)
  37. endif
  38. ifnb \4
  39. move.l \4,-(sp)
  40. endif
  41. ifnb \3
  42. move.l \3,-(sp)
  43. endif
  44. ifnb \2
  45. move.l \2,-(sp)
  46. endif
  47. lea.l (\1),a0
  48. move.l sp,a1
  49. jsr _KPrintF
  50. ifnb \2
  51. add.l #4,sp
  52. endif
  53. ifnb \3
  54. add.l #4,sp
  55. endif
  56. ifnb \4
  57. add.l #4,sp
  58. endif
  59. ifnb \5
  60. add.l #4,sp
  61. endif
  62. ifnb \6
  63. add.l #4,sp
  64. endif
  65. ifnb \7
  66. add.l #4,sp
  67. endif
  68. ifnb \8
  69. add.l #4,sp
  70. endif
  71. ifnb \9
  72. add.l #4,sp
  73. endif
  74. movem.l (sp)+,d0/d1/a0/a1
  75. endm
  76. else
  77. WRITEDEBUG macro
  78. ;
  79. endm
  80. endc
  81. ;
  82. ;
  83. ;
  84. WRITEOUT macro
  85. movem.l d0/d1/d2/a0/a1/a6,-(sp)
  86. ifnb \9
  87. move.l \9,-(sp)
  88. endif
  89. ifnb \8
  90. move.l \8,-(sp)
  91. endif
  92. ifnb \7
  93. move.l \7,-(sp)
  94. endif
  95. ifnb \6
  96. move.l \6,-(sp)
  97. endif
  98. ifnb \5
  99. move.l \5,-(sp)
  100. endif
  101. ifnb \4
  102. move.l \4,-(sp)
  103. endif
  104. ifnb \3
  105. move.l \3,-(sp)
  106. endif
  107. ifnb \2
  108. move.l \2,-(sp)
  109. endif
  110. ifd DEBUG
  111. move.l \1,a0
  112. move.l sp,a1
  113. jsr _KPrintF
  114. endif
  115. move.l \1,d1
  116. move.l sp,d2
  117. movea.l DOSBase,a6
  118. jsr _LVOVPrintf(a6)
  119. ifnb \2
  120. add.l #4,sp
  121. endif
  122. ifnb \3
  123. add.l #4,sp
  124. endif
  125. ifnb \4
  126. add.l #4,sp
  127. endif
  128. ifnb \5
  129. add.l #4,sp
  130. endif
  131. ifnb \6
  132. add.l #4,sp
  133. endif
  134. ifnb \7
  135. add.l #4,sp
  136. endif
  137. ifnb \8
  138. add.l #4,sp
  139. endif
  140. ifnb \9
  141. add.l #4,sp
  142. endif
  143. movem.l (sp)+,d0/d1/d2/a0/a1/a6
  144. endm
  145. ;COUNTERS only when DEBUG is on
  146. ifd DEBUG
  147. ifne DEBUG
  148. DEBUG_COUNTERS EQU 1
  149. endc
  150. endc
  151. ifd DEBUG_COUNTERS
  152. COUNTER_INC macro
  153. addq.l #1,\1
  154. endm
  155. else
  156. COUNTER_INC macro
  157. nop
  158. endm
  159. endc
  160. ; write usage of all emulated instructions if DEBUG is 1 to RAWIO (sushi/sashimi/serial)
  161. ifd DEBUG
  162. ifne DEBUG
  163. HAVE_DEBUGINSTR EQU 1
  164. DEBUGINSTR macro
  165. ifnb \3
  166. WRITEDEBUG \1,\2,\3
  167. else
  168. WRITEDEBUG \1,\2
  169. endc
  170. endm
  171. endc
  172. endc
  173. ifnd HAVE_DEBUGINSTR
  174. DEBUGINSTR macro
  175. endm
  176. endc