2 ; C64 generic definitions. Stolen from Elite128
6 ; ---------------------------------------------------------------------------
7 ; Zero page, Commodore stuff
9 VARTAB := $2D ; Pointer to start of BASIC variables
10 MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
11 TXTPTR := $7A ; Pointer into BASIC source code
12 TIME := $A0 ; 60 HZ clock
13 FNAM_LEN := $B7 ; Length of filename
14 SECADR := $B9 ; Secondary address
15 DEVNUM := $BA ; Device number
16 FNAM := $BB ; Pointer to filename
17 KEY_COUNT := $C6 ; Number of keys in input buffer
18 RVS := $C7 ; Reverse flag
19 CURS_FLAG := $CC ; 1 = cursor off
20 CURS_BLINK := $CD ; Blink counter
21 CURS_CHAR := $CE ; Character under the cursor
22 CURS_STATE := $CF ; Cursor blink state
23 SCREEN_PTR := $D1 ; Pointer to current char in text screen
24 CURS_X := $D3 ; Cursor column
25 CURS_Y := $D6 ; Cursor row
26 CRAM_PTR := $F3 ; Pointer to current char in color RAM
28 BASIC_BUF := $200 ; Location of command-line
29 BASIC_BUF_LEN = 89 ; Maximum length of command-line
32 CURS_COLOR := $287 ; Color under the cursor
33 PALFLAG := $2A6 ; $01 = PAL, $00 = NTSC
36 ; ---------------------------------------------------------------------------
44 ; ---------------------------------------------------------------------------
45 ; Vector and other locations
51 ; ---------------------------------------------------------------------------
57 ; ---------------------------------------------------------------------------
79 VIC_SPR_EXP_Y := $D017
80 VIC_SPR_EXP_X := $D01D
81 VIC_SPR_MCOLOR := $D01C
82 VIC_SPR_BG_PRIO := $D01B
84 VIC_SPR_MCOLOR0 := $D025
85 VIC_SPR_MCOLOR1 := $D026
87 VIC_SPR0_COLOR := $D027
88 VIC_SPR1_COLOR := $D028
89 VIC_SPR2_COLOR := $D029
90 VIC_SPR3_COLOR := $D02A
91 VIC_SPR4_COLOR := $D02B
92 VIC_SPR5_COLOR := $D02C
93 VIC_SPR6_COLOR := $D02D
94 VIC_SPR7_COLOR := $D02E
104 VIC_VIDEO_ADR := $D018
106 VIC_IRR := $D019 ; Interrupt request register
107 VIC_IMR := $D01A ; Interrupt mask register
109 VIC_BORDERCOLOR := $D020
110 VIC_BG_COLOR0 := $D021
111 VIC_BG_COLOR1 := $D022
112 VIC_BG_COLOR2 := $D023
113 VIC_BG_COLOR3 := $D024
116 VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
117 VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode)
120 ; ---------------------------------------------------------------------------
157 ; ---------------------------------------------------------------------------
158 ; I/O: VDC (128 only)
163 ; ---------------------------------------------------------------------------
192 ; ---------------------------------------------------------------------------
195 SCPU_VIC_Bank1 := $D075
198 SCPU_EnableRegs := $D07E
199 SCPU_DisableRegs:= $D07F
203 ; ---------------------------------------------------------------------------
204 ; Processor Port at $01
206 LORAM = $01 ; Enable the basic rom
207 HIRAM = $02 ; Enable the kernal rom
208 IOEN = $04 ; Enable I/O
209 CASSDATA = $08 ; Cassette data
210 CASSPLAY = $10 ; Cassette: Play
211 CASSMOT = $20 ; Cassette motor on
212 TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode
214 RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF