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,237 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* inttypes.h */
4
+ /* */
5
+ /* Format conversion of integer types */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 2002-2011, 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
+ /* Note: This file is not fully ISO 9899-1999 compliant because cc65 lacks
37
+ ** a 64 bit data types and is not able to return structs > 4 bytes. The
38
+ ** declarations have been adjusted accordingly or left out.
39
+ */
40
+
41
+
42
+
43
+ #ifndef _INTTYPES_H
44
+ #define _INTTYPES_H
45
+
46
+
47
+
48
+ /* inttypes.h must always include stdint.h */
49
+ #ifndef _STDINT_H
50
+ #include <stdint.h>
51
+ #endif
52
+
53
+
54
+
55
+ /* Standard functions */
56
+ intmax_t __fastcall__ imaxabs (intmax_t val);
57
+ intmax_t __fastcall__ strtoimax (const char* nptr, char** endptr, int base);
58
+ uintmax_t __fastcall__ strtoumax (const char* nptr, char** endptr, int base);
59
+
60
+
61
+
62
+ /* printf() macros for signed integers */
63
+ #define PRId8 "d"
64
+ #define PRId16 "d"
65
+ #define PRId32 "ld"
66
+
67
+ #define PRIdLEAST8 "d"
68
+ #define PRIdLEAST16 "d"
69
+ #define PRIdLEAST32 "ld"
70
+
71
+ #define PRIdFAST8 "d"
72
+ #define PRIdFAST16 "d"
73
+ #define PRIdFAST32 "ld"
74
+
75
+ #define PRIdMAX "ld"
76
+ #define PRIdPTR "d"
77
+
78
+ #define PRIi8 "i"
79
+ #define PRIi16 "i"
80
+ #define PRIi32 "li"
81
+
82
+ #define PRIiLEAST8 "i"
83
+ #define PRIiLEAST16 "i"
84
+ #define PRIiLEAST32 "li"
85
+
86
+ #define PRIiFAST8 "i"
87
+ #define PRIiFAST16 "i"
88
+ #define PRIiFAST32 "li"
89
+
90
+ #define PRIiMAX "li"
91
+ #define PRIiPTR "i"
92
+
93
+ /* fprintf() macros for unsigned integers */
94
+ #define PRIo8 "o"
95
+ #define PRIo16 "o"
96
+ #define PRIo32 "lo"
97
+
98
+ #define PRIoLEAST8 "o"
99
+ #define PRIoLEAST16 "o"
100
+ #define PRIoLEAST32 "lo"
101
+
102
+ #define PRIoFAST8 "o"
103
+ #define PRIoFAST16 "o"
104
+ #define PRIoFAST32 "lo"
105
+
106
+ #define PRIoMAX "lo"
107
+ #define PRIoPTR "o"
108
+
109
+ #define PRIu8 "u"
110
+ #define PRIu16 "u"
111
+ #define PRIu32 "lu"
112
+
113
+ #define PRIuLEAST8 "u"
114
+ #define PRIuLEAST16 "u"
115
+ #define PRIuLEAST32 "lu"
116
+
117
+ #define PRIuFAST8 "u"
118
+ #define PRIuFAST16 "u"
119
+ #define PRIuFAST32 "lu"
120
+
121
+ #define PRIuMAX "lu"
122
+ #define PRIuPTR "u"
123
+
124
+ #define PRIx8 "x"
125
+ #define PRIx16 "x"
126
+ #define PRIx32 "lx"
127
+
128
+ #define PRIxLEAST8 "x"
129
+ #define PRIxLEAST16 "x"
130
+ #define PRIxLEAST32 "lx"
131
+
132
+ #define PRIxFAST8 "x"
133
+ #define PRIxFAST16 "x"
134
+ #define PRIxFAST32 "lx"
135
+
136
+ #define PRIxMAX "lx"
137
+ #define PRIxPTR "x"
138
+
139
+ #define PRIX8 "X"
140
+ #define PRIX16 "X"
141
+ #define PRIX32 "lX"
142
+
143
+ #define PRIXLEAST8 "X"
144
+ #define PRIXLEAST16 "X"
145
+ #define PRIXLEAST32 "lX"
146
+
147
+ #define PRIXFAST8 "X"
148
+ #define PRIXFAST16 "X"
149
+ #define PRIXFAST32 "lX"
150
+
151
+ #define PRIXMAX "lX"
152
+ #define PRIXPTR "X"
153
+
154
+ /* fscanf() macros for signed integers */
155
+ #define SCNd8 "hd"
156
+ #define SCNd16 "d"
157
+ #define SCNd32 "ld"
158
+
159
+ #define SCNdLEAST8 "hd"
160
+ #define SCNdLEAST16 "d"
161
+ #define SCNdLEAST32 "ld"
162
+
163
+ #define SCNdFAST8 "hd"
164
+ #define SCNdFAST16 "d"
165
+ #define SCNdFAST32 "ld"
166
+
167
+ #define SCNdMAX "ld"
168
+ #define SCNdPTR "d"
169
+
170
+ #define SCNi8 "hi"
171
+ #define SCNi16 "i"
172
+ #define SCNi32 "li"
173
+
174
+ #define SCNiLEAST8 "hi"
175
+ #define SCNiLEAST16 "i"
176
+ #define SCNiLEAST32 "li"
177
+
178
+ #define SCNiFAST8 "hi"
179
+ #define SCNiFAST16 "i"
180
+ #define SCNiFAST32 "li"
181
+
182
+ #define SCNiMAX "li"
183
+ #define SCNiPTR "i"
184
+
185
+ /* fscanf() macros for unsigned integers */
186
+ #define SCNo8 "ho"
187
+ #define SCNo16 "o"
188
+ #define SCNo32 "lo"
189
+
190
+ #define SCNoLEAST8 "ho"
191
+ #define SCNoLEAST16 "o"
192
+ #define SCNoLEAST32 "lo"
193
+
194
+ #define SCNoFAST8 "ho"
195
+ #define SCNoFAST16 "o"
196
+ #define SCNoFAST32 "lo"
197
+
198
+ #define SCNoMAX "lo"
199
+ #define SCNoPTR "o"
200
+
201
+ #define SCNu8 "hu"
202
+ #define SCNu16 "u"
203
+ #define SCNu32 "lu"
204
+
205
+ #define SCNuLEAST8 "hu"
206
+ #define SCNuLEAST16 "u"
207
+ #define SCNuLEAST32 "lu"
208
+
209
+ #define SCNuFAST8 "hu"
210
+ #define SCNuFAST16 "u"
211
+ #define SCNuFAST32 "lu"
212
+
213
+ #define SCNuMAX "lu"
214
+ #define SCNuPTR "u"
215
+
216
+ #define SCNx8 "hx"
217
+ #define SCNx16 "x"
218
+ #define SCNx32 "lx"
219
+
220
+ #define SCNxLEAST8 "hx"
221
+ #define SCNxLEAST16 "x"
222
+ #define SCNxLEAST32 "lx"
223
+
224
+ #define SCNxFAST8 "hx"
225
+ #define SCNxFAST16 "x"
226
+ #define SCNxFAST32 "lx"
227
+
228
+ #define SCNxMAX "lx"
229
+ #define SCNxPTR "x"
230
+
231
+
232
+
233
+ /* End of inttypes.h */
234
+ #endif
235
+
236
+
237
+
@@ -0,0 +1,60 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* iso646.h */
4
+ /* */
5
+ /* Alternative spellings */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 1998-2000 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
+ #ifndef _ISO646_H
37
+ #define _ISO646_H
38
+
39
+
40
+
41
+ /* Operator tokens */
42
+ #define and &&
43
+ #define and_eq &=
44
+ #define bitand &
45
+ #define bitor |
46
+ #define compl ~
47
+ #define not !
48
+ #define not_eq !=
49
+ #define or ||
50
+ #define or_eq |=
51
+ #define xor ^
52
+ #define xor_eq ^=
53
+
54
+
55
+
56
+ /* End of iso646.h */
57
+ #endif
58
+
59
+
60
+
@@ -0,0 +1,84 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* joy-kernel.h */
4
+ /* */
5
+ /* Internally used joystick functions */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 2002-2006, 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
+ #ifndef _JOY_KERNEL_H
37
+ #define _JOY_KERNEL_H
38
+
39
+
40
+
41
+ /*****************************************************************************/
42
+ /* Data */
43
+ /*****************************************************************************/
44
+
45
+
46
+
47
+ /* A structure that describes the header of a joystick driver loaded into
48
+ ** memory.
49
+ */
50
+ typedef struct {
51
+
52
+ /* Driver header */
53
+ char id[3]; /* Contains 0x6a, 0x6f, 0x79 ("joy") */
54
+ unsigned char version; /* Interface version */
55
+ void* libreference; /* Library reference */
56
+
57
+ /* Jump vectors. Note that these are not C callable */
58
+ void* install; /* INSTALL routine */
59
+ void* uninstall; /* UNINSTALL routine */
60
+ void* count; /* COUNT routine */
61
+ void* read; /* READ routine */
62
+
63
+ } joy_drv_header;
64
+
65
+
66
+
67
+ /* JOY kernel variables */
68
+ extern joy_drv_header* joy_drv; /* Pointer to driver */
69
+
70
+
71
+
72
+ /*****************************************************************************/
73
+ /* Code */
74
+ /*****************************************************************************/
75
+
76
+
77
+
78
+ void joy_clear_ptr (void);
79
+ /* Clear the joy_drv pointer */
80
+
81
+
82
+
83
+ /* End of joy-kernel.h */
84
+ #endif
@@ -0,0 +1,109 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* joystick.h */
4
+ /* */
5
+ /* Read the joystick on systems that support it */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 1998-2011, 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
+ #ifndef _JOYSTICK_H
37
+ #define _JOYSTICK_H
38
+
39
+
40
+
41
+ #include <target.h>
42
+
43
+
44
+
45
+ /*****************************************************************************/
46
+ /* Definitions */
47
+ /*****************************************************************************/
48
+
49
+
50
+
51
+ /* Error codes */
52
+ #define JOY_ERR_OK 0 /* No error */
53
+ #define JOY_ERR_NO_DRIVER 1 /* No driver available */
54
+ #define JOY_ERR_CANNOT_LOAD 2 /* Error loading driver */
55
+ #define JOY_ERR_INV_DRIVER 3 /* Invalid driver */
56
+ #define JOY_ERR_NO_DEVICE 4 /* Device (hardware) not found */
57
+
58
+ /* Argument for the joy_read function */
59
+ #define JOY_1 0
60
+ #define JOY_2 1
61
+
62
+ /* Macros that evaluate the return code of joy_read */
63
+ #define JOY_UP(v) ((v) & JOY_UP_MASK)
64
+ #define JOY_DOWN(v) ((v) & JOY_DOWN_MASK)
65
+ #define JOY_LEFT(v) ((v) & JOY_LEFT_MASK)
66
+ #define JOY_RIGHT(v) ((v) & JOY_RIGHT_MASK)
67
+ #define JOY_BTN_1(v) ((v) & JOY_BTN_1_MASK) /* Universally available */
68
+ #define JOY_BTN_2(v) ((v) & JOY_BTN_2_MASK) /* Second button if available */
69
+ #define JOY_BTN_3(v) ((v) & JOY_BTN_3_MASK) /* Third button if available */
70
+ #define JOY_BTN_4(v) ((v) & JOY_BTN_4_MASK) /* Fourth button if available */
71
+
72
+ /* The name of the standard joystick driver for a platform */
73
+ extern const char joy_stddrv[];
74
+
75
+ /* The address of the static standard joystick driver for a platform */
76
+ extern const void joy_static_stddrv[];
77
+
78
+
79
+
80
+ /*****************************************************************************/
81
+ /* Functions */
82
+ /*****************************************************************************/
83
+
84
+
85
+
86
+ unsigned char __fastcall__ joy_load_driver (const char* driver);
87
+ /* Load and install a joystick driver. Return an error code. */
88
+
89
+ unsigned char joy_unload (void);
90
+ /* Uninstall, then unload the currently loaded driver. */
91
+
92
+ unsigned char __fastcall__ joy_install (const void* driver);
93
+ /* Install an already loaded driver. Return an error code. */
94
+
95
+ unsigned char joy_uninstall (void);
96
+ /* Uninstall the currently loaded driver and return an error code.
97
+ ** Note: This call does not free allocated memory.
98
+ */
99
+
100
+ unsigned char joy_count (void);
101
+ /* Return the number of joysticks supported by the driver */
102
+
103
+ unsigned char __fastcall__ joy_read (unsigned char joystick);
104
+ /* Read a particular joystick */
105
+
106
+
107
+
108
+ /* End of joystick.h */
109
+ #endif
package/include/kim1.h ADDED
@@ -0,0 +1,73 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* kim1.h */
4
+ /* */
5
+ /* KIM-1 system-specific definitions */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 2022 Dave Plummer */
10
+ /* Email: davepl@davepl.com */
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
+ #ifndef _KIM1_H
32
+ #define _KIM1_H
33
+
34
+ /* Check for errors */
35
+ #if !defined(__KIM1__)
36
+ # error This module may only be used when compiling for the KIM-1!
37
+ #endif
38
+
39
+
40
+
41
+ /*****************************************************************************/
42
+ /* Data */
43
+ /*****************************************************************************/
44
+
45
+ /*****************************************************************************/
46
+ /* Hardware */
47
+ /*****************************************************************************/
48
+
49
+ /*****************************************************************************/
50
+ /* Code */
51
+ /*****************************************************************************/
52
+
53
+ /* Read from tape */
54
+ int __fastcall__ loadt (unsigned char);
55
+
56
+ /* Write to tape */
57
+ int __fastcall__ dumpt (unsigned char, const void*, const void*);
58
+
59
+
60
+ /* Write to 7-segment LED display. Due to hardware limitations it only
61
+ ** displays briefly, so must be called repeatedly to update the
62
+ ** display.
63
+ **/
64
+ void __fastcall__ scandisplay(unsigned char left, unsigned char middle, unsigned char right);
65
+
66
+ /*
67
+ ** Get a keypress from the keypad. Returns $00-$0F(0-F), $10(AD), $11(DA), $12(+),
68
+ ** $13(GO), $14(PC) or $15 for no keypress.
69
+ **/
70
+ int __fastcall__ getkey();
71
+
72
+ /* End of kim1.h */
73
+ #endif
@@ -0,0 +1,87 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* limits.h */
4
+ /* */
5
+ /* Sizes of integer types */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 1998-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
+ #ifndef _LIMITS_H
37
+ #define _LIMITS_H
38
+
39
+
40
+ #define CHAR_BIT 8
41
+
42
+ #define SCHAR_MIN ((signed char) 0x80)
43
+ #define SCHAR_MAX 127
44
+
45
+ #define UCHAR_MAX 255
46
+
47
+ #define CHAR_MIN 0
48
+ #define CHAR_MAX 255
49
+
50
+ #define SHRT_MIN ((short) 0x8000)
51
+ #define SHRT_MAX 32767
52
+
53
+ #define USHRT_MAX 65535U
54
+
55
+ #define INT_MIN ((int) 0x8000)
56
+ #define INT_MAX 32767
57
+
58
+ #define UINT_MAX 65535U
59
+
60
+ #define LONG_MAX 2147483647L
61
+ #define LONG_MIN ((long) 0x80000000)
62
+
63
+ #define ULONG_MAX 4294967295UL
64
+
65
+ #if __CC65_STD__ >= __CC65_STD_CC65__
66
+ /* These defines that are platform dependent */
67
+ /* FILENAME_MAX in stdlib.h is defined as the same value as PATH_MAX */
68
+ #if defined(__APPLE2__)
69
+ # define PATH_MAX (64+1)
70
+ #elif defined(__ATARI__)
71
+ # define PATH_MAX (63+1)
72
+ #elif defined(__CBM__)
73
+ # define PATH_MAX (255) /* should be 256+1, see libsrc/common/_cmd.s why it's not */
74
+ #elif defined(__LUNIX__)
75
+ # define PATH_MAX (80+1)
76
+ #elif defined(__TELESTRAT__)
77
+ # define PATH_MAX (50+1)
78
+ #else
79
+ # define PATH_MAX (16+1)
80
+ #endif
81
+ #endif /* __CC65_STD__ >= __CC65_STD_CC65__ */
82
+
83
+ /* End of limits.h */
84
+ #endif
85
+
86
+
87
+