From c257263f3b0e22be70f537264ea33af107c8547a Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 10 Jan 2023 19:16:39 +0000 Subject: Futher tweaks to tape loading. Still failing on bad TAP files. --- source/snap.c | 6 +++--- source/spec.c | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/snap.c b/source/snap.c index 789d7d5..6c9e502 100644 --- a/source/snap.c +++ b/source/snap.c @@ -121,7 +121,7 @@ int TAPLoad(Z80Byte id, Z80Word *addr, Z80Word *len, SNAP_Poke poke) */ if (id == type) { - /* Knock of block type + /* Knock off block type */ blen--; @@ -140,8 +140,8 @@ int TAPLoad(Z80Byte id, Z80Word *addr, Z80Word *len, SNAP_Poke poke) blen--; } - SPEC_DEBUG("Finished block. Remaining blen=%u len=%u\n", - (unsigned)blen, (unsigned)*len); + SPEC_DEBUG("Finished block. Remaining blen=%u len=%u addr=%u\n", + (unsigned)blen, (unsigned)*len, (unsigned)*addr); /* Get the checksum. If the length was correct there should be just byte left in blen, but decrement it in a loop to skip to the end. diff --git a/source/spec.c b/source/spec.c index 596acd7..c2b4a87 100644 --- a/source/spec.c +++ b/source/spec.c @@ -359,12 +359,10 @@ static int EDCallback(Z80 *z80, Z80Val data) SPECWriteMemSNAP)) { z80->AF.b.lo |= eZ80_Carry; - z80->BC.w=0xb001; } else { z80->AF.b.lo &= ~eZ80_Carry; - z80->BC.w = 0xff01; } break; -- cgit v1.2.3