2 ; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke
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 ; 60HZ 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
36 KBDREPEATDELAY := $28c
38 ; ---------------------------------------------------------------------------
44 ; ---------------------------------------------------------------------------
51 ; ---------------------------------------------------------------------------
52 ; Vector and other locations
58 ; ---------------------------------------------------------------------------
62 VIC_LINES := $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
63 VIC_HLINE := $9004 ; Rasterline, bits 1-8
64 VIC_COLOR := $900F ; Border and background color
66 ; ---------------------------------------------------------------------------
69 VIA1 := $9110 ; *** Deprecated ***
70 VIA1_JOY := $9111 ; *** Deprecated ***
71 VIA1_PB := $9110 ; Port register B
72 VIA1_PA1 := $9111 ; Port register A
73 VIA1_DDRB := $9112 ; Data direction register B
74 VIA1_DDRA := $9113 ; Data direction register A
75 VIA1_T1CL := $9114 ; Timer 1, low byte
76 VIA1_T1CH := $9115 ; Timer 1, high byte
77 VIA1_T1LL := $9116 ; Timer 1 latch, low byte
78 VIA1_T1LH := $9117 ; Timer 1 latch, high byte
79 VIA1_T2CL := $9118 ; Timer 2, low byte
80 VIA1_T2CH := $9119 ; Timer 2, high byte
81 VIA1_SR := $911A ; Shift register
82 VIA1_CR := $911B ; Auxiliary control register
83 VIA1_PCR := $911C ; Peripheral control register
84 VIA1_IFR := $911D ; Interrupt flag register
85 VIA1_IER := $911E ; Interrupt enable register
86 VIA1_PA2 := $911F ; Port register A w/o handshake
88 ; ---------------------------------------------------------------------------
91 VIA2 := $9120 ; *** Deprecated ***
92 VIA2_JOY := $9120 ; *** Deprecated ***
93 VIA2_PB := $9120 ; Port register B
94 VIA2_PA1 := $9121 ; Port register A
95 VIA2_DDRB := $9122 ; Data direction register B
96 VIA2_DDRA := $9123 ; Data direction register A
97 VIA2_T1CL := $9124 ; Timer 1, low byte
98 VIA2_T1CH := $9125 ; Timer 1, high byte
99 VIA2_T1LL := $9126 ; Timer 1 latch, low byte
100 VIA2_T1LH := $9127 ; Timer 1 latch, high byte
101 VIA2_T2CL := $9128 ; Timer 2, low byte
102 VIA2_T2CH := $9129 ; Timer 2, high byte
103 VIA2_SR := $912A ; Shift register
104 VIA2_CR := $912B ; Auxiliary control register
105 VIA2_PCR := $912C ; Peripheral control register
106 VIA2_IFR := $912D ; Interrupt flag register
107 VIA2_IER := $912E ; Interrupt enable register
108 VIA2_PA2 := $912F ; Port register A w/o handshake