summaryrefslogtreecommitdiff
path: root/src/snap.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2004-08-27 23:55:16 +0000
committerIan C <ianc@noddybox.co.uk>2004-08-27 23:55:16 +0000
commit0922b7993ce1d18de8fe975b17fd33cd3841ae9c (patch)
tree429f1e7314a10bebd0634f87c3d25d58647e9c4f /src/snap.c
parentb219c3580da55f3396a2d8df8301a777b783d833 (diff)
Updates
Diffstat (limited to 'src/snap.c')
-rw-r--r--src/snap.c8
1 files changed, 8 insertions, 0 deletions
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--;