fcdev-cc65 0.0.0-stage → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/LICENSE +17 -0
  2. package/asminc/_file.inc +27 -0
  3. package/asminc/_heap.inc +35 -0
  4. package/asminc/accelerator.inc +80 -0
  5. package/asminc/agat.inc +39 -0
  6. package/asminc/apple2.inc +95 -0
  7. package/asminc/apple2.mac +54 -0
  8. package/asminc/ascii_charmap.inc +287 -0
  9. package/asminc/atari.inc +1169 -0
  10. package/asminc/atari.mac +65 -0
  11. package/asminc/atari2600.inc +7 -0
  12. package/asminc/atari2600_riot.inc +20 -0
  13. package/asminc/atari2600_tia.inc +69 -0
  14. package/asminc/atari5200.inc +133 -0
  15. package/asminc/atari7800.inc +14 -0
  16. package/asminc/atari7800_maria.inc +39 -0
  17. package/asminc/atari7800_riot.inc +20 -0
  18. package/asminc/atari7800_tia.inc +69 -0
  19. package/asminc/atari_antic.inc +95 -0
  20. package/asminc/atari_atascii_charmap.inc +301 -0
  21. package/asminc/atari_gtia.inc +119 -0
  22. package/asminc/atari_pokey.inc +43 -0
  23. package/asminc/atari_screen_charmap.inc +303 -0
  24. package/asminc/atmos.inc +117 -0
  25. package/asminc/c128.inc +224 -0
  26. package/asminc/c16.inc +9 -0
  27. package/asminc/c64.inc +219 -0
  28. package/asminc/c65.inc +239 -0
  29. package/asminc/cbm.mac +56 -0
  30. package/asminc/cbm510.inc +200 -0
  31. package/asminc/cbm610.inc +121 -0
  32. package/asminc/cbm_filetype.inc +34 -0
  33. package/asminc/cbm_kernal.inc +248 -0
  34. package/asminc/cbm_petscii_charmap.inc +291 -0
  35. package/asminc/cbm_screen_charmap.inc +305 -0
  36. package/asminc/cpu.mac +4 -0
  37. package/asminc/creativision.inc +66 -0
  38. package/asminc/ctype.inc +31 -0
  39. package/asminc/ctype_common.inc +91 -0
  40. package/asminc/ctypetable.inc +48 -0
  41. package/asminc/cx16.inc +574 -0
  42. package/asminc/em-error.inc +49 -0
  43. package/asminc/em-kernel.inc +106 -0
  44. package/asminc/errno.inc +37 -0
  45. package/asminc/fcntl.inc +21 -0
  46. package/asminc/gamate.inc +64 -0
  47. package/asminc/generic.mac +53 -0
  48. package/asminc/get_tv.inc +22 -0
  49. package/asminc/joy-error.inc +44 -0
  50. package/asminc/joy-kernel.inc +83 -0
  51. package/asminc/kim1.inc +31 -0
  52. package/asminc/longbranch.mac +88 -0
  53. package/asminc/lynx.inc +460 -0
  54. package/asminc/mega65.inc +239 -0
  55. package/asminc/modload.inc +78 -0
  56. package/asminc/module.mac +13 -0
  57. package/asminc/mouse-kernel.inc +184 -0
  58. package/asminc/nes.inc +93 -0
  59. package/asminc/o65.inc +150 -0
  60. package/asminc/opcodes.inc +514 -0
  61. package/asminc/pce.inc +93 -0
  62. package/asminc/pet.inc +100 -0
  63. package/asminc/plus4.inc +86 -0
  64. package/asminc/rp6502.inc +98 -0
  65. package/asminc/ser-error.inc +55 -0
  66. package/asminc/ser-kernel.inc +162 -0
  67. package/asminc/signal.inc +57 -0
  68. package/asminc/sim65.inc +75 -0
  69. package/asminc/smc.inc +267 -0
  70. package/asminc/stat.inc +64 -0
  71. package/asminc/statvfs.inc +46 -0
  72. package/asminc/stdio.inc +74 -0
  73. package/asminc/supervision.inc +75 -0
  74. package/asminc/sym1.inc +186 -0
  75. package/asminc/telestrat.inc +546 -0
  76. package/asminc/tgi-error.inc +52 -0
  77. package/asminc/tgi-kernel.inc +233 -0
  78. package/asminc/tgi-vectorfont.inc +70 -0
  79. package/asminc/time.inc +74 -0
  80. package/asminc/utsname.inc +46 -0
  81. package/asminc/vic20.inc +119 -0
  82. package/asminc/zeropage.inc +40 -0
  83. package/bin/ar65.exe +0 -0
  84. package/bin/ca65.exe +0 -0
  85. package/bin/cc65.exe +0 -0
  86. package/bin/da65.exe +0 -0
  87. package/bin/ld65.exe +0 -0
  88. package/cfg/module.cfg +21 -0
  89. package/cfg/nes.cfg +62 -0
  90. package/cfg/none.cfg +37 -0
  91. package/include/6502.h +140 -0
  92. package/include/_6522.h +68 -0
  93. package/include/_6525.h +62 -0
  94. package/include/_6526.h +71 -0
  95. package/include/_6545.h +53 -0
  96. package/include/_6551.h +55 -0
  97. package/include/_antic.h +254 -0
  98. package/include/_atari5200os.h +94 -0
  99. package/include/_atarios.h +661 -0
  100. package/include/_gtia.h +281 -0
  101. package/include/_heap.h +60 -0
  102. package/include/_maria.h +63 -0
  103. package/include/_mikey.h +264 -0
  104. package/include/_pbi.h +63 -0
  105. package/include/_pia.h +52 -0
  106. package/include/_pokey.h +220 -0
  107. package/include/_riot.h +26 -0
  108. package/include/_sid.h +68 -0
  109. package/include/_suzy.h +336 -0
  110. package/include/_ted.h +86 -0
  111. package/include/_tia.h +100 -0
  112. package/include/_vdc.h +53 -0
  113. package/include/_vic.h +67 -0
  114. package/include/_vic2.h +192 -0
  115. package/include/_vic3.h +188 -0
  116. package/include/accelerator.h +339 -0
  117. package/include/agat.h +76 -0
  118. package/include/apple2.h +358 -0
  119. package/include/apple2_filetype.h +324 -0
  120. package/include/apple2enh.h +67 -0
  121. package/include/arpa/inet.h +81 -0
  122. package/include/ascii_charmap.h +295 -0
  123. package/include/assert.h +59 -0
  124. package/include/atari.h +554 -0
  125. package/include/atari2600.h +32 -0
  126. package/include/atari5200.h +100 -0
  127. package/include/atari7800.h +67 -0
  128. package/include/atari_atascii_charmap.h +304 -0
  129. package/include/atari_screen_charmap.h +310 -0
  130. package/include/atmos.h +189 -0
  131. package/include/c128.h +175 -0
  132. package/include/c16.h +60 -0
  133. package/include/c64.h +175 -0
  134. package/include/c65.h +120 -0
  135. package/include/cbm.h +321 -0
  136. package/include/cbm264.h +165 -0
  137. package/include/cbm510.h +168 -0
  138. package/include/cbm610.h +153 -0
  139. package/include/cbm_filetype.h +108 -0
  140. package/include/cbm_petscii_charmap.h +297 -0
  141. package/include/cbm_screen_charmap.h +311 -0
  142. package/include/cc65.h +109 -0
  143. package/include/conio.h +248 -0
  144. package/include/creativision.h +78 -0
  145. package/include/ctype.h +88 -0
  146. package/include/cx16.h +420 -0
  147. package/include/dbg.h +124 -0
  148. package/include/device.h +72 -0
  149. package/include/dio.h +113 -0
  150. package/include/dirent.h +151 -0
  151. package/include/em/em-kernel.h +77 -0
  152. package/include/em.h +135 -0
  153. package/include/errno.h +135 -0
  154. package/include/fcntl.h +75 -0
  155. package/include/gamate.h +209 -0
  156. package/include/geos/gconst.h +69 -0
  157. package/include/geos/gdisk.h +79 -0
  158. package/include/geos/gdlgbox.h +110 -0
  159. package/include/geos/gfile.h +72 -0
  160. package/include/geos/ggraph.h +180 -0
  161. package/include/geos/gmemory.h +30 -0
  162. package/include/geos/gmenu.h +53 -0
  163. package/include/geos/gprocess.h +22 -0
  164. package/include/geos/gsprite.h +96 -0
  165. package/include/geos/gstruct.h +174 -0
  166. package/include/geos/gsym.h +340 -0
  167. package/include/geos/gsys.h +54 -0
  168. package/include/geos.h +109 -0
  169. package/include/inttypes.h +237 -0
  170. package/include/iso646.h +60 -0
  171. package/include/joystick/joy-kernel.h +84 -0
  172. package/include/joystick.h +109 -0
  173. package/include/kim1.h +73 -0
  174. package/include/limits.h +87 -0
  175. package/include/locale.h +83 -0
  176. package/include/lynx.h +144 -0
  177. package/include/lz4.h +43 -0
  178. package/include/lzsa.h +56 -0
  179. package/include/mega65.h +120 -0
  180. package/include/modload.h +103 -0
  181. package/include/mouse/mouse-kernel.h +67 -0
  182. package/include/mouse.h +220 -0
  183. package/include/nes.h +203 -0
  184. package/include/o65.h +178 -0
  185. package/include/osic1p.h +66 -0
  186. package/include/pce.h +110 -0
  187. package/include/peekpoke.h +58 -0
  188. package/include/pen.h +78 -0
  189. package/include/pet.h +113 -0
  190. package/include/plus4.h +63 -0
  191. package/include/rp6502.h +266 -0
  192. package/include/serial.h +180 -0
  193. package/include/setjmp.h +55 -0
  194. package/include/signal.h +74 -0
  195. package/include/sim65.h +136 -0
  196. package/include/stdarg.h +57 -0
  197. package/include/stdbool.h +53 -0
  198. package/include/stddef.h +66 -0
  199. package/include/stdint.h +144 -0
  200. package/include/stdio.h +166 -0
  201. package/include/stdlib.h +174 -0
  202. package/include/string.h +106 -0
  203. package/include/supervision.h +137 -0
  204. package/include/sym1.h +165 -0
  205. package/include/sys/stat.h +94 -0
  206. package/include/sys/statvfs.h +74 -0
  207. package/include/sys/types.h +102 -0
  208. package/include/sys/utsname.h +97 -0
  209. package/include/target.h +77 -0
  210. package/include/telestrat.h +129 -0
  211. package/include/tgi/tgi-error.h +64 -0
  212. package/include/tgi/tgi-kernel.h +75 -0
  213. package/include/tgi/tgi-vectorfont.h +90 -0
  214. package/include/tgi.h +286 -0
  215. package/include/time.h +143 -0
  216. package/include/unistd.h +103 -0
  217. package/include/vic20.h +141 -0
  218. package/include/zlib.h +175 -0
  219. package/include/zx02.h +44 -0
  220. package/lib/nes.lib +0 -0
  221. package/lib/none.lib +0 -0
  222. package/manifest.json +227 -0
  223. package/package.json +19 -4
  224. package/README.md +0 -3
@@ -0,0 +1,78 @@
1
+ ;*****************************************************************************/
2
+ ;* */
3
+ ;* modload.inc */
4
+ ;* */
5
+ ;* o65 module loader interface for cc65 */
6
+ ;* */
7
+ ;* */
8
+ ;* */
9
+ ;* (C) 2002 Ullrich von Bassewitz */
10
+ ;* Wacholderweg 14 */
11
+ ;* D-70597 Stuttgart */
12
+ ;* EMail: uz@musoftware.de */
13
+ ;* */
14
+ ;* */
15
+ ;* This software is provided 'as-is', without any expressed or implied */
16
+ ;* warranty. In no event will the authors be held liable for any damages */
17
+ ;* arising from the use of this software. */
18
+ ;* */
19
+ ;* Permission is granted to anyone to use this software for any purpose, */
20
+ ;* including commercial applications, and to alter it and redistribute it */
21
+ ;* freely, subject to the following restrictions: */
22
+ ;* */
23
+ ;* 1. The origin of this software must not be misrepresented; you must not */
24
+ ;* claim that you wrote the original software. If you use this software */
25
+ ;* in a product, an acknowledgment in the product documentation would be */
26
+ ;* appreciated but is not required. */
27
+ ;* 2. Altered source versions must be plainly marked as such, and must not */
28
+ ;* be misrepresented as being the original software. */
29
+ ;* 3. This notice may not be removed or altered from any source */
30
+ ;* distribution. */
31
+ ;* */
32
+ ;*****************************************************************************/
33
+
34
+
35
+
36
+ ; Exports structures and functions to load relocatable o65 modules at
37
+ ; runtime.
38
+
39
+
40
+
41
+ ; Offsets for the mod_ctrl struct. This struct is passed to the module loader.
42
+ ; It contains stuff, the loader needs to work, and another area where the
43
+ ; loader will place informational data if it was successful. You will have to
44
+ ; check the return code of mod_load before accessing any of these additional
45
+ ; struct members.
46
+ .struct MOD_CTRL
47
+ READ .addr
48
+ CALLERDATA .word
49
+ MODULE .addr ; Pointer to module data
50
+ MODULE_SIZE .word ; Total size of loaded module
51
+ MODULE_ID .word
52
+ .endstruct
53
+
54
+ ; unsigned char mod_load (struct mod_ctrl* ctrl);
55
+ ; /* Load a module into memory and relocate it. The function will return an
56
+ ; * error code (see below). If MLOAD_OK is returned, the outgoing fields in
57
+ ; * the passed mod_ctrl struct contain information about the module just
58
+ ; * loaded.
59
+ ; */
60
+ .global _mod_load
61
+
62
+ ; void mod_free (void* module);
63
+ ; /* Free a loaded module. Note: The given pointer is the pointer to the
64
+ ; * module memory, not a pointer to a control structure.
65
+ ; */
66
+ .global _mod_free
67
+
68
+ ; Errors
69
+ .enum
70
+ MLOAD_OK ; Module load successful
71
+ MLOAD_ERR_READ ; Read error
72
+ MLOAD_ERR_HDR ; Header error
73
+ MLOAD_ERR_OS ; Wrong OS
74
+ MLOAD_ERR_FMT ; Data format error
75
+ MLOAD_ERR_MEM ; Not enough memory
76
+ .endenum
77
+
78
+
@@ -0,0 +1,13 @@
1
+ .ifndef DYN_DRV
2
+ DYN_DRV = 1
3
+ .endif
4
+
5
+ .macro module_header module_label
6
+ .if DYN_DRV
7
+ .segment "HEADER"
8
+ .else
9
+ .data
10
+ .export module_label
11
+ module_label:
12
+ .endif
13
+ .endmacro
@@ -0,0 +1,184 @@
1
+ ;/*****************************************************************************/
2
+ ;/* */
3
+ ;/* mouse-kernel.inc */
4
+ ;/* */
5
+ ;/* Mouse API */
6
+ ;/* */
7
+ ;/* */
8
+ ;/* */
9
+ ;/* (C) 2003-2009, Ullrich von Bassewitz */
10
+ ;/* Roemerstrasse 52 */
11
+ ;/* D-70794 Filderstadt */
12
+ ;/* EMail: uz@cc65.org */
13
+ ;/* */
14
+ ;/* */
15
+ ;/* */
16
+ ;/* */
17
+ ;/* This software is provided 'as-is', without any expressed or implied */
18
+ ;/* warranty. In no event will the authors be held liable for any damages */
19
+ ;/* arising from the use of this software. */
20
+ ;/* */
21
+ ;/* Permission is granted to anyone to use this software for any purpose, */
22
+ ;/* including commercial applications, and to alter it and redistribute it */
23
+ ;/* freely, subject to the following restrictions: */
24
+ ;/* */
25
+ ;/* 1. The origin of this software must not be misrepresented; you must not */
26
+ ;/* claim that you wrote the original software. If you use this software */
27
+ ;/* in a product, an acknowledgment in the product documentation would be */
28
+ ;/* appreciated but is not required. */
29
+ ;/* 2. Altered source versions must be plainly marked as such, and must not */
30
+ ;/* be misrepresented as being the original software. */
31
+ ;/* 3. This notice may not be removed or altered from any source */
32
+ ;/* distribution. */
33
+ ;/* */
34
+ ;/*****************************************************************************/
35
+
36
+
37
+
38
+
39
+ ;------------------------------------------------------------------------------
40
+ ; Error codes
41
+
42
+ .enum
43
+ MOUSE_ERR_OK ; No error
44
+ MOUSE_ERR_NO_DRIVER ; No driver available
45
+ MOUSE_ERR_CANNOT_LOAD ; Error loading driver
46
+ MOUSE_ERR_INV_DRIVER ; Invalid driver
47
+ MOUSE_ERR_NO_DEVICE ; Mouse hardware not found
48
+ MOUSE_ERR_INV_IOCTL ; Invalid ioctl code
49
+
50
+ MOUSE_ERR_COUNT ; Special: Number of error codes
51
+ .endenum
52
+
53
+ ;------------------------------------------------------------------------------
54
+ ; The driver header
55
+
56
+ .struct MOUSE_HDR
57
+ ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
58
+ VERSION .byte 1 ; Interface version
59
+ LIBREF .addr ; Library reference
60
+ JUMPTAB .struct
61
+ INSTALL .addr
62
+ UNINSTALL .addr
63
+ HIDE .addr
64
+ SHOW .addr
65
+ SETBOX .addr
66
+ GETBOX .addr
67
+ MOVE .addr
68
+ BUTTONS .addr
69
+ POS .addr
70
+ INFO .addr
71
+ IOCTL .addr
72
+ IRQ .addr
73
+ .endstruct
74
+ FLAGS .byte ; Mouse driver flags
75
+ CALLBACKS .struct ; Jump instructions
76
+ .byte ; JMP opcode
77
+ CHIDE .addr ; Jump address
78
+ .byte
79
+ CSHOW .addr
80
+ .byte
81
+ CPREP .addr
82
+ .byte
83
+ CDRAW .addr
84
+ .byte
85
+ CMOVEX .addr
86
+ .byte
87
+ CMOVEY .addr
88
+ .endstruct
89
+ .endstruct
90
+
91
+ ;------------------------------------------------------------------------------
92
+ ; The mouse callback structure
93
+
94
+ .struct MOUSE_CALLBACKS
95
+ HIDE .addr ; Hide the mouse cursor
96
+ SHOW .addr ; Show the mouse cursor
97
+ PREP .addr ; Prepare to move the mouse cursor
98
+ DRAW .addr ; Draw the mouse cursor
99
+ MOVEX .addr ; Move the mouse cursor to X coord
100
+ MOVEY .addr ; Move the mouse cursor to Y coord
101
+ .endstruct
102
+
103
+ ;------------------------------------------------------------------------------
104
+ ; The mouse API version, stored in MOUSE_HDR::VERSION
105
+
106
+ MOUSE_API_VERSION = $06
107
+
108
+ ;------------------------------------------------------------------------------
109
+ ; Bitmapped mouse driver flags, stored in MOUSE_HDR::FLAGS.
110
+ ; Note: If neither of MOUSE_FLAG_XXX_IRQ is set, no interrupts are supplied
111
+ ; to the driver. If one of the bits is set, the interrupt vector MUST be
112
+ ; valid.
113
+ ; Beware: Some of the bits are tested using the BIT instruction, so do not
114
+ ; change the values without checking the code!
115
+
116
+ MOUSE_FLAG_EARLY_IRQ = $40 ; Enable IRQ *before* calling INSTALL
117
+ MOUSE_FLAG_LATE_IRQ = $80 ; Enable IRQ *after* calling INSTALL
118
+
119
+ ;------------------------------------------------------------------------------
120
+ ; Mouse button definitions
121
+
122
+ MOUSE_BTN_LEFT = $10
123
+ MOUSE_BTN_RIGHT = $01
124
+
125
+ ;------------------------------------------------------------------------------
126
+ ; Structures used to return data from the mouse driver
127
+
128
+ .struct MOUSE_POS
129
+ XCOORD .word
130
+ YCOORD .word
131
+ .endstruct
132
+
133
+ .struct MOUSE_INFO
134
+ POS .tag MOUSE_POS
135
+ BUTTONS .byte
136
+ .endstruct
137
+
138
+ .struct MOUSE_BOX
139
+ MINX .word
140
+ MINY .word
141
+ MAXX .word
142
+ MAXY .word
143
+ .endstruct
144
+
145
+ ;------------------------------------------------------------------------------
146
+ ; Variables
147
+
148
+ .global _mouse_drv ; Pointer to driver
149
+ .global _mouse_hidden ; Counter, 0 = mouse is visible
150
+
151
+ ;------------------------------------------------------------------------------
152
+ ; C callable functions
153
+
154
+ .global _mouse_load_driver
155
+ .global _mouse_unload
156
+ .global _mouse_install
157
+ .global _mouse_uninstall
158
+ .global _mouse_geterrormsg
159
+ .global _mouse_hide
160
+ .global _mouse_show
161
+ .global _mouse_setbox
162
+ .global _mouse_getbox
163
+ .global _mouse_move
164
+ .global _mouse_buttons
165
+ .global _mouse_pos
166
+ .global _mouse_info
167
+ .global _mouse_ioctl
168
+
169
+ .global _mouse_clear_ptr
170
+
171
+ ;------------------------------------------------------------------------------
172
+ ; Driver entry points (asm callable)
173
+
174
+ .global mouse_install
175
+ .global mouse_uninstall
176
+ .global mouse_hide
177
+ .global mouse_show
178
+ .global mouse_setbox
179
+ .global mouse_getbox
180
+ .global mouse_move
181
+ .global mouse_buttons
182
+ .global mouse_pos
183
+ .global mouse_info
184
+ .global mouse_ioctl
package/asminc/nes.inc ADDED
@@ -0,0 +1,93 @@
1
+ ;
2
+ ; NES definitions. By Groepaz/Hitmem.
3
+ ;
4
+
5
+
6
+ ;; FIXME: optimize zeropage usage
7
+
8
+ SCREEN_PTR = $62 ;2
9
+ CRAM_PTR = $64 ;2
10
+ CHARCOLOR = $66
11
+ BGCOLOR = $67
12
+ RVS = $68
13
+ CURS_X = $69
14
+ CURS_Y = $6a
15
+
16
+ tickcount = $6b ;2
17
+
18
+ VBLANK_FLAG = $70
19
+
20
+ ringbuff = $0200
21
+ ringwrite = $71
22
+ ringread = $72
23
+ ringcount = $73
24
+
25
+ ppuhi = $74
26
+ ppulo = $75
27
+ ppuval = $76
28
+
29
+ screenrows = (30-1)
30
+ charsperline = 32
31
+ xsize = charsperline
32
+
33
+ ;; PPU defines
34
+
35
+ PPU_CTRL1 = $2000
36
+ PPU_CTRL2 = $2001
37
+ PPU_STATUS = $2002
38
+ PPU_SPR_ADDR = $2003
39
+ PPU_SPR_IO = $2004
40
+ PPU_VRAM_ADDR1 = $2005
41
+ PPU_VRAM_ADDR2 = $2006
42
+ PPU_VRAM_IO = $2007
43
+
44
+ ;; APU defines
45
+
46
+ APU_PULSE1CTRL = $4000 ; Pulse #1 Control Register (W)
47
+ APU_PULSE1RAMP = $4001 ; Pulse #1 Ramp Control Register (W)
48
+ APU_PULSE1FTUNE = $4002 ; Pulse #1 Fine Tune (FT) Register (W)
49
+ APU_PULSE1CTUNE = $4003 ; Pulse #1 Coarse Tune (CT) Register (W)
50
+ APU_PULSE2CTRL = $4004 ; Pulse #2 Control Register (W)
51
+ APU_PULSE2RAMP = $4005 ; Pulse #2 Ramp Control Register (W)
52
+ APU_PULSE2FTUNE = $4006 ; Pulse #2 Fine Tune Register (W)
53
+ APU_PULSE2STUNE = $4007 ; Pulse #2 Coarse Tune Register (W)
54
+ APU_TRICTRL1 = $4008 ; Triangle Control Register #1 (W)
55
+ APU_TRICTRL2 = $4009 ; Triangle Control Register #2 (?)
56
+ APU_TRIFREQ1 = $400A ; Triangle Frequency Register #1 (W)
57
+ APU_TRIFREQ2 = $400B ; Triangle Frequency Register #2 (W)
58
+ APU_NOISECTRL = $400C ; Noise Control Register #1 (W)
59
+ ;;APU_ = $400D ; Unused (???)
60
+ APU_NOISEFREQ1 = $400E ; Noise Frequency Register #1 (W)
61
+ APU_NOISEFREQ2 = $400F ; Noise Frequency Register #2 (W)
62
+ APU_MODCTRL = $4010 ; Delta Modulation Control Register (W)
63
+ APU_MODDA = $4011 ; Delta Modulation D/A Register (W)
64
+ APU_MODADDR = $4012 ; Delta Modulation Address Register (W)
65
+ APU_MODLEN = $4013 ; Delta Modulation Data Length Register (W)
66
+ APU_SPR_DMA = $4014 ; Sprite DMA Register (W)
67
+ APU_CHANCTRL = $4015 ; Sound/Vertical Clock Signal Register (R)
68
+ APU_PAD1 = $4016 ; Joypad #1 (RW)
69
+ APU_PAD2 = $4017 ; Joypad #2/SOFTCLK (RW)
70
+
71
+
72
+ CH_HLINE = 11
73
+ CH_VLINE = 14
74
+ CH_ULCORNER = 176
75
+ CH_URCORNER = 174
76
+ CH_LLCORNER = 173
77
+ CH_LRCORNER = 189
78
+ CH_TTEE = 178
79
+ CH_RTEE = 179
80
+ CH_BTEE = 177
81
+ CH_LTEE = 171
82
+ CH_CROSS = 123
83
+ CH_CURS_UP = 145
84
+ CH_CURS_DOWN = 17
85
+ CH_CURS_LEFT = 157
86
+ CH_CURS_RIGHT = 29
87
+ CH_PI = 126
88
+ CH_DEL = 20
89
+ CH_INS = 148
90
+ CH_ENTER = 10
91
+ CH_STOP = 3
92
+ CH_ESC = 27
93
+
package/asminc/o65.inc ADDED
@@ -0,0 +1,150 @@
1
+ ;*****************************************************************************/
2
+ ;* */
3
+ ;* o65.inc */
4
+ ;* */
5
+ ;* Definitions for the o65 file format */
6
+ ;* */
7
+ ;* */
8
+ ;* */
9
+ ;* (C) 2002-2009, Ullrich von Bassewitz */
10
+ ;* Roemerstrasse 52 */
11
+ ;* D-70794 Filderstadt */
12
+ ;* EMail: uz@cc65.org */
13
+ ;* */
14
+ ;* */
15
+ ;* This software is provided 'as-is', without any expressed or implied */
16
+ ;* warranty. In no event will the authors be held liable for any damages */
17
+ ;* arising from the use of this software. */
18
+ ;* */
19
+ ;* Permission is granted to anyone to use this software for any purpose, */
20
+ ;* including commercial applications, and to alter it and redistribute it */
21
+ ;* freely, subject to the following restrictions: */
22
+ ;* */
23
+ ;* 1. The origin of this software must not be misrepresented; you must not */
24
+ ;* claim that you wrote the original software. If you use this software */
25
+ ;* in a product, an acknowledgment in the product documentation would be */
26
+ ;* appreciated but is not required. */
27
+ ;* 2. Altered source versions must be plainly marked as such, and must not */
28
+ ;* be misrepresented as being the original software. */
29
+ ;* 3. This notice may not be removed or altered from any source */
30
+ ;* distribution. */
31
+ ;* */
32
+ ;*****************************************************************************/
33
+
34
+
35
+
36
+ ; This files exports structures and constants to handle the o65 relocatable
37
+ ; file format as defined by Andre Fachat.
38
+
39
+
40
+
41
+ ; The o65 header structure (6502 format)
42
+ .struct O65_HDR
43
+ MARKER .byte 2 ; Non-C64 marker: $01 $00
44
+ MAGIC .byte 3 ; o65 magic: "o65"
45
+ VERSION .byte 1 ; Version number
46
+ MODE .word ; Mode word
47
+ TBASE .word ; Original text (code) segment address
48
+ TLEN .word ; Size of text (code) segment
49
+ DBASE .word ; Original data segment address
50
+ DLEN .word ; Size of data segment
51
+ BBASE .word ; Original bss segment address
52
+ BLEN .word ; Size of bss segment
53
+ ZBASE .word ; Original zp segment address
54
+ ZLEN .word ; Size of zp segment
55
+ STACK .word ; Stacksize needed
56
+ .endstruct
57
+
58
+ ; Marker, magic and version number
59
+ O65_MARKER_0 = $01
60
+ O65_MARKER_1 = $00
61
+ O65_MAGIC_0 = $6F ; 'o'
62
+ O65_MAGIC_1 = $36 ; '6'
63
+ O65_MAGIC_2 = $35 ; '5'
64
+ O65_VERSION = $00
65
+
66
+ ; Defines for the mode word
67
+ O65_CPU_65816 = $8000 ; Executable is for 65816
68
+ O65_CPU_6502 = $0000 ; Executable is for the 6502
69
+ O65_CPU_MASK = $8000 ; Mask to extract CPU type
70
+
71
+ O65_RELOC_PAGE = $4000 ; Page wise relocation
72
+ O65_RELOC_BYTE = $0000 ; Byte wise relocation
73
+ O65_RELOC_MASK = $4000 ; Mask to extract relocation type
74
+
75
+ O65_SIZE_32BIT = $2000 ; All size words are 32bit
76
+ O65_SIZE_16BIT = $0000 ; All size words are 16bit
77
+ O65_SIZE_MASK = $2000 ; Mask to extract size
78
+
79
+ O65_FTYPE_OBJ = $1000 ; Object file
80
+ O65_FTYPE_EXE = $0000 ; Executable file
81
+ O65_FTYPE_MASK = $1000 ; Mask to extract type
82
+
83
+ O65_ADDR_SIMPLE = $0800 ; Simple addressing
84
+ O65_ADDR_DEFAULT = $0000 ; Default addressing
85
+ O65_ADDR_MASK = $0800 ; Mask to extract addressing
86
+
87
+ O65_CHAIN = $0400 ; Chained file, another one follows
88
+ O65_CHAIN_MASK = $0400 ; Mask to extract chain flag
89
+
90
+ O65_BSSZERO = $0200 ; BSS segment must be zeroed
91
+ O65_BSSZERO_MASK = $0200 ; Mask to extract bss zero flag
92
+
93
+ ; The following is used if O65_CPU == 6502
94
+ O65_CPU2_6502 = $0000 ; Executable is for 6502
95
+ O65_CPU2_65C02 = $0010 ; Executable is for 65C02
96
+ O65_CPU2_65SC02 = $0020 ; Executable is for 65SC02
97
+ O65_CPU2_65CE02 = $0030 ; Executable is for 65CE02
98
+ O65_CPU2_6502X = $0040 ; Executable is for NMOS 6502
99
+ O65_CPU2_65816_EMU = $0050 ; Executable is for 65816 in emul mode
100
+ O65_CPU2_MASK = $00F0 ; Mask to extract CPU2 field
101
+
102
+ O65_ALIGN_1 = $0000 ; Bytewise alignment
103
+ O65_ALIGN_2 = $0001 ; Align words
104
+ O65_ALIGN_4 = $0002 ; Align longwords
105
+ O65_ALIGN_256 = $0003 ; Align pages (256 bytes)
106
+ O65_ALIGN_MASK = $0003 ; Mask to extract alignment
107
+
108
+ ; The mode word as generated by the ld65 linker
109
+ O65_MODE_CC65 = O65_CPU_6502 | O65_RELOC_BYTE | O65_SIZE_16BIT | O65_FTYPE_EXE | O65_ADDR_SIMPLE | O65_ALIGN_1
110
+
111
+ ; Relocation type codes
112
+ O65_RTYPE_WORD = $80
113
+ O65_RTYPE_HIGH = $40
114
+ O65_RTYPE_LOW = $20
115
+ O65_RTYPE_SEGADDR = $C0
116
+ O65_RTYPE_SEG = $A0
117
+ O65_RTYPE_MASK = $E0
118
+
119
+ ; Segment IDs
120
+ O65_SEGID_UNDEF = $00
121
+ O65_SEGID_ABS = $01
122
+ O65_SEGID_TEXT = $02
123
+ O65_SEGID_DATA = $03
124
+ O65_SEGID_BSS = $04
125
+ O65_SEGID_ZP = $05
126
+ O65_SEGID_MASK = $07
127
+
128
+ ; Option tags
129
+ O65_OPT_FILENAME = 0
130
+ O65_OPT_OS = 1
131
+ O65_OPT_ASM = 2
132
+ O65_OPT_AUTHOR = 3
133
+ O65_OPT_TIMESTAMP = 4
134
+
135
+ ; Operating system codes for O65_OPT_OS
136
+ O65_OS_OSA65 = 1
137
+ O65_OS_LUNIX = 2
138
+ O65_OS_CC65 = 3
139
+ O65_OS_OPENCBM = 4
140
+
141
+ ; Load errors
142
+ O65_LOAD_OK = 0 ; Module load successful
143
+ O65_LOAD_ERR_READ = 1 ; Read error
144
+ O65_LOAD_ERR_HDR = 2 ; Header error
145
+ O65_LOAD_ERR_OS = 3 ; Wrong OS
146
+ O65_LOAD_ERR_FMT = 4 ; Data format error
147
+ O65_LOAD_ERR_MEM = 5 ; Not enough memory
148
+
149
+
150
+