small tape reading improvements
This commit is contained in:
1 parent
0f843beda1
commit
9b2d01354b
5 files changed
+14
-18
No files matched your search
@@ -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