Quick experiment

The Gutenberg_Jr1_f1.dsk image wasn't recognized, so I fiddled with
the code a bit.  Still doesn't look quite right, and I don't really
know anything about Gutenberg disks, so I'm leaving the new version
disabled for the moment.
This commit is contained in:
Andy McFadden 2014-12-12 21:39:35 -08:00
parent 04087a94e8
commit 8e53955045
1 changed files with 22 additions and 0 deletions

View File

@ -70,6 +70,27 @@ static DIError TestImage(DiskImg* pImg, DiskImg::SectorOrder imageOrder,
dierr = kDIErrNone;
break; /* allow it if earlier stuff was okay */
}
#ifdef TRY_THIS
// This allowed Gutenberg_Jr_f1.dsk to be read, but it doesn't look
// quite right... leaving it alone for the moment.
if (catTrack == sctBuf[2] & 0x7f && catSect == sctBuf[3] & 0x7f) {
foundGood++;
if (sctBuf[0x0f] == 0x8d && sctBuf[0x1f] == 0x8d &&
sctBuf[0x2f] == 0x8d && sctBuf[0x3f] == 0x8d &&
sctBuf[0x4f] == 0x8d && sctBuf[0x5f] == 0x8d &&
sctBuf[0x6f] == 0x8d && sctBuf[0x7f] == 0x8d &&
sctBuf[0x8f] == 0x8d && sctBuf[0x9f] == 0x8d)
{
foundGood++;
}
}
catTrack = sctBuf[0x04];
catSect = sctBuf[0x05];
if ((catTrack & 0x80) != 0) {
// full circle
break;
}
#else
if (catTrack == sctBuf[0] && catSect == sctBuf[1]) {
foundGood++;
if (sctBuf[0x0f] == 0x8d && sctBuf[0x1f] == 0x8d &&
@ -86,6 +107,7 @@ static DIError TestImage(DiskImg* pImg, DiskImg::SectorOrder imageOrder,
}
catTrack = sctBuf[0x04];
catSect = sctBuf[0x05];
#endif
iterations++; // watch for infinite loops
}
if (iterations >= DiskFSGutenberg::kMaxCatalogSectors) {