1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

sim_imd: Properly calculate IMD sectsize.

The ImageDisk sectsize field was incorrectly set to the number of
bytes in the sector, when it should be an index as follows:

00 =  128 bytes/sector
01 =  256 bytes/sector
02 =  512 bytes/sector
03 = 1024 bytes/sector
04 = 2048 bytes/sector
05 = 4096 bytes/sector
06 = 8192 bytes/sector

Tested disk formatting on MS-DOS 1.25, Cromemco CP/M 2.2,
Cromemco CDOS, OASIS 5.6.
This commit is contained in:
Howard M. Harte
2020-12-13 15:26:04 -08:00
parent 898d7cbdbb
commit 313d71b73e
2 changed files with 19 additions and 3 deletions

View File

@@ -86,6 +86,8 @@ typedef struct {
#define IMD_MODE_300K_MFM 4
#define IMD_MODE_250K_MFM 5
#define IMD_MAX_SECTSIZE 6
#define IMD_MODE_FM(x) (x <= IMD_MODE_250K_FM)
#define IMD_MODE_MFM(x) (x >= IMD_MODE_500K_MFM)