tape interlock support, don't display PRESS PLAY if already pressed

This commit is contained in:
FeralChild64 committed 2019-11-05 17:53:27 +01:00
1 parent b860322a09
commit 3416414e51
4 files changed
+35 -4

No files matched your search

+2 -2
View File
@@ -151,8 +151,8 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| `$FFF0` | `$E50A` | `PLOT` | DONE | |
| `$FFF3` | | `IOBASE` | DONE | |
| `($FFFA)` | | NMI vec | PARTIAL | |
| `($FFFC)` | `$FCE2` | RESET vec | PARTIAL | |
| `($FFFE)` | | IRQ/BRK vec | PARTIAL | |
| `($FFFC)` | `$FCE2` | RESET vec | PARTIAL | see IOINIT status |
| `($FFFE)` | | IRQ/BRK vec | DONE | |
<br />
+1 -1
View File
@@ -138,7 +138,7 @@
.label ROPRTY = $BD // tape / RS-232 temporary storage
.label FSBLK = $BE // -- NOT IMPLEMENTED --
.label MYCH = $BF // -- NOT IMPLEMENTED --
.label CAS1 = $C0 // -- NOT IMPLEMENTED --
.label CAS1 = $C0 // tape motor interlock
.label STAL = $C1 // $C1-$C2 LOAD/SAVE start address
.label MEMUSS = $C3 // $C3-$C4 temporary address for tape LOAD/SAVE
.label LSTX = $C5 // last keyy matrix position [!] our usage probably differs in details
@@ -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
+10
View File
@@ -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