diff options
author | Ian C <ianc@noddybox.co.uk> | 2004-08-27 23:55:16 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2004-08-27 23:55:16 +0000 |
commit | 0922b7993ce1d18de8fe975b17fd33cd3841ae9c (patch) | |
tree | 429f1e7314a10bebd0634f87c3d25d58647e9c4f /src/snap.c | |
parent | b219c3580da55f3396a2d8df8301a777b783d833 (diff) |
Updates
Diffstat (limited to 'src/snap.c')
-rw-r--r-- | src/snap.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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--; |