dos33: some more comments to clear up the last fix

needed to break out Beneath Apple DOS for this one

TSL_OFFSET_L/H says what offset in the file the first TSL entry
is representing. It's a 16-bit sector value.  Apparently not everything
uses this value.
This commit is contained in:
Vince Weaver 2022-06-09 17:59:21 -04:00
parent 08f870dd38
commit 72f8e5070f
2 changed files with 14 additions and 3 deletions

View File

@ -270,7 +270,11 @@ static int dos33_add_file(unsigned char *vtoc,
/* clear the t/s sector */
memset(ts_buffer,0,BYTES_PER_SECTOR);
/* set offset into file */
/* This field in the TSL descibes the file offset */
/* (in sectors from the beginning) that the first */
/* T/S entry represents */
/* We were setting this wrong for a while as I don't */
/* think DOS33 uses it, but apparently some programs do */
ts_buffer[TSL_OFFSET_H]=get_high_byte(i);
ts_buffer[TSL_OFFSET_L]=get_low_byte(i);

View File

@ -182,7 +182,14 @@ repeat_tsl:
data[0]|(data[1]<<8));
}
size_already=1;
printf("\n\tT/S List $%02X/$%02X:\n",ts_t,ts_s);
printf("\n\tT/S List at $%02X/$%02X\n",ts_t,ts_s);
}
if (i==0) {
printf("\tT/S offset (how far into file this list points) "
"$%04X sectors (%d bytes)\n",
(tslist[TSL_OFFSET_H]<<8)+tslist[TSL_OFFSET_L],
BYTES_PER_SECTOR*((tslist[TSL_OFFSET_H]<<8)+tslist[TSL_OFFSET_L]));
}
printf("\n\t\t%02X/%02X",track,sector);
@ -192,7 +199,7 @@ repeat_tsl:
ts_s=tslist[TSL_NEXT_SECTOR];
if (!((ts_s==0) && (ts_t==0))) {
printf("\n\tNext T/S List $%02X/$%02X:\n",ts_t,ts_s);
printf("\n\tNext T/S List at $%02X/$%02X\n",ts_t,ts_s);
goto repeat_tsl;
}