2002-08-07 05:18:13 +00:00
|
|
|
;
|
|
|
|
; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Zero page, Commodore stuff
|
|
|
|
|
2013-08-25 04:43:23 +00:00
|
|
|
TXTPTR := $7A ; Pointer into BASIC source code
|
2004-04-28 12:16:41 +00:00
|
|
|
TIME := $A0 ; 60HZ clock
|
2013-05-09 11:56:54 +00:00
|
|
|
FNAM_LEN := $B7 ; Length of filename
|
|
|
|
SECADR := $B9 ; Secondary address
|
|
|
|
DEVNUM := $BA ; Device number
|
2004-04-28 12:16:41 +00:00
|
|
|
FNAM := $BB ; Pointer to filename
|
2013-05-09 11:56:54 +00:00
|
|
|
KEY_COUNT := $C6 ; Number of keys in input buffer
|
|
|
|
RVS := $C7 ; Reverse flag
|
|
|
|
CURS_FLAG := $CC ; 1 = cursor off
|
|
|
|
CURS_BLINK := $CD ; Blink counter
|
|
|
|
CURS_CHAR := $CE ; Character under the cursor
|
|
|
|
CURS_STATE := $CF ; Cursor blink state
|
|
|
|
SCREEN_PTR := $D1 ; Pointer to current char in text screen
|
|
|
|
CURS_X := $D3 ; Cursor column
|
|
|
|
CURS_Y := $D6 ; Cursor row
|
|
|
|
CRAM_PTR := $F3 ; Pointer to current char in color RAM
|
|
|
|
|
|
|
|
BASIC_BUF := $200 ; Location of command-line
|
|
|
|
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
2004-04-28 12:16:41 +00:00
|
|
|
|
|
|
|
CHARCOLOR := $286
|
2013-05-09 11:56:54 +00:00
|
|
|
CURS_COLOR := $287 ; Color under the cursor
|
2002-08-07 05:18:13 +00:00
|
|
|
|
|
|
|
|
2003-04-09 19:34:57 +00:00
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Screen size
|
|
|
|
|
|
|
|
XSIZE = 22
|
2004-04-28 12:16:41 +00:00
|
|
|
YSIZE = 23
|
2003-04-09 19:34:57 +00:00
|
|
|
|
2002-08-07 05:18:13 +00:00
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Kernal routines
|
|
|
|
|
|
|
|
; Direct entries
|
2013-05-09 11:56:54 +00:00
|
|
|
CLRSCR := $E55F
|
|
|
|
KBDREAD := $E5CF
|
2002-08-07 05:18:13 +00:00
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Vector and other locations
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
IRQVec := $0314
|
|
|
|
BRKVec := $0316
|
|
|
|
NMIVec := $0318
|
2002-08-07 05:18:13 +00:00
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; I/O: 6560 VIC
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
VIC := $9000
|
2004-04-28 12:16:41 +00:00
|
|
|
VIC_LINES := $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
|
|
|
|
VIC_HLINE := $9004 ; Rasterline, bits 1-8
|
2013-05-09 11:56:54 +00:00
|
|
|
VIC_COLOR := $900F ; Border and background color
|
2002-08-07 05:18:13 +00:00
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; I/O: 6522 VIA1
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
VIA1 := $9110
|
|
|
|
VIA1_JOY := $9111
|
|
|
|
VIA1_DDRB := $9112
|
|
|
|
VIA1_DDRA := $9113
|
2002-08-07 05:18:13 +00:00
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; I/O: 6522 VIA2
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
VIA2 := $9120
|
|
|
|
VIA2_JOY := $9120
|
|
|
|
VIA2_DDRB := $9122
|
|
|
|
VIA2_DDRA := $9123
|
2002-08-07 05:18:13 +00:00
|
|
|
|