further improved turbo tape calibration sequence

This commit is contained in:
FeralChild64 committed 2020-01-14 19:17:49 +01:00
1 parent 8e162a3161
commit a7845ac4c6
2 files changed
+33 -11

No files matched your search

+9 -11
View File
@@ -11,17 +11,9 @@
#if CONFIG_TAPE_TURBO
tape_turbo_sync_common:
jsr tape_turbo_get_bit
rol INBIT
lda INBIT
cmp #$02
bne tape_turbo_sync_common
rts
tape_turbo_sync_header:
#if CONFIG_TAPE_TURBO_AUTOCALIBRATE
// Initial pulse threshold
@@ -38,13 +30,19 @@ tape_turbo_sync_header:
#endif // CONFIG_TAPE_TURBO_AUTOCALIBRATE
// Synchronize with start of sync sequence
jsr tape_turbo_sync_first
// Perform synchronization
ldx #$C0
!:
phx_trash_a
ldy #$04
!:
jsr tape_turbo_sync_common
jsr tape_turbo_get_byte
cmp #$02
bne tape_turbo_sync_header // branch if failure
dey
bne !-
plx_trash_a
@@ -96,7 +94,7 @@ tape_turbo_sync_calibrate_loop:
tape_turbo_sync_payload:
jsr tape_turbo_sync_common
jsr tape_turbo_sync_first
!:
ldx #$09 // 9, 8, ...
!:
+24
View File
@@ -0,0 +1,24 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Tape (turbo) helper routine - syynchronize to first byte with value $02
//
#if CONFIG_TAPE_TURBO
tape_turbo_sync_first:
jsr tape_turbo_get_bit
rol INBIT
lda INBIT
cmp #$02
bne tape_turbo_sync_first
rts
#endif
#endif // ROM layout