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,174 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* stdlib.h */
4
+ /* */
5
+ /* General utilities */
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 _STDLIB_H
37
+ #define _STDLIB_H
38
+
39
+
40
+
41
+ /* size_t is needed */
42
+ #ifndef _HAVE_size_t
43
+ typedef unsigned size_t;
44
+ #define _HAVE_size_t
45
+ #endif
46
+
47
+ /* NULL pointer */
48
+ #ifndef NULL
49
+ #define NULL ((void *) 0)
50
+ #endif
51
+
52
+ /* Standard exit codes */
53
+ #define EXIT_SUCCESS 0
54
+ #define EXIT_FAILURE 1
55
+
56
+ #if __CC65_STD__ == __CC65_STD_CC65__
57
+
58
+ /* Those non-standard cc65 exit constants definitions are in addition
59
+ ** to the EXIT_SUCCESS and EXIT_FAILURE constants, which should not be
60
+ ** redefined
61
+ */
62
+ #define EXIT_ASSERT 2
63
+ #define EXIT_ABORT 3
64
+
65
+ #endif
66
+
67
+
68
+ /* Return type of the div function */
69
+ typedef struct {
70
+ int rem;
71
+ int quot;
72
+ } div_t;
73
+
74
+ /* Return type of the ldiv function (which currently doesn't exist) */
75
+ typedef struct {
76
+ long rem;
77
+ long quot;
78
+ } ldiv_t;
79
+
80
+ /* Memory management */
81
+ void* __fastcall__ malloc (size_t size);
82
+ void* __fastcall__ calloc (size_t count, size_t size);
83
+ void* __fastcall__ realloc (void* block, size_t size);
84
+ void __fastcall__ free (void* block);
85
+
86
+ /* Non standard memory management functions */
87
+
88
+ #if __CC65_STD__ == __CC65_STD_CC65__
89
+ int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size);
90
+ /* Allocate a block of memory with the given "size", which is aligned to a
91
+ ** memory address that is a multiple of "alignment". "alignment" MUST NOT be
92
+ ** zero, and MUST be a power of two; otherwise, this function will return
93
+ ** EINVAL. The function returns ENOMEM if not enough memory is available
94
+ ** to satisfy the request. "memptr" must point to a variable; that variable
95
+ ** will return the address of the allocated memory. Use free() to release that
96
+ ** allocated block.
97
+ */
98
+ #endif
99
+
100
+ void __fastcall__ __heapadd (void* mem, size_t size);
101
+ /* Add a block to the heap */
102
+ #if __CC65_STD__ == __CC65_STD_CC65__
103
+ /* define old name with one underscore for backwards compatibility */
104
+ #define _heapadd __heapadd
105
+ #endif
106
+
107
+ size_t __fastcall__ __heapblocksize (const void* block);
108
+ /* Return the size of an allocated block */
109
+ #if __CC65_STD__ == __CC65_STD_CC65__
110
+ /* define old name with one underscore for backwards compatibility */
111
+ #define _heapblocksize __heapblocksize
112
+ #endif
113
+
114
+ size_t __heapmemavail (void);
115
+ /* Return the total free heap space */
116
+ #if __CC65_STD__ == __CC65_STD_CC65__
117
+ /* define old name with one underscore for backwards compatibility */
118
+ #define _heapmemavail __heapmemavail
119
+ #endif
120
+
121
+ size_t __heapmaxavail (void);
122
+ /* Return the size of the largest free block on the heap */
123
+ #if __CC65_STD__ == __CC65_STD_CC65__
124
+ /* define old name with one underscore for backwards compatibility */
125
+ #define _heapmaxavail __heapmaxavail
126
+ #endif
127
+
128
+
129
+ /* Random numbers */
130
+ #define RAND_MAX 0x7FFF
131
+ int rand (void);
132
+ void __fastcall__ srand (unsigned seed);
133
+ void __randomize (void); /* Non-standard */
134
+ #if __CC65_STD__ == __CC65_STD_CC65__
135
+ /* define old name with one underscore for backwards compatibility */
136
+ #define _randomize __randomize
137
+ #endif
138
+
139
+ /* Other standard stuff */
140
+ void abort (void) __attribute__ ((noreturn));
141
+ int __fastcall__ abs (int val);
142
+ long __fastcall__ labs (long val);
143
+ int __fastcall__ atoi (const char* s);
144
+ long __fastcall__ atol (const char* s);
145
+ int __fastcall__ atexit (void (*exitfunc) (void));
146
+ void* __fastcall__ bsearch (const void* key, const void* base, size_t n,
147
+ size_t size, int __fastcall__ (* cmp) (const void*, const void*));
148
+ div_t __fastcall__ div (int numer, int denom);
149
+ void __fastcall__ exit (int ret) __attribute__ ((noreturn));
150
+ char* __fastcall__ getenv (const char* name);
151
+ void __fastcall__ qsort (void* base, size_t count, size_t size,
152
+ int __fastcall__ (* compare) (const void*, const void*));
153
+ long __fastcall__ strtol (const char* nptr, char** endptr, int base);
154
+ unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base);
155
+ int __fastcall__ system (const char* s);
156
+
157
+ /* Non-ANSI functions */
158
+ void __fastcall__ __swap (void* p, void* q, size_t size);
159
+ #if __CC65_STD__ == __CC65_STD_CC65__
160
+ /* define old name with one underscore for backwards compatibility */
161
+ #define _swap __swap
162
+ #endif
163
+ #if __CC65_STD__ == __CC65_STD_CC65__
164
+ char* __fastcall__ itoa (int val, char* buf, int radix);
165
+ char* __fastcall__ utoa (unsigned val, char* buf, int radix);
166
+ char* __fastcall__ ltoa (long val, char* buf, int radix);
167
+ char* __fastcall__ ultoa (unsigned long val, char* buf, int radix);
168
+ int __fastcall__ putenv (char* s);
169
+ #endif
170
+
171
+
172
+
173
+ /* End of stdlib.h */
174
+ #endif
@@ -0,0 +1,106 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* string.h */
4
+ /* */
5
+ /* String handling */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 1998-2014, 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 _STRING_H
37
+ #define _STRING_H
38
+
39
+ /* NULL pointer */
40
+ #ifndef NULL
41
+ #define NULL ((void *) 0)
42
+ #endif
43
+
44
+ /* size_t is needed */
45
+ #ifndef _HAVE_size_t
46
+ #define _HAVE_size_t
47
+ typedef unsigned size_t;
48
+ #endif
49
+
50
+ char* __fastcall__ strcat (char* dest, const char* src);
51
+ char* __fastcall__ strchr (const char* s, int c);
52
+ int __fastcall__ strcmp (const char* s1, const char* s2);
53
+ int __fastcall__ strcoll (const char* s1, const char* s2);
54
+ char* __fastcall__ strcpy (char* dest, const char* src);
55
+ size_t __fastcall__ strcspn (const char* s1, const char* s2);
56
+ char* __fastcall__ strerror (int errcode);
57
+ size_t __fastcall__ strlen (const char* s);
58
+ char* __fastcall__ strncat (char* s1, const char* s2, size_t count);
59
+ int __fastcall__ strncmp (const char* s1, const char* s2, size_t count);
60
+ char* __fastcall__ strncpy (char* dest, const char* src, size_t count);
61
+ char* __fastcall__ strpbrk (const char* str, const char* set);
62
+ char* __fastcall__ strrchr (const char* s, int c);
63
+ size_t __fastcall__ strspn (const char* s1, const char* s2);
64
+ char* __fastcall__ strstr (const char* str, const char* substr);
65
+ char* __fastcall__ strtok (char* s1, const char* s2);
66
+ size_t __fastcall__ strxfrm (char* s1, const char* s2, size_t count);
67
+ void* __fastcall__ memchr (const void* mem, int c, size_t count);
68
+ int __fastcall__ memcmp (const void* p1, const void* p2, size_t count);
69
+ void* __fastcall__ memcpy (void* dest, const void* src, size_t count);
70
+ void* __fastcall__ memmove (void* dest, const void* src, size_t count);
71
+ void* __fastcall__ memset (void* s, int c, size_t count);
72
+
73
+ /* The following is an internal function, the compiler will replace memset
74
+ ** with it if the fill value is zero. Never use this one directly!
75
+ */
76
+ void* __fastcall__ __bzero (void* ptr, size_t n);
77
+
78
+ /* Non standard: */
79
+ #if __CC65_STD__ == __CC65_STD_CC65__
80
+ void __fastcall__ bzero (void* ptr, size_t n); /* BSD */
81
+ char* __fastcall__ strdup (const char* s); /* SYSV/BSD */
82
+ char* __fastcall__ strndup (const char* s, size_t maxlen); /* SYSV/BSD */
83
+ int __fastcall__ stricmp (const char* s1, const char* s2); /* DOS/Windows */
84
+ int __fastcall__ strcasecmp (const char* s1, const char* s2); /* Same for Unix */
85
+ char* __fastcall__ strcasestr (const char* str, const char* substr);
86
+ int __fastcall__ strnicmp (const char* s1, const char* s2, size_t count); /* DOS/Windows */
87
+ int __fastcall__ strncasecmp (const char* s1, const char* s2, size_t count); /* Same for Unix */
88
+ size_t __fastcall__ strnlen (const char* s, size_t maxlen); /* POSIX.1-2008 */
89
+ char* __fastcall__ strlwr (char* s);
90
+ char* __fastcall__ strlower (char* s);
91
+ char* __fastcall__ strupr (char* s);
92
+ char* __fastcall__ strupper (char* s);
93
+ char* __fastcall__ strqtok (char* s1, const char* s2);
94
+ char* __fastcall__ stpcpy (char* dest, const char* src);
95
+ #endif
96
+
97
+ const char* __fastcall__ __stroserror (unsigned char errcode);
98
+ /* Map an operating system error number to an error message. */
99
+ #if __CC65_STD__ == __CC65_STD_CC65__
100
+ /* define old name with one underscore for backwards compatibility */
101
+ #define _stroserror __stroserror
102
+ #endif
103
+
104
+
105
+ /* End of string.h */
106
+ #endif
@@ -0,0 +1,137 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* supervision.h */
4
+ /* */
5
+ /* Supervision specific definitions */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* 2003 Peter Trauner (trap@utanet.at) */
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 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's documentation, */
23
+ /* would be appreciated, but is not required. */
24
+ /* 2. Alterred source versions must be marked plainly as such, */
25
+ /* and must not be misrepresented as being the original software. */
26
+ /* 3. This notice may not be removed or alterred */
27
+ /* from any source distribution. */
28
+ /* */
29
+ /*****************************************************************************/
30
+
31
+
32
+
33
+ #ifndef _SUPERVISION_H
34
+ #define _SUPERVISION_H
35
+
36
+
37
+
38
+ /* Check for errors */
39
+ #if !defined(__SUPERVISION__)
40
+ # error This module may only be used when compiling for the Supervision!
41
+ #endif
42
+
43
+
44
+
45
+ /*****************************************************************************/
46
+ /* Data */
47
+ /*****************************************************************************/
48
+
49
+
50
+
51
+ struct __sv_lcd {
52
+ unsigned char width;
53
+ unsigned char height;
54
+ unsigned char xpos;
55
+ unsigned char ypos;
56
+ };
57
+ #define SV_LCD (*(struct __sv_lcd*)0x2000)
58
+
59
+ struct __sv_tone {
60
+ unsigned delay;
61
+ unsigned char control;
62
+ unsigned char timer;
63
+ };
64
+ #define SV_RIGHT (*(struct __sv_tone*)0x2010)
65
+ #define SV_LEFT (*(struct __sv_tone*)0x2014)
66
+
67
+ struct __sv_noise {
68
+ unsigned char volume; /* and frequency */
69
+ unsigned char timer;
70
+ unsigned char control;
71
+ };
72
+ #define SV_NOISE (*(struct __sv_noise*)0x2028)
73
+
74
+ struct __io_port {
75
+ unsigned char in;
76
+ unsigned char out;
77
+ };
78
+ #define IO_PORT (*(struct __io_port*)0x2021)
79
+
80
+ struct __sv_dma {
81
+ unsigned start;
82
+ unsigned char size;
83
+ unsigned char control;
84
+ unsigned char on;
85
+ };
86
+ #define SV_DMA (*(struct __sv_dma*)0x2018)
87
+
88
+ #define SV_CONTROL (*(unsigned char*)0x2020)
89
+
90
+ #define SV_BANK (*(unsigned char*)0x2026)
91
+ #define SV_BANK_COMBINE(nmi,irq_timer,irq_dma,lcd_on, timer_prescale, bank) \
92
+ ((nmi)?1:0)|((irq_timer)?2:0)|((irq_dma)?4:0)|((lcd_on)?8:0) \
93
+ |((timer_prescale)?0x10:0)|((bank)<<5)
94
+
95
+ #define SV_VIDEO ((unsigned char*)0x4000)
96
+ #define SV_TIMER_COUNT (*(unsigned char*)0x2023)
97
+
98
+
99
+
100
+ /* Counters incremented asynchronously!
101
+ ** If you want more complex, copy the crt0.s file from the libsrc/supervision
102
+ ** directory and code them yourself (in assembler)
103
+ */
104
+ extern unsigned char sv_nmi_counter;
105
+ extern unsigned char sv_timer_irq_counter;
106
+ extern unsigned char sv_timer_dma_counter;
107
+
108
+ /* Masks for joy_read */
109
+ #define JOY_UP_MASK 0x08
110
+ #define JOY_DOWN_MASK 0x04
111
+ #define JOY_LEFT_MASK 0x02
112
+ #define JOY_RIGHT_MASK 0x01
113
+ #define JOY_BTN_1_MASK 0x20
114
+ #define JOY_BTN_2_MASK 0x10
115
+ #define JOY_BTN_3_MASK 0x80
116
+ #define JOY_BTN_4_MASK 0x40
117
+
118
+ #define JOY_BTN_A_MASK JOY_BTN_1_MASK
119
+ #define JOY_BTN_B_MASk JOY_BTN_2_MASK
120
+ #define JOY_START_MASK JOY_BTN_3_MASK
121
+ #define JOY_SELECT_MASK JOY_BTN_4_MASK
122
+
123
+ #define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK)
124
+ #define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK)
125
+ #define JOY_START(v) ((v) & JOY_START_MASK)
126
+ #define JOY_SELECT(v) ((v) & JOY_SELECT_MASK)
127
+
128
+ /* No support for dynamically loadable drivers */
129
+ #define DYN_DRV 0
130
+
131
+ /* The addresses of the static drivers */
132
+ extern void supervision_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
133
+
134
+
135
+
136
+ /* End of supervision.h */
137
+ #endif
package/include/sym1.h ADDED
@@ -0,0 +1,165 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* sym1.h */
4
+ /* */
5
+ /* Sym-1 system-specific definitions */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 2020 Wayne Parham */
10
+ /* EMail: wayne@parhamdata.com */
11
+ /* */
12
+ /* */
13
+ /* This software is provided 'as-is', without any expressed or implied */
14
+ /* warranty. In no event will the authors be held liable for any damages */
15
+ /* arising from the use of this software. */
16
+ /* */
17
+ /* Permission is granted to anyone to use this software for any purpose, */
18
+ /* including commercial applications, and to alter it and redistribute it */
19
+ /* freely, subject to the following restrictions: */
20
+ /* */
21
+ /* 1. The origin of this software must not be misrepresented; you must not */
22
+ /* claim that you wrote the original software. If you use this software */
23
+ /* in a product, an acknowledgment in the product documentation would be */
24
+ /* appreciated but is not required. */
25
+ /* 2. Altered source versions must be plainly marked as such, and must not */
26
+ /* be misrepresented as being the original software. */
27
+ /* 3. This notice may not be removed or altered from any source */
28
+ /* distribution. */
29
+ /* */
30
+ /*****************************************************************************/
31
+
32
+
33
+
34
+ #ifndef _SYM1_H
35
+ #define _SYM1_H
36
+
37
+
38
+
39
+ /* Check for errors */
40
+ #if !defined(__SYM1__)
41
+ # error This module may only be used when compiling for the Sym-1!
42
+ #endif
43
+
44
+
45
+
46
+ /*****************************************************************************/
47
+ /* Data */
48
+ /*****************************************************************************/
49
+
50
+
51
+
52
+ /* Display character definitions */
53
+ #define DISP_1 0x06 // '1'
54
+ #define DISP_2 0x5B // '2'
55
+ #define DISP_3 0x4F // '3'
56
+ #define DISP_4 0x66 // '4'
57
+ #define DISP_5 0x6D // '5'
58
+ #define DISP_6 0x7C // '6'
59
+ #define DISP_7 0x07 // '7'
60
+ #define DISP_8 0x7F // '8'
61
+ #define DISP_9 0x67 // '9'
62
+ #define DISP_0 0x3F // '0'
63
+ #define DISP_A 0x77 // 'A'
64
+ #define DISP_b 0x7C // 'b'
65
+ #define DISP_C 0x39 // 'C'
66
+ #define DISP_c 0x58 // 'c'
67
+ #define DISP_d 0x5E // 'd'
68
+ #define DISP_E 0x79 // 'E'
69
+ #define DISP_e 0x7B // 'e'
70
+ #define DISP_F 0x71 // 'F'
71
+ #define DISP_G 0x7D // 'G'
72
+ #define DISP_g 0x6F // 'g'
73
+ #define DISP_H 0x76 // 'H'
74
+ #define DISP_h 0x74 // 'h'
75
+ #define DISP_I 0x06 // 'I'
76
+ #define DISP_i 0x04 // 'i'
77
+ #define DISP_J 0x1E // 'J'
78
+ #define DISP_K 0x74 // 'K'
79
+ #define DISP_L 0x38 // 'L'
80
+ #define DISP_M_1 0x33 // 'M'
81
+ #define DISP_M_2 0x27 // 2nd half
82
+ #define DISP_n 0x54 // 'n'
83
+ #define DISP_O 0x3F // 'O'
84
+ #define DISP_o 0x5C // 'o'
85
+ #define DISP_P 0x73 // 'P'
86
+ #define DISP_q 0x67 // 'q'
87
+ #define DISP_r 0x50 // 'r'
88
+ #define DISP_S 0x6D // 'S'
89
+ #define DISP_t 0x46 // 't'
90
+ #define DISP_U 0x3E // 'U'
91
+ #define DISP_u 0x1C // 'u'
92
+ #define DISP_V_1 0x64 // 'V'
93
+ #define DISP_V_2 0x52 // 2nd half
94
+ #define DISP_W_1 0x3C // 'W'
95
+ #define DISP_W_2 0x1E // 2nd half
96
+ #define DISP_Y 0x6E // 'Y'
97
+ #define DISP_Z 0x5B // 'Z'
98
+ #define DISP_SPACE 0x00 // ' '
99
+ #define DISP_PERIOD 0x80 // '.'
100
+ #define DISP_HYPHEN 0x40 // '-'
101
+ #define DISP_APOSTR 0x20 // '''
102
+ #define DISP_EQUAL 0x41 // '='
103
+ #define DISP_3_BAR 0x49 // '='
104
+ #define DISP_BOTTOM 0x08 // '_'
105
+ #define DISP_TOP 0x01 // Top segment
106
+ #define DISP_LEFT 0x30 // '|' Left side, both segments
107
+ #define DISP_RIGHT 0x06 // '|' Right side, both segments
108
+ #define DISP_DEGREE 0x63 // 'o' An 'o' character in the upper segments
109
+ #define DISP_HAT 0x23 // 'n' An 'n' character in the upper segments
110
+ #define DISP_FORK 0x62 // 'u' A 'u' character in the upper segments
111
+ #define DISP_SLASH 0x51 // '/'
112
+ #define DISP_BACKSLASH 0x34 // '\'
113
+ #define DISP_TOP_RIGHT 0x02 // Top right segment
114
+ #define DISP_TOP_LEFT 0x20 // Top left segment
115
+ #define DISP_LOW_RIGHT 0x04 // Lower right segment
116
+ #define DISP_LOW_LEFT 0x10 // Lower left segment
117
+
118
+
119
+ /*****************************************************************************/
120
+ /* Hardware */
121
+ /*****************************************************************************/
122
+
123
+
124
+
125
+ #include <_6522.h>
126
+ #define VIA1 (*(struct __6522*)0xA000) // U25
127
+ #define VIA2 (*(struct __6522*)0xA800) // U28
128
+ #define VIA3 (*(struct __6522*)0xAC00) // U29
129
+
130
+
131
+ struct _display {
132
+ unsigned char d0; // left-most seven-segment display
133
+ unsigned char d1; // second seven-segment display
134
+ unsigned char d2; // third seven-segment display
135
+ unsigned char d3; // fouth seven-segment display
136
+ unsigned char d4; // fifth seven-segment display
137
+ unsigned char d5; // sixth seven-segment display
138
+ unsigned char d6; // buffer byte to the right
139
+ };
140
+ #define DISPLAY (*(struct _display*)0xA640)
141
+
142
+
143
+
144
+ /*****************************************************************************/
145
+ /* Code */
146
+ /*****************************************************************************/
147
+
148
+
149
+
150
+ void beep (void);
151
+ /* Beep sound. */
152
+
153
+ void fdisp (void);
154
+ /* Flash display */
155
+
156
+ int __fastcall__ loadt (unsigned char);
157
+ /* Read from tape */
158
+
159
+ int __fastcall__ dumpt (unsigned char, const void*, const void*);
160
+ /* Write to tape */
161
+
162
+
163
+
164
+ /* End of sym1.h */
165
+ #endif
@@ -0,0 +1,94 @@
1
+ /*****************************************************************************/
2
+ /* */
3
+ /* stat.h */
4
+ /* */
5
+ /* stat(2) definition */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* (C) 2003 Ullrich von Bassewitz */
10
+ /* Roemerstrasse 52 */
11
+ /* D-70794 Filderstadt */
12
+ /* EMail: uz@cc65.org */
13
+ /* */
14
+ /* (C) 2023 Colin Leroy-Mira */
15
+ /* EMail: colin@colino.net */
16
+ /* */
17
+ /* */
18
+ /* This software is provided 'as-is', without any expressed or implied */
19
+ /* warranty. In no event will the authors be held liable for any damages */
20
+ /* arising from the use of this software. */
21
+ /* */
22
+ /* Permission is granted to anyone to use this software for any purpose, */
23
+ /* including commercial applications, and to alter it and redistribute it */
24
+ /* freely, subject to the following restrictions: */
25
+ /* */
26
+ /* 1. The origin of this software must not be misrepresented; you must not */
27
+ /* claim that you wrote the original software. If you use this software */
28
+ /* in a product, an acknowledgment in the product documentation would be */
29
+ /* appreciated but is not required. */
30
+ /* 2. Altered source versions must be plainly marked as such, and must not */
31
+ /* be misrepresented as being the original software. */
32
+ /* 3. This notice may not be removed or altered from any source */
33
+ /* distribution. */
34
+ /* */
35
+ /*****************************************************************************/
36
+
37
+
38
+
39
+ #ifndef _STAT_H
40
+ #define _STAT_H
41
+
42
+ #include <time.h>
43
+ #include <target.h>
44
+ #include <sys/types.h>
45
+
46
+
47
+
48
+ /*****************************************************************************/
49
+ /* Data */
50
+ /*****************************************************************************/
51
+
52
+
53
+
54
+ #define S_IREAD 0x01
55
+ #define S_IWRITE 0x02
56
+
57
+ #define S_IFMT 0x03
58
+
59
+ struct stat {
60
+ dev_t st_dev;
61
+ ino_t st_ino;
62
+ mode_t st_mode;
63
+ nlink_t st_nlink;
64
+ uid_t st_uid;
65
+ gid_t st_gid;
66
+ off_t st_size;
67
+ struct timespec st_atim;
68
+ struct timespec st_ctim;
69
+ struct timespec st_mtim;
70
+ #ifdef __APPLE2__
71
+ unsigned char st_access;
72
+ unsigned char st_type;
73
+ unsigned int st_auxtype;
74
+ unsigned char st_storagetype;
75
+ unsigned int st_blocks;
76
+ struct datetime st_mtime;
77
+ struct datetime st_ctime;
78
+ #endif
79
+ };
80
+
81
+
82
+
83
+ /*****************************************************************************/
84
+ /* Code */
85
+ /*****************************************************************************/
86
+
87
+
88
+
89
+ int __fastcall__ stat (const char* pathname, struct stat* statbuf);
90
+
91
+
92
+
93
+ /* End of stat.h */
94
+ #endif