tape interlock support, don't display PRESS PLAY if already pressed
This commit is contained in:
1 parent
b860322a09
commit
3416414e51
4 files changed
+35
-4
No files matched your search
@@ -5,6 +5,27 @@ default_irq_handler:
|
||||
jsr JSCNKEY
|
||||
jsr JUDTIM // update jiffy clock
|
||||
|
||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||
|
||||
// Turn tape motor on/off depending on the button state
|
||||
// For CAS1 (tape motor interlock) variable description, see Mapping the C64, page 7
|
||||
|
||||
lda CPU_R6510
|
||||
and #$10
|
||||
beq !+ // branch if tape button pressed
|
||||
|
||||
jsr tape_motor_off
|
||||
lda #$00
|
||||
sta CAS1
|
||||
beq default_irq_handler_end_tape // branch always
|
||||
!:
|
||||
lda CAS1
|
||||
bne default_irq_handler_end_tape
|
||||
jsr tape_motor_on
|
||||
|
||||
default_irq_handler_end_tape:
|
||||
|
||||
#endif
|
||||
|
||||
// Acknowledge CIA interrupt and return
|
||||
jmp clear_cia1_interrupt_flag_and_return_from_interrupt
|
||||
|
||||
@@ -84,6 +84,14 @@ tape_ask_play:
|
||||
|
||||
sei // timing is critical for tape loading
|
||||
|
||||
// First check whether the button is already pressed
|
||||
|
||||
lda CPU_R6510
|
||||
and #$10
|
||||
beq tape_wait_play_done
|
||||
|
||||
// Turn off the motor, display message
|
||||
|
||||
jsr tape_motor_off
|
||||
|
||||
ldx #__MSG_KERNAL_PRESS_PLAY
|
||||
@@ -110,6 +118,8 @@ tape_wait_play_loop:
|
||||
and #$10 // check for pressed button
|
||||
bne tape_wait_play_loop
|
||||
|
||||
tape_wait_play_done:
|
||||
|
||||
jsr print_return
|
||||
jmp tape_screen_hide_motor_on
|
||||
|
||||
|
||||
Reference in new issue
Block a user