more compatible tape buffer handling

This commit is contained in:
FeralChild64 committed 2019-12-24 21:46:17 +01:00
1 parent 8c8e18bb80
commit 1829ef94e7
3 files changed
+12 -5

No files matched your search

+4
View File
@@ -114,6 +114,10 @@
// Check that I/O configuration is correct // 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 #if CONFIG_IEC_JIFFYDOS && !CONFIG_IEC
.error "CONFIG_IEC_JIFFYDOS requires CONFIG_IEC" .error "CONFIG_IEC_JIFFYDOS requires CONFIG_IEC"
#endif #endif
+2 -1
View File
@@ -281,8 +281,9 @@
// $314 $334-$33B -- UNUSED -- free for user software // $314 $334-$33B -- UNUSED -- free for user software
#if !CONFIG_RS232_UP9600
.label TBUFFR = $33C // $33C-$3FB [!] tape buffer, our usage details differ .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 .label REVTAB = $37C // $37C-$3FB -- WIP -- [!] RS-232 precalculated data
#endif #endif
+6 -4
View File
@@ -37,7 +37,7 @@ load_tape_turbo_header:
// Read file header; structure described here: // Read file header; structure described here:
// - https://www.luigidifraia.com/c64/docs/tapeloaders.html#turbotape64 // - 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 - start address
// 2 bytes - end address + 1 // 2 bytes - end address + 1
// 1 byte - if $B0 (tape timing) contained at the time of saving // 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 // 16 bytes - filename, padded with 0x20
jsr tape_turbo_sync_header jsr tape_turbo_sync_header
ldy #$01 // to match original ROM header layout ldy #$00
sta (TAPE1), y // store header type
iny
// FALLTROUGH // FALLTROUGH
@@ -56,9 +58,9 @@ load_tape_turbo_header_loop:
iny iny
cpy #$05 cpy #$05
bne !+ 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 bne load_tape_turbo_header_loop
// Handle the header // Handle the header