2 ; C64 generic definitions. Stolen from Elite128
6 ; ---------------------------------------------------------------------------
7 ; Zero page, Commodore stuff
9 ST := $90 ; IEC status byte
11 TIME := $A0 ; 60HZ clock
12 FNAM_LEN := $B7 ; Length of filename
13 SECADR := $B9 ; Secondary address
14 DEVNUM := $BA ; Device number
15 FNAM := $BB ; Address of filename
16 FNAM_BANK := $C7 ; Bank for filename
17 KEY_COUNT := $D0 ; Number of keys in input buffer
18 FKEY_COUNT := $D1 ; Characters for function key
19 MODE := $D7 ; 40/80 column mode flag
20 CURS_X := $EC ; Cursor column
21 CURS_Y := $EB ; Cursor row
22 SCREEN_PTR := $E0 ; Pointer to current char in text screen
23 CRAM_PTR := $E2 ; Pointer to current char in color RAM
26 RVS := $F3 ; Reverse output flag
27 SCROLL := $F8 ; Disable scrolling flag
29 BASIC_BUF := $200 ; Location of command-line
30 BASIC_BUF_LEN = 162 ; Maximum length of command-line
32 FETCH := $2A2 ; Fetch subroutine in RAM
33 FETVEC := $2AA ; Vector patch location for FETCH
34 STASH := $2AF ; Stash routine in RAM
35 STAVEC := $2B9 ; Vector patch location for STASH
36 PALFLAG := $A03 ; $FF=PAL, $00=NTSC
37 INIT_STATUS := $A04 ; Flag: Reset/NMI Status
38 FKEY_LEN := $1000 ; Function key lengths
39 FKEY_TEXT := $100A ; Function key texts
41 ; ---------------------------------------------------------------------------
55 ; ---------------------------------------------------------------------------
63 ; ---------------------------------------------------------------------------
85 VIC_SPR_EXP_Y := $D017
86 VIC_SPR_EXP_X := $D01D
87 VIC_SPR_MCOLOR := $D01C
88 VIC_SPR_BG_PRIO := $D01B
90 VIC_SPR_MCOLOR0 := $D025
91 VIC_SPR_MCOLOR1 := $D026
93 VIC_SPR0_COLOR := $D027
94 VIC_SPR1_COLOR := $D028
95 VIC_SPR2_COLOR := $D029
96 VIC_SPR3_COLOR := $D02A
97 VIC_SPR4_COLOR := $D02B
98 VIC_SPR5_COLOR := $D02C
99 VIC_SPR6_COLOR := $D02D
100 VIC_SPR7_COLOR := $D02E
107 VIC_VIDEO_ADR := $D018
109 VIC_IRR := $D019 ; Interrupt request register
110 VIC_IMR := $D01A ; Interrupt mask register
112 VIC_BORDERCOLOR := $D020
113 VIC_BG_COLOR0 := $D021
114 VIC_BG_COLOR1 := $D022
115 VIC_BG_COLOR2 := $D023
116 VIC_BG_COLOR3 := $D024
119 VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
120 VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode)
123 ; ---------------------------------------------------------------------------
160 ; ---------------------------------------------------------------------------
161 ; I/O: VDC (128 only)
166 ; ---------------------------------------------------------------------------
195 ; ---------------------------------------------------------------------------
199 MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM
200 MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM
201 MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM
202 MMU_CFG_RAM2 := %10111111 ; Bank 2 full RAM
203 MMU_CFG_RAM3 := %11111111 ; Bank 3 full RAM
205 ; ---------------------------------------------------------------------------
208 SCPU_VIC_Bank1 := $D075
211 SCPU_EnableRegs := $D07E
212 SCPU_DisableRegs:= $D07F