small tape reading improvements
This commit is contained in:
1 parent
0f843beda1
commit
9b2d01354b
5 files changed
+14
-18
No files matched your search
@@ -119,7 +119,10 @@ load_iec_loop:
|
||||
// Advance pointer to data; it is OK if it advances past $FFFF,
|
||||
// one autostart technique does exactly this
|
||||
#if !HAS_OPCODES_65CE02
|
||||
jsr lvs_advance_EAL
|
||||
inc EAL+0
|
||||
bne !+
|
||||
inc EAL+1
|
||||
!:
|
||||
#else
|
||||
inw EAL+0
|
||||
#endif
|
||||
@@ -132,7 +135,7 @@ load_iec_loop:
|
||||
phx_trash_a
|
||||
jsr udtim_keyboard
|
||||
jsr STOP
|
||||
bcs load_break_error
|
||||
bcs_far load_break_error
|
||||
plx_trash_a
|
||||
!:
|
||||
// Check for EOI - if so, this was the last byte
|
||||
|
||||
@@ -75,19 +75,6 @@ lvs_handle_byte_verify:
|
||||
sec
|
||||
rts
|
||||
|
||||
#if CONFIG_IEC && !HAS_OPCODES_65CE02
|
||||
|
||||
lvs_advance_EAL:
|
||||
|
||||
// Advance pointer
|
||||
inc EAL+0
|
||||
bne !+
|
||||
inc EAL+1
|
||||
!:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO || CONFIG_IEC
|
||||
|
||||
lvs_setup_MEMUSS:
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
// this implementation sets the timer for twice the precision (timer B is triggered every 4 CPU cycles),
|
||||
// probably an overkill, but in realityy it does not cost us anything.
|
||||
//
|
||||
// So -= we have the following thresholds:
|
||||
// So - we have the following thresholds:
|
||||
// - S vs M $72 (in our units of 4 ticks)
|
||||
// - M vs L $98 (in our units of 4 ticks)
|
||||
//
|
||||
@@ -78,6 +78,7 @@ load_tape_normal_header_loop:
|
||||
|
||||
// Read the header
|
||||
|
||||
jsr tape_normal_get_marker // XXX handle result
|
||||
jsr tape_normal_get_byte // XXX handle errors
|
||||
sta (TAPE1), y
|
||||
iny
|
||||
@@ -94,6 +95,7 @@ load_tape_normal_header_loop:
|
||||
// XXX do not skip second header, use it to correct data
|
||||
ldy #$15
|
||||
!:
|
||||
jsr tape_normal_get_marker
|
||||
jsr tape_normal_get_byte
|
||||
dey
|
||||
bne !-
|
||||
@@ -115,11 +117,16 @@ load_tape_normal_header_loop:
|
||||
|
||||
load_tape_normal_payload:
|
||||
|
||||
jsr tape_normal_pilot
|
||||
ldy #$09
|
||||
jsr tape_normal_sync
|
||||
|
||||
|
||||
|
||||
|
||||
// XXX replace this placeholder with a real routine
|
||||
!:
|
||||
jsr tape_normal_get_marker
|
||||
jsr tape_normal_get_byte
|
||||
jmp !-
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ tape_normal_get_byte:
|
||||
lda #%01111111 // canary bit is 0
|
||||
sta INBIT
|
||||
|
||||
jsr tape_normal_get_marker // XXX this is probablyy not the proper place
|
||||
|
||||
// Now fetch individual bits
|
||||
|
||||
tape_normal_get_byte_loop:
|
||||
|
||||
@@ -13,6 +13,7 @@ tape_normal_sync:
|
||||
|
||||
// Injest bytes of decreasing values
|
||||
|
||||
jsr tape_normal_get_marker // XXX handle result
|
||||
jsr tape_normal_get_byte
|
||||
bcs tape_normal_sync_fail
|
||||
|
||||
|
||||
Reference in new issue
Block a user