diff --git a/utils/dos33fs-utils/dos33.c b/utils/dos33fs-utils/dos33.c index 40aa15cb..b2fa6039 100644 --- a/utils/dos33fs-utils/dos33.c +++ b/utils/dos33fs-utils/dos33.c @@ -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); diff --git a/utils/dos33fs-utils/dos33_dump.c b/utils/dos33fs-utils/dos33_dump.c index da03f454..6a1d35eb 100644 --- a/utils/dos33fs-utils/dos33_dump.c +++ b/utils/dos33fs-utils/dos33_dump.c @@ -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; }