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
package/asminc/smc.inc ADDED
@@ -0,0 +1,267 @@
1
+ ; smc.mac
2
+ ; ca65 Macro-Pack for Self Modifying Code (SMC)
3
+ ;
4
+ ; (c) Christian Krüger, latest change: 17-Jul-2016
5
+ ;
6
+ ; This software is provided 'as-is', without any expressed or implied
7
+ ; warranty. In no event will the authors be held liable for any damages
8
+ ; arising from the use of this software.
9
+ ;
10
+ ; Permission is granted to anyone to use this software for any purpose,
11
+ ; including commercial applications, and to alter it and redistribute it
12
+ ; freely, subject to the following restrictions:
13
+ ;
14
+ ; 1. The origin of this software must not be misrepresented; you must not
15
+ ; claim that you wrote the original software. If you use this software
16
+ ; in a product, an acknowledgment in the product documentation would be
17
+ ; appreciated but is not required.
18
+ ; 2. Altered source versions must be plainly marked as such, and must not
19
+ ; be misrepresented as being the original software.
20
+ ; 3. This notice may not be removed or altered from any source
21
+ ; distribution.
22
+ ;
23
+
24
+ .define _SMCDesignator .mid(0, .tcount(label) - 1, label) .ident(.concat(.string(.right(1, label)), "_SMC"))
25
+ .define _SMCAlias .mid(0, .tcount(alias) - 1, alias) .ident(.concat(.string(.right(1, alias)), "_SMC"))
26
+ .define SMC_AbsAdr $FADE
27
+ .define SMC_ZpAdr $00
28
+ .define SMC_Opcode nop
29
+ .define SMC_Value $42
30
+
31
+ .macro SMC_OperateOnValue opcode, label
32
+ opcode _SMCDesignator+1
33
+ .endmacro
34
+
35
+ .macro SMC_OperateOnLowByte opcode, label
36
+ SMC_OperateOnValue opcode, label
37
+ .endmacro
38
+
39
+ .macro SMC_OperateOnHighByte opcode, label
40
+ opcode _SMCDesignator + 2
41
+ .endmacro
42
+
43
+ .macro SMC_Import alias
44
+ .import _SMCAlias
45
+ .endmacro
46
+
47
+ .macro SMC_Export alias, label
48
+ .export _SMCAlias := _SMCDesignator
49
+ .endmacro
50
+
51
+ .macro SMC label, statement
52
+ _SMCDesignator: statement
53
+ .endmacro
54
+
55
+ .macro SMC_TransferOpcode label, opcode, register
56
+ .if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
57
+ lda #opcode
58
+ sta _SMCDesignator
59
+ .elseif .match ({register}, x)
60
+ ldx #opcode
61
+ stx _SMCDesignator
62
+ .elseif .match ({register}, y)
63
+ ldy #opcode
64
+ sty _SMCDesignator
65
+ .else
66
+ .error "Invalid usage of macro 'SMC_TransferOpcode'"
67
+ .endif
68
+ .endmacro
69
+
70
+ .macro SMC_LoadOpcode label, register
71
+ .if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
72
+ lda _SMCDesignator
73
+ .elseif .match ({register}, x)
74
+ ldx _SMCDesignator
75
+ .elseif .match ({register}, y)
76
+ ldy _SMCDesignator
77
+ .else
78
+ .error "Invalid usage of macro 'SMC_LoadOpcode'"
79
+ .endif
80
+ .endmacro
81
+
82
+ .macro SMC_StoreOpcode label, register
83
+ .if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
84
+ sta _SMCDesignator
85
+ .elseif .match ({register}, x)
86
+ stx _SMCDesignator
87
+ .elseif .match ({register}, y)
88
+ sty _SMCDesignator
89
+ .else
90
+ .error "Invalid usage of macro 'SMC_StoreOpcode'"
91
+ .endif
92
+ .endmacro
93
+
94
+ .macro SMC_ChangeBranch label, destination, register
95
+ .if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
96
+ lda #(<(destination - _SMCDesignator -2))
97
+ sta _SMCDesignator+1
98
+ .elseif .match ({register}, x)
99
+ ldx #(<(destination - _SMCDesignator - 2))
100
+ stx _SMCDesignator+1
101
+ .elseif .match ({register}, y)
102
+ ldy #(<(destination - _SMCDesignator - 2))
103
+ sty _SMCDesignator+1
104
+ .else
105
+ .error "Invalid usage of macro 'SMC_ChangeBranch'"
106
+ .endif
107
+ .endmacro
108
+
109
+ .macro SMC_TransferValue label, value, register
110
+ .if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
111
+ lda value
112
+ sta _SMCDesignator+1
113
+ .elseif .match ({register}, x)
114
+ ldx value
115
+ stx _SMCDesignator+1
116
+ .elseif .match ({register}, y)
117
+ ldy value
118
+ sty _SMCDesignator+1
119
+ .else
120
+ .error "Invalid usage of macro 'SMC_TransferValue'"
121
+ .endif
122
+ .endmacro
123
+
124
+ .macro SMC_LoadValue label, register
125
+ .if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
126
+ lda _SMCDesignator+1
127
+ .elseif .match ({register}, x)
128
+ ldx _SMCDesignator+1
129
+ .elseif .match ({register}, y)
130
+ ldy _SMCDesignator+1
131
+ .else
132
+ .error "Invalid usage of macro 'SMC_LoadValue'"
133
+ .endif
134
+ .endmacro
135
+
136
+ .macro SMC_StoreValue label, register
137
+ .if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
138
+ sta _SMCDesignator+1
139
+ .elseif .match ({register}, x)
140
+ stx _SMCDesignator+1
141
+ .elseif .match ({register}, y)
142
+ sty _SMCDesignator+1
143
+ .else
144
+ .error "Invalid usage of macro 'SMC_StoreValue'"
145
+ .endif
146
+ .endmacro
147
+
148
+
149
+ .macro SMC_TransferLowByte label, value, register
150
+ SMC_TransferValue label, value, register
151
+ .endmacro
152
+
153
+ .macro SMC_LoadLowByte label, register
154
+ SMC_LoadValue label, register
155
+ .endmacro
156
+
157
+ .macro SMC_StoreLowByte label, register
158
+ SMC_StoreValue label, register
159
+ .endmacro
160
+
161
+ .macro SMC_TransferHighByte label, value, register
162
+ .if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
163
+ lda value
164
+ sta _SMCDesignator+2
165
+ .elseif .match ({register}, x)
166
+ ldx value
167
+ stx _SMCDesignator+2
168
+ .elseif .match ({register}, y)
169
+ ldy value
170
+ sty _SMCDesignator+2
171
+ .else
172
+ .error "Invalid usage of macro 'SMC_TransferHighByte'"
173
+ .endif
174
+ .endmacro
175
+
176
+ .macro SMC_LoadHighByte label, register
177
+ .if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
178
+ lda _SMCDesignator+2
179
+ .elseif .match ({register}, x)
180
+ ldx _SMCDesignator+2
181
+ .elseif .match ({register}, y)
182
+ ldy _SMCDesignator+2
183
+ .else
184
+ .error "Invalid usage of macro 'SMC_LoadHighByte'"
185
+ .endif
186
+ .endmacro
187
+
188
+ .macro SMC_StoreHighByte label, register
189
+ .if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
190
+ sta _SMCDesignator+2
191
+ .elseif .match ({register}, x)
192
+ stx _SMCDesignator+2
193
+ .elseif .match ({register}, y)
194
+ sty _SMCDesignator+2
195
+ .else
196
+ .error "Invalid usage of macro 'SMC_StoreHighByte'"
197
+ .endif
198
+ .endmacro
199
+
200
+ .macro SMC_TransferAddressSingle label, address, register
201
+ .if .paramcount = 2 .or .match ((register), a) .or .match ({register}, )
202
+ .if (.match (.left (1, {address}), #))
203
+ ; immediate mode
204
+ lda #<(.right (.tcount ({address})-1, {address}))
205
+ sta _SMCDesignator+1
206
+ lda #>(.right (.tcount ({address})-1, {address}))
207
+ sta _SMCDesignator+2
208
+ .else
209
+ ; assume absolute or zero page
210
+ lda address
211
+ sta _SMCDesignator+1
212
+ lda 1+(address)
213
+ sta _SMCDesignator+2
214
+ .endif
215
+ .elseif .match ((register), x)
216
+ .if (.match (.left (1, {address}), #))
217
+ ; immediate mode
218
+ ldx #<(.right (.tcount ({address})-1, {address}))
219
+ stx _SMCDesignator+1
220
+ ldx #>(.right (.tcount ({address})-1, {address}))
221
+ stx _SMCDesignator+2
222
+ .else
223
+ ; assume absolute or zero page
224
+ ldx address
225
+ stx _SMCDesignator+1
226
+ ldx 1+(address)
227
+ stx _SMCDesignator+2
228
+ .endif
229
+ .elseif .match ((register), y)
230
+ .if (.match (.left (1, {address}), #))
231
+ ; immediate mode
232
+ ldy #<(.right (.tcount ({address})-1, {address}))
233
+ sty _SMCDesignator+1
234
+ ldy #>(.right (.tcount ({address})-1, {address}))
235
+ sty _SMCDesignator+2
236
+ .else
237
+ ; assume absolute or zero page
238
+ ldy address
239
+ sty _SMCDesignator+1
240
+ ldy 1+(address)
241
+ sty _SMCDesignator+2
242
+ .endif
243
+ .else
244
+ .error "Invalid usage of macro 'SMC_TransferAddressSingle'"
245
+ .endif
246
+ .endmacro
247
+
248
+ .macro SMC_TransferAddress label, address
249
+ .if (.match (.left (1, {address}), #))
250
+ ; immediate mode
251
+ lda #<(.right (.tcount ({address})-1, {address}))
252
+ sta _SMCDesignator+1
253
+ ldx #>(.right (.tcount ({address})-1, {address}))
254
+ stx _SMCDesignator+2
255
+ .else
256
+ ; assume absolute or zero page
257
+ lda {address}
258
+ sta _SMCDesignator+1
259
+ ldx 1+{address}
260
+ stx _SMCDesignator)+2
261
+ .endif
262
+ .endmacro
263
+
264
+ .macro SMC_StoreAddress label
265
+ sta _SMCDesignator+1
266
+ stx _SMCDesignator+2
267
+ .endmacro
@@ -0,0 +1,64 @@
1
+ ;****************************************************************************
2
+ ;* *
3
+ ;* stat.inc *
4
+ ;* *
5
+ ;* Stat struct *
6
+ ;* *
7
+ ;* *
8
+ ;* *
9
+ ;*(C) 2023 Colin Leroy-Mira <colin@colino.net> *
10
+ ;* *
11
+ ;* *
12
+ ;*This software is provided 'as-is', without any expressed or implied *
13
+ ;*warranty. In no event will the authors be held liable for any damages *
14
+ ;*arising from the use of this software. *
15
+ ;* *
16
+ ;*Permission is granted to anyone to use this software for any purpose, *
17
+ ;*including commercial applications, and to alter it and redistribute it *
18
+ ;*freely, subject to the following restrictions: *
19
+ ;* *
20
+ ;*1. The origin of this software must not be misrepresented; you must not *
21
+ ;* claim that you wrote the original software. If you use this software *
22
+ ;* in a product, an acknowledgment in the product documentation would be *
23
+ ;* appreciated but is not required. *
24
+ ;*2. Altered source versions must be plainly marked as such, and must not *
25
+ ;* be misrepresented as being the original software. *
26
+ ;*3. This notice may not be removed or altered from any source *
27
+ ;* distribution. *
28
+ ;* *
29
+ ;****************************************************************************
30
+
31
+ .include "time.inc"
32
+
33
+ ;------------------------------------------------------------------------------
34
+ ; st_mode values
35
+
36
+ S_IFDIR = $01
37
+ S_IFREG = $02
38
+
39
+ ;------------------------------------------------------------------------------
40
+ ; struct stat
41
+
42
+ .struct stat
43
+ st_dev .dword
44
+ st_ino .dword
45
+ st_mode .byte
46
+ st_nlink .dword
47
+ st_uid .byte
48
+ st_gid .byte
49
+ st_size .dword
50
+ st_atim .tag timespec
51
+ st_ctim .tag timespec
52
+ st_mtim .tag timespec
53
+ .ifdef __APPLE2__
54
+ st_access .byte
55
+ st_type .byte
56
+ st_auxtype .word
57
+ st_storagetype .byte
58
+ st_blocks .word
59
+ st_mod_date .word
60
+ st_mod_time .word
61
+ st_create_date .word
62
+ st_create_time .word
63
+ .endif
64
+ .endstruct
@@ -0,0 +1,46 @@
1
+ ;****************************************************************************
2
+ ;* *
3
+ ;* statvfs.inc *
4
+ ;* *
5
+ ;* Statvfs struct *
6
+ ;* *
7
+ ;* *
8
+ ;* *
9
+ ;*(C) 2023 Colin Leroy-Mira <colin@colino.net> *
10
+ ;* *
11
+ ;* *
12
+ ;*This software is provided 'as-is', without any expressed or implied *
13
+ ;*warranty. In no event will the authors be held liable for any damages *
14
+ ;*arising from the use of this software. *
15
+ ;* *
16
+ ;*Permission is granted to anyone to use this software for any purpose, *
17
+ ;*including commercial applications, and to alter it and redistribute it *
18
+ ;*freely, subject to the following restrictions: *
19
+ ;* *
20
+ ;*1. The origin of this software must not be misrepresented; you must not *
21
+ ;* claim that you wrote the original software. If you use this software *
22
+ ;* in a product, an acknowledgment in the product documentation would be *
23
+ ;* appreciated but is not required. *
24
+ ;*2. Altered source versions must be plainly marked as such, and must not *
25
+ ;* be misrepresented as being the original software. *
26
+ ;*3. This notice may not be removed or altered from any source *
27
+ ;* distribution. *
28
+ ;* *
29
+ ;****************************************************************************
30
+
31
+ ;------------------------------------------------------------------------------
32
+ ; struct statvfs
33
+
34
+ .struct statvfs
35
+ f_bsize .dword
36
+ f_frsize .dword
37
+ f_blocks .dword
38
+ f_bfree .dword
39
+ f_bavail .dword
40
+ f_files .dword
41
+ f_ffree .dword
42
+ f_favail .dword
43
+ f_fsid .dword
44
+ f_flag .dword
45
+ f_namemax .dword
46
+ .endstruct
@@ -0,0 +1,74 @@
1
+ ;*****************************************************************************/
2
+ ;* */
3
+ ;* stdio.inc */
4
+ ;* */
5
+ ;* Mirror definitions for stdio.h */
6
+ ;* */
7
+ ;* */
8
+ ;* */
9
+ ;* (C) 2003-2005, 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
+ ; Constants
38
+
39
+ _IOFBF = 0
40
+ _IOLBF = 1
41
+ _IONBF = 2
42
+ BUFSIZ = 256
43
+ EOF = -1
44
+ .if .defined(__APPLE2__)
45
+ FILENAME_MAX = 64+1
46
+ .elseif .defined(__ATARI__)
47
+ FILENAME_MAX = 63+1
48
+ .elseif .defined(__CBM__)
49
+ FILENAME_MAX = 255
50
+ .elseif .defined(__LUNIX__)
51
+ FILENAME_MAX = 80+1
52
+ .elseif .defined(__TELESTRAT__)
53
+ FILENAME_MAX = 50+1
54
+ .else
55
+ FILENAME_MAX = 16+1
56
+ .endif
57
+ L_tmpnam = FILENAME_MAX
58
+ SEEK_CUR = 0
59
+ SEEK_END = 1
60
+ SEEK_SET = 2
61
+ TMP_MAX = 256
62
+
63
+ ; Maximum number of open files (size of the file table)
64
+ FOPEN_MAX = 8
65
+
66
+ ;----------------------------------------------------------------------------
67
+ ; External variables
68
+
69
+ .global _stdin
70
+ .global _stdout
71
+ .global _stderr
72
+
73
+
74
+
@@ -0,0 +1,75 @@
1
+ ; supervision symbols
2
+
3
+ ; supervision 65c02s
4
+ ; in cc65 up to 2.9.1 65c02 means 65sc02
5
+
6
+ lcd_addr = $4000
7
+ LCD_LINESIZE = $30
8
+ LCD_WIDTH = 160
9
+ LCD_HEIGHT = 160
10
+ ; 2 bit per pixel, packed
11
+
12
+ lcd_width = $2000
13
+ lcd_height = $2001
14
+ lcd_xpos = $2002 ; in pixel, bit 0+1 not used
15
+ lcd_ypos = $2003 ; weird
16
+
17
+ sv_port_r = $2021
18
+ sv_port_w = $2022
19
+
20
+ sv_timer_count = $2023
21
+ ; read for quitting
22
+ sv_timer_quit = $2024
23
+
24
+ ; bit 0 timer, bit 1 dma
25
+ sv_irq_source = $2027
26
+ SV_IRQ_REQUEST_TIMER = 1
27
+ SV_IRQ_REQUEST_DMA = 2
28
+
29
+ ; bit 5,6,7 select bank at 0x8000
30
+ sv_bank = $2026
31
+ SV_NMI_ENABLE_ON = 1
32
+ SV_IRQ_ENABLE_TIMER = 2
33
+ SV_IRQ_ENABLE_DMA = 4
34
+ SV_LCD_ON = 8
35
+ SV_TIMER_MODE_240Hz = $10 ; else 15360
36
+
37
+
38
+ ; low activ/pressed
39
+ sv_control = $2020
40
+ SV_RIGHT = 1
41
+ SV_LEFT = 2
42
+ SV_DOWN = 4
43
+ SV_UP = 8
44
+ SV_BUTTONB = $10
45
+ SV_BUTTONA = $20
46
+ SV_SELECT = $40
47
+ SV_START = $80
48
+
49
+ ; frequency=125000/counter
50
+ sv_audio_right_counter = $2010 ;word
51
+ sv_audio_left_counter = $2014
52
+ SV_AUDIO_ON =$40
53
+ ;bits 0..3 volume
54
+ ; bit 4 ?
55
+ ; bit 5 ?
56
+ sv_audio_right_control = $2012
57
+ sv_audio_left_control = $2016
58
+ ; write activates tone for x/60 sec (0 means 256)
59
+ sv_audio_right_timer = $2013
60
+ sv_audio_left_timer = $2017
61
+
62
+
63
+ ;read for irq quitting
64
+ sv_dma_quit = $2025
65
+ sv_dma_on = $201c
66
+ ; bit 7 true start, false stop
67
+ sv_dma_start = $2018 ; word
68
+ sv_dma_size = $201a ; *32 samples
69
+ sv_dma_control = $201b
70
+ ; bit 0,1 speed: 0 15360, 11 15360/4
71
+ ; bit 2,3 volume: 0 silent, 11 loud
72
+
73
+ sv_noise_volume = $2028 ; and frequency
74
+ sv_noise_timer = $2029
75
+ sv_noise_control = $202a