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,
|
// Advance pointer to data; it is OK if it advances past $FFFF,
|
||||||
// one autostart technique does exactly this
|
// one autostart technique does exactly this
|
||||||
#if !HAS_OPCODES_65CE02
|
#if !HAS_OPCODES_65CE02
|
||||||
jsr lvs_advance_EAL
|
inc EAL+0
|
||||||
|
bne !+
|
||||||
|
inc EAL+1
|
||||||
|
!:
|
||||||
#else
|
#else
|
||||||
inw EAL+0
|
inw EAL+0
|
||||||
#endif
|
#endif
|
||||||
@@ -132,7 +135,7 @@ load_iec_loop:
|
|||||||
phx_trash_a
|
phx_trash_a
|
||||||
jsr udtim_keyboard
|
jsr udtim_keyboard
|
||||||
jsr STOP
|
jsr STOP
|
||||||
bcs load_break_error
|
bcs_far load_break_error
|
||||||
plx_trash_a
|
plx_trash_a
|
||||||
!:
|
!:
|
||||||
// Check for EOI - if so, this was the last byte
|
// Check for EOI - if so, this was the last byte
|
||||||
|
|||||||
@@ -75,19 +75,6 @@ lvs_handle_byte_verify:
|
|||||||
sec
|
sec
|
||||||
rts
|
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
|
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO || CONFIG_IEC
|
||||||
|
|
||||||
lvs_setup_MEMUSS:
|
lvs_setup_MEMUSS:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// this implementation sets the timer for twice the precision (timer B is triggered every 4 CPU cycles),
|
// 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.
|
// 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)
|
// - S vs M $72 (in our units of 4 ticks)
|
||||||
// - M vs L $98 (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
|
// Read the header
|
||||||
|
|
||||||
|
jsr tape_normal_get_marker // XXX handle result
|
||||||
jsr tape_normal_get_byte // XXX handle errors
|
jsr tape_normal_get_byte // XXX handle errors
|
||||||
sta (TAPE1), y
|
sta (TAPE1), y
|
||||||
iny
|
iny
|
||||||
@@ -94,6 +95,7 @@ load_tape_normal_header_loop:
|
|||||||
// XXX do not skip second header, use it to correct data
|
// XXX do not skip second header, use it to correct data
|
||||||
ldy #$15
|
ldy #$15
|
||||||
!:
|
!:
|
||||||
|
jsr tape_normal_get_marker
|
||||||
jsr tape_normal_get_byte
|
jsr tape_normal_get_byte
|
||||||
dey
|
dey
|
||||||
bne !-
|
bne !-
|
||||||
@@ -115,11 +117,16 @@ load_tape_normal_header_loop:
|
|||||||
|
|
||||||
load_tape_normal_payload:
|
load_tape_normal_payload:
|
||||||
|
|
||||||
|
jsr tape_normal_pilot
|
||||||
|
ldy #$09
|
||||||
|
jsr tape_normal_sync
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// XXX replace this placeholder with a real routine
|
// XXX replace this placeholder with a real routine
|
||||||
!:
|
!:
|
||||||
|
jsr tape_normal_get_marker
|
||||||
jsr tape_normal_get_byte
|
jsr tape_normal_get_byte
|
||||||
jmp !-
|
jmp !-
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ tape_normal_get_byte:
|
|||||||
lda #%01111111 // canary bit is 0
|
lda #%01111111 // canary bit is 0
|
||||||
sta INBIT
|
sta INBIT
|
||||||
|
|
||||||
jsr tape_normal_get_marker // XXX this is probablyy not the proper place
|
|
||||||
|
|
||||||
// Now fetch individual bits
|
// Now fetch individual bits
|
||||||
|
|
||||||
tape_normal_get_byte_loop:
|
tape_normal_get_byte_loop:
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ tape_normal_sync:
|
|||||||
|
|
||||||
// Injest bytes of decreasing values
|
// Injest bytes of decreasing values
|
||||||
|
|
||||||
|
jsr tape_normal_get_marker // XXX handle result
|
||||||
jsr tape_normal_get_byte
|
jsr tape_normal_get_byte
|
||||||
bcs tape_normal_sync_fail
|
bcs tape_normal_sync_fail
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user