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