|
|
| version 1.8, 2004/03/04 15:20:13 | version 1.9, 2004/03/19 00:30:00 |
|---|---|
| Line 116 void newdisk_nhd(const char *fname, UINT | Line 116 void newdisk_nhd(const char *fname, UINT |
| ZeroMemory(&nhd, sizeof(nhd)); | ZeroMemory(&nhd, sizeof(nhd)); |
| CopyMemory(&nhd.sig, sig_nhd, 15); | CopyMemory(&nhd.sig, sig_nhd, 15); |
| STOREINTELDWORD(nhd.headersize, sizeof(nhd)); | STOREINTELDWORD(nhd.headersize, sizeof(nhd)); |
| size = hddsize * 16; | size = hddsize * 15; |
| STOREINTELDWORD(nhd.cylinders, size); | STOREINTELDWORD(nhd.cylinders, size); |
| STOREINTELWORD(nhd.surfaces, 8); | STOREINTELWORD(nhd.surfaces, 8); |
| #if 0 | STOREINTELWORD(nhd.sectors, 17); |
| STOREINTELWORD(nhd.sectors, 32); | |
| STOREINTELWORD(nhd.sectorsize, 256); | |
| #else | |
| STOREINTELWORD(nhd.sectors, 16); | |
| STOREINTELWORD(nhd.sectorsize, 512); | STOREINTELWORD(nhd.sectorsize, 512); |
| #endif | |
| r = (file_write(fh, &nhd, sizeof(nhd)) != sizeof(nhd)); | r = (file_write(fh, &nhd, sizeof(nhd)) != sizeof(nhd)); |
| r |= writehddipl(fh, 256, size * 8 * 32 * 256); | r |= writehddipl(fh, 512, size * 8 * 17 * 512); |
| file_close(fh); | file_close(fh); |
| if (r) { | if (r) { |
| file_delete(fname); | file_delete(fname); |