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

-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