diff --git a/c64/aliases/,aliases_config.s b/c64/aliases/,aliases_config.s index e07297f0..04313aef 100644 --- a/c64/aliases/,aliases_config.s +++ b/c64/aliases/,aliases_config.s @@ -114,6 +114,10 @@ // Check that I/O configuration is correct { +#if CONFIG_RS232_UP9600 && (CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO) + .error "CONFIG_RS232_UP9600 is not compatible with CONFIG_TAPE_*" +#endif + #if CONFIG_IEC_JIFFYDOS && !CONFIG_IEC .error "CONFIG_IEC_JIFFYDOS requires CONFIG_IEC" #endif diff --git a/c64/aliases/,aliases_ram_lowmem.s b/c64/aliases/,aliases_ram_lowmem.s index 6e377781..62f76618 100644 --- a/c64/aliases/,aliases_ram_lowmem.s +++ b/c64/aliases/,aliases_ram_lowmem.s @@ -281,8 +281,9 @@ // $314 $334-$33B -- UNUSED -- free for user software +#if !CONFIG_RS232_UP9600 .label TBUFFR = $33C // $33C-$3FB [!] tape buffer, our usage details differ -#if CONFIG_RS232_UP9600 +#else .label REVTAB = $37C // $37C-$3FB -- WIP -- [!] RS-232 precalculated data #endif diff --git a/c64/kernal/tape/load_tape_turbo.s b/c64/kernal/tape/load_tape_turbo.s index 4825509b..643a0244 100644 --- a/c64/kernal/tape/load_tape_turbo.s +++ b/c64/kernal/tape/load_tape_turbo.s @@ -37,7 +37,7 @@ load_tape_turbo_header: // Read file header; structure described here: // - https://www.luigidifraia.com/c64/docs/tapeloaders.html#turbotape64 // - // 1 byte (skipped) - file type (0 = data, odd value = relocatable, even value = non-relocatable) + // 1 byte - file type (0 = data, odd value = relocatable, even value = non-relocatable) // 2 bytes - start address // 2 bytes - end address + 1 // 1 byte - if $B0 (tape timing) contained at the time of saving @@ -45,7 +45,9 @@ load_tape_turbo_header: // 16 bytes - filename, padded with 0x20 jsr tape_turbo_sync_header - ldy #$01 // to match original ROM header layout + ldy #$00 + sta (TAPE1), y // store header type + iny // FALLTROUGH @@ -56,9 +58,9 @@ load_tape_turbo_header_loop: iny cpy #$05 bne !+ - jsr tape_turbo_get_byte // tape timing - skip this XXX how to use it? + jsr tape_turbo_get_byte // tape timing - skip this one !: - cpy #$15 + cpy #$C0 // header is 192 bytes long in total bne load_tape_turbo_header_loop // Handle the header