further CHROUT fixes and optimizations
This commit is contained in:
1 parent
e53dcaf345
commit
d3ef25c441
6 files changed
+46
-45
No files matched your search
@@ -43,12 +43,11 @@ chrout_iec:
|
||||
|
||||
lda SCHAR
|
||||
jsr JCIOUT
|
||||
bcc chrout_done
|
||||
bcc chrout_done_success
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
chrout_done_fail:
|
||||
jsr cursor_show_if_enabled
|
||||
|
||||
plp
|
||||
|
||||
@@ -68,7 +67,6 @@ chrout_done_fail:
|
||||
rts
|
||||
|
||||
chrout_done_unknown_device:
|
||||
jsr cursor_show_if_enabled
|
||||
|
||||
plp
|
||||
|
||||
@@ -87,9 +85,8 @@ chrout_done_unknown_device:
|
||||
// End wioth error
|
||||
jmp lvs_device_not_found_error
|
||||
|
||||
chrout_done:
|
||||
jsr cursor_show_if_enabled
|
||||
|
||||
chrout_done_success:
|
||||
|
||||
plp
|
||||
|
||||
// Restore X and Y
|
||||
|
||||
@@ -99,10 +99,19 @@ not_quote:
|
||||
ldy PNTR
|
||||
!:
|
||||
cpy #80
|
||||
bcc no_screen_advance_to_next_line
|
||||
bcc chrout_screen_done
|
||||
lda #0
|
||||
sta PNTR
|
||||
jmp screen_advance_to_next_line
|
||||
jmp chrout_screen_advance_to_next_line
|
||||
|
||||
no_screen_advance_to_next_line:
|
||||
jmp chrout_done
|
||||
|
||||
chrout_screen_calc_lptr_done:
|
||||
|
||||
jsr screen_calculate_line_pointer
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
chrout_screen_done:
|
||||
|
||||
jsr cursor_show_if_enabled
|
||||
jmp chrout_done_success
|
||||
+3
-4
@@ -1,5 +1,5 @@
|
||||
|
||||
screen_advance_to_next_line:
|
||||
chrout_screen_advance_to_next_line:
|
||||
|
||||
// jsr cursor_hide_if_visible
|
||||
|
||||
@@ -42,6 +42,5 @@ screen_advance_to_next_line:
|
||||
// Off the bottom of the screen
|
||||
jsr scroll_screen_up
|
||||
!:
|
||||
|
||||
jsr screen_calculate_line_pointer
|
||||
jmp chrout_done
|
||||
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
@@ -23,7 +23,7 @@ chrout_try_RETURN:
|
||||
sta QTSW
|
||||
sta INSRT
|
||||
sta RVS
|
||||
jmp screen_advance_to_next_line
|
||||
jmp chrout_screen_advance_to_next_line
|
||||
!:
|
||||
chrout_try_DEL:
|
||||
|
||||
@@ -49,8 +49,7 @@ chrout_try_CRSR_UP:
|
||||
sec
|
||||
sbc #40
|
||||
sta PNTR
|
||||
jsr screen_calculate_line_pointer
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
!:
|
||||
chrout_try_CRSR_DOWN:
|
||||
|
||||
@@ -66,8 +65,7 @@ chrout_try_CRSR_DOWN:
|
||||
// so that we can tell if we really are on the bottom phys
|
||||
// screen line or not
|
||||
jsr screen_scroll_up_if_on_last_line
|
||||
jsr screen_calculate_line_pointer
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
!:
|
||||
chrout_try_CRSR_LEFT:
|
||||
|
||||
@@ -76,9 +74,11 @@ chrout_try_CRSR_LEFT:
|
||||
|
||||
lda TBLX
|
||||
ora PNTR
|
||||
beq chrout_screen_control_done // if top-left screen character
|
||||
bne position_not_top_left
|
||||
jmp chrout_screen_done
|
||||
position_not_top_left:
|
||||
dec PNTR
|
||||
jmp chrout_screen_control_calcptr_done
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
!:
|
||||
chrout_try_CRSR_RIGHT:
|
||||
|
||||
@@ -86,17 +86,16 @@ chrout_try_CRSR_RIGHT:
|
||||
bne !+
|
||||
|
||||
inc PNTR
|
||||
jsr screen_calculate_line_pointer
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
!:
|
||||
chrout_try_RVS_ON:
|
||||
chrout_try_RVS_ON: // XXX deduplicate with RVS_OFF
|
||||
|
||||
cmp #$12
|
||||
bne !+
|
||||
|
||||
lda #$80
|
||||
sta RVS
|
||||
bne chrout_screen_control_done // branch always
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
chrout_try_RVS_OFF:
|
||||
|
||||
@@ -105,7 +104,7 @@ chrout_try_RVS_OFF:
|
||||
|
||||
lda #$00
|
||||
sta RVS
|
||||
beq chrout_screen_control_done // branch always
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
chrout_try_MODE_TXT:
|
||||
|
||||
@@ -114,7 +113,7 @@ chrout_try_MODE_TXT:
|
||||
|
||||
// XXX
|
||||
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
chrout_try_MODE_GFX:
|
||||
|
||||
@@ -123,7 +122,7 @@ chrout_try_MODE_GFX:
|
||||
|
||||
// XXX
|
||||
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
chrout_try_COLOR:
|
||||
|
||||
@@ -132,7 +131,7 @@ colour_check_loop:
|
||||
cmp colour_codes,x
|
||||
bne !+
|
||||
stx COLOR
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
dex
|
||||
bpl colour_check_loop
|
||||
@@ -144,7 +143,7 @@ chrout_try_SHIFT_ENABLE:
|
||||
|
||||
// XXX
|
||||
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
chrout_try_SHIFT_DISABLE:
|
||||
|
||||
@@ -153,7 +152,7 @@ chrout_try_SHIFT_DISABLE:
|
||||
|
||||
// XXX
|
||||
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
chrout_try_HOME:
|
||||
|
||||
@@ -164,7 +163,7 @@ chrout_try_HOME:
|
||||
lda #$00
|
||||
sta PNTR
|
||||
sta TBLX
|
||||
beq chrout_screen_control_calcptr_done // branch always
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
!:
|
||||
chrout_try_CLR:
|
||||
|
||||
@@ -172,7 +171,7 @@ chrout_try_CLR:
|
||||
bne !+
|
||||
|
||||
jsr clear_screen
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
chrout_try_INS:
|
||||
|
||||
@@ -188,7 +187,7 @@ chrout_try_RUN_STOP:
|
||||
|
||||
// XXX
|
||||
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
!:
|
||||
chrout_try_FKEY:
|
||||
|
||||
@@ -196,11 +195,6 @@ chrout_try_FKEY:
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
chrout_screen_control_done: // unknown, LF, or no more actions required // XXX to !csc_done
|
||||
!: // unknown, LF, or no more actions required // XXX to !csc_done
|
||||
|
||||
jmp chrout_done
|
||||
|
||||
chrout_screen_control_calcptr_done: // XXX to !csc_calcptr_done
|
||||
|
||||
jsr screen_calculate_line_pointer
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
@@ -28,7 +28,7 @@ chrout_screen_del_column_0:
|
||||
lda LNMX
|
||||
sta PNTR
|
||||
|
||||
jmp chrout_screen_control_calcptr_done
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
|
||||
chrout_screen_del_column_non_0:
|
||||
|
||||
@@ -59,5 +59,7 @@ chrout_screen_del_column_non_0:
|
||||
!:
|
||||
dec PNTR
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
chrout_screen_del_done:
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
@@ -17,7 +17,7 @@ chrout_screen_ins:
|
||||
beq !+
|
||||
|
||||
// Line is too long to extend
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
|
||||
!:
|
||||
// Work out if line needs to be expanded, and if so expand it
|
||||
@@ -61,4 +61,4 @@ chrout_screen_ins:
|
||||
lda #$20
|
||||
sta (PNT),y
|
||||
|
||||
jmp chrout_done
|
||||
jmp chrout_screen_done
|
||||
Reference in new issue
Block a user