improved tape adapter handling

This commit is contained in:
FeralChild64 committed 2020-05-31 21:17:30 +02:00
1 parent 9168115679
commit df00cc507d
2 files changed
+31 -6

No files matched your search

+30 -5
View File
@@ -61,20 +61,49 @@ tape_wait_play_loop:
#else
// The ROM is configured for tape adapter without the key sense - but it is still
// possible, that regular Datasette or Tapuino is connected
lda CPU_R6510
and #$10
beq tape_wait_first_pulse // branch if button reported pressed, most likely really no key sense
// We have key sense - perform regular waiting
!:
jsr STOP
bcs tape_break_error
lda CPU_R6510
and #$10
beq !-
tape_wait_first_pulse:
// We have no key sense - so just turn the motor on and wait for the first pulse
jsr tape_motor_on
lda #$10
!:
jsr STOP
bcs tape_break_error
lda #$10
bit CIA1_ICR // $DC0D
bne !-
!:
jsr STOP
bcs tape_break_error
lda #$10
bit CIA1_ICR // $DC0D
beq !-
#endif
// FALLTROUGH
tape_wait_play_done:
#if CONFIG_MB_MEGA_65
// Display confirmation
@@ -84,10 +113,6 @@ tape_wait_play_loop:
#endif
// FALLTROUGH
tape_wait_play_done:
// Prepare for reading
lda #$01