reduced amount of VICE label conflicts

This commit is contained in:
FeralChild64 committed 2019-09-27 16:40:58 +02:00
1 parent 332438145c
commit 72a60958e9
21 files changed
+77 -123

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -10,7 +10,7 @@
// VIC-II registers
.label VIC_BASE = $D000 // base address of the chip
.label __VIC_BASE = $D000 // base address of the chip
.label VIC_SP0X = $D000
.label VIC_SP0Y = $D001
@@ -64,7 +64,7 @@
// SID registers
.label SID_BASE = $D400 // base address of the chip
.label __SID_BASE = $D400 // base address of the chip
.label SID_FRELO1 = $D400
.label SID_FREHI1 = $D401
@@ -101,7 +101,7 @@
// CIA #1 registers
.label CIA1_BASE = $DC00 // base address of the chip
.label __CIA1_BASE = $DC00 // base address of the chip
.label CIA1_PRA = $DC00
.label CIA1_PRB = $DC01
@@ -125,7 +125,7 @@
// CIA #2 registers
.label CIA2_BASE = $DD00 // base address of the chip
.label __CIA2_BASE = $DD00 // base address of the chip
.label CIA2_PRA = $DD00 // VIC bank switching and IEC port
.label CIA2_PRB = $DD01
+3 -3
View File
@@ -166,13 +166,13 @@
.label HIBASE = $288 // high byte of start of screen
.label XMAX = $289 // max keyboard buffer size
.label RPTFLG = $28A // -- NOT IMPLEMENTED --
.label KOUNT = $28B // -- NOT IMPLEMENTED --
.label KOUNT = $28B // key repeat counter
.label DELAY = $28C // -- NOT IMPLEMENTED --
.label SHFLAG = $28D // bucky keys (SHIFT/CTRL/C=) flags
.label LSTSHF = $28E // last bucky key flags
.label KEYLOG = $28F // $28F-$290 -- NOT IMPLEMENTED --
.label KEYLOG = $28F // $28F-$290 -- NOT IMPLEMENTED -- keyboard decoding pointer
.label MODE = $291 // flag, is case switch allowed
.label AUTODN = $292 // -- NOT IMPLEMENTED --
.label AUTODN = $292 // -- NOT IMPLEMENTED -- screen scroll disable
.label M51CRT = $293 // -- NOT IMPLEMENTED -- mock 6551
.label M51CDR = $294 // -- NOT IMPLEMENTED -- mock 6551
.label M51AJB = $295 // $295-$296 -- NOT IMPLEMENTED -- mock 6551
-24
View File
@@ -60,7 +60,6 @@
// We also use the following for temp colour pointer when scrolling
.label load_save_verify_end_address = $AE
.label cassette_buffer_ptr = $B2
.label current_logical_filenum = $B8
.label current_secondary_address = $B9
.label current_device_number = $BA
@@ -80,7 +79,6 @@
.label keyboard_input_ready = $D0
.label current_screen_line_ptr = $D1
.label current_screen_x = $D3
.label quote_mode_flag = $D4
.label logical_line_length = $D5
.label current_screen_y = $D6
.label last_printed_character_ascii = $D7
@@ -91,28 +89,6 @@
.label current_screen_line_colour_ptr = $F3
.label keyboard_decoding_table_ptr = $F5
.label basic_input_buffer = BUF
// "Compute's Mapping the 64" book
.label keyboard_buffer = $0277
.label text_colour = $0286 // p55
.label colour_under_cursor = $0287 // p56
.label key_buffer_size = $0289 // p57
// 0 = cursor keys, insert, delete and space repeat, but nothing else
// 128 = all keys repeat
// 64 = no keys repeat
.label key_repeat_flags = $028A // p58
// https://www.c64-wiki.com/wiki/Page_2
.label key_repeat_counter = $028B
.label key_first_repeat_delay = $028C
// bit 0 = shift, 1 = Vendor Key, 2 = Control
.label key_bucky_state = $028D
.label key_last_bucky_state = $028E
.label keyboard_decoding_ptr = $028F
.label enable_case_switch = $0291
.label screen_scroll_disable = $0292
#if CONFIG_MEMORY_MODEL_60K
// BASIC uses some extra bytes for memory access under ROMs located at $2A7 onwards
+1 -1
View File
@@ -24,7 +24,7 @@ read_line_loop:
ldx #22
jmp basic_do_error
!:
sta basic_input_buffer,x
sta BUF,x
inx
jmp read_line_loop
+5 -5
View File
@@ -66,7 +66,7 @@ list_single_line: // entry point needed by DOS wedge
// Iterate through printing out the line
// contents
lda #0
sta quote_mode_flag
sta QTSW
ldy #4
list_print_loop:
@@ -82,14 +82,14 @@ list_print_loop:
beq list_end_of_line
cmp #$22
bne list_not_quote
lda quote_mode_flag
lda QTSW
eor #$ff
sta quote_mode_flag
sta QTSW
lda #$22
jmp list_is_literal
list_not_quote:
// Check quote mode, and display as literal if required
ldx quote_mode_flag
ldx QTSW
bne list_is_literal
cmp #$7f
@@ -128,7 +128,7 @@ list_not_quote:
// REM command locks quote flag on until the end of the line, allowing
// funny characters in REM statements without problem.
inc $0427
sta quote_mode_flag // Any value other than $00 or $FF will lock quote mode on, so the token value of REM is fine here
sta QTSW // Any value other than $00 or $FF will lock quote mode on, so the token value of REM is fine here
// FALL THROUGH
list_not_rem:
+8 -8
View File
@@ -17,7 +17,7 @@ tokenise_line:
lda #$00
sta $0110
sta $0112
sta quote_mode_flag
sta QTSW
lda tokenise_work1
sta $0113
@@ -40,7 +40,7 @@ tokenise_char:
// Clear quote mode flag that is also used by KERNAL for screen display
lda #$00
sta quote_mode_flag
sta QTSW
rts
!:
// More to do
@@ -60,9 +60,9 @@ tokenise_char_loop:
bne tk_not_quote
// Quote
lda quote_mode_flag
lda QTSW
eor #$ff
sta quote_mode_flag
sta QTSW
jmp tk_literal_char
tk_not_quote:
@@ -82,7 +82,7 @@ tk_not_quote:
tk_might_be_keyword:
// Don't tokenise in quote mode
lda quote_mode_flag
lda QTSW
bne tk_literal_char
// Pack string
@@ -137,9 +137,9 @@ found_token_in_line:
// If it is REM, then lock us in quote mode to the end of the line
cmp #$8f
bne not_rem
sta quote_mode_flag
not_rem:
sta QTSW
not_rem:
// Now skip over the length of the token
lda $0110
clc
-22
View File
@@ -5,7 +5,6 @@
// XXX get rid of this file, use ,aliases_ram_lowmem.s instead
.label kernal_load_or_verify_flag = $93
.label current_file_num = $98
.label input_device_number = DFLTN
.label cassette_buffer_bytes_used = $A6
@@ -30,7 +29,6 @@
.label keyboard_input_ready = $D0
.label current_screen_line_ptr = $D1
.label current_screen_x = $D3
.label quote_mode_flag = $D4
.label logical_line_length = $D5
.label current_screen_y = $D6
.label last_printed_character_ascii = $D7
@@ -40,26 +38,6 @@
.label screen_line_link_table = $D9
.label current_screen_line_colour_ptr = $F3
.label keyboard_decoding_table_ptr = $F5
// "Compute's Mapping the 64" book
.label keyboard_buffer = $0277
.label text_colour = $0286 // p55
.label colour_under_cursor = $0287 // p56
.label key_buffer_size = $0289 // p57
// 0 = cursor keys, insert, delete and space repeat, but nothing else
// 128 = all keys repeat
// 64 = no keys repeat
.label key_repeat_flags = $028A // p58
// https://www.c64-wiki.com/wiki/Page_2
.label key_repeat_counter = $028B
.label key_first_repeat_delay = $028C
// bit 0 = shift, 1 = Vendor Key, 2 = Control
.label key_bucky_state = $028D
.label key_last_bucky_state = $028E
.label keyboard_decoding_ptr = $028F
.label enable_case_switch = $0291
.label screen_scroll_disable = $0292
#if CONFIG_MEMORY_MODEL_60K
+4 -4
View File
@@ -3,7 +3,7 @@
// cursor_blink_countdown
// cursor_saved_character
// cursor_is_visible
// colour_under_cursor
// GDCOL (colour under cursor)
show_cursor_if_enabled:
lda cursor_blink_disable
@@ -48,8 +48,8 @@ draw_cursor:
sta (current_screen_line_ptr),y
// Also set cursor colour
lda (current_screen_line_colour_ptr),y
sta colour_under_cursor
lda text_colour
sta GDCOL
lda COLOR
sta (current_screen_line_colour_ptr),y
lda #1
@@ -63,7 +63,7 @@ undraw_cursor:
lda cursor_saved_character
ldy current_screen_x
sta (current_screen_line_ptr),y
lda colour_under_cursor
lda GDCOL
sta (current_screen_line_colour_ptr),y
lda #0
+5 -5
View File
@@ -90,7 +90,7 @@ read_from_keyboard:
lda keys_in_key_buffer
beq chrin_repeat
lda keyboard_buffer
lda KEYD
cmp #$0d
bne not_enter
@@ -145,7 +145,7 @@ empty_line:
not_enter:
// Print character
lda keyboard_buffer
lda KEYD
jsr CHROUT
jsr pop_keyboard_buffer
@@ -160,11 +160,11 @@ pop_keyboard_buffer:
sei
ldx #$00
ldy #$01
!: lda keyboard_buffer,y
sta keyboard_buffer,x
!: lda KEYD,y
sta KEYD,x
inx
iny
cpy key_buffer_size
cpy XMAX
bne !-
dec keys_in_key_buffer
cli
+8 -8
View File
@@ -110,7 +110,7 @@ not_0a:
bne not_0d
// RETURN clears quote and insert modes
lda #$00
sta quote_mode_flag
sta QTSW
sta insert_mode
jmp screen_advance_to_next_line
not_0d:
@@ -235,7 +235,7 @@ done_delete:
not_14:
// Check for quote mode
ldx quote_mode_flag
ldx QTSW
bne is_quote_mode
ldx insert_mode
bne is_quote_mode
@@ -274,7 +274,7 @@ not_quote_mode:
colour_check_loop:
cmp colour_codes,x
bne !+
stx text_colour
stx COLOR
jmp chrout_done
!: dex
bpl colour_check_loop
@@ -415,14 +415,14 @@ output_literal_char:
bne not_quote
// Toggle quote flag if required
lda quote_mode_flag
lda QTSW
eor #$80
sta quote_mode_flag
sta QTSW
not_quote:
// Set colour
lda text_colour
lda COLOR
sta (current_screen_line_colour_ptr),y
// Advance the column, and scroll screen down if we need
@@ -556,7 +556,7 @@ no_copy_down:
// Erase newly inserted line
ldy #79
!:
lda text_colour
lda COLOR
sta (current_screen_line_colour_ptr),y
lda #$20
sta (current_screen_line_ptr),y
@@ -659,7 +659,7 @@ scroll_copy_loop2:
// Fill in scrolled up area
ldx load_or_scroll_temp_pointer+0
scroll_copy_loop3:
lda text_colour
lda COLOR
sta (current_screen_line_colour_ptr),y
lda #$20
sta (current_screen_line_ptr),y
+5 -5
View File
@@ -79,17 +79,17 @@ cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
// But require key to be held for ~1/3sec before
// repeating (Compute's Mapping the 64 p58)
ldx #22-2 // Fudge factor to match speed
stx key_first_repeat_delay
stx DELAY
// Set current colour for text (Compute's Mapping the 64 p215)
ldx #$01 // default is light blue ($0E), but we use a different one
stx text_colour
stx COLOR
// Set maximum keyboard buffer size (Compute's Mapping the 64 p215)
ldx #10
stx key_buffer_size
// Put non-zero value in enable_case_switch
stx enable_case_switch
stx XMAX
// Put non-zero value in MODE to enable case switch
stx MODE
// Set default I/O devices (see SCINIT description at http://sta.c64.org/cbm64krnfunc.html)
jsr clrchn_reset
+1 -1
View File
@@ -47,7 +47,7 @@ clearscreen_l2:
// Clear colour RAM
// (Compute's Mapping the 64 p216)
lda text_colour
lda COLOR
clearscreen_l3:
sta $d800,y
sta $d900,y
+1 -1
View File
@@ -22,7 +22,7 @@ GETIN:
rts
!:
lda keyboard_buffer
lda KEYD
pha
jsr pop_keyboard_buffer
+4 -4
View File
@@ -53,15 +53,15 @@ IOINIT:
#endif // CONFIG_SID_D4XX || CONFIG_SID_D5XX
#if CONFIG_SID_2ND
lda SID_SIGVOL - SID_BASE + CONFIG_SID_2ND_ADDRESS
lda SID_SIGVOL - __SID_BASE + CONFIG_SID_2ND_ADDRESS
and #$F0
sta SID_SIGVOL - SID_BASE + CONFIG_SID_2ND_ADDRESS
sta SID_SIGVOL - __SID_BASE + CONFIG_SID_2ND_ADDRESS
#endif // CONFIG_SID_2ND
#if CONFIG_SID_3RD
lda SID_SIGVOL - SID_BASE + CONFIG_SID_3RD_ADDRESS
lda SID_SIGVOL - __SID_BASE + CONFIG_SID_3RD_ADDRESS
and #$F0
sta SID_SIGVOL - SID_BASE + CONFIG_SID_3RD_ADDRESS
sta SID_SIGVOL - __SID_BASE + CONFIG_SID_3RD_ADDRESS
#endif // CONFIG_SID_3RD
// Initialize CIAs
+28 -28
View File
@@ -74,9 +74,9 @@ SCNKEY:
sta BufferQuantity
// Decrement key repeat timeout if non-zero
ldx key_repeat_counter
ldx KOUNT
beq sk_start
dec key_repeat_counter
dec KOUNT
sk_start:
// Call main keyboard scanning routine
@@ -110,7 +110,7 @@ accept_key:
// Convert matrix position to key code
// XXX - Add offset of $40, $80 or $C0 if shift, CONTROL or C= are held down
pha
lda key_bucky_state
lda SHFLAG
and #$7
tax
pla
@@ -123,9 +123,9 @@ accept_key:
// Stash key into keyboard buffer
ldx keys_in_key_buffer
cpx key_buffer_size
cpx XMAX
beq sk_nokey
sta keyboard_buffer,x
sta KEYD,x
inc keys_in_key_buffer
sk_nokey:
@@ -204,10 +204,10 @@ ReturnNoKeys:
NoActivityDetected:
// So cancel all bucky keys
lda key_bucky_state
sta key_last_bucky_state
lda SHFLAG
sta LSTSHF
lda #$00
sta key_bucky_state
sta SHFLAG
jmp ReturnNoKeys
@@ -239,7 +239,7 @@ JoystickActivity:
// Clear bucky key status
lda #$00
sta key_bucky_state
sta SHFLAG
lda $dc01
and #$03
@@ -254,7 +254,7 @@ JoystickActivity:
// Up
// Mark shift as pressed
ldx #$01
stx key_bucky_state
stx SHFLAG
ldx #$07 // UP/DOWN
jsr KeyFound
!:
@@ -278,7 +278,7 @@ JoystickActivity:
cmp #$08
bne !+
ldx #$01
stx key_bucky_state
stx SHFLAG
ldx #$02
jsr KeyFound // LEFT/RIGHT
!:
@@ -332,20 +332,20 @@ next_row:
// Store de-bounce data for bucky keys
// (Compute's Mapping the 64, p58-59)
lda key_bucky_state
sta key_last_bucky_state
lda SHFLAG
sta LSTSHF
// Build bucky state
lda #$00
sta key_bucky_state
sta SHFLAG
lda ScanResult+6
eor #%10000000
and #%10000000 // Left shift
rol
rol
and #$01
ora key_bucky_state
sta key_bucky_state
ora SHFLAG
sta SHFLAG
// Right shift
lda ScanResult+1
@@ -355,15 +355,15 @@ next_row:
lsr
lsr
and #$01
ora key_bucky_state
sta key_bucky_state
ora SHFLAG
sta SHFLAG
// Control
lda ScanResult+0
eor #$04
and #$04
ora key_bucky_state
sta key_bucky_state
ora SHFLAG
sta SHFLAG
// Vendor key
lda ScanResult+0
@@ -373,17 +373,17 @@ next_row:
lsr
lsr
and #$02
ora key_bucky_state
sta key_bucky_state
ora SHFLAG
sta SHFLAG
// Chick for shift + Vendor
cmp #$03
bne no_case_toggle
lda key_last_bucky_state
lda LSTSHF
cmp #$03
beq no_case_toggle
lda enable_case_switch
lda MODE
beq no_case_toggle
lda $D018
@@ -509,15 +509,15 @@ KeyHeld:
// Different key held
sta last_key_matrix_position
pha
lda key_first_repeat_delay
sta key_repeat_counter
lda DELAY
sta KOUNT
pla
BuckyHeld:
jmp ConsiderNextKey
SameKeyHeld:
pha
lda key_repeat_counter
lda KOUNT
bmi KeyCanRepeat
bne KeyRepeatWait
// Count down ended, so repeat key now
@@ -526,7 +526,7 @@ KeyCanRepeat:
// (Compute's Mapping the 64 p58)
pha
lda #6-2 // Fudge factor to match speed
sta key_repeat_counter
sta KOUNT
pla
pla