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.
- package/LICENSE +17 -0
- package/asminc/_file.inc +27 -0
- package/asminc/_heap.inc +35 -0
- package/asminc/accelerator.inc +80 -0
- package/asminc/agat.inc +39 -0
- package/asminc/apple2.inc +95 -0
- package/asminc/apple2.mac +54 -0
- package/asminc/ascii_charmap.inc +287 -0
- package/asminc/atari.inc +1169 -0
- package/asminc/atari.mac +65 -0
- package/asminc/atari2600.inc +7 -0
- package/asminc/atari2600_riot.inc +20 -0
- package/asminc/atari2600_tia.inc +69 -0
- package/asminc/atari5200.inc +133 -0
- package/asminc/atari7800.inc +14 -0
- package/asminc/atari7800_maria.inc +39 -0
- package/asminc/atari7800_riot.inc +20 -0
- package/asminc/atari7800_tia.inc +69 -0
- package/asminc/atari_antic.inc +95 -0
- package/asminc/atari_atascii_charmap.inc +301 -0
- package/asminc/atari_gtia.inc +119 -0
- package/asminc/atari_pokey.inc +43 -0
- package/asminc/atari_screen_charmap.inc +303 -0
- package/asminc/atmos.inc +117 -0
- package/asminc/c128.inc +224 -0
- package/asminc/c16.inc +9 -0
- package/asminc/c64.inc +219 -0
- package/asminc/c65.inc +239 -0
- package/asminc/cbm.mac +56 -0
- package/asminc/cbm510.inc +200 -0
- package/asminc/cbm610.inc +121 -0
- package/asminc/cbm_filetype.inc +34 -0
- package/asminc/cbm_kernal.inc +248 -0
- package/asminc/cbm_petscii_charmap.inc +291 -0
- package/asminc/cbm_screen_charmap.inc +305 -0
- package/asminc/cpu.mac +4 -0
- package/asminc/creativision.inc +66 -0
- package/asminc/ctype.inc +31 -0
- package/asminc/ctype_common.inc +91 -0
- package/asminc/ctypetable.inc +48 -0
- package/asminc/cx16.inc +574 -0
- package/asminc/em-error.inc +49 -0
- package/asminc/em-kernel.inc +106 -0
- package/asminc/errno.inc +37 -0
- package/asminc/fcntl.inc +21 -0
- package/asminc/gamate.inc +64 -0
- package/asminc/generic.mac +53 -0
- package/asminc/get_tv.inc +22 -0
- package/asminc/joy-error.inc +44 -0
- package/asminc/joy-kernel.inc +83 -0
- package/asminc/kim1.inc +31 -0
- package/asminc/longbranch.mac +88 -0
- package/asminc/lynx.inc +460 -0
- package/asminc/mega65.inc +239 -0
- package/asminc/modload.inc +78 -0
- package/asminc/module.mac +13 -0
- package/asminc/mouse-kernel.inc +184 -0
- package/asminc/nes.inc +93 -0
- package/asminc/o65.inc +150 -0
- package/asminc/opcodes.inc +514 -0
- package/asminc/pce.inc +93 -0
- package/asminc/pet.inc +100 -0
- package/asminc/plus4.inc +86 -0
- package/asminc/rp6502.inc +98 -0
- package/asminc/ser-error.inc +55 -0
- package/asminc/ser-kernel.inc +162 -0
- package/asminc/signal.inc +57 -0
- package/asminc/sim65.inc +75 -0
- package/asminc/smc.inc +267 -0
- package/asminc/stat.inc +64 -0
- package/asminc/statvfs.inc +46 -0
- package/asminc/stdio.inc +74 -0
- package/asminc/supervision.inc +75 -0
- package/asminc/sym1.inc +186 -0
- package/asminc/telestrat.inc +546 -0
- package/asminc/tgi-error.inc +52 -0
- package/asminc/tgi-kernel.inc +233 -0
- package/asminc/tgi-vectorfont.inc +70 -0
- package/asminc/time.inc +74 -0
- package/asminc/utsname.inc +46 -0
- package/asminc/vic20.inc +119 -0
- package/asminc/zeropage.inc +40 -0
- package/bin/ar65.exe +0 -0
- package/bin/ca65.exe +0 -0
- package/bin/cc65.exe +0 -0
- package/bin/da65.exe +0 -0
- package/bin/ld65.exe +0 -0
- package/cfg/module.cfg +21 -0
- package/cfg/nes.cfg +62 -0
- package/cfg/none.cfg +37 -0
- package/include/6502.h +140 -0
- package/include/_6522.h +68 -0
- package/include/_6525.h +62 -0
- package/include/_6526.h +71 -0
- package/include/_6545.h +53 -0
- package/include/_6551.h +55 -0
- package/include/_antic.h +254 -0
- package/include/_atari5200os.h +94 -0
- package/include/_atarios.h +661 -0
- package/include/_gtia.h +281 -0
- package/include/_heap.h +60 -0
- package/include/_maria.h +63 -0
- package/include/_mikey.h +264 -0
- package/include/_pbi.h +63 -0
- package/include/_pia.h +52 -0
- package/include/_pokey.h +220 -0
- package/include/_riot.h +26 -0
- package/include/_sid.h +68 -0
- package/include/_suzy.h +336 -0
- package/include/_ted.h +86 -0
- package/include/_tia.h +100 -0
- package/include/_vdc.h +53 -0
- package/include/_vic.h +67 -0
- package/include/_vic2.h +192 -0
- package/include/_vic3.h +188 -0
- package/include/accelerator.h +339 -0
- package/include/agat.h +76 -0
- package/include/apple2.h +358 -0
- package/include/apple2_filetype.h +324 -0
- package/include/apple2enh.h +67 -0
- package/include/arpa/inet.h +81 -0
- package/include/ascii_charmap.h +295 -0
- package/include/assert.h +59 -0
- package/include/atari.h +554 -0
- package/include/atari2600.h +32 -0
- package/include/atari5200.h +100 -0
- package/include/atari7800.h +67 -0
- package/include/atari_atascii_charmap.h +304 -0
- package/include/atari_screen_charmap.h +310 -0
- package/include/atmos.h +189 -0
- package/include/c128.h +175 -0
- package/include/c16.h +60 -0
- package/include/c64.h +175 -0
- package/include/c65.h +120 -0
- package/include/cbm.h +321 -0
- package/include/cbm264.h +165 -0
- package/include/cbm510.h +168 -0
- package/include/cbm610.h +153 -0
- package/include/cbm_filetype.h +108 -0
- package/include/cbm_petscii_charmap.h +297 -0
- package/include/cbm_screen_charmap.h +311 -0
- package/include/cc65.h +109 -0
- package/include/conio.h +248 -0
- package/include/creativision.h +78 -0
- package/include/ctype.h +88 -0
- package/include/cx16.h +420 -0
- package/include/dbg.h +124 -0
- package/include/device.h +72 -0
- package/include/dio.h +113 -0
- package/include/dirent.h +151 -0
- package/include/em/em-kernel.h +77 -0
- package/include/em.h +135 -0
- package/include/errno.h +135 -0
- package/include/fcntl.h +75 -0
- package/include/gamate.h +209 -0
- package/include/geos/gconst.h +69 -0
- package/include/geos/gdisk.h +79 -0
- package/include/geos/gdlgbox.h +110 -0
- package/include/geos/gfile.h +72 -0
- package/include/geos/ggraph.h +180 -0
- package/include/geos/gmemory.h +30 -0
- package/include/geos/gmenu.h +53 -0
- package/include/geos/gprocess.h +22 -0
- package/include/geos/gsprite.h +96 -0
- package/include/geos/gstruct.h +174 -0
- package/include/geos/gsym.h +340 -0
- package/include/geos/gsys.h +54 -0
- package/include/geos.h +109 -0
- package/include/inttypes.h +237 -0
- package/include/iso646.h +60 -0
- package/include/joystick/joy-kernel.h +84 -0
- package/include/joystick.h +109 -0
- package/include/kim1.h +73 -0
- package/include/limits.h +87 -0
- package/include/locale.h +83 -0
- package/include/lynx.h +144 -0
- package/include/lz4.h +43 -0
- package/include/lzsa.h +56 -0
- package/include/mega65.h +120 -0
- package/include/modload.h +103 -0
- package/include/mouse/mouse-kernel.h +67 -0
- package/include/mouse.h +220 -0
- package/include/nes.h +203 -0
- package/include/o65.h +178 -0
- package/include/osic1p.h +66 -0
- package/include/pce.h +110 -0
- package/include/peekpoke.h +58 -0
- package/include/pen.h +78 -0
- package/include/pet.h +113 -0
- package/include/plus4.h +63 -0
- package/include/rp6502.h +266 -0
- package/include/serial.h +180 -0
- package/include/setjmp.h +55 -0
- package/include/signal.h +74 -0
- package/include/sim65.h +136 -0
- package/include/stdarg.h +57 -0
- package/include/stdbool.h +53 -0
- package/include/stddef.h +66 -0
- package/include/stdint.h +144 -0
- package/include/stdio.h +166 -0
- package/include/stdlib.h +174 -0
- package/include/string.h +106 -0
- package/include/supervision.h +137 -0
- package/include/sym1.h +165 -0
- package/include/sys/stat.h +94 -0
- package/include/sys/statvfs.h +74 -0
- package/include/sys/types.h +102 -0
- package/include/sys/utsname.h +97 -0
- package/include/target.h +77 -0
- package/include/telestrat.h +129 -0
- package/include/tgi/tgi-error.h +64 -0
- package/include/tgi/tgi-kernel.h +75 -0
- package/include/tgi/tgi-vectorfont.h +90 -0
- package/include/tgi.h +286 -0
- package/include/time.h +143 -0
- package/include/unistd.h +103 -0
- package/include/vic20.h +141 -0
- package/include/zlib.h +175 -0
- package/include/zx02.h +44 -0
- package/lib/nes.lib +0 -0
- package/lib/none.lib +0 -0
- package/manifest.json +227 -0
- package/package.json +19 -4
- package/README.md +0 -3
package/include/fcntl.h
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* fcntl.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* File control operations */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 1998-2004 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 _FCNTL_H
|
|
37
|
+
#define _FCNTL_H
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/*****************************************************************************/
|
|
42
|
+
/* Data */
|
|
43
|
+
/*****************************************************************************/
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/* Flag values for the open() call */
|
|
48
|
+
#define O_RDONLY 0x01
|
|
49
|
+
#define O_WRONLY 0x02
|
|
50
|
+
#define O_RDWR 0x03
|
|
51
|
+
#define O_CREAT 0x10
|
|
52
|
+
#define O_TRUNC 0x20
|
|
53
|
+
#define O_APPEND 0x40
|
|
54
|
+
#define O_EXCL 0x80
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/*****************************************************************************/
|
|
59
|
+
/* Code */
|
|
60
|
+
/*****************************************************************************/
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/* Functions */
|
|
65
|
+
int open (const char* name, int flags, ...); /* May take a mode argument */
|
|
66
|
+
int __fastcall__ close (int fd);
|
|
67
|
+
int __fastcall__ creat (const char* name, unsigned mode);
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/* End of fcntl.h */
|
|
72
|
+
#endif
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
package/include/gamate.h
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* gamate.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Gamate system specific definitions */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (w) 2015 Groepaz/Hitmen (groepaz@gmx.net) */
|
|
10
|
+
/* based on technical reference by PeT (mess@utanet.at) */
|
|
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 _GAMATE_H
|
|
32
|
+
#define _GAMATE_H
|
|
33
|
+
|
|
34
|
+
/* Check for errors */
|
|
35
|
+
#if !defined(__GAMATE__)
|
|
36
|
+
# error This module may only be used when compiling for the Gamate!
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
#define AUDIO_BASE 0x4000
|
|
40
|
+
|
|
41
|
+
/*
|
|
42
|
+
base clock cpu clock/32 ?
|
|
43
|
+
|
|
44
|
+
0/1: 1. channel(right): 12 bit frequency: right frequency 0 nothing, 1 high;
|
|
45
|
+
3 23khz; 4 17,3; 10 6,9; 15 4.6; $60 720hz; $eff 18,0; $fff 16,9 hz)
|
|
46
|
+
(delay clock/32)
|
|
47
|
+
2/3: 2. channel(left): 12 bit frequency
|
|
48
|
+
4/5: 3. channel(both): 12 bit frequency
|
|
49
|
+
6: 0..5 noise frequency 0 fast 1f slow (about 500us) 15.6ns--> clock/32 counts
|
|
50
|
+
7 control (hinibble right)
|
|
51
|
+
bit 0: right channel high (full cycle, else square pulse/tone)
|
|
52
|
+
bit 1: left channel high
|
|
53
|
+
bit 2: both channel high
|
|
54
|
+
bit 3: set right tone (else noise)
|
|
55
|
+
bit 4: set left channel normal
|
|
56
|
+
bit 5: set both normal
|
|
57
|
+
bits 30: 11 high, 10 square, 01 noise, 00 noise only when square high
|
|
58
|
+
noise means switches channel to ad converter based noise algorithmen
|
|
59
|
+
(white noise shift register 17bit wide, repeats after about 130000 cycles)
|
|
60
|
+
probably out=!bit16, bit0=bit16 xor bit13; runs through, so start value anything than 0
|
|
61
|
+
8: 1st volume: 0..3 square volume; bit 4 envelope (higher priority)
|
|
62
|
+
9: 2nd volume
|
|
63
|
+
10: 3rd volume
|
|
64
|
+
11/12: envelope delay time 0 fast, 0xffff slow/nearly no effect (2 22us, 4 56us)
|
|
65
|
+
frequency $800, envelope $10 2 times in pulse high time (4*16*16)
|
|
66
|
+
13: envelope control
|
|
67
|
+
0-3 one time falling
|
|
68
|
+
4-7 one time rising
|
|
69
|
+
8 falling
|
|
70
|
+
9 one time falling
|
|
71
|
+
a starts with down falling, rising; same falling time, but double/longer cycle
|
|
72
|
+
b one time falling, on
|
|
73
|
+
c rising
|
|
74
|
+
d one time rising, on
|
|
75
|
+
e rising, falling (double cycle before restart)
|
|
76
|
+
f one time rising
|
|
77
|
+
bit 0: once only
|
|
78
|
+
bit 1: full tone
|
|
79
|
+
bit 2: start rising (else falling)
|
|
80
|
+
bit 3:
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/* LCD
|
|
84
|
+
|
|
85
|
+
resolution 160x152 in 4 greys/greens
|
|
86
|
+
2 256x256 sized bitplanes (2x 8kbyte ram)
|
|
87
|
+
*/
|
|
88
|
+
#define LCD_BASE 0x5000
|
|
89
|
+
|
|
90
|
+
#define LCD_MODE 0x5001
|
|
91
|
+
/*
|
|
92
|
+
bit 3..0 (from zeropage 15)
|
|
93
|
+
bit 0 set no normal screen display, seldom scrolling effects on screen;
|
|
94
|
+
bytes written to somewhat actual display refresh position!?
|
|
95
|
+
bytes read "random"
|
|
96
|
+
bit 1,2,3 no effect
|
|
97
|
+
bit 4 swaps plane intensity
|
|
98
|
+
bit 5 ? display effect
|
|
99
|
+
bit 6 on y auto increment (else auto x increment), reading
|
|
100
|
+
bit 7 ? lcd flickering
|
|
101
|
+
*/
|
|
102
|
+
#define LCD_MODE_INC_Y 0x40
|
|
103
|
+
|
|
104
|
+
#define LCD_XPOS 0x5002 /* smooth scrolling X */
|
|
105
|
+
#define LCD_YPOS 0x5003 /* smooth scrolling Y */
|
|
106
|
+
/*
|
|
107
|
+
smooth scrolling until $c8 with 200 limit
|
|
108
|
+
after 200 display if ((value & 0xf) < 8) display of (value & 0xf) - 8
|
|
109
|
+
chaos lines from value + current line from plane 2 only then lines starting
|
|
110
|
+
with zero (problematic 200 limit/overrun implementation!?)
|
|
111
|
+
*/
|
|
112
|
+
#define LCD_X 0x5004 /* x-addr */
|
|
113
|
+
/*
|
|
114
|
+
bit 5,6 no effect
|
|
115
|
+
bit 7 0 1st/1 2nd bitplane
|
|
116
|
+
*/
|
|
117
|
+
#define LCD_XPOS_PLANE1 0x00
|
|
118
|
+
#define LCD_XPOS_PLANE2 0x80
|
|
119
|
+
|
|
120
|
+
#define LCD_Y 0x5005 /* y-addr */
|
|
121
|
+
|
|
122
|
+
#define LCD_READ 0x5006 /* read from RAM (no auto inc?) */
|
|
123
|
+
#define LCD_DATA 0x5007 /* write to RAM */
|
|
124
|
+
|
|
125
|
+
/* BIOS zeropage usage */
|
|
126
|
+
|
|
127
|
+
/* locations 0x0a-0x0c, 0x0e-0x11 and 0xe8 are in use by the BIOS IRQ/NMI handlers */
|
|
128
|
+
#define ZP_NMI_4800 0x0a /* content of I/O reg 4800 gets copied here each NMI */
|
|
129
|
+
|
|
130
|
+
#define ZP_IRQ_COUNT 0x0b /* increments once per IRQ, used elsewhere in the
|
|
131
|
+
BIOS for synchronisation purposes */
|
|
132
|
+
#define ZP_IRQ_CTRL 0x0c /* if 0 then cartridge irq stubs will not get called */
|
|
133
|
+
|
|
134
|
+
/* each of the following 4 increments by 1 per IRQ - it is _not_ a 32bit
|
|
135
|
+
counter (see code at $ffa6 in BIOS)
|
|
136
|
+
these are not used elsewhere in the bios and can be (re)set as needed by
|
|
137
|
+
the user.
|
|
138
|
+
*/
|
|
139
|
+
#define ZP_IRQ_CNT1 0x0e
|
|
140
|
+
#define ZP_IRQ_CNT2 0x0f
|
|
141
|
+
#define ZP_IRQ_CNT3 0x10
|
|
142
|
+
#define ZP_IRQ_CNT4 0x11
|
|
143
|
+
|
|
144
|
+
#define ZP_NMI_FLAG 0xe8 /* set to 0xff each NMI */
|
|
145
|
+
|
|
146
|
+
/* constants for the conio implementation */
|
|
147
|
+
#define COLOR_BLACK 0x03
|
|
148
|
+
#define COLOR_GRAY2 0x02
|
|
149
|
+
#define COLOR_GRAY1 0x01
|
|
150
|
+
#define COLOR_WHITE 0x00
|
|
151
|
+
|
|
152
|
+
#define CH_HLINE 1
|
|
153
|
+
#define CH_VLINE 2
|
|
154
|
+
#define CH_CROSS 3
|
|
155
|
+
#define CH_ULCORNER 4
|
|
156
|
+
#define CH_URCORNER 5
|
|
157
|
+
#define CH_LLCORNER 6
|
|
158
|
+
#define CH_LRCORNER 7
|
|
159
|
+
#define CH_TTEE 8
|
|
160
|
+
#define CH_BTEE 9
|
|
161
|
+
|
|
162
|
+
#define CH_RTEE 11
|
|
163
|
+
#define CH_LTEE 12
|
|
164
|
+
|
|
165
|
+
#define CH_ENTER 13
|
|
166
|
+
#define CH_PI 18
|
|
167
|
+
|
|
168
|
+
#define TV_NTSC 0
|
|
169
|
+
#define TV_PAL 1
|
|
170
|
+
#define TV_OTHER 2
|
|
171
|
+
|
|
172
|
+
/* No support for dynamically loadable drivers */
|
|
173
|
+
#define DYN_DRV 0
|
|
174
|
+
|
|
175
|
+
#define JOY_DATA 0x4400 /* hw register to read the pad bits from */
|
|
176
|
+
|
|
177
|
+
/* Masks for joy_read */
|
|
178
|
+
#define JOY_UP_MASK 0x01
|
|
179
|
+
#define JOY_DOWN_MASK 0x02
|
|
180
|
+
#define JOY_LEFT_MASK 0x04
|
|
181
|
+
#define JOY_RIGHT_MASK 0x08
|
|
182
|
+
#define JOY_BTN_1_MASK 0x10
|
|
183
|
+
#define JOY_BTN_2_MASK 0x20
|
|
184
|
+
#define JOY_BTN_3_MASK 0x40
|
|
185
|
+
#define JOY_BTN_4_MASK 0x80
|
|
186
|
+
|
|
187
|
+
#define JOY_BTN_A_MASK JOY_BTN_1_MASK
|
|
188
|
+
#define JOY_BTN_B_MASk JOY_BTN_2_MASK
|
|
189
|
+
#define JOY_START_MASK JOY_BTN_3_MASK
|
|
190
|
+
#define JOY_SELECT_MASK JOY_BTN_4_MASK
|
|
191
|
+
|
|
192
|
+
#define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK)
|
|
193
|
+
#define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK)
|
|
194
|
+
#define JOY_START(v) ((v) & JOY_START_MASK)
|
|
195
|
+
#define JOY_SELECT(v) ((v) & JOY_SELECT_MASK)
|
|
196
|
+
|
|
197
|
+
/* The addresses of the static drivers */
|
|
198
|
+
extern void gamate_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
|
199
|
+
|
|
200
|
+
void waitvsync (void);
|
|
201
|
+
/* Wait for start of next frame */
|
|
202
|
+
|
|
203
|
+
/* NOTE: all Gamate are "NTSC" */
|
|
204
|
+
#define get_tv() TV_NTSC
|
|
205
|
+
/* Return the video mode the machine is using. */
|
|
206
|
+
|
|
207
|
+
/* End of gamate.h */
|
|
208
|
+
#endif
|
|
209
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
GEOS constants
|
|
3
|
+
|
|
4
|
+
reassembled by Maciej 'YTM/Elysium' Witkowiak
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* Here are constants which didn't fit into any other category... */
|
|
8
|
+
|
|
9
|
+
#ifndef _GCONST_H
|
|
10
|
+
#define _GCONST_H
|
|
11
|
+
|
|
12
|
+
#ifndef NULL
|
|
13
|
+
#define NULL ((void *) 0)
|
|
14
|
+
#endif
|
|
15
|
+
#define FALSE 0
|
|
16
|
+
#define TRUE 0xff
|
|
17
|
+
#define MOUSE_SPRNUM 0
|
|
18
|
+
#define DISK_DRV_LGH 0x0d80
|
|
19
|
+
|
|
20
|
+
/* drivetypes */
|
|
21
|
+
#define DRV_NULL 0
|
|
22
|
+
#define DRV_1541 1
|
|
23
|
+
#define DRV_1571 2
|
|
24
|
+
#define DRV_1581 3
|
|
25
|
+
#define DRV_NETWORK 15
|
|
26
|
+
|
|
27
|
+
/* various disk constants */
|
|
28
|
+
#define REL_FILE_NUM 9
|
|
29
|
+
#define CMND_FILE_NUM 15
|
|
30
|
+
#define MAX_CMND_STR 32
|
|
31
|
+
#define DIR_1581_TRACK 40
|
|
32
|
+
#define DIR_ACC_CHAN 13
|
|
33
|
+
#define DIR_TRACK 18
|
|
34
|
+
#define N_TRACKS 35
|
|
35
|
+
#define DK_NM_ID_LEN 18
|
|
36
|
+
#define TRACK 9
|
|
37
|
+
#define SECTOR 12
|
|
38
|
+
#define TOTAL_BLOCKS 664
|
|
39
|
+
|
|
40
|
+
/* offset to something */
|
|
41
|
+
#define OFF_INDEX_PTR 1
|
|
42
|
+
|
|
43
|
+
/* values for CPU_DATA memory config - C64 */
|
|
44
|
+
#define IO_IN 0x35
|
|
45
|
+
#define KRNL_IO_IN 0x36
|
|
46
|
+
#define KRNL_BAS_IO_IN 0x37
|
|
47
|
+
|
|
48
|
+
/* values for MMU config - C128 */
|
|
49
|
+
#define CIOIN 0x7E
|
|
50
|
+
#define CRAM64K 0x7F
|
|
51
|
+
#define CKRNLBASIOIN 0x40
|
|
52
|
+
#define CKRNLIOIN 0x4E
|
|
53
|
+
|
|
54
|
+
/* alarmSetFlag */
|
|
55
|
+
#define ALARMMASK 4
|
|
56
|
+
|
|
57
|
+
#define CLR_SAVE 0x40
|
|
58
|
+
#define CONSTRAINED 0x40
|
|
59
|
+
#define UN_CONSTRAINED 0
|
|
60
|
+
#define FG_SAVE 0x80
|
|
61
|
+
|
|
62
|
+
#define FUTURE1 7
|
|
63
|
+
#define FUTURE2 8
|
|
64
|
+
#define FUTURE3 9
|
|
65
|
+
#define FUTURE4 10
|
|
66
|
+
#define USELAST 127
|
|
67
|
+
#define SHORTCUT 128
|
|
68
|
+
|
|
69
|
+
#endif
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
GEOS functions from disk driver
|
|
3
|
+
|
|
4
|
+
by Maciej 'YTM/Elysium' Witkowiak
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#ifndef _GDISK_H
|
|
8
|
+
#define _GDISK_H
|
|
9
|
+
|
|
10
|
+
#include <geos/gstruct.h>
|
|
11
|
+
|
|
12
|
+
char __fastcall__ ReadBuff(struct tr_se *myTrSe);
|
|
13
|
+
char __fastcall__ WriteBuff(struct tr_se *myTrSe);
|
|
14
|
+
|
|
15
|
+
char __fastcall__ GetBlock(struct tr_se *myTrSe, char *buffer);
|
|
16
|
+
char __fastcall__ PutBlock(struct tr_se *myTrSe, const char *buffer);
|
|
17
|
+
char __fastcall__ ReadBlock(struct tr_se *myTrSe, char *buffer);
|
|
18
|
+
char __fastcall__ WriteBlock(struct tr_se *myTrSe, const char *buffer);
|
|
19
|
+
char __fastcall__ VerWriteBlock(struct tr_se *myTrSe, const char *buffer);
|
|
20
|
+
|
|
21
|
+
unsigned CalcBlksFree(void);
|
|
22
|
+
char ChkDkGEOS(void);
|
|
23
|
+
char SetGEOSDisk(void);
|
|
24
|
+
char NewDisk(void);
|
|
25
|
+
char OpenDisk(void);
|
|
26
|
+
|
|
27
|
+
char __fastcall__ FindBAMBit(struct tr_se *myTrSe);
|
|
28
|
+
char __fastcall__ BlkAlloc(struct tr_se output[], unsigned length);
|
|
29
|
+
char __fastcall__ NxtBlkAlloc(struct tr_se *startTrSe,
|
|
30
|
+
struct tr_se output[], unsigned length);
|
|
31
|
+
char __fastcall__ FreeBlock(struct tr_se *myTrSe);
|
|
32
|
+
struct tr_se __fastcall__ SetNextFree(struct tr_se *myTrSe);
|
|
33
|
+
// above needs (unsigned) casts on both sides of '='
|
|
34
|
+
|
|
35
|
+
char GetDirHead(void);
|
|
36
|
+
char PutDirHead(void);
|
|
37
|
+
void __fastcall__ GetPtrCurDkNm(char *name);
|
|
38
|
+
|
|
39
|
+
void EnterTurbo(void);
|
|
40
|
+
void ExitTurbo(void);
|
|
41
|
+
void PurgeTurbo(void);
|
|
42
|
+
|
|
43
|
+
char __fastcall__ ChangeDiskDevice(char newdev);
|
|
44
|
+
|
|
45
|
+
/* disk header offsets i.e. index curDirHead with these */
|
|
46
|
+
#define OFF_TO_BAM 4
|
|
47
|
+
#define OFF_DISK_NAME 144
|
|
48
|
+
#define OFF_GS_DTYPE 189
|
|
49
|
+
#define OFF_OP_TR_SC 171
|
|
50
|
+
#define OFF_GS_ID 173
|
|
51
|
+
/* disk errors reported in _oserror */
|
|
52
|
+
#define ANY_FAULT 0xf0
|
|
53
|
+
#define G_EOF 0
|
|
54
|
+
#define NO_BLOCKS 1
|
|
55
|
+
#define INV_TRACK 2
|
|
56
|
+
#define INSUFF_SPACE 3
|
|
57
|
+
#define FULL_DIRECTORY 4
|
|
58
|
+
#define FILE_NOT_FOUND 5
|
|
59
|
+
#define BAD_BAM 6
|
|
60
|
+
#define UNOPENED_VLIR 7
|
|
61
|
+
#define INV_RECORD 8
|
|
62
|
+
#define OUT_OF_RECORDS 9
|
|
63
|
+
#define STRUCT_MISMAT 10
|
|
64
|
+
#define BFR_OVERFLOW 11
|
|
65
|
+
#define CANCEL_ERR 12
|
|
66
|
+
#define DEV_NOT_FOUND 13
|
|
67
|
+
#define INCOMPATIBLE 14
|
|
68
|
+
#define HDR_NOT_THERE 0x20
|
|
69
|
+
#define NO_SYNC 0x21
|
|
70
|
+
#define DBLK_NOT_THERE 0x22
|
|
71
|
+
#define DAT_CHKSUM_ERR 0x23
|
|
72
|
+
#define WR_VER_ERR 0x25
|
|
73
|
+
#define WR_PR_ON 0x26
|
|
74
|
+
#define HDR_CHKSUM_ERR 0x27
|
|
75
|
+
#define DSK_ID_MISMAT 0x29
|
|
76
|
+
#define BYTE_DEC_ERR 0x2e
|
|
77
|
+
#define DOS_MISMATCH 0x73
|
|
78
|
+
|
|
79
|
+
#endif
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
GEOS dialog box functions
|
|
3
|
+
|
|
4
|
+
by Maciej 'YTM/Elysium' Witkowiak
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#ifndef _GDLGBOX_H
|
|
8
|
+
#define _GDLGBOX_H
|
|
9
|
+
|
|
10
|
+
char __fastcall__ DoDlgBox(const char *dboxstring);
|
|
11
|
+
char RstrFrmDialogue(void);
|
|
12
|
+
|
|
13
|
+
/* These are custom, predefined dialog boxes, I'm sure you'll find them usable
|
|
14
|
+
Most of them show 2 lines of text */
|
|
15
|
+
|
|
16
|
+
char __fastcall__ DlgBoxYesNo(const char *line1, const char *line2);
|
|
17
|
+
char __fastcall__ DlgBoxOkCancel(const char *line1, const char *line2);
|
|
18
|
+
void __fastcall__ DlgBoxOk(const char *line1, const char *line2);
|
|
19
|
+
char __fastcall__ DlgBoxGetString(char *myString, char strLength,
|
|
20
|
+
const char *line1, const char *line2);
|
|
21
|
+
char __fastcall__ DlgBoxFileSelect(const char *classtxt, char ftype,
|
|
22
|
+
char *fname);
|
|
23
|
+
|
|
24
|
+
/* This is a more general dialog box, works like printf in a window */
|
|
25
|
+
char MessageBox(char mode, const char *format, ...);
|
|
26
|
+
|
|
27
|
+
/* mode argument for MessageBox() */
|
|
28
|
+
enum {
|
|
29
|
+
MB_EMPTY=0,
|
|
30
|
+
MB_OK,
|
|
31
|
+
MB_OKCANCEL,
|
|
32
|
+
MB_YESNO,
|
|
33
|
+
MB_LAST };
|
|
34
|
+
|
|
35
|
+
/* Now the command string type */
|
|
36
|
+
|
|
37
|
+
typedef void dlgBoxStr;
|
|
38
|
+
|
|
39
|
+
/* and command string commands - macros */
|
|
40
|
+
|
|
41
|
+
#define DB_DEFPOS(pattern) (char)(DEF_DB_POS | (pattern))
|
|
42
|
+
#define DB_SETPOS(pattern,top,bot,left,right) \
|
|
43
|
+
(char)(SET_DB_POS | (pattern)), (char)(top), (char)(bot), \
|
|
44
|
+
(unsigned)(left), (unsigned)(right)
|
|
45
|
+
#define DB_ICON(i,x,y) (char)(i), (char)(x), (char)(y)
|
|
46
|
+
#define DB_TXTSTR(x,y,text) (char)DBTXTSTR, (char)(x), (char)(y), (text)
|
|
47
|
+
#define DB_VARSTR(x,y,ptr) (char)DBVARSTR, (char)(x), (char)(y), (char)(ptr)
|
|
48
|
+
#define DB_GETSTR(x,y,ptr,length) (char)DBGETSTRING, (char)(x), (char)(y), (char)(ptr), (char)(length)
|
|
49
|
+
#define DB_SYSOPV(ptr) (char)DBSYSOPV, (unsigned)(ptr)
|
|
50
|
+
#define DB_GRPHSTR(ptr) (char)DBGRPHSTR, (unsigned)(ptr)
|
|
51
|
+
#define DB_GETFILES(x,y) (char)DBGETFILES, (char)(x), (char)(y)
|
|
52
|
+
#define DB_OPVEC(ptr) (char)DBOPVEC, (unsigned)(ptr)
|
|
53
|
+
#define DB_USRICON(x,y,ptr) (char)DBUSRICON, (char)(x), (char)(y), (unsigned)(ptr)
|
|
54
|
+
#define DB_USRROUT(ptr) (char)DB_USR_ROUT, (unsigned)(ptr)
|
|
55
|
+
#define DB_END (char)NULL
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
part of constants below is used internally, but some are useful for macros above
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/* icons for DB_ICON */
|
|
62
|
+
#define OK 1
|
|
63
|
+
#define CANCEL 2
|
|
64
|
+
#define YES 3
|
|
65
|
+
#define NO 4
|
|
66
|
+
#define OPEN 5
|
|
67
|
+
#define DISK 6
|
|
68
|
+
/* commands - internally used by command macros */
|
|
69
|
+
#define DBTXTSTR 11
|
|
70
|
+
#define DBVARSTR 12
|
|
71
|
+
#define DBGETSTRING 13
|
|
72
|
+
#define DBSYSOPV 14
|
|
73
|
+
#define DBGRPHSTR 15
|
|
74
|
+
#define DBGETFILES 16
|
|
75
|
+
#define DBOPVEC 17
|
|
76
|
+
#define DBUSRICON 18
|
|
77
|
+
#define DB_USR_ROUT 19
|
|
78
|
+
/* icons tabulation in standard window */
|
|
79
|
+
#define DBI_X_0 1
|
|
80
|
+
#define DBI_X_1 9
|
|
81
|
+
#define DBI_X_2 17
|
|
82
|
+
#define DBI_Y_0 8
|
|
83
|
+
#define DBI_Y_1 40
|
|
84
|
+
#define DBI_Y_2 72
|
|
85
|
+
/* standard window size defaults */
|
|
86
|
+
#define SET_DB_POS 0
|
|
87
|
+
#define DEF_DB_POS 0x80
|
|
88
|
+
#define DEF_DB_TOP 32
|
|
89
|
+
#define DEF_DB_BOT 127
|
|
90
|
+
#define DEF_DB_LEFT 64
|
|
91
|
+
#define DEF_DB_RIGHT 255
|
|
92
|
+
/* text tabulation in standard window */
|
|
93
|
+
#define TXT_LN_1_Y 16
|
|
94
|
+
#define TXT_LN_2_Y 32
|
|
95
|
+
#define TXT_LN_3_Y 48
|
|
96
|
+
#define TXT_LN_4_Y 64
|
|
97
|
+
#define TXT_LN_5_Y 80
|
|
98
|
+
#define TXT_LN_X 16
|
|
99
|
+
/* system icons size */
|
|
100
|
+
#define SYSDBI_HEIGHT 16
|
|
101
|
+
#define SYSDBI_WIDTH 6
|
|
102
|
+
/* dialogbox string offsets */
|
|
103
|
+
#define OFF_DB_FORM 0
|
|
104
|
+
#define OFF_DB_TOP 1
|
|
105
|
+
#define OFF_DB_BOT 2
|
|
106
|
+
#define OFF_DB_LEFT 3
|
|
107
|
+
#define OFF_DB_RIGHT 5
|
|
108
|
+
#define OFF_DB_1STCMD 7
|
|
109
|
+
|
|
110
|
+
#endif
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
GEOS filesystem functions
|
|
3
|
+
|
|
4
|
+
by Maciej 'YTM/Elysium' Witkowiak
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#ifndef _GFILE_H
|
|
8
|
+
#define _GFILE_H
|
|
9
|
+
|
|
10
|
+
#include <geos/gstruct.h>
|
|
11
|
+
|
|
12
|
+
struct filehandle *Get1stDirEntry(void);
|
|
13
|
+
struct filehandle *GetNxtDirEntry(void);
|
|
14
|
+
|
|
15
|
+
char __fastcall__ FindFTypes(char *buffer, char ftype, char fmaxnum, const char *classtxt);
|
|
16
|
+
|
|
17
|
+
char __fastcall__ GetFile(char flag, const char *fname,
|
|
18
|
+
const char *loadaddr, const char *datadname, const char *datafname);
|
|
19
|
+
char __fastcall__ FindFile(const char *fname);
|
|
20
|
+
char __fastcall__ ReadFile(struct tr_se *myTrSe, char *buffer, unsigned flength);
|
|
21
|
+
char __fastcall__ SaveFile(char skip, struct fileheader *myHeader);
|
|
22
|
+
char __fastcall__ FreeFile(struct tr_se myTable[]);
|
|
23
|
+
char __fastcall__ DeleteFile(const char *fname);
|
|
24
|
+
char __fastcall__ RenameFile(const char *source, const char *target);
|
|
25
|
+
|
|
26
|
+
char ReadByte(void);
|
|
27
|
+
|
|
28
|
+
char __fastcall__ FollowChain(struct tr_se *startTrSe, char *buffer);
|
|
29
|
+
char __fastcall__ GetFHdrInfo(struct filehandle *myFile);
|
|
30
|
+
|
|
31
|
+
char __fastcall__ OpenRecordFile(const char *fname);
|
|
32
|
+
char CloseRecordFile(void);
|
|
33
|
+
char NextRecord(void);
|
|
34
|
+
char PreviousRecord(void);
|
|
35
|
+
char __fastcall__ PointRecord(char);
|
|
36
|
+
char DeleteRecord(void);
|
|
37
|
+
char InsertRecord(void);
|
|
38
|
+
char AppendRecord(void);
|
|
39
|
+
char __fastcall__ ReadRecord(char *buffer, unsigned flength);
|
|
40
|
+
char __fastcall__ WriteRecord(const char *buffer, unsigned flength);
|
|
41
|
+
char UpdateRecordFile(void);
|
|
42
|
+
|
|
43
|
+
/* GEOS filetypes */
|
|
44
|
+
#define NOT_GEOS 0
|
|
45
|
+
#define BASIC 1
|
|
46
|
+
#define ASSEMBLY 2
|
|
47
|
+
#define DATA 3
|
|
48
|
+
#define SYSTEM 4
|
|
49
|
+
#define DESK_ACC 5
|
|
50
|
+
#define APPLICATION 6
|
|
51
|
+
#define APPL_DATA 7
|
|
52
|
+
#define FONT 8
|
|
53
|
+
#define PRINTER 9
|
|
54
|
+
#define INPUT_DEVICE 10
|
|
55
|
+
#define DISK_DEVICE 11
|
|
56
|
+
#define SYSTEM_BOOT 12
|
|
57
|
+
#define TEMPORARY 13
|
|
58
|
+
#define AUTO_EXEC 14
|
|
59
|
+
#define INPUT_128 15
|
|
60
|
+
#define NUMFILETYPES 16
|
|
61
|
+
/* supported structures */
|
|
62
|
+
#define SEQUENTIAL 0
|
|
63
|
+
#define VLIR 1
|
|
64
|
+
/* DOS filetypes */
|
|
65
|
+
#define DEL 0
|
|
66
|
+
#define SEQ 1
|
|
67
|
+
#define PRG 2
|
|
68
|
+
#define USR 3
|
|
69
|
+
#define REL 4
|
|
70
|
+
#define CBM 5
|
|
71
|
+
|
|
72
|
+
#endif
|