dynamically load based on reading bits

This commit is contained in:
Jorj Bauer 2020-06-27 22:40:14 -04:00
parent f66049ce8e
commit d655e9a1ba

View File

@ -204,10 +204,12 @@ bool Woz::skipByte(uint8_t datatrack)
uint8_t Woz::nextDiskBit(uint8_t datatrack)
{
if (!tracks[datatrack].trackData) {
fprintf(stderr, "ERROR: nextDiskBit was called without the track being cached, and it can't possibly know which QT to load it from\n");
return 0;
loadMissingTrackFromImage(datatrack);
}
if (!tracks[datatrack].trackData)
return 0;
static uint8_t head_window = 0;
head_window <<= 1;
head_window |= getNextWozBit(datatrack);