more cleanups and granularity improvements
This commit is contained in:
1 parent
d62f193c88
commit
9b2638f739
7 files changed
+109
-54
No files matched your search
@@ -34,11 +34,18 @@ chrout_try_jumptable_loop_noquote:
|
|||||||
bne !+
|
bne !+
|
||||||
|
|
||||||
// Found, perform a jump to subroutine
|
// Found, perform a jump to subroutine
|
||||||
|
#if !HAS_OPCODES_65C02_XXX_DISABLED
|
||||||
lda chrout_screen_jumptable_hi, x
|
lda chrout_screen_jumptable_hi, x
|
||||||
pha
|
pha
|
||||||
lda chrout_screen_jumptable_lo, x
|
lda chrout_screen_jumptable_lo, x
|
||||||
pha
|
pha
|
||||||
rts
|
rts
|
||||||
|
#else
|
||||||
|
txa
|
||||||
|
asl
|
||||||
|
tax
|
||||||
|
jmp (chrout_screen_jumptable, x) // XXX whyy Kick Assembler does not accept this?
|
||||||
|
#endif
|
||||||
!:
|
!:
|
||||||
dex
|
dex
|
||||||
bpl chrout_try_jumptable_loop
|
bpl chrout_try_jumptable_loop
|
||||||
|
|||||||
@@ -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.
|
// starting from the least probable routine.
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -36,6 +36,8 @@ __chrout_screen_jumptable_quote_guard:
|
|||||||
__chrout_screen_jumptable_codes_end:
|
__chrout_screen_jumptable_codes_end:
|
||||||
|
|
||||||
|
|
||||||
|
#if !HAS_OPCODES_65C02_XXX_DISABLED
|
||||||
|
|
||||||
chrout_screen_jumptable_lo:
|
chrout_screen_jumptable_lo:
|
||||||
|
|
||||||
.byte <(chrout_screen_CLR - 1)
|
.byte <(chrout_screen_CLR - 1)
|
||||||
@@ -85,3 +87,32 @@ chrout_screen_jumptable_hi:
|
|||||||
.byte >(chrout_screen_INS - 1)
|
.byte >(chrout_screen_INS - 1)
|
||||||
.byte >(chrout_screen_DEL - 1)
|
.byte >(chrout_screen_DEL - 1)
|
||||||
.byte >(chrout_screen_RETURN - 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
|
||||||
@@ -7,21 +7,6 @@
|
|||||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
#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
|
// Loading terminated by user
|
||||||
//
|
//
|
||||||
@@ -34,44 +19,6 @@ tape_break_error:
|
|||||||
jmp kernalerror_ROUTINE_TERMINATED
|
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,
|
// Ask user to press PLAY on tape deck,
|
||||||
// Unless user cancelled loading, blank screen and start motor
|
// Unless user cancelled loading, blank screen and start motor
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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
|
||||||
File renamed without changes.
@@ -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
|
||||||
Reference in new issue
Block a user