//
// sizePtr is optional
//
-uint8_t * ReadFile(const char * filename, uint32_t * sizePtr/*= NULL*/)
+uint8_t * ReadFile(const char * filename, uint32_t * sizePtr/*= NULL*/, uint32_t skip/*= 0*/)
{
FILE * fp = fopen(filename, "rb");
uint32_t size = ftell(fp);
fseek(fp, 0, SEEK_SET);
+ if (skip > 0)
+ {
+ fseek(fp, skip, SEEK_CUR);
+ size -= skip;
+ }
+
uint8_t * buffer = (uint8_t *)malloc(size);
fread(buffer, 1, size, fp);
fclose(fp);
else if (wozCRC == 0)
WriteLog("FILEIO: Warning--WOZ file has no CRC...\n");
-#if 0 // Need to fix this so it works with both 1 & 2 (works with only 1 ATM)
+#if 1
+ // Need to fix this so it works with both 1 & 2 (works with only 1 ATM)
WriteLog("Track map:\n");
WriteLog(" 1 1 1 1 1 1 1 1\n");
WriteLog("0.,.1.,.2.,.3.,.4.,.5.,.6.,.7.,.8.,.9.,.0.,.1.,.2.,.3.,.4.,.5.,.6.,.7.,.\n");
WriteLog("\n");
+#if 0
uint8_t numTracks = woz.trksSize / sizeof(WOZ1Track);
// N.B.: Need to check the track in tmap[] to have this tell the correct track... Right now, it doesn't
{
WriteLog("WOZ: Stream %u: %d bits (packed into %d bytes)\n", i, woz.track[i].bitCount, (woz.track[i].bitCount + 7) / 8);
}
+#endif
#endif
WriteLog("FILEIO: Well formed WOZ file found\n");