From 0922b7993ce1d18de8fe975b17fd33cd3841ae9c Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 27 Aug 2004 23:55:16 +0000 Subject: Updates --- src/snap.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/snap.c') diff --git a/src/snap.c b/src/snap.c index bbc074b..08bd360 100644 --- a/src/snap.c +++ b/src/snap.c @@ -100,8 +100,13 @@ int TAPLoad(FILE *fp, Z80Byte id, Z80Word *addr, Z80Word *len, SNAP_Poke poke) Z80Word blen; Z80Byte type,b,csum,tape_csum; + b=0; + if (!fp) + { + Debug("No file to load!\n"); return FALSE; + } /* Get length (wrapping file if at eof) */ @@ -113,6 +118,8 @@ int TAPLoad(FILE *fp, Z80Byte id, Z80Word *addr, Z80Word *len, SNAP_Poke poke) blen=GetLSBWord(fp); } + Debug("blen=%u type=%u\n",id); + type=GetByte(fp); csum=id; @@ -120,6 +127,7 @@ int TAPLoad(FILE *fp, Z80Byte id, Z80Word *addr, Z80Word *len, SNAP_Poke poke) */ if (id==type) { + Debug("Matched type\n"); /* Knock of block type */ blen--; -- cgit v1.2.3