diff --git a/c64/kernal/screen/chrout_screen_control.s b/c64/kernal/screen/chrout_screen_control.s index 83686dde..91ca0ef8 100644 --- a/c64/kernal/screen/chrout_screen_control.s +++ b/c64/kernal/screen/chrout_screen_control.s @@ -34,11 +34,18 @@ chrout_try_jumptable_loop_noquote: bne !+ // Found, perform a jump to subroutine +#if !HAS_OPCODES_65C02_XXX_DISABLED lda chrout_screen_jumptable_hi, x pha lda chrout_screen_jumptable_lo, x pha rts +#else + txa + asl + tax + jmp (chrout_screen_jumptable, x) // XXX whyy Kick Assembler does not accept this? +#endif !: dex bpl chrout_try_jumptable_loop diff --git a/c64/kernal/screen/chrout_screen_jumptable_codes.s b/c64/kernal/screen/chrout_screen_jumptable_codes.s index 448c3f96..3011ba28 100644 --- a/c64/kernal/screen/chrout_screen_jumptable_codes.s +++ b/c64/kernal/screen/chrout_screen_jumptable_codes.s @@ -1,6 +1,6 @@ // -// Jumptable for screen control coldes support. To improve performance, should be sorted +// Jumptable for screen control codes support. To improve performance, should be sorted // starting from the least probable routine. // @@ -36,6 +36,8 @@ __chrout_screen_jumptable_quote_guard: __chrout_screen_jumptable_codes_end: +#if !HAS_OPCODES_65C02_XXX_DISABLED + chrout_screen_jumptable_lo: .byte <(chrout_screen_CLR - 1) @@ -85,3 +87,32 @@ chrout_screen_jumptable_hi: .byte >(chrout_screen_INS - 1) .byte >(chrout_screen_DEL - 1) .byte >(chrout_screen_RETURN - 1) + +#else + +chrout_screen_jumptable: + + .word chrout_screen_CLR + .word chrout_screen_HOME + .word chrout_screen_SHIFT_OFF + .word chrout_screen_SHIFT_ON + .word chrout_screen_TXT + .word chrout_screen_GFX + .word chrout_screen_RVS_OFF + .word chrout_screen_RVS_ON + .word chrout_screen_CRSR_RIGHT + .word chrout_screen_CRSR_LEFT + .word chrout_screen_CRSR_DOWN + .word chrout_screen_CRSR_UP +#if CONFIG_EDIT_STOPQUOTE + .word chrout_screen_STOP +#endif +#if CONFIG_EDIT_TABULATORS + .word chrout_screen_TAB_BW + .word chrout_screen_TAB_FW +#endif + .word chrout_screen_INS + .word chrout_screen_DEL + .word chrout_screen_RETURN + +#endif diff --git a/c64/kernal/tape/tape_common.s b/c64/kernal/tape/tape_common.s index 1f133fd2..a74db3af 100644 --- a/c64/kernal/tape/tape_common.s +++ b/c64/kernal/tape/tape_common.s @@ -7,21 +7,6 @@ #if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO -// -// Check if VERIFY asked - if yes, terminate loading -// - -tape_ditch_verify: - - lda VERCKK - bne !+ - rts -!: - pla - pla - jmp lvs_device_not_found_error - - // // Loading terminated by user // @@ -34,44 +19,6 @@ tape_break_error: jmp kernalerror_ROUTINE_TERMINATED -// -// Handle screen (visible/blanked) + tape deck motor (on/off), -// store/restore screen color -// - -tape_screen_on_motor_off: - - jsr tape_motor_off - - lda COLSTORE - sta VIC_EXTCOL - - jmp screen_on - -tape_screen_off_motor_on: - lda VIC_EXTCOL - sta COLSTORE - - jsr screen_off - jmp tape_motor_on - - -// -// Clear the SID settings - for sound effects during LOAD -// - -tape_clean_sid: - - lda #$00 - ldy #$1C -!: - sta __SID_BASE, y - dey - bpl !- - - rts - - // // Ask user to press PLAY on tape deck, // Unless user cancelled loading, blank screen and start motor diff --git a/c64/kernal/tape/tape_common_clean_sid.s b/c64/kernal/tape/tape_common_clean_sid.s new file mode 100644 index 00000000..fa135bf4 --- /dev/null +++ b/c64/kernal/tape/tape_common_clean_sid.s @@ -0,0 +1,22 @@ + +// +// Clear the SID settings - for sound effects during LOAD +// + + +#if CONFIG_TAPE_TURBO + + +tape_clean_sid: + + lda #$00 + ldy #$1C +!: + sta __SID_BASE, y + dey + bpl !- + + rts + + +#endif diff --git a/c64/kernal/tape/tape_common_ditch_verify.s b/c64/kernal/tape/tape_common_ditch_verify.s new file mode 100644 index 00000000..c0c6edb0 --- /dev/null +++ b/c64/kernal/tape/tape_common_ditch_verify.s @@ -0,0 +1,21 @@ + +// +// Check if VERIFY asked - if yes, terminate loading +// + + +#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO + + +tape_ditch_verify: + + lda VERCKK + bne !+ + rts +!: + pla + pla + jmp lvs_device_not_found_error + + +#endif diff --git a/c64/kernal/tape/tape_motor.s b/c64/kernal/tape/tape_common_motor.s similarity index 100% rename from c64/kernal/tape/tape_motor.s rename to c64/kernal/tape/tape_common_motor.s diff --git a/c64/kernal/tape/tape_common_screen.s b/c64/kernal/tape/tape_common_screen.s new file mode 100644 index 00000000..f8fb8814 --- /dev/null +++ b/c64/kernal/tape/tape_common_screen.s @@ -0,0 +1,27 @@ + +// +// Handle screen (visible/blanked) + tape deck motor (on/off), +// store/restore screen color +// + + +#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO + + +tape_screen_on_motor_off: + + jsr tape_motor_off + + lda COLSTORE + sta VIC_EXTCOL + + jmp screen_on + +tape_screen_off_motor_on: + lda VIC_EXTCOL + sta COLSTORE + + jsr screen_off + jmp tape_motor_on + +#endif