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,180 @@
1
+ /*
2
+ GEOS graphic (non icon/menu/sprite) functions
3
+
4
+ by Maciej 'YTM/Elysium' Witkowiak
5
+ */
6
+
7
+ #ifndef _GGRAPH_H
8
+ #define _GGRAPH_H
9
+
10
+ #include <geos/gstruct.h>
11
+
12
+ void __fastcall__ SetPattern(char newpattern);
13
+
14
+ void __fastcall__ HorizontalLine(char pattern, char y, unsigned xstart, unsigned xend);
15
+ void __fastcall__ InvertLine(char y, unsigned xstart, unsigned xend);
16
+ void __fastcall__ RecoverLine(char y, unsigned xstart, unsigned xend);
17
+ void __fastcall__ VerticalLine(char pattern, char ystart, char yend, unsigned x);
18
+
19
+ void __fastcall__ InitDrawWindow(struct window *myRectangle);
20
+ void Rectangle(void);
21
+ void __fastcall__ FrameRectangle(char pattern);
22
+ void InvertRectangle(void);
23
+ void ImprintRectangle(void);
24
+ void RecoverRectangle(void);
25
+
26
+ void __fastcall__ DrawLine(char mode, struct window *topBotCoords);
27
+
28
+ void __fastcall__ DrawPoint(char mode, struct pixel *myPixel);
29
+ char __fastcall__ TestPoint(struct pixel *myPixel);
30
+
31
+ void __fastcall__ PutChar(char character, char y, unsigned x);
32
+ void __fastcall__ PutString(char *myString, char y, unsigned x);
33
+ void __fastcall__ PutDecimal(char style, unsigned value, char y, unsigned x);
34
+
35
+ char __fastcall__ GetCharWidth(char character);
36
+ void __fastcall__ LoadCharSet(struct fontdesc *myFont);
37
+ void UseSystemFont(void);
38
+
39
+ void __fastcall__ BitmapUp(struct iconpic *myIcon);
40
+ void __fastcall__ BitmapClip(char skipl, char skipr, unsigned skiptop,
41
+ struct iconpic *myIcon);
42
+ void __fastcall__ BitOtherClip(void *proc1, void *proc2, char skipl,
43
+ char skipr, unsigned skiptop,
44
+ struct iconpic *myIcon);
45
+
46
+ void __fastcall__ GraphicsString(const void *myGfxString);
47
+
48
+ #ifdef __GEOS_CBM__
49
+ void SetNewMode(void);
50
+ #endif
51
+
52
+ /* VIC colour constants */
53
+ #define BLACK 0
54
+ #define WHITE 1
55
+ #define RED 2
56
+ #define CYAN 3
57
+ #define PURPLE 4
58
+ #define GREEN 5
59
+ #define BLUE 6
60
+ #define YELLOW 7
61
+ #define ORANGE 8
62
+ #define BROWN 9
63
+ #define LTRED 10
64
+ #define DKGREY 11
65
+ #define GREY 12
66
+ #define MEDGREY 12
67
+ #define LTGREEN 13
68
+ #define LTBLUE 14
69
+ #define LTGREY 15
70
+ /* VIC memory banks - lowest 2 bits of cia2base+0 */
71
+ #define GRBANK0 3
72
+ #define GRBANK1 2
73
+ #define GRBANK2 1
74
+ #define GRBANK3 0
75
+ /* VIC screen sizes */
76
+ #define VIC_X_POS_OFF 24
77
+ #define VIC_Y_POS_OFF 50
78
+ #ifdef __GEOS_CBM__
79
+ #define SC_BYTE_WIDTH 40
80
+ #define SC_PIX_HEIGHT 200
81
+ #define SC_PIX_WIDTH 320
82
+ #define SC_SIZE 8000
83
+ #else
84
+ #define SC_BYTE_WIDTH 70
85
+ #define SC_PIX_HEIGHT 192
86
+ #define SC_PIX_WIDTH 560
87
+ #define SC_SIZE 13440
88
+ #endif
89
+ /* VDC screen constants */
90
+ #define SCREENBYTEWIDTH 80
91
+ #define SCREENPIXELWIDTH 640
92
+ /* control characters for use as numbers, not characters */
93
+ #define BACKSPACE 8
94
+ #define FORWARDSPACE 9
95
+ #define TAB 9
96
+ #define LF 10
97
+ #define HOME 11
98
+ #define PAGE_BREAK 12
99
+ #define UPLINE 12
100
+ #define CR 13
101
+ #define ULINEON 14
102
+ #define ULINEOFF 15
103
+ #define ESC_GRAPHICS 16
104
+ #define ESC_RULER 17
105
+ #define REV_ON 18
106
+ #define REV_OFF 19
107
+ #define GOTOX 20
108
+ #define GOTOY 21
109
+ #define GOTOXY 22
110
+ #define NEWCARDSET 23
111
+ #define BOLDON 24
112
+ #define ITALICON 25
113
+ #define OUTLINEON 26
114
+ #define PLAINTEXT 27
115
+ /* control characters for use in
116
+ strings: eg: str[10]=CBOLDON "Hello"; */
117
+ #define CCR "\015"
118
+ #define CULINEON "\016"
119
+ #define CULINEOFF "\017"
120
+ #define CREV_ON "\022"
121
+ #define CREV_OFF "\023"
122
+ #define CBOLDON "\030"
123
+ #define CITALICON "\031"
124
+ #define COUTLINEON "\032"
125
+ #define CPLAINTEXT "\033"
126
+
127
+ /*values of currentMode */
128
+ /* bitNumbers */
129
+ #define UNDERLINE_BIT 7
130
+ #define BOLD_BIT 6
131
+ #define REVERSE_BIT 5
132
+ #define ITALIC_BIT 4
133
+ #define OUTLINE_BIT 3
134
+ #define SUPERSCRIPT_BIT 2
135
+ #define SUBSCRIPT_BIT 1
136
+ /* bitMasks */
137
+ #define SET_UNDERLINE 0x80
138
+ #define SET_BOLD 0x40
139
+ #define SET_REVERSE 0x20
140
+ #define SET_ITALIC 0x10
141
+ #define SET_OUTLINE 0x08
142
+ #define SET_SUPERSCRIPT 0x04
143
+ #define SET_SUBSCRIPT 0x02
144
+ #define SET_PLAINTEXT 0
145
+ /* values of dispBufferOn */
146
+ #define ST_WRGS_FORE 0x20
147
+ #define ST_WR_BACK 0x40
148
+ #define ST_WR_FORE 0x80
149
+ /* PutDecimal parameters */
150
+ /* leading zeros? */
151
+ #define SET_NOSURPRESS 0
152
+ #define SET_SURPRESS 0x40
153
+ /* justification */
154
+ #define SET_RIGHTJUST 0
155
+ #define SET_LEFTJUST 0x80
156
+ /* C128 x-extension flags */
157
+ #define ADD1_W 0x2000
158
+ #define DOUBLE_B 0x80
159
+ #define DOUBLE_W 0x8000
160
+ /* DrawLine/DrawPoint mode values */
161
+ #define DRAW_ERASE 0x00
162
+ #define DRAW_DRAW 0x40
163
+ #define DRAW_COPY 0x80
164
+
165
+ typedef void graphicStr;
166
+
167
+ #define MOVEPENTO(x,y) (char)1, (unsigned)(x), (char)(y)
168
+ #define LINETO(x,y) (char)2, (unsigned)(x), (char)(y)
169
+ #define RECTANGLETO(x,y) (char)3, (unsigned)(x), (char)(y)
170
+ #define NEWPATTERN(p) (char)5, (char)(p)
171
+ #define FRAME_RECTO(x,y) (char)7, (unsigned)(x), (char)(y)
172
+ #define PEN_X_DELTA(x) (char)8, (unsigned)(x)
173
+ #define PEN_Y_DELTA(y) (char)9, (char)(y)
174
+ #define PEN_XY_DELTA(x,y) (char)10, (unsigned)(x), (char)(y)
175
+ #define GSTR_END (char)NULL
176
+ /* ESC_PUTSTRING can't be implemented - it needs text, not pointer to it
177
+ #define ESC_PUTSTRING(x,y,text) (char)6, (unsigned)(x), (char)(y), (text), (char)NULL
178
+ */
179
+
180
+ #endif
@@ -0,0 +1,30 @@
1
+ /*
2
+ GEOS memory and string functions
3
+
4
+ by Maciej 'YTM/Elysium' Witkowiak
5
+ */
6
+
7
+ #ifndef _GMEMORY_H
8
+ #define _GMEMORY_H
9
+
10
+ #include <geos/gstruct.h>
11
+
12
+ void __fastcall__ CopyString(char *dest, const char *source);
13
+ char __fastcall__ CmpString(const char *dest, const char *source);
14
+ void __fastcall__ CopyFString(char len, char *dest, const char *source);
15
+ char __fastcall__ CmpFString(char len, char *dest, const char *source);
16
+
17
+ unsigned __fastcall__ CRC(const char *buffer, unsigned len);
18
+ void* __fastcall__ ClearRam(char *dest, unsigned len);
19
+ void* __fastcall__ FillRam(char *dest, char what, unsigned len);
20
+
21
+ void* __fastcall__ MoveData(char *dest, const char *source, unsigned len);
22
+
23
+ void __fastcall__ InitRam(char *myInitTab);
24
+
25
+ void __fastcall__ StashRAM(char REUBank, unsigned len, char *reuaddy, const char *cpuaddy);
26
+ void __fastcall__ FetchRAM(char REUBank, unsigned len, const char *reuaddy, char *cpuaddy);
27
+ void __fastcall__ SwapRAM(char REUBank, unsigned len, char *reuaddy, char *cpuaddy);
28
+ char __fastcall__ VerifyRAM(char REUBank, unsigned len, const char *reuaddy, const char *cpuaddy);
29
+
30
+ #endif
@@ -0,0 +1,53 @@
1
+ /*
2
+ GEOS menu and icon functions
3
+
4
+ by Maciej 'YTM/Elysium' Witkowiak
5
+ */
6
+
7
+ #ifndef _GMENU_H
8
+ #define _GMENU_H
9
+
10
+ #include <geos/gstruct.h>
11
+
12
+ void __fastcall__ DoMenu(struct menu *myMenu);
13
+ void ReDoMenu(void);
14
+ void RecoverMenu(void);
15
+ void RecoverAllMenus(void);
16
+ void DoPreviousMenu(void);
17
+ void GotoFirstMenu(void);
18
+
19
+ void __fastcall__ DoIcons(struct icontab *myIconTab);
20
+
21
+ /* DoMenu - menutypes */
22
+ #define MENU_ACTION 0x00
23
+ #define DYN_SUB_MENU 0x40
24
+ #define SUB_MENU 0x80
25
+ #define HORIZONTAL 0x00
26
+ #define VERTICAL 0x80
27
+ /* menu string offsets */
28
+ #define OFF_MY_TOP 0
29
+ #define OFF_MY_BOT 1
30
+ #define OFF_MX_LEFT 2
31
+ #define OFF_MX_RIGHT 4
32
+ #define OFF_NUM_M_ITEMS 6
33
+ #define OFF_1ST_M_ITEM 7
34
+ /* icon string offsets */
35
+ #define OFF_NM_ICNS 0
36
+ #define OFF_IC_XMOUSE 1
37
+ #define OFF_IC_YMOUSE 3
38
+ #define OFF_PIC_ICON 0
39
+ #define OFF_X_ICON_POS 2
40
+ #define OFF_Y_ICON_POS 3
41
+ #define OFF_WDTH_ICON 4
42
+ #define OFF_HEIGHT_ICON 5
43
+ #define OFF_SRV_RT_ICON 6
44
+ #define OFF_NX_ICON 8
45
+ /* icons, menus status flags */
46
+ #define ST_FLASH 0x80
47
+ #define ST_INVERT 0x40
48
+ #define ST_LD_AT_ADDR 0x01
49
+ #define ST_LD_DATA 0x80
50
+ #define ST_PR_DATA 0x40
51
+ #define ST_WR_PR 0x40
52
+
53
+ #endif
@@ -0,0 +1,22 @@
1
+ /*
2
+ GEOS processes (~multitasking) functions
3
+
4
+ by Maciej 'YTM/Elysium' Witkowiak
5
+ */
6
+
7
+ #ifndef _GPROCESS_H
8
+ #define _GPROCESS_H
9
+
10
+ #include <geos/gstruct.h>
11
+
12
+ void __fastcall__ InitProcesses(char number, struct process *proctab);
13
+ void __fastcall__ RestartProcess(char number);
14
+ void __fastcall__ EnableProcess(char number);
15
+ void __fastcall__ BlockProcess(char number);
16
+ void __fastcall__ UnblockProcess(char number);
17
+ void __fastcall__ FreezeProcess(char number);
18
+ void __fastcall__ UnfreezeProcess(char number);
19
+
20
+ void __fastcall__ Sleep(unsigned jiffies);
21
+
22
+ #endif
@@ -0,0 +1,96 @@
1
+ /*
2
+ GEOS mouse and sprite functions
3
+
4
+ by Maciej 'YTM/Elysium' Witkowiak
5
+ */
6
+
7
+ #ifndef _GSPRITE_H
8
+ #define _GSPRITE_H
9
+
10
+ void StartMouseMode(void);
11
+ void ClearMouseMode(void);
12
+ void MouseUp(void);
13
+ void MouseOff(void);
14
+ char __fastcall__ IsMseInRegion(struct window *region);
15
+
16
+ void __fastcall__ DrawSprite(char spritenum, const char *spritepic);
17
+ void __fastcall__ PosSprite(char spritenum, struct pixel *position);
18
+ void __fastcall__ EnablSprite(char spritenum);
19
+ void __fastcall__ DisablSprite(char spritenum);
20
+
21
+ void __fastcall__ InitTextPrompt(char height);
22
+ void __fastcall__ PromptOn(struct pixel *position);
23
+ void PromptOff(void);
24
+ char GetNextChar(void);
25
+
26
+ /* keyboard constants */
27
+ #define KEY_F1 1
28
+ #define KEY_F2 2
29
+ #define KEY_F3 3
30
+ #define KEY_F4 4
31
+ #define KEY_F5 5
32
+ #define KEY_F6 6
33
+ #define KEY_NOSCRL 7
34
+ #define KEY_ENTER 13
35
+ #define KEY_F7 14
36
+ #define KEY_F8 15
37
+ #define KEY_HOME 18
38
+ #define KEY_CLEAR 19
39
+ #define KEY_LARROW 20
40
+ #define KEY_UPARROW 21
41
+ #define KEY_STOP 22
42
+ #define KEY_RUN 23
43
+ #define KEY_BPS 24
44
+ #define KEY_HELP 25
45
+ #define KEY_ALT 26
46
+ #define KEY_ESC 27
47
+ #define KEY_INSERT 28
48
+ #define KEY_INVALID 31
49
+ #define KEY_LEFT BACKSPACE
50
+ #ifdef __GEOS_CBM__
51
+ #define KEY_UP 16
52
+ #define KEY_DOWN 17
53
+ #define KEY_DELETE 29
54
+ #define KEY_RIGHT 30
55
+ #else
56
+ #define KEY_UP 11
57
+ #define KEY_DOWN 10
58
+ #define KEY_DELETE 127
59
+ #define KEY_RIGHT 21
60
+ #endif
61
+
62
+ /* values of faultData - pointer position vs. mouseWindow */
63
+ /* bit numbers */
64
+ #define OFFTOP_BIT 7
65
+ #define OFFBOTTOM_BIT 6
66
+ #define OFFLEFT_BIT 5
67
+ #define OFFRIGHT_BIT 4
68
+ #define OFFMENU_BIT 3
69
+ /* bit masks */
70
+ #define SET_OFFTOP 0x80
71
+ #define SET_OFFBOTTOM 0x40
72
+ #define SET_OFFLEFT 0x20
73
+ #define SET_OFFRIGHT 0x10
74
+ #define SET_OFFMENU 0x08
75
+
76
+ /* mouseOn */
77
+ /* bit numbers */
78
+ #define MOUSEON_BIT 7
79
+ #define MENUON_BIT 6
80
+ #define ICONSON_BIT 5
81
+ /* bit masks */
82
+ #define SET_MSE_ON 0x80
83
+ #define SET_MENUON 0x40
84
+ #define SET_ICONSON 0x20
85
+
86
+ /* pressFlag */
87
+ /* bit numbers */
88
+ #define KEYPRESS_BIT 7
89
+ #define INPUT_BIT 6
90
+ #define MOUSE_BIT 5
91
+ /* bit masks */
92
+ #define SET_KEYPRESS 0x80
93
+ #define SET_INPUTCHG 0x40
94
+ #define SET_MOUSE 0x20
95
+
96
+ #endif
@@ -0,0 +1,174 @@
1
+ /*
2
+ GEOS structs
3
+
4
+ by Maciej 'YTM/Elysium' Witkowiak
5
+ */
6
+
7
+ /*
8
+ apart from initializing data, structures below can be used to
9
+ speed up access to data and let cc65 to generate better code
10
+ e.g. if you have menu defined as TopMenu and you want to change the number of
11
+ menu items use:
12
+ ((struct menu*)&TopMenu)->number=newNumber;
13
+ This will be translated into single lda/sta pair
14
+ */
15
+
16
+ #ifndef _GSTRUCT_H
17
+ #define _GSTRUCT_H
18
+
19
+ typedef void (*void_func) (void);
20
+
21
+ struct s_date { /* system date & time */
22
+ char s_year;
23
+ char s_month;
24
+ char s_day;
25
+ char s_hour;
26
+ char s_minutes;
27
+ char s_seconds;
28
+ };
29
+
30
+ struct tr_se { /* track and sector */
31
+ char track;
32
+ char sector;
33
+ };
34
+
35
+ struct fileheader { /* header block (like fileHeader) */
36
+ struct tr_se n_block;
37
+ char icon_desc[3];
38
+ char icon_pic[63];
39
+ char dostype;
40
+ char type;
41
+ char structure;
42
+ unsigned load_address;
43
+ unsigned end_address;
44
+ unsigned exec_address;
45
+ char class_name[19];
46
+ char column_flag;
47
+ char author[63];
48
+ char note[96];
49
+ };
50
+
51
+ #ifdef __GEOS_CBM__
52
+
53
+ struct f_date { /* date in filedesctiptor */
54
+ char f_year;
55
+ char f_month;
56
+ char f_day;
57
+ char f_hour;
58
+ char f_minute;
59
+ };
60
+
61
+ struct filehandle { /* filehandle in directory sectors */
62
+ char dostype; /* or in dirEntryBuf */
63
+ struct tr_se n_block;
64
+ char name[16];
65
+ struct tr_se header;
66
+ char structure;
67
+ char type;
68
+ struct f_date date;
69
+ unsigned size;
70
+ };
71
+
72
+ #else /* #ifdef __GEOS_CBM__ */
73
+
74
+ struct f_date { /* date in filedesctiptor */
75
+ unsigned f_day:5;
76
+ unsigned f_month:4;
77
+ unsigned f_year:7;
78
+ char f_minute;
79
+ char f_hour;
80
+ };
81
+
82
+ struct filehandle { /* filehandle in directory sectors */
83
+ unsigned name_len:4; /* or in dirEntryBuf */
84
+ unsigned structure:4;
85
+ char name[15];
86
+ char type;
87
+ struct tr_se n_block;
88
+ unsigned size;
89
+ char byte_size[3];
90
+ struct f_date date;
91
+ char version;
92
+ char min_version;
93
+ char access;
94
+ struct tr_se header;
95
+ struct f_date mod_date;
96
+ struct tr_se dir_head;
97
+ };
98
+
99
+ #endif /* #ifdef __GEOS_CBM__ */
100
+
101
+ struct pixel { /* describes point */
102
+ unsigned x;
103
+ char y;
104
+ };
105
+
106
+ struct fontdesc { /* describes font */
107
+ char baseline;
108
+ char width;
109
+ char height;
110
+ char *index_tbl;
111
+ char *data_ptr;
112
+ };
113
+
114
+ struct window { /* describes screen region */
115
+ char top;
116
+ char bot;
117
+ unsigned left;
118
+ unsigned right;
119
+ };
120
+
121
+ struct VLIR_info { /* VLIR information */
122
+ char curRecord; /* currently only used in VLIR */
123
+ char usedRecords; /* as system info (curRecord is mainly of your interest */
124
+ char fileWritten;
125
+ unsigned fileSize;
126
+ };
127
+
128
+ struct process { /* process info, declare table of that type */
129
+ unsigned pointer; /* (like: struct process proctab[2]= ... */
130
+ unsigned jiffies; /* last entry MUST BE {0,0} */
131
+ };
132
+
133
+ struct iconpic { /* icon/encoded bitmap description */
134
+ char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
135
+ char x; /* position in cards (*8 pixels) */
136
+ char y;
137
+ char width; /* in cards */
138
+ char height; /* in lines (pixels) */
139
+ };
140
+
141
+ struct icondef { /* icon definition for DoIcons */
142
+ char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
143
+ char x; /* position in cards (*8 pixels) */
144
+ char y;
145
+ char width; /* of icon (in cards) */
146
+ char height; /* of icon in lines (pixels) */
147
+ unsigned proc_ptr; /* pointer to function handling that icon */
148
+ };
149
+
150
+ struct icontab {
151
+ char number; /* number of declared icons */
152
+ struct pixel mousepos; /* position of mouse after DoIcons */
153
+ struct icondef tab[]; /* table of size declared by icontab.number */
154
+ };
155
+
156
+ struct menuitem {
157
+ char *name;
158
+ char type;
159
+ void *rest; /* may be ptr to function, or ptr to struct menu (submenu) */
160
+ };
161
+
162
+ struct menu {
163
+ struct window size;
164
+ char number;
165
+ struct menuitem items[];
166
+ };
167
+
168
+ struct inittab { /* use struct inittab mytab[n] for initram */
169
+ unsigned ptr; /* ptr to 1st byte */
170
+ char number; /* number of following bytes */
171
+ char values[]; /* actual string of bytes */
172
+ };
173
+
174
+ #endif