tape reading fix (data pilot)

This commit is contained in:
FeralChild64 committed 2020-08-26 17:37:30 +02:00
1 parent e40e8c5d2e
commit aecf5f9594
8 files changed
+19 -4

No files matched your search

-3
View File
@@ -9,9 +9,6 @@
// .Y not equal to 0 - returns error if data block is longer (length includes checksum)
// XXX improve error handling - do not ignore second copy, handle damaged sync part
#if CONFIG_TAPE_NORMAL
+19 -1
View File
@@ -27,7 +27,13 @@ tape_normal_get_pilot_header: // entry point, reset calibration, requir
sta __pulse_threshold_ML
lda #$80
#if CONFIG_TAPE_AUTODETECT
ldy #$FF // marker: try to detect turbo
bmi tape_normal_get_pilot_header_cont
#else
skip_2_bytes_trash_nvz
#endif
// FALLTROUGH
@@ -42,6 +48,15 @@ tape_normal_get_pilot_short: // entry point, require 1x $40 pulses
lda #$01
#if CONFIG_TAPE_AUTODETECT
ldy #$00 // marker: do not try to detect turbo
// FALLTROUGH
tape_normal_get_pilot_header_cont:
sty INBIT
#else
skip_2_bytes_trash_nvz
#endif
// FALLTROUGH
tape_normal_get_pilot_common:
@@ -72,9 +87,12 @@ tape_normal_get_pilot_common_loop_inner:
bcc tape_normal_get_pilot_common_restart // not a pilot - try again
#if CONFIG_TAPE_AUTODETECT
bit INBIT
bpl !+
// Try to distinguish turbo by cheecking for short signals
cmp #$B9 // see comment in tape_common_autodetect.s
bcs !+
bcs !++
!:
#endif
jsr tape_normal_calibrate_during_pilot