sim_imd: clean up debug output.

This commit is contained in:
Howard M. Harte 2020-11-07 19:41:40 +00:00
parent c2059b0708
commit 78d6650acd
2 changed files with 10 additions and 19 deletions

View file

@ -1,9 +1,7 @@
/*************************************************************************
* *
* $Id: sim_imd.c 1999 2008-07-22 04:25:28Z hharte $ *
* *
* Copyright (c) 2007-2008 Howard M. Harte. *
* http://www.hartetec.com *
* Copyright (c) 2007-2020 Howard M. Harte. *
* https://github.com/hharte *
* *
* Permission is hereby granted, free of charge, to any person obtaining *
* a copy of this software and associated documentation files (the *
@ -36,9 +34,6 @@
* see: http://www.classiccmp.org/dunfield/img/index.htm *
* for details on the ImageDisk format and other utilities. *
* *
* Environment: *
* User mode only *
* *
*************************************************************************/
/* Change log:
@ -240,7 +235,7 @@ static t_stat diskParse(DISK_INFO *myDisk, uint32 isVerbose)
/* Now read each sector */
for(i=0;i<imd.nsects;i++) {
TotalSectorCount++;
sim_debug(myDisk->debugmask, myDisk->device, "Sector Phys: %d/Logical: %d: %d bytes: ", i, sectorMap[i], sectorSize);
sim_debug(myDisk->debugmask, myDisk->device, "Sector Phys: %2d/Logical: %2d: %4d bytes, offset: 0x%05x: ", i, sectorMap[i], sectorSize, ftell(myDisk->file));
sectRecordType = fgetc(myDisk->file);
/* AGN Logical head mapping */
myDisk->track[imd.cyl][imd.head].logicalHead[i] = sectorHeadMap[i];
@ -279,7 +274,7 @@ static t_stat diskParse(DISK_INFO *myDisk, uint32 isVerbose)
if (1) {
uint8 cdata = fgetc(myDisk->file);
sim_debug(myDisk->debugmask, myDisk->device, "Compressed Data = 0x%02x\n", cdata);
sim_debug(myDisk->debugmask, myDisk->device, "Compressed Data = 0x%02x", cdata);
}
}
else {
@ -296,15 +291,16 @@ static t_stat diskParse(DISK_INFO *myDisk, uint32 isVerbose)
}
myDisk->ntracks++;
} while (!feof(myDisk->file));
sim_debug(myDisk->debugmask, myDisk->device, "Processed %d sectors\n", TotalSectorCount);
for(i=0;i<myDisk->ntracks;i++) {
uint8 j;
sim_debug(myDisk->verbosedebugmask, myDisk->device, "Track %02d: ", i);
for(j=0;j<imd.nsects;j++) {
sim_debug(myDisk->verbosedebugmask, myDisk->device, "0x%06x ", myDisk->track[i][0].sectorOffsetMap[j]);
sim_debug(myDisk->verbosedebugmask, myDisk->device, "Track %3d: ", i);
for(j=0;j<myDisk->track[i >> 1][i & 1].nsects;j++) {
sim_debug(myDisk->verbosedebugmask, myDisk->device, "0x%05x ", myDisk->track[i >> 1][i & 1].sectorOffsetMap[j]);
}
sim_debug(myDisk->verbosedebugmask, myDisk->device, "\n");
}

View file

@ -1,9 +1,7 @@
/*************************************************************************
* *
* $Id: sim_imd.h 1987 2008-07-08 03:25:57Z hharte $ *
* *
* Copyright (c) 2007-2008 Howard M. Harte. *
* http://www.hartetec.com *
* Copyright (c) 2007-2020 Howard M. Harte. *
* https://github.com/hharte *
* *
* Permission is hereby granted, free of charge, to any person obtaining *
* a copy of this software and associated documentation files (the *
@ -36,9 +34,6 @@
* See: http://www.classiccmp.org/dunfield/img/index.htm *
* for details on the ImageDisk format and other utilities. *
* *
* Environment: *
* User mode only *
* *
*************************************************************************/
#ifndef SIM_IMD_H_