mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-08 15:29:41 +00:00
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:
parent
08f870dd38
commit
72f8e5070f
|
@ -270,7 +270,11 @@ static int dos33_add_file(unsigned char *vtoc,
|
||||||
/* clear the t/s sector */
|
/* clear the t/s sector */
|
||||||
memset(ts_buffer,0,BYTES_PER_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_H]=get_high_byte(i);
|
||||||
ts_buffer[TSL_OFFSET_L]=get_low_byte(i);
|
ts_buffer[TSL_OFFSET_L]=get_low_byte(i);
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,14 @@ repeat_tsl:
|
||||||
data[0]|(data[1]<<8));
|
data[0]|(data[1]<<8));
|
||||||
}
|
}
|
||||||
size_already=1;
|
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);
|
printf("\n\t\t%02X/%02X",track,sector);
|
||||||
|
@ -192,7 +199,7 @@ repeat_tsl:
|
||||||
ts_s=tslist[TSL_NEXT_SECTOR];
|
ts_s=tslist[TSL_NEXT_SECTOR];
|
||||||
|
|
||||||
if (!((ts_s==0) && (ts_t==0))) {
|
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;
|
goto repeat_tsl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user