ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
pccga.h
Go to the documentation of this file.
1#ifndef __UGBC_PCCGA__
2#define __UGBC_PCCGA__
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 11
51#define KEY_1 2
52#define KEY_2 3
53#define KEY_3 4
54#define KEY_4 5
55#define KEY_5 6
56#define KEY_6 7
57#define KEY_7 8
58#define KEY_8 9
59#define KEY_9 10
60#define KEY_A 30
61#define KEY_ASTERISK 0xff
62#define KEY_AT 0xff
63#define KEY_B 48
64#define KEY_C 46
65#define KEY_CLEAR 0xff
66#define KEY_COLON 0xff
67#define KEY_COMMA 51
68#define KEY_COMMODORE 0xff
69#define KEY_CONTROL 29
70#define KEY_CRSR_LEFT_RIGHT 0xff
71#define KEY_CRSR_UP_DOWN 0xff
72#define KEY_D 32
73#define KEY_DELETE 83
74#define KEY_E 18
75#define KEY_EQUAL 0xff
76#define KEY_F 33
77#define KEY_F1 59
78#define KEY_F2 60
79#define KEY_F3 61
80#define KEY_F4 62
81#define KEY_F5 63
82#define KEY_F6 64
83#define KEY_F7 65
84#define KEY_F8 66
85#define KEY_G 34
86#define KEY_H 35
87#define KEY_HOME 71
88#define KEY_I 23
89#define KEY_INSERT 82
90#define KEY_J 36
91#define KEY_K 37
92#define KEY_L 38
93#define KEY_LEFT_ARROW 0xff
94#define KEY_LEFT_SHIFT 42
95#define KEY_M 50
96#define KEY_MINUS 53
97#define KEY_N 49
98#define KEY_O 24
99#define KEY_P 25
100#define KEY_PERIOD 52
101#define KEY_PLUS 27
102#define KEY_POUND 0xff
103#define KEY_Q 16
104#define KEY_R 19
105#define KEY_RETURN 28
106#define KEY_RIGHT_SHIFT 54
107#define KEY_RUNSTOP 0xff
108#define KEY_S 31
109#define KEY_SEMICOLON 0xff
110#define KEY_SLASH 0xff
111#define KEY_SPACE 57
112#define KEY_T 20
113#define KEY_U 22
114#define KEY_UP_ARROW 0xff
115#define KEY_V 47
116#define KEY_W 17
117#define KEY_X 45
118#define KEY_Y 21
119#define KEY_Z 44
120#define KEY_BACKSLASH 41
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 29
129#define KEY_GRAPH 0xff
130#define KEY_CAPS 58
131#define KEY_CODE 0xff
132#define KEY_ESC 1
133#define KEY_TAB 15
134#define KEY_STOP 0xff
135#define KEY_BS 14
136#define KEY_SELECT 0xff
137#define KEY_RET 0xff
138#define KEY_INS 82
139#define KEY_DEL 83
140#define KEY_LEFT 75
141#define KEY_UP 72
142#define KEY_DOWN 80
143#define KEY_RIGHT 77
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 255
173#define DSTRING_DEFAULT_SPACE 1024
174
175void pccga_wait_fire( Environment * _environment, int _port, int _release );
176void pccga_wait_fire_semivar( Environment * _environment, char * _port, int _release );
177void pccga_wait_key_or_fire( Environment * _environment, int _port, int _release );
178void pccga_wait_key_or_fire_semivar( Environment * _environment, char * _port, int _release );
179void pccga_inkey( Environment * _environment, char * _pressed, char * _key );
180void pccga_scancode( Environment * _environment, char * _scacode );
181void pccga_asciicode( Environment * _environment, char * _scacode );
182void pccga_scanshift( Environment * _environment, char * _shifts );
183void pccga_key_state( Environment * _environment, char *_scancode, char * _result );
184void pccga_keyshift( Environment * _environment, char * _shifts );
185void pccga_key_pressed( Environment * _environment, char *_scancode, char * _result );
186void pccga_clear_key( Environment * _environment );
187void pccga_joy( Environment * _environment, int _port, char * _value );
188void pccga_joy_vars( Environment * _environment, char * _port, char * _value );
189void pccga_wait_key( Environment * _environment, int _release );
190
191void pccga_sys_call( Environment * _environment, int _destination );
192
193void pccga_timer_set_status_on( Environment * _environment, char * _timer );
194void pccga_timer_set_status_off( Environment * _environment, char * _timer );
195void pccga_timer_set_counter( Environment * _environment, char * _timer, char * _counter );
196void pccga_timer_set_init( Environment * _environment, char * _timer, char * _init );
197void pccga_timer_set_address( Environment * _environment, char * _timer, char * _address );
198
199#endif
void pccga_wait_fire_semivar(Environment *_environment, char *_port, int _release)
Definition pccga.c:94
void pccga_wait_fire(Environment *_environment, int _port, int _release)
Definition pccga.c:90
void pccga_joy_vars(Environment *_environment, char *_port, char *_value)
Definition pccga.c:160
void pccga_wait_key_or_fire(Environment *_environment, int _port, int _release)
Definition pccga.c:82
void pccga_wait_key(Environment *_environment, int _release)
Definition pccga.c:67
void pccga_asciicode(Environment *_environment, char *_scacode)
Definition pccga.c:109
void pccga_keyshift(Environment *_environment, char *_shifts)
Definition pccga.c:152
void pccga_key_pressed(Environment *_environment, char *_scancode, char *_result)
Definition pccga.c:118
void pccga_joy(Environment *_environment, int _port, char *_value)
Definition pccga.c:164
void pccga_timer_set_address(Environment *_environment, char *_timer, char *_address)
Definition pccga.c:236
void pccga_scancode(Environment *_environment, char *_scacode)
Definition pccga.c:98
void pccga_wait_key_or_fire_semivar(Environment *_environment, char *_port, int _release)
Definition pccga.c:86
void pccga_key_state(Environment *_environment, char *_scancode, char *_result)
Definition pccga.c:133
void pccga_inkey(Environment *_environment, char *_pressed, char *_key)
Definition pccga.c:55
void pccga_timer_set_init(Environment *_environment, char *_timer, char *_init)
Definition pccga.c:218
void pccga_scanshift(Environment *_environment, char *_shifts)
Definition pccga.c:148
void pccga_timer_set_status_on(Environment *_environment, char *_timer)
Definition pccga.c:172
void pccga_timer_set_status_off(Environment *_environment, char *_timer)
Definition pccga.c:186
void pccga_sys_call(Environment *_environment, int _destination)
Definition pccga.c:168
void pccga_clear_key(Environment *_environment)
Definition pccga.c:156
void pccga_timer_set_counter(Environment *_environment, char *_timer, char *_counter)
Definition pccga.c:200
struct _Environment Environment
Structure of compilation environment.