fcdev-cc65 0.0.0-stage → 0.7.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/asminc/cx16.inc
ADDED
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
;
|
|
2
|
+
; CX16 r39 definitions
|
|
3
|
+
;
|
|
4
|
+
|
|
5
|
+
; ---------------------------------------------------------------------------
|
|
6
|
+
; Constants
|
|
7
|
+
|
|
8
|
+
.enum COLOR
|
|
9
|
+
BLACK = $00
|
|
10
|
+
WHITE
|
|
11
|
+
RED
|
|
12
|
+
CYAN
|
|
13
|
+
PURPLE
|
|
14
|
+
GREEN
|
|
15
|
+
BLUE
|
|
16
|
+
YELLOW
|
|
17
|
+
ORANGE
|
|
18
|
+
BROWN
|
|
19
|
+
PINK
|
|
20
|
+
LIGHTRED = PINK
|
|
21
|
+
GRAY1
|
|
22
|
+
GRAY2
|
|
23
|
+
LIGHTGREEN
|
|
24
|
+
LIGHTBLUE
|
|
25
|
+
GRAY3
|
|
26
|
+
.endenum
|
|
27
|
+
|
|
28
|
+
; Special characters
|
|
29
|
+
.enum CH
|
|
30
|
+
COLOR_SWAP = $01
|
|
31
|
+
STOP = $03
|
|
32
|
+
UNDERLINE
|
|
33
|
+
WHITE
|
|
34
|
+
BOLD
|
|
35
|
+
BELL
|
|
36
|
+
BACKSPACE
|
|
37
|
+
TAB
|
|
38
|
+
LINEFEED
|
|
39
|
+
ITALIC
|
|
40
|
+
OUTLINE
|
|
41
|
+
ENTER
|
|
42
|
+
FONT_LOWER
|
|
43
|
+
FONT_ISO
|
|
44
|
+
F9
|
|
45
|
+
CURS_DOWN
|
|
46
|
+
REVERSE
|
|
47
|
+
HOME
|
|
48
|
+
DEL
|
|
49
|
+
F10
|
|
50
|
+
F11
|
|
51
|
+
F12
|
|
52
|
+
SHIFT_TAB
|
|
53
|
+
RED = $1C
|
|
54
|
+
CURS_RIGHT
|
|
55
|
+
GREEN
|
|
56
|
+
BLUE
|
|
57
|
+
LIRA = $5C
|
|
58
|
+
ORANGE = $81
|
|
59
|
+
RUN = $83
|
|
60
|
+
HELP
|
|
61
|
+
F1
|
|
62
|
+
F3
|
|
63
|
+
F5
|
|
64
|
+
F7
|
|
65
|
+
F2
|
|
66
|
+
F4
|
|
67
|
+
F6
|
|
68
|
+
F8
|
|
69
|
+
SHIFT_ENTER
|
|
70
|
+
FONT_UPPER
|
|
71
|
+
FONT_PET
|
|
72
|
+
BLACK
|
|
73
|
+
CURS_UP
|
|
74
|
+
ATTR_CLEAR
|
|
75
|
+
SCRN_CLEAR
|
|
76
|
+
INS
|
|
77
|
+
BROWN
|
|
78
|
+
PINK
|
|
79
|
+
LIGHTRED = PINK
|
|
80
|
+
GRAY1
|
|
81
|
+
GRAY2
|
|
82
|
+
LIGHTGREEN
|
|
83
|
+
LIGHTBLUE
|
|
84
|
+
GRAY3
|
|
85
|
+
PURPLE
|
|
86
|
+
CURS_LEFT
|
|
87
|
+
YELLOW
|
|
88
|
+
CYAN
|
|
89
|
+
SHIFT_SPACE
|
|
90
|
+
LTEE = $AB
|
|
91
|
+
LLCORNER = $AD
|
|
92
|
+
URCORNER
|
|
93
|
+
ULCORNER = $B0
|
|
94
|
+
BTEE
|
|
95
|
+
TTEE
|
|
96
|
+
RTEE
|
|
97
|
+
LRCORNER = $BD
|
|
98
|
+
HLINE = $C0
|
|
99
|
+
CROSS = $DB
|
|
100
|
+
VLINE = $DD
|
|
101
|
+
PI
|
|
102
|
+
.endenum
|
|
103
|
+
|
|
104
|
+
; ---------------------------------------------------------------------------
|
|
105
|
+
; Zero page
|
|
106
|
+
|
|
107
|
+
; Banking registers
|
|
108
|
+
RAM_BANK := $00
|
|
109
|
+
ROM_BANK := $01
|
|
110
|
+
|
|
111
|
+
; GEOS and graphics pseudo-registers
|
|
112
|
+
.struct gREG
|
|
113
|
+
.org $02
|
|
114
|
+
.union
|
|
115
|
+
r0 .word
|
|
116
|
+
.struct
|
|
117
|
+
r0L .byte
|
|
118
|
+
r0H .byte
|
|
119
|
+
.endstruct
|
|
120
|
+
.endunion
|
|
121
|
+
.union
|
|
122
|
+
r1 .word
|
|
123
|
+
.struct
|
|
124
|
+
r1L .byte
|
|
125
|
+
r1H .byte
|
|
126
|
+
.endstruct
|
|
127
|
+
.endunion
|
|
128
|
+
.union
|
|
129
|
+
r2 .word
|
|
130
|
+
.struct
|
|
131
|
+
r2L .byte
|
|
132
|
+
r2H .byte
|
|
133
|
+
.endstruct
|
|
134
|
+
.endunion
|
|
135
|
+
.union
|
|
136
|
+
r3 .word
|
|
137
|
+
.struct
|
|
138
|
+
r3L .byte
|
|
139
|
+
r3H .byte
|
|
140
|
+
.endstruct
|
|
141
|
+
.endunion
|
|
142
|
+
.union
|
|
143
|
+
r4 .word
|
|
144
|
+
.struct
|
|
145
|
+
r4L .byte
|
|
146
|
+
r4H .byte
|
|
147
|
+
.endstruct
|
|
148
|
+
.endunion
|
|
149
|
+
.union
|
|
150
|
+
r5 .word
|
|
151
|
+
.struct
|
|
152
|
+
r5L .byte
|
|
153
|
+
r5H .byte
|
|
154
|
+
.endstruct
|
|
155
|
+
.endunion
|
|
156
|
+
.union
|
|
157
|
+
r6 .word
|
|
158
|
+
.struct
|
|
159
|
+
r6L .byte
|
|
160
|
+
r6H .byte
|
|
161
|
+
.endstruct
|
|
162
|
+
.endunion
|
|
163
|
+
.union
|
|
164
|
+
r7 .word
|
|
165
|
+
.struct
|
|
166
|
+
r7L .byte
|
|
167
|
+
r7H .byte
|
|
168
|
+
.endstruct
|
|
169
|
+
.endunion
|
|
170
|
+
.union
|
|
171
|
+
r8 .word
|
|
172
|
+
.struct
|
|
173
|
+
r8L .byte
|
|
174
|
+
r8H .byte
|
|
175
|
+
.endstruct
|
|
176
|
+
.endunion
|
|
177
|
+
.union
|
|
178
|
+
r9 .word
|
|
179
|
+
.struct
|
|
180
|
+
r9L .byte
|
|
181
|
+
r9H .byte
|
|
182
|
+
.endstruct
|
|
183
|
+
.endunion
|
|
184
|
+
.union
|
|
185
|
+
r10 .word
|
|
186
|
+
.struct
|
|
187
|
+
r10L .byte
|
|
188
|
+
r10H .byte
|
|
189
|
+
.endstruct
|
|
190
|
+
.endunion
|
|
191
|
+
.union
|
|
192
|
+
r11 .word
|
|
193
|
+
.struct
|
|
194
|
+
r11L .byte
|
|
195
|
+
r11H .byte
|
|
196
|
+
.endstruct
|
|
197
|
+
.endunion
|
|
198
|
+
.union
|
|
199
|
+
r12 .word
|
|
200
|
+
.struct
|
|
201
|
+
r12L .byte
|
|
202
|
+
r12H .byte
|
|
203
|
+
.endstruct
|
|
204
|
+
.endunion
|
|
205
|
+
.union
|
|
206
|
+
r13 .word
|
|
207
|
+
.struct
|
|
208
|
+
r13L .byte
|
|
209
|
+
r13H .byte
|
|
210
|
+
.endstruct
|
|
211
|
+
.endunion
|
|
212
|
+
.union
|
|
213
|
+
r14 .word
|
|
214
|
+
.struct
|
|
215
|
+
r14L .byte
|
|
216
|
+
r14H .byte
|
|
217
|
+
.endstruct
|
|
218
|
+
.endunion
|
|
219
|
+
.union
|
|
220
|
+
r15 .word
|
|
221
|
+
.struct
|
|
222
|
+
r15L .byte
|
|
223
|
+
r15H .byte
|
|
224
|
+
.endstruct
|
|
225
|
+
.endunion
|
|
226
|
+
.endstruct
|
|
227
|
+
|
|
228
|
+
; Kernal
|
|
229
|
+
KTEMP2 := $80 ; 2 bytes for temporary storage
|
|
230
|
+
IMPARM := $82 ; Pointer for PRIMM function
|
|
231
|
+
FNAM := $8A ; Pointer to filename
|
|
232
|
+
|
|
233
|
+
; BASIC
|
|
234
|
+
TXTPTR := $EE ; Pointer into BASIC source code
|
|
235
|
+
|
|
236
|
+
; Page two
|
|
237
|
+
|
|
238
|
+
BASIC_BUF := $0200 ; Location of command-line
|
|
239
|
+
BASIC_BUF_LEN = 81 ; Maximum length of command-line
|
|
240
|
+
|
|
241
|
+
SCREEN_PTR := $0262 ; Pointer to current row on text screen (16 bits)
|
|
242
|
+
STATUS := $0287 ; Status from previous I/O operation
|
|
243
|
+
IN_DEV := $028B ; Current input device number
|
|
244
|
+
OUT_DEV := $028C ; Current output device number
|
|
245
|
+
FNAM_LEN := $028F ; Length of filename
|
|
246
|
+
SECADR := $0291 ; Secondary address
|
|
247
|
+
DEVNUM := $0292 ; Device number
|
|
248
|
+
CURS_COLOR := $0373 ; Color under the cursor
|
|
249
|
+
CHARCOLOR := $0376 ; Cursor's color nybbles (high: background, low: foreground)
|
|
250
|
+
RVS := $0377 ; Reverse flag
|
|
251
|
+
CURS_FLAG := $037B ; 1 = cursor off
|
|
252
|
+
CURS_BLINK := $037C ; Blink counter
|
|
253
|
+
CURS_CHAR := $037D ; Character under the cursor
|
|
254
|
+
CURS_STATE := $037E ; Cursor blink state
|
|
255
|
+
CURS_X := $0380 ; Cursor column
|
|
256
|
+
CURS_Y := $0383 ; Cursor row
|
|
257
|
+
LLEN := $0386 ; Line length
|
|
258
|
+
NLINES := $0387 ; Number of screen lines
|
|
259
|
+
|
|
260
|
+
; BASIC
|
|
261
|
+
VARTAB := $03E1 ; Pointer to start of BASIC variables
|
|
262
|
+
MEMSIZE := $0259 ; Pointer to highest BASIC RAM location (+1)
|
|
263
|
+
|
|
264
|
+
; ---------------------------------------------------------------------------
|
|
265
|
+
; Vector and other locations
|
|
266
|
+
|
|
267
|
+
IRQVec := $0314
|
|
268
|
+
BRKVec := $0316
|
|
269
|
+
NMIVec := $0318
|
|
270
|
+
|
|
271
|
+
; ---------------------------------------------------------------------------
|
|
272
|
+
; I/O locations
|
|
273
|
+
|
|
274
|
+
; 65C22 Versatile Interface Adapter
|
|
275
|
+
.struct VIA1 ; Versatile Interface Adapter
|
|
276
|
+
.org $9F00
|
|
277
|
+
PRB .byte ; mouse, LED, VIC bus (Port Register B)
|
|
278
|
+
PRA .byte ; keyboard, controllers (Port Register A)
|
|
279
|
+
DDRB .byte ; (Data Direction Register B)
|
|
280
|
+
DDRA .byte ; (Data Direction Register A)
|
|
281
|
+
T1 .word ; (Timer 1)
|
|
282
|
+
T1L .word ; (Timer 1 Latch)
|
|
283
|
+
T2 .word ; (Timer 2)
|
|
284
|
+
SR .byte ; (Shift Register)
|
|
285
|
+
ACR .byte ; (Auxiliary Control Register)
|
|
286
|
+
PCR .byte ; (Peripheral Control Register)
|
|
287
|
+
IFR .byte ; (Interrupt Flags Register)
|
|
288
|
+
IER .byte ; (Interrupt Enable Register)
|
|
289
|
+
PRA2 .byte ; keyboard, controllers (PRA without handshake)
|
|
290
|
+
.endstruct
|
|
291
|
+
|
|
292
|
+
; 65C22 Versatile Interface Adapter
|
|
293
|
+
.struct VIA2
|
|
294
|
+
.org $9F10
|
|
295
|
+
PRB .byte
|
|
296
|
+
PRA .byte
|
|
297
|
+
DDRB .byte
|
|
298
|
+
DDRA .byte
|
|
299
|
+
T1 .word
|
|
300
|
+
T1L .word
|
|
301
|
+
T2 .word
|
|
302
|
+
SR .byte
|
|
303
|
+
ACR .byte
|
|
304
|
+
PCR .byte
|
|
305
|
+
IFR .byte
|
|
306
|
+
IER .byte
|
|
307
|
+
PRA2 .byte
|
|
308
|
+
.endstruct
|
|
309
|
+
|
|
310
|
+
; Video Enhanced Retro Adapter
|
|
311
|
+
; Has audio and SPI.
|
|
312
|
+
.scope VERA
|
|
313
|
+
|
|
314
|
+
; External registers
|
|
315
|
+
|
|
316
|
+
.struct
|
|
317
|
+
.org $9F20
|
|
318
|
+
ADDR .faraddr ; Address for data port access
|
|
319
|
+
DATA0 .byte ; First data port
|
|
320
|
+
DATA1 .byte ; Second data port
|
|
321
|
+
CTRL .byte ; Control register
|
|
322
|
+
IRQ_EN .byte ; Interrupt enable bits
|
|
323
|
+
IRQ_FLAGS .byte ; Interrupt flags
|
|
324
|
+
IRQ_RASTER .byte ; Line where IRQ will occur
|
|
325
|
+
.endstruct
|
|
326
|
+
.enum ; Address automatic increment amounts
|
|
327
|
+
DEC0 = (($00 << 1) | $01) << 3
|
|
328
|
+
DEC1 = (($01 << 1) | $01) << 3
|
|
329
|
+
DEC2 = (($02 << 1) | $01) << 3
|
|
330
|
+
DEC4 = (($03 << 1) | $01) << 3
|
|
331
|
+
DEC8 = (($04 << 1) | $01) << 3
|
|
332
|
+
DEC16 = (($05 << 1) | $01) << 3
|
|
333
|
+
DEC32 = (($06 << 1) | $01) << 3
|
|
334
|
+
DEC64 = (($07 << 1) | $01) << 3
|
|
335
|
+
DEC128 = (($08 << 1) | $01) << 3
|
|
336
|
+
DEC256 = (($09 << 1) | $01) << 3
|
|
337
|
+
DEC512 = (($0A << 1) | $01) << 3
|
|
338
|
+
DEC40 = (($0B << 1) | $01) << 3
|
|
339
|
+
DEC80 = (($0C << 1) | $01) << 3
|
|
340
|
+
DEC160 = (($0D << 1) | $01) << 3
|
|
341
|
+
DEC320 = (($0E << 1) | $01) << 3
|
|
342
|
+
DEC640 = (($0F << 1) | $01) << 3
|
|
343
|
+
INC0 = (($00 << 1) | $00) << 3
|
|
344
|
+
INC1 = (($01 << 1) | $00) << 3
|
|
345
|
+
INC2 = (($02 << 1) | $00) << 3
|
|
346
|
+
INC4 = (($03 << 1) | $00) << 3
|
|
347
|
+
INC8 = (($04 << 1) | $00) << 3
|
|
348
|
+
INC16 = (($05 << 1) | $00) << 3
|
|
349
|
+
INC32 = (($06 << 1) | $00) << 3
|
|
350
|
+
INC64 = (($07 << 1) | $00) << 3
|
|
351
|
+
INC128 = (($08 << 1) | $00) << 3
|
|
352
|
+
INC256 = (($09 << 1) | $00) << 3
|
|
353
|
+
INC512 = (($0A << 1) | $00) << 3
|
|
354
|
+
INC40 = (($0B << 1) | $00) << 3
|
|
355
|
+
INC80 = (($0C << 1) | $00) << 3
|
|
356
|
+
INC160 = (($0D << 1) | $00) << 3
|
|
357
|
+
INC320 = (($0E << 1) | $00) << 3
|
|
358
|
+
INC640 = (($0F << 1) | $00) << 3
|
|
359
|
+
.endenum
|
|
360
|
+
.enum ; Interrupt request flags
|
|
361
|
+
VERT_SYNC = %00000001
|
|
362
|
+
RASTER_IRQ = %00000010
|
|
363
|
+
SPR_COLLIDED = %00000100
|
|
364
|
+
AUDIO_LOW = %00001000
|
|
365
|
+
.endenum
|
|
366
|
+
.scope DISP ; Display controller
|
|
367
|
+
SELECT1 = %00000010
|
|
368
|
+
.union
|
|
369
|
+
.org $9F29
|
|
370
|
+
.struct
|
|
371
|
+
; These four registers are visible when the DCSEL flag = %0
|
|
372
|
+
VIDEO .byte
|
|
373
|
+
HSCALE .byte
|
|
374
|
+
VSCALE .byte
|
|
375
|
+
FRAME .byte
|
|
376
|
+
.endstruct
|
|
377
|
+
.struct
|
|
378
|
+
; These four registers are visible when the DCSEL flag = %1
|
|
379
|
+
HSTART .byte
|
|
380
|
+
HSTOP .byte
|
|
381
|
+
VSTART .byte
|
|
382
|
+
VSTOP .byte
|
|
383
|
+
.endstruct
|
|
384
|
+
.endunion
|
|
385
|
+
.enum MODE ; Output mode
|
|
386
|
+
DISABLE = $00
|
|
387
|
+
VGA
|
|
388
|
+
NTSC
|
|
389
|
+
RGB ; Interlaced, composite sync
|
|
390
|
+
.endenum
|
|
391
|
+
.enum DISABLE
|
|
392
|
+
COLOR = %00000100 ; NTSC monochrome
|
|
393
|
+
.endenum
|
|
394
|
+
.enum ENABLE
|
|
395
|
+
LAYER0 = %00010000
|
|
396
|
+
LAYER1 = %00100000
|
|
397
|
+
SPRITES = %01000000
|
|
398
|
+
.endenum
|
|
399
|
+
.endscope
|
|
400
|
+
.struct L0 ; Display layer 0
|
|
401
|
+
.org $9F2D
|
|
402
|
+
CONFIG .byte
|
|
403
|
+
MAP_BASE .byte
|
|
404
|
+
TILE_BASE .byte
|
|
405
|
+
HSCROLL .word
|
|
406
|
+
VSCROLL .word
|
|
407
|
+
.endstruct
|
|
408
|
+
.struct L1 ; Display layer 1
|
|
409
|
+
.org $9F34
|
|
410
|
+
CONFIG .byte
|
|
411
|
+
MAP_BASE .byte
|
|
412
|
+
TILE_BASE .byte
|
|
413
|
+
HSCROLL .word
|
|
414
|
+
VSCROLL .word
|
|
415
|
+
.endstruct
|
|
416
|
+
.enum ; Layer display modes
|
|
417
|
+
TILE1BPP = %00000000 | $00
|
|
418
|
+
TILE2BPP
|
|
419
|
+
TILE4BPP
|
|
420
|
+
TILE8BPP
|
|
421
|
+
T256C = %00001000
|
|
422
|
+
BITMAP1BPP = %00000100 | $00
|
|
423
|
+
BITMAP2BPP
|
|
424
|
+
BITMAP4BPP
|
|
425
|
+
BITMAP8BPP
|
|
426
|
+
.endenum
|
|
427
|
+
.enum MAP ; Map geometry
|
|
428
|
+
WIDTH32 = $00 << 4
|
|
429
|
+
WIDTH64 = $01 << 4
|
|
430
|
+
WIDTH128 = $02 << 4
|
|
431
|
+
WIDTH256 = $03 << 4
|
|
432
|
+
HEIGHT32 = $00 << 6
|
|
433
|
+
HEIGHT64 = $01 << 6
|
|
434
|
+
HEIGHT128 = $02 << 6
|
|
435
|
+
HEIGHT256 = $03 << 6
|
|
436
|
+
.endenum
|
|
437
|
+
.enum TILE ; Tile geometry
|
|
438
|
+
WIDTH8 = $00
|
|
439
|
+
WIDTH16 = $01
|
|
440
|
+
WIDTH320 = WIDTH8
|
|
441
|
+
WIDTH640 = WIDTH16
|
|
442
|
+
HEIGHT8 = $00 << 1
|
|
443
|
+
HEIGHT16 = $01 << 1
|
|
444
|
+
.endenum
|
|
445
|
+
.scope PCM ; Pulse-Code Modulator
|
|
446
|
+
.struct
|
|
447
|
+
.org $9F3B
|
|
448
|
+
CTRL .byte
|
|
449
|
+
RATE .byte
|
|
450
|
+
DATA .byte
|
|
451
|
+
.endstruct
|
|
452
|
+
.enum
|
|
453
|
+
STEREO = %00010000
|
|
454
|
+
BITS16 = %00100000
|
|
455
|
+
RESET = %10000000
|
|
456
|
+
.endenum
|
|
457
|
+
.endscope
|
|
458
|
+
.scope SPI
|
|
459
|
+
.struct
|
|
460
|
+
.org $9F3E
|
|
461
|
+
DATA .byte
|
|
462
|
+
CTRL .byte
|
|
463
|
+
.endstruct
|
|
464
|
+
.enum
|
|
465
|
+
SELECT = %00000001
|
|
466
|
+
SLOW = %00000010
|
|
467
|
+
.endenum
|
|
468
|
+
.endscope
|
|
469
|
+
|
|
470
|
+
; Internal RAM and registers
|
|
471
|
+
|
|
472
|
+
.struct
|
|
473
|
+
.org $000000
|
|
474
|
+
VRAM .res $020000 ; 128 Kibibytes
|
|
475
|
+
.endstruct
|
|
476
|
+
.scope PSG ; Programmable Sound Generator
|
|
477
|
+
.struct
|
|
478
|
+
PITCH .word
|
|
479
|
+
VOL .byte ; Right, left sides; volume
|
|
480
|
+
WAVEFORM .byte ; Wave shape, pulse width
|
|
481
|
+
.endstruct
|
|
482
|
+
LEFT = %01 << 6
|
|
483
|
+
RIGHT = %10 << 6
|
|
484
|
+
.enum
|
|
485
|
+
PULSE = $00 << 6
|
|
486
|
+
SAWTOOTH = $01 << 6
|
|
487
|
+
TRIANGLE = $02 << 6
|
|
488
|
+
NOISE = $03 << 6
|
|
489
|
+
.endenum
|
|
490
|
+
.struct
|
|
491
|
+
.org $01F9C0
|
|
492
|
+
VOICES .res $10 * 4
|
|
493
|
+
.endstruct
|
|
494
|
+
.endscope
|
|
495
|
+
.struct
|
|
496
|
+
.org $01FA00
|
|
497
|
+
PALETTE .word $0100
|
|
498
|
+
.endstruct
|
|
499
|
+
.scope SPRITE
|
|
500
|
+
.struct ; Sprite attributes
|
|
501
|
+
ADDR .addr ; Address and color mode
|
|
502
|
+
XX .word ; Co-ordinates
|
|
503
|
+
YY .word
|
|
504
|
+
Z_FLIP .byte ; Collision mask, Z-depth, flip bits
|
|
505
|
+
SIZE_PAL .byte
|
|
506
|
+
.endstruct
|
|
507
|
+
.enum FLIP
|
|
508
|
+
NONE = %00000000
|
|
509
|
+
HORIZ
|
|
510
|
+
VERT
|
|
511
|
+
BOTH
|
|
512
|
+
.endenum
|
|
513
|
+
.enum DEPTH
|
|
514
|
+
DISABLE = $00 << 2
|
|
515
|
+
CANVAS = $01 << 2
|
|
516
|
+
LAYER0 = $02 << 2
|
|
517
|
+
LAYER1 = $03 << 2
|
|
518
|
+
.endenum
|
|
519
|
+
.enum ; Sprite geometry
|
|
520
|
+
WIDTH8 = $00 << 4
|
|
521
|
+
WIDTH16 = $01 << 4
|
|
522
|
+
WIDTH32 = $02 << 4
|
|
523
|
+
WIDTH64 = $03 << 4
|
|
524
|
+
HEIGHT8 = $00 << 6
|
|
525
|
+
HEIGHT16 = $01 << 6
|
|
526
|
+
HEIGHT32 = $02 << 6
|
|
527
|
+
HEIGHT64 = $03 << 6
|
|
528
|
+
COLORS16 = $00 << 7
|
|
529
|
+
COLORS256 = $01 << 7
|
|
530
|
+
.endenum
|
|
531
|
+
.endscope
|
|
532
|
+
.struct
|
|
533
|
+
.org $01FC00
|
|
534
|
+
SPRITES .res 128 * 8
|
|
535
|
+
.endstruct
|
|
536
|
+
.endscope
|
|
537
|
+
|
|
538
|
+
; YM2151 audio chip
|
|
539
|
+
.struct YM2151
|
|
540
|
+
.org $9F40
|
|
541
|
+
ADDR .byte
|
|
542
|
+
.union
|
|
543
|
+
DATA .byte
|
|
544
|
+
STATUS .byte
|
|
545
|
+
.endunion
|
|
546
|
+
.endstruct
|
|
547
|
+
|
|
548
|
+
; X16 Emulator device
|
|
549
|
+
; This device doesn't exist on the real machine.
|
|
550
|
+
.struct EMULATOR
|
|
551
|
+
.org $9FB0
|
|
552
|
+
DEBUG .byte ; Boolean: debugging enabled
|
|
553
|
+
VERALOG .byte ; Boolean: log VERA activity
|
|
554
|
+
KEYBOARDLOG .byte ; Boolean: log keyboard data
|
|
555
|
+
ECHO .byte ; Type of echo that's enabled
|
|
556
|
+
SAVEXIT .byte ; Boolean: save machine state on exit
|
|
557
|
+
GIFREC .byte ; Method of recording GIF movie
|
|
558
|
+
.res 2
|
|
559
|
+
CYCLECOUNT .dword ; Running count of CPU cycles (Read-Only)
|
|
560
|
+
.res 1
|
|
561
|
+
KEYMAP .byte ; Current keyboard layout number (Read-Only)
|
|
562
|
+
DETECT .byte 2 ; If is "16" string, then running on emulator (RO)
|
|
563
|
+
.endstruct
|
|
564
|
+
|
|
565
|
+
; ---------------------------------------------------------------------------
|
|
566
|
+
; Banked RAM and ROM
|
|
567
|
+
|
|
568
|
+
TIMER := $A03B ; (bank 0) 60 Hz. timer (3 bytes, big-endian)
|
|
569
|
+
|
|
570
|
+
.struct BANK
|
|
571
|
+
.org $A000
|
|
572
|
+
RAM .res $2000 ; 8 Kibibyte window into 512 Kibibytes or 2048 Kibibytes
|
|
573
|
+
ROM .res $4000 ; 16 Kibibyte window into 128 Kibibytes
|
|
574
|
+
.endstruct
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
;/*****************************************************************************/
|
|
2
|
+
;/* */
|
|
3
|
+
;/* em-error.inc */
|
|
4
|
+
;/* */
|
|
5
|
+
;/* EM error codes */
|
|
6
|
+
;/* */
|
|
7
|
+
;/* */
|
|
8
|
+
;/* */
|
|
9
|
+
;/* (C) 2002-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
|
+
; Error constants
|
|
37
|
+
.enum
|
|
38
|
+
EM_ERR_OK ; No error
|
|
39
|
+
EM_ERR_NO_DRIVER ; No driver available
|
|
40
|
+
EM_ERR_CANNOT_LOAD ; Error loading driver
|
|
41
|
+
EM_ERR_INV_DRIVER ; Invalid driver
|
|
42
|
+
EM_ERR_NO_DEVICE ; Device (hardware) not found
|
|
43
|
+
EM_ERR_INSTALLED ; A driver is already installed
|
|
44
|
+
|
|
45
|
+
EM_ERR_COUNT ; Special: Number of error messages
|
|
46
|
+
.endenum
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|