home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / emulate / systems / apple / strucs.inc < prev    next >
Text File  |  1990-04-17  |  13KB  |  288 lines

  1.     .Xlist
  2.     Page    58,132
  3.     Subttl    STRUCS.INC    Apple Emulator (65C02 Processor)
  4. ;******************************************************************************
  5. ;
  6. ;   Name:    STRUCS        Apple Emulator (65C02 Processor)
  7. ;
  8. ;   Group:    Emulator
  9. ;
  10. ;   Revision:    1.00
  11. ;
  12. ;   Date:    January 30, 1988
  13. ;
  14. ;   Author:    Randy W. Spurlock
  15. ;
  16. ;******************************************************************************
  17. ;
  18. ;  Module Functional Description:
  19. ;
  20. ;        This module contains all the structures needed by the
  21. ;    Apple emulator. This module can be included with any needed
  22. ;    source files to define the Apple emulator structures.
  23. ;
  24. ;******************************************************************************
  25. ;
  26. ;  Changes:
  27. ;
  28. ;    DATE     REVISION                DESCRIPTION
  29. ;  --------   --------    -------------------------------------------------------
  30. ;   1/30/88    1.00    Original
  31. ;
  32. ;******************************************************************************
  33. Slot_Data    Struc                ; Slot data pointer structure
  34. Slot_0        Dw    (?)            ; Slot 0 data pointer
  35. Slot_1        Dw    (?)            ; Slot 1 data pointer
  36. Slot_2        Dw    (?)            ; Slot 2 data pointer
  37. Slot_3        Dw    (?)            ; Slot 3 data pointer
  38. Slot_4        Dw    (?)            ; Slot 4 data pointer
  39. Slot_5        Dw    (?)            ; Slot 5 data pointer
  40. Slot_6        Dw    (?)            ; Slot 6 data pointer
  41. Slot_7        Dw    (?)            ; Slot 7 data pointer
  42. Slot_Data    Ends                ; End of Slot_Data structure
  43. ;******************************************************************************
  44. ;
  45. ;    Define the language card structure
  46. ;
  47. ;******************************************************************************
  48. Lang_Card    Struc                ; Language card structure
  49. Lang_Byte    Db    (?)            ; Language card control byte
  50. Lang_Flag    Db    (?)            ; Language card flag byte
  51. Lang_Reserved    Db    14 Dup (?)        ; Language card reserved area
  52. Lang_Card    Ends                ; End of Lang_Card structure
  53. ;******************************************************************************
  54. ;
  55. ;    Define the language card data area structure
  56. ;
  57. ;******************************************************************************
  58. Lang_Card_Data    Struc                ; Language card data structure
  59. Lang_Area    Db    16 Dup (?)        ; Language card control area
  60. Seg_1_Bank_1    Db    4096 Dup (?)        ; Lang. card segment 1 bank 1
  61. Seg_1_Bank_2    Db    4096 Dup (?)        ; Lang. card segment 1 bank 2
  62. Seg_1_RAM    Db    8192 Dup (?)        ; Lang. card segment 1 RAM
  63. Seg_2_Bank_1    Db    4096 Dup (?)        ; Lang. card segment 2 bank 1
  64. Seg_2_Bank_2    Db    4096 Dup (?)        ; Lang. card segment 2 bank 2
  65. Seg_2_RAM    Db    8192 Dup (?)        ; Lang. card segment 2 RAM
  66. Lang_Card_Data    Ends                ; End Lang_Card_Data structure
  67. ;******************************************************************************
  68. ;
  69. ;    Define the cartridge structure
  70. ;
  71. ;******************************************************************************
  72. Cartridge    Struc                ; Cartridge structure
  73. Cart_File    Db    64 Dup (?)        ; Cartridge file name
  74. Cart_Byte    Db    (?)            ; Cartridge control byte
  75. Cart_Reserved    Db    15 Dup (?)        ; Cartridge reserved area
  76. Cart_Image    Db    32768 Dup (?)        ; Cartridge image area
  77. Cartridge    Ends                ; End of Cartridge structure
  78. ;******************************************************************************
  79. ;
  80. ;    Define the cartridge file name structure
  81. ;
  82. ;******************************************************************************
  83. Cart_Name    Struc                ; Cartridge file name structure
  84. Cart_Base    Db    "Cart"                  ; Cartridge base file name
  85. Cart_Slot    Db    "x"                     ; Cartridge base slot number
  86. Cart_Ext    Db    ".crt",0                ; Cartridge base extension
  87. Cart_Name    Ends                ; End of Cart_Name structure
  88. ;******************************************************************************
  89. ;
  90. ;    Define the disk controller structure
  91. ;
  92. ;******************************************************************************
  93. Disk_Card    Struc                ; Disk controller structure
  94. Disk_Current    Dw    (?)            ; Disk ctrl. current drive ptr.
  95. Disk_Drive_A    Db    6223 Dup (?)        ; Disk drive A structure
  96. Disk_Drive_B    Db    6223 Dup (?)        ; Disk drive B structure
  97. Disk_Card    Ends                ; End of Disk_Card structure
  98. ;******************************************************************************
  99. ;
  100. ;    Define the disk drive structure
  101. ;
  102. ;******************************************************************************
  103. Disk_Drive    Struc                ; Disk drive structure
  104. Disk_File    Db    64 Dup (?)        ; Disk drive file name
  105. Disk_Flag    Db    (?)            ; Disk drive flag byte
  106. Disk_Last    Db    (?)            ; Disk drive last phase
  107. Disk_Curr    Db    (?)            ; Disk drive current phase
  108. Disk_Latch    Db    (?)            ; Disk drive write data latch
  109. Disk_Handle    Dw    (?)            ; Disk drive handle number
  110. Disk_Pointer    Dw    (?)            ; Disk track buffer pointer
  111. Disk_Limit    Dw    (?)            ; Disk track pointer limit
  112. Disk_Track    Dw    (?)            ; Disk track size
  113. Disk_Sector    Db    (?)            ; Disk sector size (13/16)
  114. Disk_Reserved    Db    2 Dup (?)        ; Disk drive reserved area
  115. Disk_Buffer    Db    6144 Dup (?)        ; Disk drive track buffer
  116. Disk_Drive    Ends                ; End of Disk_Drive structure
  117. ;******************************************************************************
  118. ;
  119. ;    Define the base drive disk file name structure
  120. ;
  121. ;******************************************************************************
  122. Disk_Name    Struc                ; Disk file name structure
  123. Disk_Base    Db    "Disk"                  ; Disk drive base file name
  124. Disk_Slot    Db    "x"                     ; Disk drive base slot number
  125. Disk_Letter    Db    "y"                     ; Disk drive base drive letter
  126. Disk_Ext    Db    ".dsk",0                ; Disk drive base extension
  127. Disk_Name    Ends                ; End of Disk_Name structure
  128. ;******************************************************************************
  129. ;
  130. ;    Define the unencrypted track buffer structure (13 Sector Disk)
  131. ;
  132. ;******************************************************************************
  133. Buffer_13    Struc                ; Unencrypted track structure
  134. Buffer_0_13    Db    256 Dup (?)        ; Unencrypted sector 0
  135. Buffer_1_13    Db    256 Dup (?)        ; Unencrypted sector 1
  136. Buffer_2_13    Db    256 Dup (?)        ; Unencrypted sector 2
  137. Buffer_3_13    Db    256 Dup (?)        ; Unencrypted sector 3
  138. Buffer_4_13    Db    256 Dup (?)        ; Unencrypted sector 4
  139. Buffer_5_13    Db    256 Dup (?)        ; Unencrypted sector 5
  140. Buffer_6_13    Db    256 Dup (?)        ; Unencrypted sector 6
  141. Buffer_7_13    Db    256 Dup (?)        ; Unencrypted sector 7
  142. Buffer_8_13    Db    256 Dup (?)        ; Unencrypted sector 8
  143. Buffer_9_13    Db    256 Dup (?)        ; Unencrypted sector 9
  144. Buffer_A_13    Db    256 Dup (?)        ; Unencrypted sector A
  145. Buffer_B_13    Db    256 Dup (?)        ; Unencrypted sector B
  146. Buffer_C_13    Db    256 Dup (?)        ; Unencrypted sector C
  147. Buffer_13    Ends                ; End of Buffer_13 structure
  148. ;******************************************************************************
  149. ;
  150. ;    Define the unencrypted track buffer structure (16 Sector Disk)
  151. ;
  152. ;******************************************************************************
  153. Buffer_16    Struc                ; Unencrypted track structure
  154. Buffer_0_16    Db    256 Dup (?)        ; Unencrypted sector 0
  155. Buffer_1_16    Db    256 Dup (?)        ; Unencrypted sector 1
  156. Buffer_2_16    Db    256 Dup (?)        ; Unencrypted sector 2
  157. Buffer_3_16    Db    256 Dup (?)        ; Unencrypted sector 3
  158. Buffer_4_16    Db    256 Dup (?)        ; Unencrypted sector 4
  159. Buffer_5_16    Db    256 Dup (?)        ; Unencrypted sector 5
  160. Buffer_6_16    Db    256 Dup (?)        ; Unencrypted sector 6
  161. Buffer_7_16    Db    256 Dup (?)        ; Unencrypted sector 7
  162. Buffer_8_16    Db    256 Dup (?)        ; Unencrypted sector 8
  163. Buffer_9_16    Db    256 Dup (?)        ; Unencrypted sector 9
  164. Buffer_A_16    Db    256 Dup (?)        ; Unencrypted sector A
  165. Buffer_B_16    Db    256 Dup (?)        ; Unencrypted sector B
  166. Buffer_C_16    Db    256 Dup (?)        ; Unencrypted sector C
  167. Buffer_D_16    Db    256 Dup (?)        ; Unencrypted sector D
  168. Buffer_E_16    Db    256 Dup (?)        ; Unencrypted sector E
  169. Buffer_F_16    Db    256 Dup (?)        ; Unencrypted sector F
  170. Buffer_16    Ends                ; End of Buffer_16 structure
  171. ;******************************************************************************
  172. ;
  173. ;    Define the encrypted track buffer structure (13 Sector Disk)
  174. ;
  175. ;******************************************************************************
  176. Track_13    Struc                ; 13 Sector track structure
  177. Gap_1_13    Db    64 Dup (?)        ; 13 Sector disk - Gap 1
  178. Sector_0_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 0
  179. Sector_1_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 1
  180. Sector_2_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 2
  181. Sector_3_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 3
  182. Sector_4_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 4
  183. Sector_5_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 5
  184. Sector_6_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 6
  185. Sector_7_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 7
  186. Sector_8_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 8
  187. Sector_9_13    Db    447 Dup (?)        ; 13 Sector disk - Sector 9
  188. Sector_A_13    Db    447 Dup (?)        ; 13 Sector disk - Sector A
  189. Sector_B_13    Db    447 Dup (?)        ; 13 Sector disk - Sector B
  190. Sector_C_13    Db    447 Dup (?)        ; 13 Sector disk - Sector C
  191. Track_13    Ends                ; End of Track_13 structure
  192. ;******************************************************************************
  193. ;
  194. ;    Define the encrypted track buffer structure (16 Sector Disk)
  195. ;
  196. ;******************************************************************************
  197. Track_16    Struc                ; 16 Sector track structure
  198. Gap_1_16    Db    64 Dup (?)        ; 16 Sector disk - Gap 1
  199. Sector_0_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 0
  200. Sector_1_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 1
  201. Sector_2_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 2
  202. Sector_3_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 3
  203. Sector_4_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 4
  204. Sector_5_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 5
  205. Sector_6_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 6
  206. Sector_7_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 7
  207. Sector_8_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 8
  208. Sector_9_16    Db    379 Dup (?)        ; 16 Sector disk - Sector 9
  209. Sector_A_16    Db    379 Dup (?)        ; 16 Sector disk - Sector A
  210. Sector_B_16    Db    379 Dup (?)        ; 16 Sector disk - Sector B
  211. Sector_C_16    Db    379 Dup (?)        ; 16 Sector disk - Sector C
  212. Sector_D_16    Db    379 Dup (?)        ; 16 Sector disk - Sector D
  213. Sector_E_16    Db    379 Dup (?)        ; 16 Sector disk - Sector E
  214. Sector_F_16    Db    379 Dup (?)        ; 16 Sector disk - Sector F
  215. Track_16    Ends                ; End of Track_16 structure
  216. ;******************************************************************************
  217. ;
  218. ;    Define the sector structure (13 Sector Disk)
  219. ;
  220. ;******************************************************************************
  221. Sector_13    Struc                ; 13 Sector structure
  222. Prologue_13    Db    3 Dup (?)        ; 13 Sector prologue (D5 AA AD)
  223. Data_13     Db    410 Dup (?)        ; 13 Sector data bytes
  224. Checksum_13    Db    1 Dup (?)        ; 13 Sector checksum
  225. Epilogue_13    Db    3 Dup (?)        ; 13 Sector epilogue (DE AA EB)
  226. Sector_13    Ends                ; End of Sector_13 structure
  227. ;******************************************************************************
  228. ;
  229. ;    Define the sector structure (16 Sector Disk)
  230. ;
  231. ;******************************************************************************
  232. Sector_16    Struc                ; 16 Sector structure
  233. Prologue_16    Db    3 Dup (?)        ; 16 Sector prologue (D5 AA AD)
  234. Data_16     Db    342 Dup (?)        ; 16 Sector data bytes
  235. Checksum_16    Db    1 Dup (?)        ; 16 Sector checksum
  236. Epilogue_16    Db    3 Dup (?)        ; 16 Sector epilogue (DE AA EB)
  237. Sector_16    Ends                ; End of Sector_16 structure
  238. ;******************************************************************************
  239. ;
  240. ;    Define the address structure (13/16 Sector Disk)
  241. ;
  242. ;******************************************************************************
  243. Disk_Address    Struc                ; Disk track address structure
  244. Prologue    Db    3 Dup (?)        ; Address prologue (D5 AA 96)
  245. Volume        Db    2 Dup (?)        ; Disk volume number
  246. Track        Db    2 Dup (?)        ; Disk track number
  247. Sector        Db    2 Dup (?)        ; Disk sector number
  248. Checksum    Db    2 Dup (?)        ; Address checksum
  249. Epilogue    Db    2 Dup (?)        ; Address epilogue (DE AA EB)
  250. Disk_Address    Ends                ; End of Disk_Address structure
  251. ;******************************************************************************
  252. ;
  253. ;    Define the find matching file structure
  254. ;
  255. ;******************************************************************************
  256. Find_Match    Struc                ; Find matching structure
  257. DOS_Reserved    Db    21 Dup (?)        ; MS-DOS reserved area
  258. File_Attr    Db    (?)            ; File attribute byte
  259. File_Time    Dw    (?)            ; File time value
  260. File_Date    Dw    (?)            ; File data value
  261. File_Size_Low    Dw    (?)            ; File size value (LSW)
  262. File_Size_High    Dw    (?)            ; File size value (MSW)
  263. File_Name    Db    13 Dup (?)        ; File name/extension/zero byte
  264. Find_Match    Ends                ; End of Find_Match structure
  265. ;******************************************************************************
  266. ;
  267. ;    Define the debug opcode structure
  268. ;
  269. ;******************************************************************************
  270. Opcode        Struc                ; Opcode debug structure
  271. Op_Type     Db    ?            ; Opcode type value
  272. Op_Address    Db    ?            ; Opcode addressing type
  273. Opcode        Ends                ; End of Opcode structure
  274. ;******************************************************************************
  275. ;
  276. ;    Define the Int_Update stack frame structure
  277. ;
  278. ;******************************************************************************
  279. Stack_Frame    Struc            ; Int_Update stack frame definition
  280. BP_Save     Dw    ?        ; Saved BP register value
  281. Return_Address    Dw    ?        ; Caller return address
  282. AX_Save     Dw    ?        ; Saved AX register (From Interrupt)
  283. Current_IP    Dw    ?        ; Currently executing IP register
  284. Current_CS    Dw    ?        ; Currently executing CS register
  285. Current_Flag    Dw    ?        ; Currently executing flag register
  286. Stack_Frame    Ends            ; End of stack frame definition
  287.     .List
  288.