--- np2/fdd/newdisk.c 2004/03/04 15:20:13 1.8 +++ np2/fdd/newdisk.c 2005/02/07 14:46:09 1.10 @@ -29,7 +29,7 @@ void newdisk_fdd(const char *fname, REG8 static BOOL writezero(FILEH fh, UINT size) { - BYTE work[256]; + UINT8 work[256]; UINT wsize; ZeroMemory(work, sizeof(work)); @@ -45,7 +45,7 @@ static BOOL writezero(FILEH fh, UINT siz static BOOL writehddipl(FILEH fh, UINT ssize, UINT32 tsize) { - BYTE work[1024]; + UINT8 work[1024]; UINT size; ZeroMemory(work, sizeof(work)); @@ -74,7 +74,7 @@ static BOOL writehddipl(FILEH fh, UINT s void newdisk_thd(const char *fname, UINT hddsize) { FILEH fh; - BYTE work[256]; + UINT8 work[256]; UINT size; BOOL r; @@ -116,18 +116,13 @@ void newdisk_nhd(const char *fname, UINT ZeroMemory(&nhd, sizeof(nhd)); CopyMemory(&nhd.sig, sig_nhd, 15); STOREINTELDWORD(nhd.headersize, sizeof(nhd)); - size = hddsize * 16; + size = hddsize * 15; STOREINTELDWORD(nhd.cylinders, size); STOREINTELWORD(nhd.surfaces, 8); -#if 0 - STOREINTELWORD(nhd.sectors, 32); - STOREINTELWORD(nhd.sectorsize, 256); -#else - STOREINTELWORD(nhd.sectors, 16); + STOREINTELWORD(nhd.sectors, 17); STOREINTELWORD(nhd.sectorsize, 512); -#endif 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); if (r) { file_delete(fname);