ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
coleco.h
Go to the documentation of this file.
1#ifndef __UGBC_COLECO__
2#define __UGBC_COLECO__
3
4/*****************************************************************************
5 * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
6 *****************************************************************************
7 * Copyright 2021-2026 Marco Spedaletti (asimov@mclink.it)
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 *----------------------------------------------------------------------------
21 * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
22 * (la "Licenza"); è proibito usare questo file se non in conformità alla
23 * Licenza. Una copia della Licenza è disponibile all'indirizzo:
24 *
25 * http://www.apache.org/licenses/LICENSE-2.0
26 *
27 * Se non richiesto dalla legislazione vigente o concordato per iscritto,
28 * il software distribuito nei termini della Licenza è distribuito
29 * "COSì COM'è", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
30 * implicite. Consultare la Licenza per il testo specifico che regola le
31 * autorizzazioni e le limitazioni previste dalla medesima.
32 ****************************************************************************/
33
34#include "../ugbc.h"
35
36// _1 2
37// _2 8
38// _3 3
39// _4 13
40// _5 12
41// _6 1
42// _7 10
43// _8 14
44// _9 4
45// _0 5
46// _# 9
47// _* 6
48
49#define KEY_NONE 0
50#define KEY_0 5
51#define KEY_1 2
52#define KEY_2 8
53#define KEY_3 3
54#define KEY_4 13
55#define KEY_5 12
56#define KEY_6 1
57#define KEY_7 10
58#define KEY_8 14
59#define KEY_9 4
60#define KEY_A 0xff
61#define KEY_ASTERISK 6
62#define KEY_AT 0xff
63#define KEY_B 0xff
64#define KEY_C 0xff
65#define KEY_CLEAR 0xff
66#define KEY_COLON 0xff
67#define KEY_COMMA 0xff
68#define KEY_COMMODORE 0xff
69#define KEY_CONTROL 0xff
70#define KEY_CRSR_LEFT_RIGHT 0xff
71#define KEY_CRSR_UP_DOWN 0xff
72#define KEY_D 0xff
73#define KEY_DELETE 0xff
74#define KEY_E 0xff
75#define KEY_EQUAL 0xff
76#define KEY_F 0xff
77#define KEY_F1 0xff
78#define KEY_F2 0xff
79#define KEY_F3 0xff
80#define KEY_F4 0xff
81#define KEY_F5 0xff
82#define KEY_F6 0xff
83#define KEY_F7 0xff
84#define KEY_F8 0xff
85#define KEY_G 0xff
86#define KEY_H 0xff
87#define KEY_HOME 0xff
88#define KEY_I 0xff
89#define KEY_INSERT 0xff
90#define KEY_J 0xff
91#define KEY_K 0xff
92#define KEY_L 0xff
93#define KEY_LEFT_ARROW 0xff
94#define KEY_LEFT_SHIFT 0xff
95#define KEY_M 0xff
96#define KEY_MINUS 0xff
97#define KEY_N 0xff
98#define KEY_O 0xff
99#define KEY_P 0xff
100#define KEY_PERIOD 0xff
101#define KEY_PLUS 0xff
102#define KEY_POUND 0xff
103#define KEY_Q 0xff
104#define KEY_R 0xff
105#define KEY_RETURN 0xff
106#define KEY_RIGHT_SHIFT 0xff
107#define KEY_RUNSTOP 0xff
108#define KEY_S 0xff
109#define KEY_SEMICOLON 0xff
110#define KEY_SLASH 0xff
111#define KEY_SPACE 0xff
112#define KEY_T 0xff
113#define KEY_U 0xff
114#define KEY_UP_ARROW 0xff
115#define KEY_V 0xff
116#define KEY_W 0xff
117#define KEY_X 0xff
118#define KEY_Y 0xff
119#define KEY_Z 0xff
120#define KEY_BACKSLASH 0xff
121#define KEY_SQUARE_OPEN 0xff
122#define KEY_SQUARE_CLOSED 0xff
123#define KEY_SEMICOMMA 0xff
124#define KEY_QUOTE 0xff
125#define KEY_APIX 0xff
126#define KEY_DEAD 0xff
127#define KEY_SHIFT 0xff
128#define KEY_CTRL 0xff
129#define KEY_GRAPH 0xff
130#define KEY_CAPS 0xff
131#define KEY_CODE 0xff
132#define KEY_ESC 0xff
133#define KEY_TAB 0xff
134#define KEY_STOP 0xff
135#define KEY_BS 0xff
136#define KEY_SELECT 0xff
137#define KEY_RET 0xff
138#define KEY_INS 0xff
139#define KEY_DEL 0xff
140#define KEY_LEFT 0xff
141#define KEY_UP 0xff
142#define KEY_DOWN 0xff
143#define KEY_RIGHT 0xff
144#define KEY_DIVISION 0xff
145
146#define KEYBOARD_CONFIG_DEFAULT_SYNC 1
147
148#define INPUT_DEFAULT_SEPARATOR ','
149#define INPUT_DEFAULT_SIZE 32
150#define INPUT_DEFAULT_CURSOR 0x60
151
152#define SCREEN_CAPABILITIES ( ( 1<<TILEMAP_NATIVE ) | ( 1<<BITMAP_NATIVE ) )
153
154#define JOY_COUNT 2
155
156#define JOY_UP 0
157#define JOY_DOWN 2
158#define JOY_LEFT 3
159#define JOY_RIGHT 1
160#define JOY_FIRE 6
161
162#define JOYSTICK_CONFIG_DEFAULT_SYNC 1
163
164#define DEFAULT_PAINT_BUCKET_SIZE 64
165
166#define BANK_COUNT 0
167#define BANK_SIZE 0
168#define BANK_BASE_ADDRESS 0
169
170#define MAX_AUDIO_CHANNELS 3
171
172#define DSTRING_DEFAULT_COUNT 32
173#define DSTRING_DEFAULT_SPACE 128
174
175void coleco_wait_fire( Environment * _environment, int _port, int _release );
176void coleco_wait_fire_semivar( Environment * _environment, char * _port, int _release );
177void coleco_wait_key_or_fire( Environment * _environment, int _port, int _release );
178void coleco_wait_key_or_fire_semivar( Environment * _environment, char * _port, int _release );
179void coleco_inkey( Environment * _environment, char * _pressed, char * _key );
180void coleco_scancode( Environment * _environment, char * _pressed, char * _scacode );
181void coleco_scanshift( Environment * _environment, char * _shifts );
182void coleco_keyshift( Environment * _environment, char * _shifts );
183void coleco_key_pressed( Environment * _environment, char *_scancode, char * _result );
184void coleco_clear_key( Environment * _environment );
185void coleco_joy( Environment * _environment, int _port, char * _value );
186void coleco_joy_vars( Environment * _environment, char * _port, char * _value );
187
188void coleco_sys_call( Environment * _environment, int _destination );
189
190void coleco_timer_set_status_on( Environment * _environment, char * _timer );
191void coleco_timer_set_status_off( Environment * _environment, char * _timer );
192void coleco_timer_set_counter( Environment * _environment, char * _timer, char * _counter );
193void coleco_timer_set_init( Environment * _environment, char * _timer, char * _init );
194void coleco_timer_set_address( Environment * _environment, char * _timer, char * _address );
195
196#endif
void coleco_wait_fire(Environment *_environment, int _port, int _release)
void coleco_key_pressed(Environment *_environment, char *_scancode, char *_result)
void coleco_keyshift(Environment *_environment, char *_shifts)
void coleco_joy(Environment *_environment, int _port, char *_value)
void coleco_scanshift(Environment *_environment, char *_shifts)
void coleco_inkey(Environment *_environment, char *_pressed, char *_key)
void coleco_sys_call(Environment *_environment, int _destination)
void coleco_timer_set_status_off(Environment *_environment, char *_timer)
void coleco_timer_set_init(Environment *_environment, char *_timer, char *_init)
void coleco_clear_key(Environment *_environment)
void coleco_scancode(Environment *_environment, char *_pressed, char *_scacode)
void coleco_joy_vars(Environment *_environment, char *_port, char *_value)
void coleco_timer_set_status_on(Environment *_environment, char *_timer)
void coleco_wait_fire_semivar(Environment *_environment, char *_port, int _release)
void coleco_wait_key_or_fire(Environment *_environment, int _port, int _release)
void coleco_timer_set_address(Environment *_environment, char *_timer, char *_address)
void coleco_wait_key_or_fire_semivar(Environment *_environment, char *_port, int _release)
void coleco_timer_set_counter(Environment *_environment, char *_timer, char *_counter)
struct _Environment Environment
Structure of compilation environment.