home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / emulation / qlsource / romsrc / inc / amigqdos_inc < prev    next >
Encoding:
Text File  |  1998-01-14  |  7.9 KB  |  356 lines

  1. */beginfile AMIGQDOS_inc
  2.  
  3. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. ; AmigaQDOS_inc - Amiga QDOS includes file
  5. ;           - last modified 14/01/98
  6.  
  7. ; QDOS-Amiga sources by Rainer Kowallik
  8. ;  ...latest changes by Mark J Swift
  9.  
  10.  
  11. ;         **** ATTENTION! ****
  12. ;
  13. ; $00000-$0BFFF is reserved for the QDOS ROM
  14. ;
  15. ; $0C000-$0FFFF can be used for whatever you wish
  16. ;
  17. ; $10000-$13FFF is reserved for the first bitplane
  18. ; $14000-$17FFF is reserved for the second bitplane
  19. ;
  20. ; $18000-$180FF is reserved for QL I/O
  21. ;
  22. ; $18100-$18167 is reserved for special amiga variables
  23. ;
  24. ; $18168-$18280 is reserved for the QL BEEP sound sample
  25. ;
  26. ; $18280-$185FF is reserved for the main sprite list
  27. ;
  28. ; $18600-$187FF is reserved for main copper list
  29. ;
  30. ; $18800-$1F3FF is reserved for the floppy disk buffer
  31. ;
  32. ; $1F400-$1FFE7 is reserved for Amiga specific ROMs that patch
  33. ;           the QDOS ROM to work on the Amiga
  34. ;
  35. ; $1FFE8-$1FFFF is reserved for TAS emu self-modifying code
  36. ;
  37. ; $20000-$27FFF is reserved for the QL screen
  38. ;
  39. ; $28000 --->   is reserved for system variables, a possible
  40. ;           second screen, and the QL tables and work area.
  41.  
  42.  
  43. AV_IDENT    EQU    'Grub'
  44.  
  45. ; define track sizes for read and write
  46.  
  47. TLEN       EQU    12500    ; theoretical size
  48. WLEN       EQU    TLEN+20    ; 20 bytes extra
  49. RLEN       EQU    TLEN+1324 ; 1 sector extra
  50. POLLT       EQU    200    ; time after which motor shuts-off
  51.  
  52. ; address of various bits of hardware
  53.  
  54. BPLANE1       EQU    $10000
  55. BPLANE2       EQU    $14000
  56. BPLANE3       EQU    $12000
  57.  
  58. SAMPLE       EQU    $18168
  59.  
  60. SPRNULL       EQU    $18280
  61. SPRLST       EQU    $18288
  62.  
  63. COPLST       EQU    $18600
  64.  
  65. MFMBUFFER   EQU    $18800    ; disk MFM buffer
  66. MFMBUFEND   EQU    $1F400
  67.  
  68. ** AMGVARS - Variables specific to QDOS-Amiga **
  69.  
  70. AMGVARS       EQU    $18100
  71.  
  72. AV.IDENT    EQU    $18100    ; (long)
  73. AV.RSETlink EQU    $18110
  74. AV.ILLGlink EQU    $18114
  75. AV.MAINlink EQU    $18118
  76. AV.LVL5link EQU    $1811C
  77. AV.LVL7link EQU    $18120
  78. AV.TRP0link EQU    $18124
  79. AV.TRP1link EQU    $18128
  80.  
  81. AV.CIAA_ICR EQU    $1813A    ; (byte)
  82. AV.CIAB_ICR EQU    $1813B    ; (byte)
  83. AV.CIAA_MSK EQU    $1813C    ; (byte)
  84. AV.CIAB_MSK EQU    $1813D    ; (byte)
  85.  
  86. AV.FLGS1    EQU    $1813E    ; (byte)
  87.             ; bit 7 = 1 disable blitr activity
  88.             ;     0 enable blitr activity
  89.             ;     6 = 1 blitter active
  90.             ;     0 blitter inactive
  91.  
  92. AV.MAIV       EQU    $18140    ; (long) Ptr to MAIN vars
  93. AV.VDUV       EQU    $18144    ; (long) Ptr to VDU vars
  94. AV.CLKV       EQU    $18148    ; (long) Ptr to CLOCK vars
  95. AV.KEYV       EQU    $1814C    ; (long) Ptr to KEYB'RD vars
  96. ;AV.PARV     EQU     $18150     ; (long) Ptr to PARPORT vars
  97. AV.SERV       EQU    $18154    ; (long) Ptr to SERPORT vars
  98. AV.DSKV       EQU    $18158    ; (long) Ptr to disk vars
  99. AV.SNDV       EQU    $1815C    ; (long) Ptr to sound vars
  100.  
  101. ** Variables local to QDOS ROM patch routines **
  102.  
  103. MV.RSETlink EQU    $00
  104. MV.RSET       EQU    $04    ; (long) custom reset routine
  105.  
  106. MV.LVL7link EQU    $08
  107. MV.LVL7       EQU    $0C    ; (long) custom CTRL-ALT-7
  108.  
  109. MV.XINTLink EQU    $10    ; (long) address
  110.             ; (long) ptr
  111.  
  112. MV.RVARS    EQU    $18    ; (long) ptr to variables below
  113.  
  114. MV_LEN       EQU    $22
  115.  
  116. ** ROM links allocated by MAIN routine **
  117.  
  118. RV.RSETlink EQU    $00
  119. RV.RSET       EQU    $04    ; (long) reset routine
  120.  
  121. RV.ILLGlink EQU    $08
  122. RV.ILLG       EQU    $0C    ; (long) illegal interrupt
  123.  
  124. RV.MAINlink EQU    $10
  125. RV.MAIN       EQU    $14    ; (long) main QL interrupt
  126.  
  127. RV.LVL5link EQU    $18
  128. RV.LVL5       EQU    $1C    ; (long) CTRL-ALT-5.
  129.  
  130. RV.LVL7link EQU    $20
  131. RV.LVL7       EQU    $24    ; (long) CTRL-ALT-7
  132.  
  133. RV.TRP0link EQU    $28
  134. RV.TRP0       EQU    $2C    ; (long)
  135.  
  136. RV.TRP1link EQU    $30
  137. RV.TRP1       EQU    $34    ; (long)
  138.  
  139. RV_LEN       EQU    $38
  140.  
  141. ** Variables local to VDU routines **
  142.  
  143. VV.XINTLink EQU    $00    ; (long)
  144.             ; (long)
  145. VV.POLLLink EQU    $08    ; (long)
  146.             ; (long)
  147.  
  148. VV.LVL7link EQU    $10    ; (long) address
  149. VV.LVL7       EQU    $14    ; (long) address
  150.  
  151. VV.PRIINc   EQU    $18    ; (byte)
  152. VV.PRIBNd   EQU    $19    ; (byte)
  153. VV.PRIACc   EQU    $1A    ; (word)
  154. VV.PRICNt   EQU    $1C    ; (word)
  155.  
  156. VV.STAT       EQU    $1E    ; (byte)
  157.  
  158. VV.4COL0    EQU    $20    ; (word)
  159. VV.4COL1    EQU    $22    ; (word)
  160. VV.4COL2    EQU    $24    ; (word)
  161. VV.4COL3    EQU    $26    ; (word)
  162.  
  163. VV.8COL0    EQU    $28    ; (word)
  164. VV.8COL1    EQU    $2A    ; (word)
  165. VV.8COL2    EQU    $2C    ; (word)
  166. VV.8COL3    EQU    $2E    ; (word)
  167.  
  168. VV_LEN       EQU    $30
  169.  
  170. ** Variables local to clock routines **
  171.  
  172. CV.XINTLink EQU    $00    ; (long)
  173.             ; (long)
  174. CV.POLLLink EQU    $08    ; (long) not used
  175.             ; (long)
  176.  
  177. CV.RSETlink EQU    $10
  178. CV.RSET       EQU    $14    ; (long) reset routine
  179.  
  180. CV.LVL7link EQU    $18    ; (long) address
  181. CV.LVL7       EQU    $1C    ; (long) address
  182.  
  183. CV.TRP1link EQU    $20    ; (long) address
  184. CV.TRP1       EQU    $24    ; (long) address
  185.  
  186. CV_LEN       EQU    $28    ; (long)
  187.  
  188. ** Define some variables local to keyboard routines **
  189.  
  190. KV.XINTLink EQU    $00    ; (long) address
  191.             ; (long) ptr
  192.  
  193. KV.POLLLink EQU    $08    ; (long) address
  194.             ; (long) ptr
  195.  
  196. KV.LVL7link EQU    $10    ; (long) address
  197. KV.LVL7       EQU    $14    ; (long) address
  198.  
  199. KV.TRP1link EQU    $18    ; (long) address
  200. KV.TRP1       EQU    $1C    ; (long) address
  201.  
  202. KV.SHIFTflg EQU    $20    ; (word)
  203. KV.ACTKEy   EQU    $22    ; (word)
  204. KV.STORAwkey EQU    $24    ; (4xlong)
  205. KV.QLASCtbl EQU $34    ; (long) ptr to ASCII table
  206.  
  207. KV.STOMOuse EQU $38    ; (word)
  208.  
  209. KV.PTROLDX  EQU    $3A    ; (word)
  210. KV.PTROLDY  EQU    $3C    ; (word)
  211.  
  212. KV.PTRX       EQU    $3E    ; (word)
  213. KV.PTRY       EQU    $40    ; (word)
  214.  
  215. KV.PTRINCX  EQU    $42    ; (word)
  216. KV.PTRINCY  EQU    $44    ; (word)
  217.  
  218. KV.PTRMINX  EQU    $46    ; (word)
  219. KV.PTRMINY  EQU    $48    ; (word)
  220. KV.PTRMAXX  EQU    $4A    ; (word)
  221. KV.PTRMAXY  EQU    $4C    ; (word)
  222.  
  223. KV.PTRERRX  EQU    $4E    ; (word)
  224. KV.PTRERRY  EQU    $50    ; (word)
  225.  
  226. KV.QIMIFLG  EQU    $52    ; (byte)
  227.  
  228. KV_LEN       EQU    $54    ; length of KV vars
  229.  
  230. ** Define some variables local to serial port routines **
  231.  
  232. ; (necessary for IO.SERIO)
  233.  
  234. SV.PEND       EQU    $28    ; (long) pending test
  235. SV.FBYTE    EQU    $2C    ; (long) fetch byte
  236. SV.SBYTE    EQU    $30    ; (long) send byte
  237. SV.RTS       EQU    $34    ; (word) RTS (4E75)
  238.  
  239. SV.LVL7link EQU    $36    ; (long)
  240. SV.LVL7       EQU    $3A    ; (long) address
  241.  
  242. SV.TRP1link EQU    $3E    ; (long)
  243. SV.TRP1       EQU    $42    ; (long) address
  244.  
  245. SV_LEN       EQU    $46    ; length of SER port vars
  246.  
  247. ** Define some variables local to sound routines **
  248.  
  249. BV.XINTLink EQU    $00    ; (long) address
  250.             ; (long) ptr
  251.  
  252. BV.POLLLink EQU    $08    ; (long) address
  253.             ; (long) ptr
  254.  
  255. BV.LVL7link EQU    $10    ; (long)
  256. BV.LVL7       EQU    $14    ; (long) address
  257.  
  258. BV.TRP1link EQU    $18    ; (long)
  259. BV.TRP1       EQU    $1C    ; (long) address
  260.  
  261. BV.DURVAL   EQU    $20    ; (long)
  262. BV.DURCNT   EQU    $24    ; (long)
  263. BV.PITCH1   EQU    $28    ; (word)
  264. BV.PITCH2   EQU    $2A    ; (word)
  265. BV.GRDVAL   EQU    $2C    ; (long)
  266. BV.GRDCNT   EQU    $30    ; (long)
  267. BV.PITCH    EQU    $34    ; (word)
  268. BV.PITINC   EQU    $36    ; (word)
  269. BV.REPVAL   EQU    $38    ; (word)
  270. BV.REPCNT   EQU    $3A    ; (word)
  271. BV.FUZZ       EQU    $3C    ; (word)
  272. BV.RAND       EQU    $3E    ; (word)
  273. BV.SEED       EQU    $40    ; (word)
  274. BV.NOTE       EQU    $42    ; (word)
  275. BV.BEEP       EQU    $44    ; (word)
  276.  
  277. BV_LEN       EQU    $46    ; length of BV vars
  278.  
  279. ** Define some variables local to Floppy routines **
  280.  
  281. FV.POLLLink EQU    $00    ; (long) address
  282.                 ; (long)
  283. FV.POLLActiv EQU    $08    ; (byte)
  284.  
  285. FV.XINTLink EQU    $0A    ; (long) address
  286.                 ; (long)
  287.  
  288. FV.FLAGS    EQU    $12    ; (word)
  289.  
  290.        ; bit 14 1=write 0=read
  291.        ; bit 13 1=index on write 0=no index on write
  292.        ; bit 12 1=index on read  0=no index on read
  293.        ; bit 11 1=use SYNC word  0=no SYNC on read
  294.        ; bit  5 1=retry on error 0=no retry on error
  295.  
  296. FV.CNGFLag  EQU    $14    ; (byte) disk change status
  297. FV.RDYFLag  EQU    $15    ; (byte) disk ready status
  298.  
  299. FV.LASTBit  EQU    $16    ; (word) last bit in MFM
  300.  
  301. FV.REQDRive EQU    $18    ; (word) required drive
  302.  
  303. FV.MAXDRive EQU    $1A    ; (word) max drive possible
  304.  
  305. FV.DRVVArs  EQU    $1C    ; drive variables here
  306.  
  307.  
  308. ; Define drive variables (there's one of these for every drive)
  309.  
  310. DV.TYPE       EQU    $00    ; (long)
  311.  
  312. DV.TIMEOut  EQU    $04    ; (word)
  313.  
  314. DV.SIDE       EQU    $06    ; (word)
  315. DV.TRACK    EQU    $08    ; (word)
  316.  
  317. DV.SIDE0buff EQU    $0A    ; buffer vars for side 0
  318. DV.SIDE1buff EQU    $0E    ; buffer vars for side 1
  319.  
  320. DV_LEN       EQU    $12
  321.  
  322. ; end of variables
  323.  
  324. FV_LEN       EQU    FV.DRVVArs+4*DV_LEN
  325.  
  326.  
  327. ;    Define ASCII buffer variables
  328.  
  329. AB.DRIVE    EQU    $00    ; (word)
  330. AB.SIDE       EQU    $02    ; (word)
  331. AB.TRACK    EQU    $04    ; (word)
  332.  
  333. AB.PENDWflag EQU    $06    ; (word)
  334. AB.BADFLag  EQU    $08    ; (word)
  335.  
  336. AB.LASTBit  EQU    $0A    ; (word) last bit in MFM
  337.  
  338. AB.SCTRPtrs EQU    $0C
  339.  
  340. AB.SCTR1    EQU    $0C
  341. AB.SCTR2    EQU    $10
  342. AB.SCTR3    EQU    $14
  343. AB.SCTR4    EQU    $18
  344. AB.SCTR5    EQU    $1C
  345. AB.SCTR6    EQU    $20
  346. AB.SCTR7    EQU    $24
  347. AB.SCTR8    EQU    $28
  348. AB.SCTR9    EQU    $2C
  349.  
  350. AB.BUFBEg   EQU    $30
  351.  
  352. AB.BUFENd   EQU    $1242
  353.  
  354. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  355. */endfile
  356.