diff --git a/c64/kernal/iec/load_iec.s b/c64/kernal/iec/load_iec.s index f609c035..3c4d2b09 100644 --- a/c64/kernal/iec/load_iec.s +++ b/c64/kernal/iec/load_iec.s @@ -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 diff --git a/c64/kernal/iostack/load_save_common.s b/c64/kernal/iostack/load_save_common.s index fb38606c..9aa7ed97 100644 --- a/c64/kernal/iostack/load_save_common.s +++ b/c64/kernal/iostack/load_save_common.s @@ -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: diff --git a/c64/kernal/tape/load_tape_normal.s b/c64/kernal/tape/load_tape_normal.s index 05b905b4..b3a51172 100644 --- a/c64/kernal/tape/load_tape_normal.s +++ b/c64/kernal/tape/load_tape_normal.s @@ -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 !- diff --git a/c64/kernal/tape/tape_normal_get_byte.s b/c64/kernal/tape/tape_normal_get_byte.s index c0b8e79a..1fbae18e 100644 --- a/c64/kernal/tape/tape_normal_get_byte.s +++ b/c64/kernal/tape/tape_normal_get_byte.s @@ -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: diff --git a/c64/kernal/tape/tape_normal_sync.s b/c64/kernal/tape/tape_normal_sync.s index 0e1716ed..7969f958 100644 --- a/c64/kernal/tape/tape_normal_sync.s +++ b/c64/kernal/tape/tape_normal_sync.s @@ -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