common screen visibilityy handling for Turbo Tape and JiffyDOS
This commit is contained in:
1 parent
aad50ee979
commit
430682d9c7
5 files changed
+61
-49
No files matched your search
@@ -23,21 +23,15 @@ load_jiffydos:
|
|||||||
|
|
||||||
#if CONFIG_IEC_BLANK_SCREEN
|
#if CONFIG_IEC_BLANK_SCREEN
|
||||||
|
|
||||||
// Blank screen to make sure no sprite/badline will interrupt
|
// Preserve register with screen status (blank/visibe)
|
||||||
lda VIC_SCROLY
|
lda VIC_SCROLY
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
and #($FF - $10)
|
|
||||||
sta VIC_SCROLY
|
|
||||||
|
|
||||||
// Only the next screen is badline-free
|
// Blank screen to make sure no sprite/badline will interrupt
|
||||||
!:
|
jsr screen_off
|
||||||
lda VIC_SCROLY // wait for lower part of screen
|
|
||||||
bpl !-
|
|
||||||
!:
|
|
||||||
lda VIC_SCROLY // wait for screen start
|
|
||||||
bmi !-
|
|
||||||
|
|
||||||
// Preserve 3 lowest bits of CIA2_PRA XXX deduplicate this
|
// Preserve 3 lowest bits of CIA2_PRA XXX deduplicate this
|
||||||
|
|
||||||
lda CIA2_PRA
|
lda CIA2_PRA
|
||||||
and #%00000111
|
and #%00000111
|
||||||
sta C3PO
|
sta C3PO
|
||||||
@@ -58,7 +52,7 @@ load_jiffydos:
|
|||||||
load_jiffydos_loop:
|
load_jiffydos_loop:
|
||||||
|
|
||||||
// Wait until device is ready to send (releases CLK)
|
// Wait until device is ready to send (releases CLK)
|
||||||
jsr iec_wait_for_clk_release // XXX consider inlining this
|
jsr iec_wait_for_clk_release
|
||||||
|
|
||||||
#if CONFIG_IEC_BLANK_SCREEN
|
#if CONFIG_IEC_BLANK_SCREEN
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
//
|
|
||||||
// Helper routines to blank/show screen
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
|
||||||
|
|
||||||
|
|
||||||
screen_blank:
|
|
||||||
|
|
||||||
lda VIC_SCROLY
|
|
||||||
and #($FF - $10)
|
|
||||||
sta VIC_SCROLY
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
screen_show:
|
|
||||||
|
|
||||||
lda VIC_SCROLY
|
|
||||||
ora #$10
|
|
||||||
sta VIC_SCROLY
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
//
|
||||||
|
// Helper routine to blank screen
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO || (CONFIG_IEC_JIFFYDOS && !CONFIG_MEMORY_MODEL_60K)
|
||||||
|
|
||||||
|
|
||||||
|
screen_off:
|
||||||
|
|
||||||
|
lda VIC_SCROLY
|
||||||
|
and #($FF - $10)
|
||||||
|
sta VIC_SCROLY
|
||||||
|
|
||||||
|
// To be sure there are no badlines we have to wait till the next screen,
|
||||||
|
// as the bit is checked by VIC-II at the start of the frame only
|
||||||
|
!:
|
||||||
|
lda VIC_SCROLY // wait for lower part of screen
|
||||||
|
bpl !-
|
||||||
|
!:
|
||||||
|
lda VIC_SCROLY // wait for screen start
|
||||||
|
bmi !-
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
//
|
||||||
|
// Helper routine to show screen
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||||
|
|
||||||
|
|
||||||
|
screen_on:
|
||||||
|
|
||||||
|
lda VIC_SCROLY
|
||||||
|
ora #$10
|
||||||
|
sta VIC_SCROLY
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -58,20 +58,20 @@ tape_motor_on:
|
|||||||
// store/restore screen color
|
// store/restore screen color
|
||||||
//
|
//
|
||||||
|
|
||||||
tape_screen_show_motor_off:
|
tape_screen_on_motor_off:
|
||||||
|
|
||||||
jsr tape_motor_off
|
jsr tape_motor_off
|
||||||
|
|
||||||
lda COLSTORE
|
lda COLSTORE
|
||||||
sta VIC_EXTCOL
|
sta VIC_EXTCOL
|
||||||
|
|
||||||
jmp screen_show
|
jmp screen_on
|
||||||
|
|
||||||
tape_screen_hide_motor_on:
|
tape_screen_off_motor_on:
|
||||||
lda VIC_EXTCOL
|
lda VIC_EXTCOL
|
||||||
sta COLSTORE
|
sta COLSTORE
|
||||||
|
|
||||||
jsr screen_blank
|
jsr screen_off
|
||||||
jmp tape_motor_on
|
jmp tape_motor_on
|
||||||
|
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ tape_wait_play_done:
|
|||||||
sta CAS1 // set the interlock
|
sta CAS1 // set the interlock
|
||||||
|
|
||||||
jsr print_return
|
jsr print_return
|
||||||
jmp tape_screen_hide_motor_on
|
jmp tape_screen_off_motor_on
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -133,7 +133,7 @@ tape_wait_play_done:
|
|||||||
|
|
||||||
tape_handle_header:
|
tape_handle_header:
|
||||||
|
|
||||||
jsr tape_screen_show_motor_off
|
jsr tape_screen_on_motor_off
|
||||||
|
|
||||||
// Print FOUND + file name
|
// Print FOUND + file name
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ tape_handle_header_displayed:
|
|||||||
|
|
||||||
// Load the file
|
// Load the file
|
||||||
|
|
||||||
jsr tape_screen_hide_motor_on
|
jsr tape_screen_off_motor_on
|
||||||
|
|
||||||
// FALLTROUGH
|
// FALLTROUGH
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ tape_handle_header_skip:
|
|||||||
// Skip this file
|
// Skip this file
|
||||||
|
|
||||||
jsr print_return
|
jsr print_return
|
||||||
jsr tape_screen_hide_motor_on
|
jsr tape_screen_off_motor_on
|
||||||
|
|
||||||
// FALLTROUGH
|
// FALLTROUGH
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ tape_header_wait_stop:
|
|||||||
|
|
||||||
tape_load_success:
|
tape_load_success:
|
||||||
|
|
||||||
jsr tape_screen_show_motor_off
|
jsr tape_screen_on_motor_off
|
||||||
jsr lvs_display_done
|
jsr lvs_display_done
|
||||||
|
|
||||||
cli
|
cli
|
||||||
@@ -325,7 +325,7 @@ tape_load_success:
|
|||||||
|
|
||||||
tape_load_error:
|
tape_load_error:
|
||||||
|
|
||||||
jsr tape_screen_show_motor_off
|
jsr tape_screen_on_motor_off
|
||||||
|
|
||||||
cli
|
cli
|
||||||
jmp lvs_load_verify_error
|
jmp lvs_load_verify_error
|
||||||
|
|||||||
Reference in new issue
Block a user