fcdev-cc65 0.0.0-stage → 0.7.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,233 @@
1
+ ;*****************************************************************************/
2
+ ;* */
3
+ ;* tgi-kernel.inc */
4
+ ;* */
5
+ ;* TGI kernel interface */
6
+ ;* */
7
+ ;* */
8
+ ;* */
9
+ ;* (C) 2002-2012, 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
+ ;------------------------------------------------------------------------------
37
+ ; The driver header
38
+
39
+ .struct TGI_HDR
40
+ ID .byte 3 ; Contains 0x74, 0x67, 0x69 ("tgi")
41
+ VERSION .byte 1 ; Interface version
42
+ LIBREF .addr ; Library reference
43
+ VARS .struct
44
+ XRES .word 1 ; X resolution
45
+ YRES .word 1 ; Y resolution
46
+ COLORCOUNT .byte 1 ; Number of available colors
47
+ PAGECOUNT .byte 1 ; Number of screens available
48
+ FONTWIDTH .byte 1 ; System font width in pixel
49
+ FONTHEIGHT .byte 1 ; System font height in pixel
50
+ ASPECTRATIO .word 1 ; Fixed point 8.8 format
51
+ FLAGS .byte 1 ; TGI driver flags
52
+ .endstruct
53
+ JUMPTAB .struct
54
+ INSTALL .addr ; INSTALL routine
55
+ UNINSTALL .addr ; UNINSTALL routine
56
+ INIT .addr ; INIT routine
57
+ DONE .addr ; DONE routine
58
+ GETERROR .addr ; GETERROR routine
59
+ CONTROL .addr ; CONTROL routine
60
+ CLEAR .addr ; CLEAR routine
61
+ SETVIEWPAGE .addr ; SETVIEWPAGE routine
62
+ SETDRAWPAGE .addr ; SETDRAWPAGE routine
63
+ SETCOLOR .addr ; SETCOLOR routine
64
+ SETPALETTE .addr ; SETPALETTE routine
65
+ GETPALETTE .addr ; GETPALETTE routine
66
+ GETDEFPALETTE .addr ; GETDEFPALETTE routine
67
+ SETPIXEL .addr ; SETPIXEL routine
68
+ GETPIXEL .addr ; GETPIXEL routine
69
+ LINE .addr ; LINE routine
70
+ BAR .addr ; BAR routine
71
+ TEXTSTYLE .addr ; TEXTSTYLE routine
72
+ OUTTEXT .addr ; OUTTEXT routine
73
+ .endstruct
74
+ .endstruct
75
+
76
+ ;------------------------------------------------------------------------------
77
+ ; The TGI API version, stored at TGI_HDR_VERSION
78
+
79
+ TGI_API_VERSION = $06
80
+
81
+ ;------------------------------------------------------------------------------
82
+ ; Bitmapped tgi driver flags, stored in TGI_HDR::VARS::FLAGS.
83
+ ; Beware: Some of the bits are tested using the BIT instruction, so do not
84
+ ; change the values without checking the code!
85
+
86
+ TGI_BM_FONT_FINESCALE = $80 ; Bitmap fonts are fine grained scalable
87
+
88
+ ;------------------------------------------------------------------------------
89
+ ; Text constants
90
+
91
+ TGI_FONT_BITMAP = 0
92
+ TGI_FONT_VECTOR = 1
93
+
94
+ TGI_TEXT_HORIZONTAL = 0
95
+ TGI_TEXT_VERTICAL = 1
96
+
97
+ ;----------------------------------------------------------------------------
98
+ ; Results of tgi_outcode
99
+
100
+ TGI_CLIP_NONE = $00
101
+ TGI_CLIP_LEFT = $01
102
+ TGI_CLIP_RIGHT = $02
103
+ TGI_CLIP_BOTTOM = $04
104
+ TGI_CLIP_TOP = $08
105
+
106
+ ;------------------------------------------------------------------------------
107
+ ; ASM accessible color constants
108
+
109
+ .global tgi_color_black:zp ; Target-specific value for black
110
+ .global tgi_color_white:zp ; Target-specific value for white
111
+
112
+ ;------------------------------------------------------------------------------
113
+ ; C accessible variables
114
+
115
+ .global _tgi_drv ; Pointer to driver
116
+ .global _tgi_error ; Last error code
117
+ .global _tgi_gmode ; Flag: graphics mode active
118
+ .global _tgi_curx ; Current drawing cursor X
119
+ .global _tgi_cury ; Current drawing cursor Y
120
+ .global _tgi_color ; Current drawing color
121
+ .global _tgi_font ; Which font to use
122
+ .global _tgi_textdir ; Current text direction
123
+ .global _tgi_vectorfont ; Pointer to vector font
124
+ .global _tgi_textscalew ; Text magnification for the width
125
+ .global _tgi_textscaleh ; Text magnification for the height
126
+ .global _tgi_charwidth ; Width of scaled system font char
127
+ .global _tgi_charheight ; Height of scaled system font char
128
+ .global _tgi_xres ; X resolution of the current mode
129
+ .global _tgi_yres ; Y resolution of the current mode
130
+ .global _tgi_xmax ; Maximum X coordinate
131
+ .global _tgi_ymax ; Maximum Y coordinate
132
+ .global _tgi_colorcount ; Number of available colors
133
+ .global _tgi_pagecount ; Number of available screen pages
134
+ .global _tgi_fontwidth ; System font width
135
+ .global _tgi_fontheight ; System font height
136
+ .global _tgi_aspectratio ; Aspect ratio, fixed point 8.8
137
+ .global _tgi_flags ; TGI driver flags
138
+
139
+ ;------------------------------------------------------------------------------
140
+ ; ASM accessible variables
141
+
142
+ .global tgi_clip_x1 ; Coordinate for line clipper
143
+ .global tgi_clip_y1 ; Coordinate for line clipper
144
+ .global tgi_clip_x2 ; Coordinate for line clipper
145
+ .global tgi_clip_y2 ; Coordinate for line clipper
146
+
147
+ ;------------------------------------------------------------------------------
148
+ ; Driver entry points
149
+
150
+ .global tgi_install
151
+ .global tgi_uninstall
152
+ .global tgi_init
153
+ .global tgi_done
154
+ .global tgi_geterror
155
+ .global tgi_control
156
+ .global tgi_clear
157
+ .global tgi_setviewpage
158
+ .global tgi_setdrawpage
159
+ .global tgi_setcolor
160
+ .global tgi_setpalette
161
+ .global tgi_getpalette
162
+ .global tgi_getdefpalette
163
+ .global tgi_setpixel
164
+ .global tgi_getpixel
165
+ .global tgi_line
166
+ .global tgi_bar
167
+ .global tgi_textstyle
168
+ .global tgi_outtext
169
+
170
+ ;------------------------------------------------------------------------------
171
+ ; ASM functions
172
+
173
+ .global tgi_clear_ptr
174
+ .global tgi_clippedline
175
+ .global tgi_curtoxy
176
+ .global tgi_getset
177
+ .global tgi_imulround
178
+ .global tgi_inv_arg
179
+ .global tgi_inv_drv
180
+ .global tgi_linepop
181
+ .global tgi_outcode
182
+ .global tgi_popxy
183
+ .global tgi_popxy2
184
+ .global tgi_set_ptr
185
+
186
+ ;------------------------------------------------------------------------------
187
+ ; C callable functions
188
+
189
+ .global _tgi_arc
190
+ .global _tgi_bar
191
+ .global _tgi_circle
192
+ .global _tgi_clear
193
+ .global _tgi_done
194
+ .global _tgi_ellipse
195
+ .global _tgi_getaspectratio
196
+ .global _tgi_getcolor
197
+ .global _tgi_getcolorcount
198
+ .global _tgi_getdefpalette
199
+ .global _tgi_geterror
200
+ .global _tgi_geterrormsg
201
+ .global _tgi_getmaxcolor
202
+ .global _tgi_getmaxx
203
+ .global _tgi_getmaxy
204
+ .global _tgi_getpagecount
205
+ .global _tgi_getpalette
206
+ .global _tgi_getpixel
207
+ .global _tgi_gettextheight
208
+ .global _tgi_gettextwidth
209
+ .global _tgi_getxres
210
+ .global _tgi_getyres
211
+ .global _tgi_gotoxy
212
+ .global _tgi_imulround
213
+ .global _tgi_init
214
+ .global _tgi_install
215
+ .global _tgi_install_vectorfont
216
+ .global _tgi_ioctl
217
+ .global _tgi_line
218
+ .global _tgi_lineto
219
+ .global _tgi_load_driver
220
+ .global _tgi_outtext
221
+ .global _tgi_outtextxy
222
+ .global _tgi_pieslice
223
+ .global _tgi_setaspectratio
224
+ .global _tgi_setcolor
225
+ .global _tgi_setdrawpage
226
+ .global _tgi_setpalette
227
+ .global _tgi_setpixel
228
+ .global _tgi_settextdir
229
+ .global _tgi_settextscale
230
+ .global _tgi_settextstyle
231
+ .global _tgi_setviewpage
232
+ .global _tgi_uninstall
233
+ .global _tgi_unload
@@ -0,0 +1,70 @@
1
+ ;*****************************************************************************/
2
+ ;* */
3
+ ;* tgi-vectorfont.inc */
4
+ ;* */
5
+ ;* TGI vector font definitions */
6
+ ;* */
7
+ ;* */
8
+ ;* */
9
+ ;* (C) 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
+ ;------------------------------------------------------------------------------
37
+ ; Vectorfont constants
38
+
39
+ TGI_VF_VERSION = $00 ; File version number
40
+ TGI_VF_FIRSTCHAR = $20 ; First char in file
41
+ TGI_VF_LASTCHAR = $7E ; Last char in file
42
+ TGI_VF_CCOUNT = (TGI_VF_LASTCHAR - TGI_VF_FIRSTCHAR + 1)
43
+
44
+ ;------------------------------------------------------------------------------
45
+ ; TCH file header and font data structures
46
+
47
+ ; TCH file header
48
+ .struct TGI_VF_HDR
49
+ MAGIC .byte 3 ; "TCH"
50
+ VERSION .byte 1 ; Version number
51
+ SIZE .word 1 ; Font data size
52
+ .endstruct
53
+
54
+ ; Font data loaded directly from file
55
+ .struct TGI_VECTORFONT
56
+ TOP .byte ; Height of char
57
+ BOTTOM .byte ; Descender
58
+ HEIGHT .byte ; Maximum char height
59
+ WIDTHS .byte ::TGI_VF_CCOUNT ; Char widths
60
+ CHARS .word ::TGI_VF_CCOUNT ; Pointer to character defs
61
+ OPS .byte ; Actually dynamic
62
+ .endstruct
63
+
64
+ ;------------------------------------------------------------------------------
65
+ ; C callable functions
66
+
67
+ .global _tgi_vectorchar
68
+
69
+
70
+
@@ -0,0 +1,74 @@
1
+ ;/*****************************************************************************/
2
+ ;/* */
3
+ ;/* time.inc */
4
+ ;/* */
5
+ ;/* Date and time */
6
+ ;/* */
7
+ ;/* */
8
+ ;/* */
9
+ ;/* (C) 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
+ ;------------------------------------------------------------------------------
37
+ ; Struct tm - must match the struct defined in time.h
38
+
39
+ .struct tm
40
+ tm_sec .word
41
+ tm_min .word
42
+ tm_hour .word
43
+ tm_mday .word
44
+ tm_mon .word
45
+ tm_year .word
46
+ tm_wday .word
47
+ tm_yday .word
48
+ tm_isdst .word
49
+ .endstruct
50
+
51
+
52
+ ;------------------------------------------------------------------------------
53
+ ; Struct timespec - must match the struct defined in time.h
54
+
55
+ .struct timespec
56
+ tv_sec .dword
57
+ tv_nsec .dword
58
+ .endstruct
59
+
60
+
61
+ ;------------------------------------------------------------------------------
62
+ ; Exported functions
63
+
64
+ .global _clock_getres
65
+ .global _clock_gettime
66
+ .global _clock_settime
67
+ .global _localtime
68
+ .global _mktime
69
+
70
+
71
+ ;------------------------------------------------------------------------------
72
+ ; Constants
73
+
74
+ CLOCK_REALTIME = 0
@@ -0,0 +1,46 @@
1
+ ;/*****************************************************************************/
2
+ ;/* */
3
+ ;/* utsname.inc */
4
+ ;/* */
5
+ ;/* Return system information */
6
+ ;/* */
7
+ ;/* */
8
+ ;/* */
9
+ ;/* (C) 2003 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
+ ; Struct utsname
37
+ .struct utsname
38
+ sysname .byte 17
39
+ nodename .byte 9
40
+ release .byte 9
41
+ version .byte 9
42
+ machine .byte 25
43
+ .endstruct
44
+
45
+
46
+
@@ -0,0 +1,119 @@
1
+ ;
2
+ ; VIC-20 generic definitions. Stolen mostly from c64.inc -- Steve Schmidtke
3
+ ;
4
+
5
+ ; ---------------------------------------------------------------------------
6
+ ; Zero page, Commodore stuff
7
+
8
+ VARTAB := $2D ; Pointer to start of BASIC variables
9
+ MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
10
+ TXTPTR := $7A ; Pointer into BASIC source code
11
+ STATUS := $90 ; Kernal I/O completion status
12
+ TIME := $A0 ; 60HZ clock
13
+ FNAM_LEN := $B7 ; Length of filename
14
+ SECADR := $B9 ; Secondary address
15
+ DEVNUM := $BA ; Device number
16
+ FNAM := $BB ; Pointer to filename
17
+ KEY_COUNT := $C6 ; Number of keys in input buffer
18
+ RVS := $C7 ; Reverse flag
19
+ CURS_FLAG := $CC ; 1 = cursor off
20
+ CURS_BLINK := $CD ; Blink counter
21
+ CURS_CHAR := $CE ; Character under the cursor
22
+ CURS_STATE := $CF ; Cursor blink state
23
+ SCREEN_PTR := $D1 ; Pointer to current char in text screen
24
+ CURS_X := $D3 ; Cursor column
25
+ CURS_Y := $D6 ; Cursor row
26
+ CRAM_PTR := $F3 ; Pointer to current char in color RAM
27
+
28
+ BASIC_BUF := $200 ; Location of command-line
29
+ BASIC_BUF_LEN = 89 ; Maximum length of command-line
30
+
31
+ CHARCOLOR := $286
32
+ CURS_COLOR := $287 ; Color under the cursor
33
+
34
+ KBDREPEAT := $28a
35
+ KBDREPEATRATE := $28b
36
+ KBDREPEATDELAY := $28c
37
+
38
+ RSSTAT := $297 ; RS-232 device driver status
39
+
40
+ ; ---------------------------------------------------------------------------
41
+ ; Screen size
42
+
43
+ XSIZE = 22
44
+ YSIZE = 23
45
+
46
+ ; ---------------------------------------------------------------------------
47
+ ; Vector and other locations
48
+
49
+ IRQVec := $0314
50
+ BRKVec := $0316
51
+ NMIVec := $0318
52
+
53
+ ; ---------------------------------------------------------------------------
54
+ ; I/O: 6560 VIC
55
+
56
+ VIC := $9000
57
+ VIC_CR0 := VIC+$0
58
+ VIC_CR1 := VIC+$1
59
+ VIC_CR2 := VIC+$2
60
+ VIC_CR3 := VIC+$3
61
+ VIC_LINES := VIC+$3 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
62
+ VIC_CR4 := VIC+$4
63
+ VIC_HLINE := VIC+$4 ; Rasterline, bits 1-8
64
+ VIC_CR5 := VIC+$5
65
+ VIC_CR6 := VIC+$6
66
+ VIC_CR7 := VIC+$7
67
+ VIC_CR8 := VIC+$8
68
+ VIC_CR9 := VIC+$9
69
+ VIC_CRA := VIC+$A
70
+ VIC_CRB := VIC+$B
71
+ VIC_CRC := VIC+$C
72
+ VIC_CRD := VIC+$D
73
+ VIC_CRE := VIC+$E
74
+ VIC_CRF := VIC+$F
75
+ VIC_COLOR := VIC+$F ; Border and background color
76
+
77
+ ; ---------------------------------------------------------------------------
78
+ ; I/O: 6522 VIA1
79
+
80
+ VIA1 := $9110 ; VIA1 base address
81
+ VIA1_JOY := VIA1+$0 ; *** Deprecated ***
82
+ VIA1_PB := VIA1+$0 ; Port register B
83
+ VIA1_PA1 := VIA1+$1 ; Port register A
84
+ VIA1_DDRB := VIA1+$2 ; Data direction register B
85
+ VIA1_DDRA := VIA1+$3 ; Data direction register A
86
+ VIA1_T1CL := VIA1+$4 ; Timer 1, low byte
87
+ VIA1_T1CH := VIA1+$5 ; Timer 1, high byte
88
+ VIA1_T1LL := VIA1+$6 ; Timer 1 latch, low byte
89
+ VIA1_T1LH := VIA1+$7 ; Timer 1 latch, high byte
90
+ VIA1_T2CL := VIA1+$8 ; Timer 2, low byte
91
+ VIA1_T2CH := VIA1+$9 ; Timer 2, high byte
92
+ VIA1_SR := VIA1+$A ; Shift register
93
+ VIA1_ACR := VIA1+$B ; Auxiliary control register
94
+ VIA1_PCR := VIA1+$C ; Peripheral control register
95
+ VIA1_IFR := VIA1+$D ; Interrupt flag register
96
+ VIA1_IER := VIA1+$E ; Interrupt enable register
97
+ VIA1_PA2 := VIA1+$F ; Port register A w/o handshake
98
+
99
+ ; ---------------------------------------------------------------------------
100
+ ; I/O: 6522 VIA2
101
+
102
+ VIA2 := $9120 ; VIA2 base address
103
+ VIA2_JOY := VIA2+$0 ; *** Deprecated ***
104
+ VIA2_PB := VIA2+$0 ; Port register B
105
+ VIA2_PA1 := VIA2+$1 ; Port register A
106
+ VIA2_DDRB := VIA2+$2 ; Data direction register B
107
+ VIA2_DDRA := VIA2+$3 ; Data direction register A
108
+ VIA2_T1CL := VIA2+$4 ; Timer 1, low byte
109
+ VIA2_T1CH := VIA2+$5 ; Timer 1, high byte
110
+ VIA2_T1LL := VIA2+$6 ; Timer 1 latch, low byte
111
+ VIA2_T1LH := VIA2+$7 ; Timer 1 latch, high byte
112
+ VIA2_T2CL := VIA2+$8 ; Timer 2, low byte
113
+ VIA2_T2CH := VIA2+$9 ; Timer 2, high byte
114
+ VIA2_SR := VIA2+$A ; Shift register
115
+ VIA2_ACR := VIA2+$B ; Auxiliary control register
116
+ VIA2_PCR := VIA2+$C ; Peripheral control register
117
+ VIA2_IFR := VIA2+$D ; Interrupt flag register
118
+ VIA2_IER := VIA2+$E ; Interrupt enable register
119
+ VIA2_PA2 := VIA2+$F ; Port register A w/o handshake
@@ -0,0 +1,40 @@
1
+ ;
2
+ ; zeropage.inc
3
+ ;
4
+ ; (C) Copyright 2002-2012, Ullrich von Bassewitz (uz@cc65.org)
5
+ ;
6
+
7
+ ; Assembler include file that imports the runtime zero page locations used
8
+ ; by the compiler, ready for usage in asm code.
9
+
10
+
11
+ .globalzp c_sp, sreg, regsave
12
+ .globalzp ptr1, ptr2, ptr3, ptr4
13
+ .globalzp tmp1, tmp2, tmp3, tmp4
14
+ .globalzp regbank
15
+
16
+ ; FIXME: there must be a less ugly way to do this
17
+ .ifp4510
18
+ .else
19
+ .ifp45GS02
20
+ .else
21
+
22
+ ; The following symbol is supplied for compatibility reasons only, it
23
+ ; will get removed in future versions. Using it will cause a linker
24
+ ; warning.
25
+ .globalzp sp
26
+ .endif
27
+ .endif
28
+
29
+
30
+ ; The size of the register bank
31
+ regbanksize = 6
32
+
33
+ ; The total amount of zero page space used
34
+ zpspace = 26
35
+
36
+ ; The amount of space that needs to be saved by an interrupt handler that
37
+ ; calls C code (does not include the register bank, which is saved by the
38
+ ; generated C code if required).
39
+ zpsavespace = zpspace - regbanksize
40
+
package/bin/ar65.exe ADDED
Binary file
package/bin/ca65.exe ADDED
Binary file
package/bin/cc65.exe ADDED
Binary file
package/bin/da65.exe ADDED
Binary file
package/bin/ld65.exe ADDED
Binary file
package/cfg/module.cfg ADDED
@@ -0,0 +1,21 @@
1
+ MEMORY {
2
+ ZP: start = $0000, size = $0100;
3
+ COMBINED: file = %O, start = $0000, size = $FFFF;
4
+ }
5
+ SEGMENTS {
6
+ ZEROPAGE: load = ZP, type = zp;
7
+ EXTZP: load = ZP, type = zp, optional = yes;
8
+ HEADER: load = COMBINED, type = ro;
9
+ ONCE: load = COMBINED, type = ro, optional = yes;
10
+ CODE: load = COMBINED, type = ro;
11
+ RODATA: load = COMBINED, type = ro;
12
+ DATA: load = COMBINED, type = rw;
13
+ BSS: load = COMBINED, type = bss;
14
+ }
15
+ FILES {
16
+ %O: format = o65;
17
+ }
18
+ FORMATS {
19
+ o65: os = cc65,
20
+ type = small;
21
+ }