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
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* tgi-vectorfont.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* TGI vector font definitions */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 2009, 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 _TGI_VECTORFONT_H
|
|
37
|
+
#define _TGI_VECTORFONT_H
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/*****************************************************************************/
|
|
42
|
+
/* Data */
|
|
43
|
+
/*****************************************************************************/
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
#define TGI_VF_FIRSTCHAR 0x20 /* First char in file */
|
|
48
|
+
#define TGI_VF_LASTCHAR 0x7E /* Last char in file */
|
|
49
|
+
#define TGI_VF_CCOUNT (TGI_VF_LASTCHAR - TGI_VF_FIRSTCHAR + 1)
|
|
50
|
+
|
|
51
|
+
#define TGI_VF_VERSION 0x00 /* File version number */
|
|
52
|
+
|
|
53
|
+
/* TCH file header */
|
|
54
|
+
typedef struct tgi_vectorfont_header tgi_vectorfont_header;
|
|
55
|
+
struct tgi_vectorfont_header {
|
|
56
|
+
unsigned char magic[3]; /* "TCH" */
|
|
57
|
+
unsigned char version; /* Version number */
|
|
58
|
+
unsigned size; /* Font data size */
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/* Font data loaded directly from file */
|
|
62
|
+
struct tgi_vectorfont {
|
|
63
|
+
unsigned char top; /* Height of char */
|
|
64
|
+
unsigned char baseline; /* Character baseline */
|
|
65
|
+
unsigned char bottom; /* Descender */
|
|
66
|
+
unsigned char widths[TGI_VF_CCOUNT]; /* Char widths */
|
|
67
|
+
unsigned char* chars[TGI_VF_CCOUNT]; /* Pointer to character defs */
|
|
68
|
+
unsigned char vec_ops[1]; /* Actually dynamic */
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/*****************************************************************************/
|
|
74
|
+
/* Code */
|
|
75
|
+
/*****************************************************************************/
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
void __fastcall__ tgi_vectorchar (char C);
|
|
80
|
+
/* Draw one character of the vector font at the current graphics cursor
|
|
81
|
+
** position using the current font magnification.
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/* End of tgi-vectorfont.h */
|
|
87
|
+
#endif
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
package/include/tgi.h
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* tgi.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Tiny graphics interface */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 2002-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 _TGI_H
|
|
37
|
+
#define _TGI_H
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
#include <tgi/tgi-error.h>
|
|
42
|
+
#include <target.h>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/*****************************************************************************/
|
|
47
|
+
/* Definitions */
|
|
48
|
+
/*****************************************************************************/
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/* Font constants for use with tgi_settextstyle */
|
|
53
|
+
#define TGI_FONT_BITMAP 0
|
|
54
|
+
#define TGI_FONT_VECTOR 1
|
|
55
|
+
|
|
56
|
+
/* Direction constants for use with tgi_settextstyle */
|
|
57
|
+
#define TGI_TEXT_HORIZONTAL 0
|
|
58
|
+
#define TGI_TEXT_VERTICAL 1
|
|
59
|
+
|
|
60
|
+
/* The name of the standard tgi driver for a platform */
|
|
61
|
+
extern const char tgi_stddrv[];
|
|
62
|
+
|
|
63
|
+
/* The address of the static standard tgi driver for a platform */
|
|
64
|
+
extern const void tgi_static_stddrv[];
|
|
65
|
+
|
|
66
|
+
/* A vector font definition */
|
|
67
|
+
typedef struct tgi_vectorfont tgi_vectorfont;
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/*****************************************************************************/
|
|
72
|
+
/* Functions */
|
|
73
|
+
/*****************************************************************************/
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
void __fastcall__ tgi_load_driver (const char* name);
|
|
78
|
+
/* Load and install the given driver. */
|
|
79
|
+
|
|
80
|
+
void tgi_unload (void);
|
|
81
|
+
/* Uninstall, then unload the currently loaded driver. Will call tgi_done if
|
|
82
|
+
** necessary.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
void __fastcall__ tgi_install (const void* driver);
|
|
86
|
+
/* Install an already loaded driver. */
|
|
87
|
+
|
|
88
|
+
void tgi_uninstall (void);
|
|
89
|
+
/* Uninstall the currently loaded driver but do not unload it. Will call
|
|
90
|
+
** tgi_done if necessary.
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
void tgi_init (void);
|
|
94
|
+
/* Initialize the already loaded graphics driver. */
|
|
95
|
+
|
|
96
|
+
void tgi_done (void);
|
|
97
|
+
/* End graphics mode, switch back to text mode. Will NOT uninstall or unload
|
|
98
|
+
** the driver!
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
const tgi_vectorfont* __fastcall__ tgi_load_vectorfont (const char* name);
|
|
102
|
+
/* Load a vector font into memory and return it. In case of errors, NULL is
|
|
103
|
+
** returned and an error is set, which can be retrieved using tgi_geterror.
|
|
104
|
+
** To use the font, it has to be installed using tgi_install_vectorfont.
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
void __fastcall__ tgi_install_vectorfont (const tgi_vectorfont* font);
|
|
108
|
+
/* Install a vector font for use. More than one vector font can be loaded,
|
|
109
|
+
** but only one can be active. This function is used to tell which one. Call
|
|
110
|
+
** with a NULL pointer to uninstall the currently installed font.
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
void __fastcall__ tgi_free_vectorfont (const tgi_vectorfont* font);
|
|
114
|
+
/* Free a vector font that was previously loaded into memory. */
|
|
115
|
+
|
|
116
|
+
unsigned char tgi_geterror (void);
|
|
117
|
+
/* Return the error code for the last operation. This will also clear the
|
|
118
|
+
** error.
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
const char* __fastcall__ tgi_geterrormsg (unsigned char code);
|
|
122
|
+
/* Get an error message describing the error in code. */
|
|
123
|
+
|
|
124
|
+
void tgi_clear (void);
|
|
125
|
+
/* Clear the drawpage. */
|
|
126
|
+
|
|
127
|
+
unsigned tgi_getpagecount (void);
|
|
128
|
+
/* Returns the number of screen pages available. */
|
|
129
|
+
|
|
130
|
+
void __fastcall__ tgi_setviewpage (unsigned char page);
|
|
131
|
+
/* Set the visible page. Will set an error if the page is not available. */
|
|
132
|
+
|
|
133
|
+
void __fastcall__ tgi_setdrawpage (unsigned char page);
|
|
134
|
+
/* Set the drawable page. Will set an error if the page is not available. */
|
|
135
|
+
|
|
136
|
+
unsigned char tgi_getcolorcount (void);
|
|
137
|
+
/* Get the number of available colors. Zero means 256 colors. */
|
|
138
|
+
|
|
139
|
+
unsigned char tgi_getmaxcolor (void);
|
|
140
|
+
/* Return the maximum supported color number (the number of colors would
|
|
141
|
+
** then be getmaxcolor()+1).
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
void __fastcall__ tgi_setcolor (unsigned char color_index);
|
|
145
|
+
/* Set the current drawing color (palette index). */
|
|
146
|
+
|
|
147
|
+
unsigned char tgi_getcolor (void);
|
|
148
|
+
/* Return the current drawing color (palette index). */
|
|
149
|
+
|
|
150
|
+
void __fastcall__ tgi_setpalette (const unsigned char* palette);
|
|
151
|
+
/* Set the palette (not available with all drivers/hardware). palette is
|
|
152
|
+
** a pointer to as many entries as there are colors required for the drivers
|
|
153
|
+
** palette. This palette is the (only) place where to use the TGI_COLOR values.
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
const unsigned char* tgi_getpalette (void);
|
|
157
|
+
/* Return the current palette. */
|
|
158
|
+
|
|
159
|
+
const unsigned char* tgi_getdefpalette (void);
|
|
160
|
+
/* Return the default palette. */
|
|
161
|
+
|
|
162
|
+
unsigned tgi_getxres (void);
|
|
163
|
+
/* Return the resolution in X direction. */
|
|
164
|
+
|
|
165
|
+
unsigned tgi_getmaxx (void);
|
|
166
|
+
/* Return the maximum x coordinate. The resolution in x direction is
|
|
167
|
+
** getmaxx() + 1
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
unsigned tgi_getyres (void);
|
|
171
|
+
/* Return the resolution in Y direction. */
|
|
172
|
+
|
|
173
|
+
unsigned tgi_getmaxy (void);
|
|
174
|
+
/* Return the maximum y coordinate. The resolution in y direction is
|
|
175
|
+
** getmaxy() + 1
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
unsigned tgi_getaspectratio (void);
|
|
179
|
+
/* Returns the aspect ratio for the loaded driver. The aspect ratio is an
|
|
180
|
+
** 8.8 fixed point value.
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
void __fastcall__ tgi_setaspectratio (unsigned aspectratio);
|
|
184
|
+
/* Set a new aspect ratio for the loaded driver. The aspect ratio is an
|
|
185
|
+
** 8.8 fixed point value.
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
unsigned char __fastcall__ tgi_getpixel (int x, int y);
|
|
189
|
+
/* Get the color value of a pixel. */
|
|
190
|
+
|
|
191
|
+
void __fastcall__ tgi_setpixel (int x, int y);
|
|
192
|
+
/* Plot a pixel in the current drawing color. */
|
|
193
|
+
|
|
194
|
+
void __fastcall__ tgi_gotoxy (int x, int y);
|
|
195
|
+
/* Set the graphics cursor to the given position. */
|
|
196
|
+
|
|
197
|
+
void __fastcall__ tgi_line (int x1, int y1, int x2, int y2);
|
|
198
|
+
/* Draw a line in the current drawing color. The graphics cursor will
|
|
199
|
+
** be set to x2/y2 by this call.
|
|
200
|
+
*/
|
|
201
|
+
|
|
202
|
+
void __fastcall__ tgi_lineto (int x2, int y2);
|
|
203
|
+
/* Draw a line in the current drawing color from the graphics cursor to the
|
|
204
|
+
** new end point. The graphics cursor will be updated to x2/y2.
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
void __fastcall__ tgi_circle (int x, int y, unsigned char radius);
|
|
208
|
+
/* Draw a circle in the current drawing color. */
|
|
209
|
+
|
|
210
|
+
void __fastcall__ tgi_ellipse (int x, int y, unsigned char rx, unsigned char ry);
|
|
211
|
+
/* Draw a full ellipse with center at x/y and radii rx/ry using the current
|
|
212
|
+
** drawing color.
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
void __fastcall__ tgi_arc (int x, int y, unsigned char rx, unsigned char ry,
|
|
216
|
+
unsigned sa, unsigned ea);
|
|
217
|
+
/* Draw an ellipse arc with center at x/y and radii rx/ry using the current
|
|
218
|
+
** drawing color. The arc covers the angle between sa and ea (startangle and
|
|
219
|
+
** endangle), which must be in the range 0..360 (otherwise the function may
|
|
220
|
+
** behave unexpectedly).
|
|
221
|
+
*/
|
|
222
|
+
|
|
223
|
+
void __fastcall__ tgi_pieslice (int x, int y, unsigned char rx, unsigned char ry,
|
|
224
|
+
unsigned sa, unsigned ea);
|
|
225
|
+
/* Draw an ellipse pie slice with center at x/y and radii rx/ry using the
|
|
226
|
+
** current drawing color. The pie slice covers the angle between sa and ea
|
|
227
|
+
** (startangle and endangle), which must be in the range 0..360 (otherwise the
|
|
228
|
+
** function may behave unextectedly).
|
|
229
|
+
*/
|
|
230
|
+
|
|
231
|
+
void __fastcall__ tgi_bar (int x1, int y1, int x2, int y2);
|
|
232
|
+
/* Draw a bar (a filled rectangle) using the current color. */
|
|
233
|
+
|
|
234
|
+
void __fastcall__ tgi_settextdir (unsigned char dir);
|
|
235
|
+
/* Set the direction for text output. dir is one of the TGI_TEXT_XXX
|
|
236
|
+
** constants.
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
void __fastcall__ tgi_settextscale (unsigned width, unsigned height);
|
|
240
|
+
/* Set the scaling for text output. The scaling factors for width and height
|
|
241
|
+
** are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
void __fastcall__ tgi_settextstyle (unsigned width, unsigned height,
|
|
245
|
+
unsigned char dir, unsigned char font);
|
|
246
|
+
/* Set the style for text output. The scaling factors for width and height
|
|
247
|
+
** are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc.
|
|
248
|
+
** dir is one of the TGI_TEXT_XXX constants. font is one of the TGI_FONT_XXX
|
|
249
|
+
** constants.
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
unsigned __fastcall__ tgi_gettextwidth (const char* s);
|
|
253
|
+
/* Calculate the width of the text in pixels according to the current text
|
|
254
|
+
** style.
|
|
255
|
+
*/
|
|
256
|
+
|
|
257
|
+
unsigned __fastcall__ tgi_gettextheight (const char* s);
|
|
258
|
+
/* Calculate the height of the text in pixels according to the current text
|
|
259
|
+
** style.
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
void __fastcall__ tgi_outtext (const char* s);
|
|
263
|
+
/* Output text at the current graphics cursor position. The graphics cursor
|
|
264
|
+
** is moved to the end of the text.
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
void __fastcall__ tgi_outtextxy (int x, int y, const char* s);
|
|
268
|
+
/* Output text at the given cursor position. The graphics cursor is moved to
|
|
269
|
+
** the end of the text.
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);
|
|
273
|
+
/* Call the driver specific control function. What this function does for
|
|
274
|
+
** a specific code depends on the driver. The driver will set an error
|
|
275
|
+
** for unknown codes or values.
|
|
276
|
+
*/
|
|
277
|
+
|
|
278
|
+
int __fastcall__ tgi_imulround (int rhs, int lhs);
|
|
279
|
+
/* Helper function for functions using sine/cosine: Multiply two values, one
|
|
280
|
+
** being an 8.8 fixed point one, and return the rounded and scaled result.
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
/* End of tgi.h */
|
|
286
|
+
#endif
|
package/include/time.h
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* time.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Date and time */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 1998-2012 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 _TIME_H
|
|
37
|
+
#define _TIME_H
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/* Forward declaration for target.h */
|
|
41
|
+
typedef unsigned long time_t;
|
|
42
|
+
typedef unsigned long clock_t;
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/* NULL pointer */
|
|
47
|
+
#ifndef NULL
|
|
48
|
+
#define NULL ((void *) 0)
|
|
49
|
+
#endif
|
|
50
|
+
|
|
51
|
+
/* size_t is needed */
|
|
52
|
+
#ifndef _HAVE_size_t
|
|
53
|
+
#define _HAVE_size_t
|
|
54
|
+
typedef unsigned size_t;
|
|
55
|
+
#endif
|
|
56
|
+
|
|
57
|
+
/* Structure for broken down time */
|
|
58
|
+
struct tm {
|
|
59
|
+
int tm_sec;
|
|
60
|
+
int tm_min;
|
|
61
|
+
int tm_hour;
|
|
62
|
+
int tm_mday;
|
|
63
|
+
int tm_mon;
|
|
64
|
+
int tm_year;
|
|
65
|
+
int tm_wday;
|
|
66
|
+
int tm_yday;
|
|
67
|
+
int tm_isdst;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
#if defined(__ATARI5200__)
|
|
71
|
+
# define CLOCKS_PER_SEC 60
|
|
72
|
+
#elif defined(__ATMOS__)
|
|
73
|
+
# define CLOCKS_PER_SEC 100
|
|
74
|
+
#elif defined(__CBM__)
|
|
75
|
+
# if defined(__CBM510__) || defined(__CBM610__)
|
|
76
|
+
/* The 510/610 gets its clock from the AC current */
|
|
77
|
+
# define CLOCKS_PER_SEC 50
|
|
78
|
+
# else
|
|
79
|
+
# define CLOCKS_PER_SEC 60
|
|
80
|
+
# endif
|
|
81
|
+
#elif defined(__NES__)
|
|
82
|
+
# define CLOCKS_PER_SEC 50
|
|
83
|
+
#elif defined(__PCE__)
|
|
84
|
+
# define CLOCKS_PER_SEC 60
|
|
85
|
+
#elif defined(__GAMATE__)
|
|
86
|
+
# define CLOCKS_PER_SEC 135 /* FIXME */
|
|
87
|
+
#elif defined(__GEOS__)
|
|
88
|
+
# define CLOCKS_PER_SEC 1
|
|
89
|
+
#elif defined (__RP6502__)
|
|
90
|
+
# define CLOCKS_PER_SEC 100
|
|
91
|
+
#elif defined(__TELESTRAT__)
|
|
92
|
+
# define CLOCKS_PER_SEC 10
|
|
93
|
+
#elif defined(__ATARI__) || defined (__LYNX__)
|
|
94
|
+
/* Read the clock rate at runtime */
|
|
95
|
+
clock_t __clocks_per_sec (void);
|
|
96
|
+
# define CLOCKS_PER_SEC __clocks_per_sec()
|
|
97
|
+
#endif
|
|
98
|
+
#define CLOCK_REALTIME 0
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/* ISO C function prototypes */
|
|
103
|
+
char* __fastcall__ asctime (const struct tm* timep);
|
|
104
|
+
clock_t clock (void);
|
|
105
|
+
char* __fastcall__ ctime (const time_t* timep);
|
|
106
|
+
struct tm* __fastcall__ gmtime (const time_t* timep);
|
|
107
|
+
struct tm* __fastcall__ localtime (const time_t* timep);
|
|
108
|
+
time_t __fastcall__ mktime (struct tm* timep);
|
|
109
|
+
size_t __fastcall__ strftime (char* buf, size_t bufsize, const char* format, const struct tm* tm);
|
|
110
|
+
time_t __fastcall__ time (time_t* t);
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
#if __CC65_STD__ >= __CC65_STD_CC65__
|
|
114
|
+
|
|
115
|
+
typedef unsigned char clockid_t;
|
|
116
|
+
|
|
117
|
+
/* Structure for seconds and nanoseconds */
|
|
118
|
+
struct timespec {
|
|
119
|
+
time_t tv_sec;
|
|
120
|
+
long tv_nsec;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/* Timezone representation, default is UTC */
|
|
124
|
+
extern struct _timezone {
|
|
125
|
+
char daylight; /* True if daylight savings time active */
|
|
126
|
+
long timezone; /* Number of seconds behind UTC */
|
|
127
|
+
char tzname[5]; /* Name of timezone, e.g. CET */
|
|
128
|
+
char dstname[5]; /* Name when daylight true, e.g. CEST */
|
|
129
|
+
} _tz;
|
|
130
|
+
|
|
131
|
+
#define CLK_TCK CLOCKS_PER_SEC
|
|
132
|
+
|
|
133
|
+
/* POSIX function prototypes */
|
|
134
|
+
int __fastcall__ clock_getres (clockid_t clock_id, struct timespec *res);
|
|
135
|
+
int __fastcall__ clock_gettime (clockid_t clock_id, struct timespec *tp);
|
|
136
|
+
int __fastcall__ clock_settime (clockid_t clock_id, const struct timespec *tp);
|
|
137
|
+
|
|
138
|
+
#endif
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
/* End of time.h */
|
|
142
|
+
|
|
143
|
+
#endif
|
package/include/unistd.h
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*****************************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* unistd.h */
|
|
4
|
+
/* */
|
|
5
|
+
/* Unix compatibility header file for cc65 */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* (C) 2003-2011, Ullrich von Bassewitz */
|
|
10
|
+
/* Roemerstrasse 52 */
|
|
11
|
+
/* D-70794 Filderstadt */
|
|
12
|
+
/* EMail: uz@cc65.org */
|
|
13
|
+
/* */
|
|
14
|
+
/* */
|
|
15
|
+
/* This software is provided 'as-is', without any expressed or implied */
|
|
16
|
+
/* warranty. In no event will the authors be held liable for any damages */
|
|
17
|
+
/* arising from the use of this software. */
|
|
18
|
+
/* */
|
|
19
|
+
/* Permission is granted to anyone to use this software for any purpose, */
|
|
20
|
+
/* including commercial applications, and to alter it and redistribute it */
|
|
21
|
+
/* freely, subject to the following restrictions: */
|
|
22
|
+
/* */
|
|
23
|
+
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
24
|
+
/* claim that you wrote the original software. If you use this software */
|
|
25
|
+
/* in a product, an acknowledgment in the product documentation would be */
|
|
26
|
+
/* appreciated but is not required. */
|
|
27
|
+
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
28
|
+
/* be misrepresented as being the original software. */
|
|
29
|
+
/* 3. This notice may not be removed or altered from any source */
|
|
30
|
+
/* distribution. */
|
|
31
|
+
/* */
|
|
32
|
+
/*****************************************************************************/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#ifndef _UNISTD_H
|
|
37
|
+
#define _UNISTD_H
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/*****************************************************************************/
|
|
42
|
+
/* Data */
|
|
43
|
+
/*****************************************************************************/
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/* Predefined file handles */
|
|
48
|
+
#define STDIN_FILENO 0
|
|
49
|
+
#define STDOUT_FILENO 1
|
|
50
|
+
#define STDERR_FILENO 2
|
|
51
|
+
|
|
52
|
+
/* WE need size_t */
|
|
53
|
+
#ifndef _HAVE_size_t
|
|
54
|
+
#define _HAVE_size_t
|
|
55
|
+
typedef unsigned size_t;
|
|
56
|
+
#endif
|
|
57
|
+
|
|
58
|
+
/* We need off_t if sys/types is not included */
|
|
59
|
+
#ifndef _HAVE_off_t
|
|
60
|
+
#define _HAVE_off_t
|
|
61
|
+
typedef long int off_t;
|
|
62
|
+
#endif
|
|
63
|
+
|
|
64
|
+
/* Stuff for getopt */
|
|
65
|
+
extern char *optarg;
|
|
66
|
+
extern int optind, opterr, optopt;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
/*****************************************************************************/
|
|
71
|
+
/* Code */
|
|
72
|
+
/*****************************************************************************/
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
/* Files */
|
|
77
|
+
int __fastcall__ write (int fd, const void* buf, unsigned count);
|
|
78
|
+
int __fastcall__ read (int fd, void* buf, unsigned count);
|
|
79
|
+
off_t __fastcall__ lseek (int fd, off_t offset, int whence);
|
|
80
|
+
int __fastcall__ unlink (const char* name); /* Same as remove() */
|
|
81
|
+
|
|
82
|
+
/* Directories */
|
|
83
|
+
int __fastcall__ chdir (const char* name);
|
|
84
|
+
char* __fastcall__ getcwd (char* buf, size_t size);
|
|
85
|
+
int mkdir (const char* name, ...); /* May take a mode argument */
|
|
86
|
+
int __fastcall__ rmdir (const char* name);
|
|
87
|
+
|
|
88
|
+
/* Others */
|
|
89
|
+
unsigned __fastcall__ sleep (unsigned seconds);
|
|
90
|
+
int __fastcall__ getopt (int argc, char* const* argv, const char* optstring);
|
|
91
|
+
|
|
92
|
+
/* Non standard: */
|
|
93
|
+
#if __CC65_STD__ == __CC65_STD_CC65__
|
|
94
|
+
int __fastcall__ exec (const char* progname, const char* cmdline);
|
|
95
|
+
#endif
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/* End of unistd.h */
|
|
100
|
+
#endif
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|