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/locale.h
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* locale.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Localization <locale.h> */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 1998-2005 Ullrich von Bassewitz */
|
|
10
|
+
/* Roemerstrasse 52 */
|
|
11
|
+
/* D-70794 Filderstadt */
|
|
12
|
+
/* EMail: uz@cc65.org */
|
|
13
|
+
/* */
|
|
14
|
+
/* */
|
|
15
|
+
/* This software is provided 'as-is', without any expressed or implied */
|
|
16
|
+
/* warranty. In no event will the authors be held liable for any damages */
|
|
17
|
+
/* arising from the use of this software. */
|
|
18
|
+
/* */
|
|
19
|
+
/* Permission is granted to anyone to use this software for any purpose, */
|
|
20
|
+
/* including commercial applications, and to alter it and redistribute it */
|
|
21
|
+
/* freely, subject to the following restrictions: */
|
|
22
|
+
/* */
|
|
23
|
+
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
24
|
+
/* claim that you wrote the original software. If you use this software */
|
|
25
|
+
/* in a product, an acknowledgment in the product documentation would be */
|
|
26
|
+
/* appreciated but is not required. */
|
|
27
|
+
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
28
|
+
/* be misrepresented as being the original software. */
|
|
29
|
+
/* 3. This notice may not be removed or altered from any source */
|
|
30
|
+
/* distribution. */
|
|
31
|
+
/* */
|
|
32
|
+
/*****************************************************************************/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#ifndef _LOCALE_H
|
|
37
|
+
#define _LOCALE_H
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/* NULL pointer */
|
|
42
|
+
#ifndef NULL
|
|
43
|
+
#define NULL ((void *) 0)
|
|
44
|
+
#endif
|
|
45
|
+
|
|
46
|
+
/* Locale information constants */
|
|
47
|
+
#define LC_ALL 0
|
|
48
|
+
#define LC_COLLATE 1
|
|
49
|
+
#define LC_CTYPE 2
|
|
50
|
+
#define LC_MONETARY 3
|
|
51
|
+
#define LC_NUMERIC 4
|
|
52
|
+
#define LC_TIME 5
|
|
53
|
+
|
|
54
|
+
/* Struct containing locale settings */
|
|
55
|
+
struct lconv {
|
|
56
|
+
char* currency_symbol;
|
|
57
|
+
char* decimal_point;
|
|
58
|
+
char* grouping;
|
|
59
|
+
char* int_curr_symbol;
|
|
60
|
+
char* mon_decimal_point;
|
|
61
|
+
char* mon_grouping;
|
|
62
|
+
char* mon_thousands_sep;
|
|
63
|
+
char* negative_sign;
|
|
64
|
+
char* positive_sign;
|
|
65
|
+
char* thousands_sep;
|
|
66
|
+
char frac_digits;
|
|
67
|
+
char int_frac_digits;
|
|
68
|
+
char n_cs_precedes;
|
|
69
|
+
char n_sep_by_space;
|
|
70
|
+
char n_sign_posn;
|
|
71
|
+
char p_cs_precedes;
|
|
72
|
+
char p_sep_by_space;
|
|
73
|
+
char p_sign_posn;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/* Function prototypes */
|
|
77
|
+
struct lconv* localeconv (void);
|
|
78
|
+
char* __fastcall__ setlocale (int category, const char* locale);
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
/* End of locale.h */
|
|
83
|
+
#endif
|
package/include/lynx.h
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* lynx.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Lynx system-specific definitions */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 2003 Shawn Jefferson */
|
|
10
|
+
/* */
|
|
11
|
+
/* Adapted with many changes Ullrich von Bassewitz, 2004-10-09 */
|
|
12
|
+
/* */
|
|
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
|
+
#ifndef _LYNX_H
|
|
35
|
+
#define _LYNX_H
|
|
36
|
+
|
|
37
|
+
/* Check for errors */
|
|
38
|
+
#if !defined(__LYNX__)
|
|
39
|
+
# error This module may only be used when compiling for the Lynx game console!
|
|
40
|
+
#endif
|
|
41
|
+
|
|
42
|
+
/* Color definitions */
|
|
43
|
+
#define COLOR_TRANSPARENT 0x00
|
|
44
|
+
#define COLOR_BLACK 0x01
|
|
45
|
+
#define COLOR_RED 0x02
|
|
46
|
+
#define COLOR_PINK 0x03
|
|
47
|
+
#define COLOR_LIGHTGREY 0x04
|
|
48
|
+
#define COLOR_GREY 0x05
|
|
49
|
+
#define COLOR_DARKGREY 0x06
|
|
50
|
+
#define COLOR_BROWN 0x07
|
|
51
|
+
#define COLOR_PEACH 0x08
|
|
52
|
+
#define COLOR_YELLOW 0x09
|
|
53
|
+
#define COLOR_LIGHTGREEN 0x0A
|
|
54
|
+
#define COLOR_GREEN 0x0B
|
|
55
|
+
#define COLOR_PURPLE 0x0C
|
|
56
|
+
#define COLOR_BLUE 0x0D
|
|
57
|
+
#define COLOR_LIGHTBLUE 0x0E
|
|
58
|
+
#define COLOR_WHITE 0x0F
|
|
59
|
+
|
|
60
|
+
/* TGI color defines (default palette) */
|
|
61
|
+
#define TGI_COLOR_TRANSPARENT COLOR_TRANSPARENT
|
|
62
|
+
#define TGI_COLOR_BLACK COLOR_BLACK
|
|
63
|
+
#define TGI_COLOR_RED COLOR_RED
|
|
64
|
+
#define TGI_COLOR_PINK COLOR_PINK
|
|
65
|
+
#define TGI_COLOR_LIGHTGREY COLOR_LIGHTGREY
|
|
66
|
+
#define TGI_COLOR_GREY COLOR_GREY
|
|
67
|
+
#define TGI_COLOR_DARKGREY COLOR_DARKGREY
|
|
68
|
+
#define TGI_COLOR_BROWN COLOR_BROWN
|
|
69
|
+
#define TGI_COLOR_ORANGE COLOR_BROWN
|
|
70
|
+
#define TGI_COLOR_PEACH COLOR_PEACH
|
|
71
|
+
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
|
72
|
+
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
|
73
|
+
#define TGI_COLOR_GREEN COLOR_GREEN
|
|
74
|
+
#define TGI_COLOR_PURPLE COLOR_PURPLE
|
|
75
|
+
#define TGI_COLOR_BLUE COLOR_BLUE
|
|
76
|
+
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
|
77
|
+
#define TGI_COLOR_WHITE COLOR_WHITE
|
|
78
|
+
|
|
79
|
+
/* No support for dynamically loadable drivers */
|
|
80
|
+
#define DYN_DRV 0
|
|
81
|
+
|
|
82
|
+
/* Addresses of static drivers */
|
|
83
|
+
extern void lynx_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
|
84
|
+
extern void lynx_comlynx_ser[]; /* Referred to by ser_static_stddrv[] */
|
|
85
|
+
extern void lynx_160_102_16_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
|
86
|
+
|
|
87
|
+
/* Sound support */
|
|
88
|
+
void lynx_snd_init (void); /* Initialize the sound driver */
|
|
89
|
+
void lynx_snd_pause (void); /* Pause sound */
|
|
90
|
+
void lynx_snd_continue (void); /* Continue sound after pause */
|
|
91
|
+
void __fastcall__ lynx_snd_play (unsigned char channel, unsigned char *music); /* Play tune on channel */
|
|
92
|
+
void lynx_snd_stop (void); /* Stop sound on all channels */
|
|
93
|
+
void __fastcall__ lynx_snd_stop_channel (unsigned char channel); /* Stop sound on all channels */
|
|
94
|
+
unsigned char lynx_snd_active(void); /* Show which channels are active */
|
|
95
|
+
|
|
96
|
+
/* Cartridge access */
|
|
97
|
+
void __fastcall__ lynx_load (int file_number); /* Load a file into RAM using a zero-based index */
|
|
98
|
+
void __fastcall__ lynx_exec (int file_number); /* Load a file into ram and execute it */
|
|
99
|
+
|
|
100
|
+
/* EEPROM access */
|
|
101
|
+
unsigned __fastcall__ lynx_eeprom_read (unsigned char cell); /* Read a 16 bit word from the given address */
|
|
102
|
+
unsigned __fastcall__ lynx_eeprom_write (unsigned char cell, unsigned val); /* Write the word at the given address */
|
|
103
|
+
void __fastcall__ lynx_eeprom_erase (unsigned char cell); /* Clear the word at the given address */
|
|
104
|
+
unsigned __fastcall__ lynx_eeread (unsigned cell); /* Read a 16 bit word from the given address 93C46, 93C66 or 93C86 */
|
|
105
|
+
unsigned __fastcall__ lynx_eewrite (unsigned cell, unsigned val); /* Write the word at the given address 93C46, 93C66 or 93C86 */
|
|
106
|
+
|
|
107
|
+
/* TGI extras */
|
|
108
|
+
#define tgi_sprite(spr) tgi_ioctl(0, spr)
|
|
109
|
+
#define tgi_flip() tgi_ioctl(1, (void*)0)
|
|
110
|
+
#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (void*)(bgcol))
|
|
111
|
+
#define tgi_setframerate(rate) tgi_ioctl(3, (void*)(rate))
|
|
112
|
+
#define tgi_busy() tgi_ioctl(4, (void*)0)
|
|
113
|
+
#define tgi_updatedisplay() tgi_ioctl(4, (void*)1)
|
|
114
|
+
#define tgi_setcollisiondetection(active) tgi_ioctl(5, (void*)(active))
|
|
115
|
+
|
|
116
|
+
/* Hardware definitions */
|
|
117
|
+
#include <_mikey.h>
|
|
118
|
+
#define MIKEY (*(struct __mikey *)0xFD00)
|
|
119
|
+
|
|
120
|
+
#define _MIKEY_TIMERS (*(struct _mikey_all_timers *) 0xFD00) /* mikey_timers[8] */
|
|
121
|
+
#define _HBL_TIMER (*(struct _mikey_timer *) 0xFD00) /* timer0 (HBL) */
|
|
122
|
+
#define _VBL_TIMER (*(struct _mikey_timer *) 0xFD08) /* timer2 (VBL) */
|
|
123
|
+
#define _UART_TIMER (*(struct _mikey_timer *) 0xFD14) /* timer4 (UART) */
|
|
124
|
+
#define _VIDDMA (*(unsigned int *) 0xFD92) /* DISPCTL/VIDDMA */
|
|
125
|
+
|
|
126
|
+
#include <_suzy.h>
|
|
127
|
+
#define SUZY (*(volatile struct __suzy*)0xFC00)
|
|
128
|
+
|
|
129
|
+
/* Masks for joy_read */
|
|
130
|
+
#define JOY_UP_MASK 0x80
|
|
131
|
+
#define JOY_DOWN_MASK 0x40
|
|
132
|
+
#define JOY_LEFT_MASK 0x20
|
|
133
|
+
#define JOY_RIGHT_MASK 0x10
|
|
134
|
+
#define JOY_BTN_1_MASK 0x01
|
|
135
|
+
#define JOY_BTN_2_MASK 0x02
|
|
136
|
+
|
|
137
|
+
#define JOY_BTN_A_MASK JOY_BTN_1_MASK
|
|
138
|
+
#define JOY_BTN_B_MASK JOY_BTN_2_MASK
|
|
139
|
+
|
|
140
|
+
#define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK)
|
|
141
|
+
#define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK)
|
|
142
|
+
|
|
143
|
+
/* End of lynx.h */
|
|
144
|
+
#endif
|
package/include/lz4.h
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* lz4.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Decompression routine for the 'lz4' format */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 2017 Mega Cat Studios */
|
|
10
|
+
/* */
|
|
11
|
+
/* This software is provided 'as-is', without any expressed or implied */
|
|
12
|
+
/* warranty. In no event will the authors be held liable for any damages */
|
|
13
|
+
/* arising from the use of this software. */
|
|
14
|
+
/* */
|
|
15
|
+
/* Permission is granted to anyone to use this software for any purpose, */
|
|
16
|
+
/* including commercial applications, and to alter it and redistribute it */
|
|
17
|
+
/* freely, subject to the following restrictions: */
|
|
18
|
+
/* */
|
|
19
|
+
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
20
|
+
/* claim that you wrote the original software. If you use this software */
|
|
21
|
+
/* in a product, an acknowledgment in the product documentation would be */
|
|
22
|
+
/* appreciated but is not required. */
|
|
23
|
+
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
24
|
+
/* be misrepresented as being the original software. */
|
|
25
|
+
/* 3. This notice may not be removed or altered from any source */
|
|
26
|
+
/* distribution. */
|
|
27
|
+
/* */
|
|
28
|
+
/*****************************************************************************/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
#ifndef _LZ4_H
|
|
33
|
+
#define _LZ4_H
|
|
34
|
+
|
|
35
|
+
void __fastcall__ decompress_lz4 (const unsigned char* src, unsigned char* const dst,
|
|
36
|
+
const unsigned short uncompressed_size);
|
|
37
|
+
/* Decompresses the source buffer into the destination buffer.
|
|
38
|
+
** The size of the decompressed data must be known in advance, LZ4
|
|
39
|
+
** does not include any terminator in-stream.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/* end of lz4.h */
|
|
43
|
+
#endif
|
package/include/lzsa.h
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* lzsa.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Decompression routine for the 'lzsa' format */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 2022 John Brandwood */
|
|
10
|
+
/* */
|
|
11
|
+
/* */
|
|
12
|
+
/* Boost license: */
|
|
13
|
+
/* Distributed under the Boost Software License, Version 1.0. */
|
|
14
|
+
/* Boost Software License - Version 1.0 - August 17th, 2003 */
|
|
15
|
+
/* */
|
|
16
|
+
/* Permission is hereby granted, free of charge, to any person or */
|
|
17
|
+
/* organization */
|
|
18
|
+
/* obtaining a copy of the software and accompanying documentation covered by*/
|
|
19
|
+
/* this license (the "Software") to use, reproduce, display, distribute, */
|
|
20
|
+
/* execute, and transmit the Software, and to prepare derivative works of the*/
|
|
21
|
+
/* Software, and to permit third-parties to whom the Software is furnished to*/
|
|
22
|
+
/* do so, all subject to the following: */
|
|
23
|
+
/* */
|
|
24
|
+
/* The copyright notices in the Software and this entire statement, including*/
|
|
25
|
+
/* the above license grant, this restriction and the following disclaimer, */
|
|
26
|
+
/* must be included in all copies of the Software, in whole or in part, and */
|
|
27
|
+
/* all derivative works of the Software, unless such copies or derivative */
|
|
28
|
+
/* works are solely in the form of machine-executable object code generated */
|
|
29
|
+
/* by a source language processor. */
|
|
30
|
+
/* */
|
|
31
|
+
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*/
|
|
32
|
+
/* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */
|
|
33
|
+
/* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT */
|
|
34
|
+
/* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE */
|
|
35
|
+
/* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR */
|
|
36
|
+
/* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE */
|
|
37
|
+
/* USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
38
|
+
/*****************************************************************************/
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
#ifndef _LZSA_H
|
|
43
|
+
#define _LZSA_H
|
|
44
|
+
|
|
45
|
+
void __fastcall__ decompress_lzsa1 (const unsigned char* src, unsigned char* const dst);
|
|
46
|
+
/* Decompresses the source buffer into the destination buffer.
|
|
47
|
+
** compress with lzsa -r -f 1 input.bin output.lzsa1
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
void __fastcall__ decompress_lzsa2 (const unsigned char* src, unsigned char* const dst);
|
|
51
|
+
/* Decompresses the source buffer into the destination buffer.
|
|
52
|
+
** compress with lzsa -r -f 2 input.bin output.lzsa2
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/* end of lzsa.h */
|
|
56
|
+
#endif
|
package/include/mega65.h
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* mega65.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* MEGA65 system specific definitions */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 1998-2013, 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 _MEGA65_H
|
|
37
|
+
#define _MEGA65_H
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/* Check for errors */
|
|
42
|
+
#if !defined(__MEGA65__)
|
|
43
|
+
# error This module may only be used when compiling for the MEGA65!
|
|
44
|
+
#endif
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/* Additional key defines */
|
|
49
|
+
#define CH_F1 133
|
|
50
|
+
#define CH_F2 137
|
|
51
|
+
#define CH_F3 134
|
|
52
|
+
#define CH_F4 138
|
|
53
|
+
#define CH_F5 135
|
|
54
|
+
#define CH_F6 139
|
|
55
|
+
#define CH_F7 136
|
|
56
|
+
#define CH_F8 140
|
|
57
|
+
|
|
58
|
+
/* Color defines */
|
|
59
|
+
#define COLOR_BLACK 0x00
|
|
60
|
+
#define COLOR_WHITE 0x01
|
|
61
|
+
#define COLOR_RED 0x02
|
|
62
|
+
#define COLOR_CYAN 0x03
|
|
63
|
+
#define COLOR_PURPLE 0x04
|
|
64
|
+
#define COLOR_GREEN 0x05
|
|
65
|
+
#define COLOR_BLUE 0x06
|
|
66
|
+
#define COLOR_YELLOW 0x07
|
|
67
|
+
#define COLOR_ORANGE 0x08
|
|
68
|
+
#define COLOR_BROWN 0x09
|
|
69
|
+
#define COLOR_LIGHTRED 0x0A
|
|
70
|
+
#define COLOR_GRAY1 0x0B
|
|
71
|
+
#define COLOR_GRAY2 0x0C
|
|
72
|
+
#define COLOR_LIGHTGREEN 0x0D
|
|
73
|
+
#define COLOR_LIGHTBLUE 0x0E
|
|
74
|
+
#define COLOR_GRAY3 0x0F
|
|
75
|
+
|
|
76
|
+
/* TGI color defines */
|
|
77
|
+
#define TGI_COLOR_BLACK COLOR_BLACK
|
|
78
|
+
#define TGI_COLOR_WHITE COLOR_WHITE
|
|
79
|
+
#define TGI_COLOR_RED COLOR_RED
|
|
80
|
+
#define TGI_COLOR_CYAN COLOR_CYAN
|
|
81
|
+
#define TGI_COLOR_PURPLE COLOR_PURPLE
|
|
82
|
+
#define TGI_COLOR_GREEN COLOR_GREEN
|
|
83
|
+
#define TGI_COLOR_BLUE COLOR_BLUE
|
|
84
|
+
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
|
85
|
+
#define TGI_COLOR_ORANGE COLOR_ORANGE
|
|
86
|
+
#define TGI_COLOR_BROWN COLOR_BROWN
|
|
87
|
+
#define TGI_COLOR_LIGHTRED COLOR_LIGHTRED
|
|
88
|
+
#define TGI_COLOR_GRAY1 COLOR_GRAY1
|
|
89
|
+
#define TGI_COLOR_GRAY2 COLOR_GRAY2
|
|
90
|
+
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
|
91
|
+
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
|
92
|
+
#define TGI_COLOR_GRAY3 COLOR_GRAY3
|
|
93
|
+
|
|
94
|
+
/* Masks for joy_read */
|
|
95
|
+
#define JOY_UP_MASK 0x01
|
|
96
|
+
#define JOY_DOWN_MASK 0x02
|
|
97
|
+
#define JOY_LEFT_MASK 0x04
|
|
98
|
+
#define JOY_RIGHT_MASK 0x08
|
|
99
|
+
#define JOY_BTN_1_MASK 0x10
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/* Define hardware */
|
|
103
|
+
#include <_vic3.h>
|
|
104
|
+
#define VIC (*(struct __vic2*)0xD000)
|
|
105
|
+
|
|
106
|
+
#include <_sid.h>
|
|
107
|
+
#define SID1 (*(struct __sid*)0xD400)
|
|
108
|
+
#define SID2 (*(struct __sid*)0xD420)
|
|
109
|
+
|
|
110
|
+
#include <_6526.h>
|
|
111
|
+
#define CIA1 (*(struct __6526*)0xDC00)
|
|
112
|
+
#define CIA2 (*(struct __6526*)0xDD00)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/* Define special memory areas */
|
|
116
|
+
#define COLOR_RAM ((unsigned char*)0xD800)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/* End of mega65.h */
|
|
120
|
+
#endif
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* modload.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* o65 module loader interface for cc65 */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 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
|
+
/* Exports structures and functions to load relocatable o65 modules at
|
|
37
|
+
** runtime.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
#ifndef _MODLOAD_H
|
|
43
|
+
#define _MODLOAD_H
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/* The following struct is passed to the module loader. It contains stuff,
|
|
48
|
+
** the loader needs to work, and another area where the loader will place
|
|
49
|
+
** informational data if it was successful. You will have to check the return
|
|
50
|
+
** code of mod_load before accessing any of these additional struct members.
|
|
51
|
+
*/
|
|
52
|
+
struct mod_ctrl {
|
|
53
|
+
/* Parameters passed into the loader routine. The member callerdata
|
|
54
|
+
** is an opaque 16 bit datatype that may be used by the caller to
|
|
55
|
+
** pass data through to the read routine. The read routine is used by the
|
|
56
|
+
** loader to load any required data. There are several calls where the
|
|
57
|
+
** read routine is passed a count of 1, so you may choose to make this
|
|
58
|
+
** a special case when implementing read(). The read() should return the
|
|
59
|
+
** number of bytes actually read. If the return value differs from the
|
|
60
|
+
** passed count, this is considered an error.
|
|
61
|
+
** NOTE: read() is designed so that the POSIX read() routine can be used
|
|
62
|
+
** for this vector, if you're loading from disk.
|
|
63
|
+
*/
|
|
64
|
+
int __fastcall__ (*read) (int callerdata, void* buffer, unsigned count);
|
|
65
|
+
int callerdata;
|
|
66
|
+
|
|
67
|
+
/* Parameters set by the loader routine */
|
|
68
|
+
void* module; /* Pointer to module data */
|
|
69
|
+
unsigned module_size; /* Total size of loaded module */
|
|
70
|
+
unsigned module_id; /* Module id */
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
unsigned char __fastcall__ mod_load (struct mod_ctrl* ctrl);
|
|
76
|
+
/* Load a module into memory and relocate it. The function will return an
|
|
77
|
+
** error code (see below). If MLOAD_OK is returned, the outgoing fields in
|
|
78
|
+
** the passed mod_ctrl struct contain information about the module just
|
|
79
|
+
** loaded.
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
void __fastcall__ mod_free (void* module);
|
|
83
|
+
/* Free a loaded module. Note: The given pointer is the pointer to the
|
|
84
|
+
** module memory, not a pointer to a control structure.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/* Errors */
|
|
90
|
+
#define MLOAD_OK 0 /* Module load successful */
|
|
91
|
+
#define MLOAD_ERR_READ 1 /* Read error */
|
|
92
|
+
#define MLOAD_ERR_HDR 2 /* Header error */
|
|
93
|
+
#define MLOAD_ERR_OS 3 /* Wrong OS */
|
|
94
|
+
#define MLOAD_ERR_FMT 4 /* Data format error */
|
|
95
|
+
#define MLOAD_ERR_MEM 5 /* Not enough memory */
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/* End of modload.h */
|
|
100
|
+
#endif
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* mouse-kernel.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Internally used mouse functions */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 2003-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 _MOUSE_KERNEL_H
|
|
37
|
+
#define _MOUSE_KERNEL_H
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/*****************************************************************************/
|
|
42
|
+
/* Data */
|
|
43
|
+
/*****************************************************************************/
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/* Mouse kernel variables */
|
|
48
|
+
extern void* mouse_drv; /* Pointer to driver */
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/*****************************************************************************/
|
|
53
|
+
/* Code */
|
|
54
|
+
/*****************************************************************************/
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
void mouse_clear_ptr (void);
|
|
59
|
+
/* Clear the mouse_drv pointer */
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/* End of mouse-kernel.h */
|
|
64
|
+
#endif
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|