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_LO = $BB ; Address of filename
17 FNAM_BANK = $C7 ; Bank for filename
18 KEY_COUNT = $D0 ; Number of keys in input buffer
19 FKEY_COUNT = $D1 ; Characters for function key
20 MODE = $D7 ; 40/80 column mode flag
21 CURS_X = $EC ; Cursor column
22 CURS_Y = $EB ; Cursor row
23 SCREEN_PTR = $E0 ; Pointer to current char in text screen
24 CRAM_PTR = $E2 ; Pointer to current char in color RAM
27 RVS = $F3 ; Reverse output flag
28 FETCH = $2A2 ; Fetch subroutine in RAM
29 FETVEC = $2AA ; Vector patch location for FETCH
30 STASH = $2AF ; Stash routine in RAM
31 STAVEC = $2B9 ; Vector patch location for STASH
32 PALFLAG = $A03 ; $FF=PAL, $00=NTSC
33 INIT_STATUS = $A04 ; Flag: Reset/NMI Status
34 FKEY_LEN = $1000 ; Function key lengths
35 FKEY_TEXT = $100A ; Function key texts
37 ; ---------------------------------------------------------------------------
50 ; ---------------------------------------------------------------------------
58 ; ---------------------------------------------------------------------------
82 VIC_SPR_MCOLOR = $D01C
83 VIC_SPR_BG_PRIO = $D01B
85 VIC_SPR_MCOLOR0 = $D025
86 VIC_SPR_MCOLOR1 = $D026
88 VIC_SPR0_COLOR = $D027
89 VIC_SPR1_COLOR = $D028
90 VIC_SPR2_COLOR = $D029
91 VIC_SPR3_COLOR = $D02A
92 VIC_SPR4_COLOR = $D02B
93 VIC_SPR5_COLOR = $D02C
94 VIC_SPR6_COLOR = $D02D
95 VIC_SPR7_COLOR = $D02E
102 VIC_VIDEO_ADR = $D018
104 VIC_IRR = $D019 ; Interrupt request register
105 VIC_IMR = $D01A ; Interrupt mask register
107 VIC_BORDERCOLOR = $D020
108 VIC_BG_COLOR0 = $D021
109 VIC_BG_COLOR1 = $D022
110 VIC_BG_COLOR2 = $D023
111 VIC_BG_COLOR3 = $D024
114 VIC_KBD_128 = $D02F ; Extended kbd bits (visible in 64 mode)
115 VIC_CLK_128 = $D030 ; Clock rate register (visible in 64 mode)
118 ; ---------------------------------------------------------------------------
155 ; ---------------------------------------------------------------------------
156 ; I/O: VDC (128 only)
161 ; ---------------------------------------------------------------------------
182 ; ---------------------------------------------------------------------------
186 MMU_CFG_CC65 = %00001110 ; Bank 0 with kernal ROM
187 MMU_CFG_RAM0 = %00111111 ; Bank 0 full RAM
188 MMU_CFG_RAM1 = %01111111 ; Bank 1 full RAM
190 ; ---------------------------------------------------------------------------
193 SCPU_VIC_Bank1 = $D075
196 SCPU_EnableRegs = $D07E
197 SCPU_DisableRegs= $D07F