• Please review our updated Terms and Rules here

Converting a double sided raw image to imd?

AndersG

Experienced Member
Joined
Jan 18, 2017
Messages
57
Location
N60 E20
hi!

Whatever I do, the resulting image ends up single sided. I have a DSDD RAW image file with two sides, 40 tracks and 9x512 byte sectors and run the following command:

dsktrans -itype raw -otype imd -format bbii9512 ddboot1.raw ddboot1.imd

The resultng image is single-sided :(

.libdskrc:
[bbii9512]
description = BB2 - DSSD 48 tpi 5.25" - 512 x 9
cylinders = 40
heads = 2
secsize = 512
sectors = 9
secbase = 1
datarate = DD

diskdefs:
diskdef bbii9512
seclen 512
tracks 80
sectrk 9
blocksize 1024
maxdir 32
skew 5
boottrk 3
os 2.2
libdsk:format bbii9512
end
 
I think your number of tracks is incorrect for the libdsk definition:

.libdskrc:
[bbii9512]
description = BB2 - DSSD 48 tpi 5.25" - 512 x 9
cylinders = 80
heads = 2
secsize = 512
sectors = 9
secbase = 1
datarate = DD

and depending on how the tracks are arranged, you may need one of:

sides = outback
sides = alt
sides = outout

ie.
SIDES_ALT, /* Track n is cylinder C C0H0,C0H1,C1H0,C1H1,......*/
SIDES_OUTBACK, /* Tracks go (head 0) 0,1,2,3,...37,38,39, then
(head 1) 39,38,37,...,2,1,0 */
SIDES_OUTOUT, /* Tracks go (head 0) 0,1,2,3,...37,38,39, then
(head 1) 0,1,2,3,...37,38,39 */


Larry
 
Last edited:
@Stone
My box with the floppydrive is a DOS box where I run IMD. I cannot restore a RAW image there, right? The linux box where I run cpmtools etc is a VM and has no floppy.

@Larry
In the raw image, I had side one first, tracks 0..39, then side 2, tracks 0..39. I guess I find the interaction between .libdskrc and diskdefs somewhat confusing and somewhat poorly documented. Your post cleared it up somewhat.

Meanwhile, I did do some more testing, using just a SS image yesterday and even there, something is amiss. Ie the image works fine with cpmtools, but has the directory all messed up on the physical machine. Will do some more testing using the monitor commands tonight. To see what goes where, right now, the sectors for the directory seem to end up in the wrong places...

Working from an empty IMD file, created with my utility was no problem though. Ie I used an 1:1 interleave for simplicity, then used IMDU to change the interleave to 1:5. Boots somewhat faster, as expected. So it is the conversion from RAW to IMD that fails.

The BIOS has a skew of 5, DEFB 01,06,11,16, But then:

371: 4CED DDSTUFF:
372: 4CED 0000 DEFW 0 ;NO SECTOR SKEW TABLE

Am I to understand that DD does not use any skew?

I guess I am a bit confused about skew. Ie I know how and why, but I was not aware that there was such a thing as software skew. I always thought that skew (interleave) was of the hardware variety, ie that sectors were skewed, but only on disk, so that when the computer asked for sector 3, it got sector 3, even if the actual sectors on the platter were not in consecutive order.



BBII auto param routine:
Code:
  92:	4BB5          	PARAMS:
  93:	0000          		IF	WINCH
  99:				ENDIF
 100:	4BB5  AF      		XOR	A		;SET SECTOR# TO ZERO TO INDICATE
 101:	4BB6  3253FD  		LD	(HSTSEC),A	; EXPLORATORY READ OPERATION
 102:	4BB9  3E01    	PARM1:	LD	A,SIDSEL+OFF
 103:	4BBB  D3C8    		OUT	(PORT0),A	;MAKE SURE SIDE #0 OF DISK IS SELECTED
 104:	4BBD  3A50FD  		LD	A,(DISK)
 105:	4BC0  3256FD  		LD	(HSTDSK),A	;STORE UNIT# IN CASE OF ERROR
 106:	4BC3  4F      		LD	C,A
 107:	4BC4  CD1BF0  		CALL	MONITR+27	;SELECT NEW DISK DRIVE
 108:	4BC7          		JR	NZ,PARM2
V Value error
 109:	4BC7  3A4EFD  		LD	A,(TRACK)
 110:	4BCA  3254FD  		LD	(HSTTRK),A	;STORE TRACK# IN CASE OF ERROR
 111:	4BCD  4F      		LD	C,A
 112:	4BCE  CD21F0  		CALL	MONITR+33	;SEEK SPECIFIED TEST TRACK
 113:	4BD1          		JR	NZ,PARM2
V Value error
 114:	4BD1  2168FD  		LD	HL,IDBUFF
 115:	4BD4  CD2AF0  		CALL	MONITR+42	;READ AN ID MARK FROM TEST TRACK
 116:	4BD7          		JR	Z,PARM3
V Value error
 117:			
 118:	4BD7  CDB6EE  	PARM2:	CALL	REPORT		;DISPLAY ERROR AND ALLOW RECOVERY
 119:	4BDA          		JR	Z,PARM1		;TRY AGAIN IF NOT ABORTED
V Value error
 120:	4BDA  210000  		LD	HL,0
 121:	4BDD  C9      		RET			;ELSE RETURN PERM SELECT ERROR
 122:			;
 123:			;	ARRIVE HERE AFTER SUCCESSFULLY READING AN ID RECORD
 124:			;
 125:	4BDE  21C6EC  	PARM3:	LD	HL,SDSTUFF
 126:	4BE1  2266FD  		LD	(PRMPTR),HL	;FIRST SELECT SINGLE DENSITY PARAMETERS
 127:	4BE4  3A6EFD  		LD	A,(IDBUFF+6)
 128:	4BE7  CB47    		BIT	0,A		;TEST DENSITY BYTE RETURNED BY READID
 129:	4BE9  CA73EC  		JP	Z,PARM10	;JUMP IF SINGLE DENSITY
 130:			
 131:	4BEC  21FDEC  		LD	HL,DDSTUFF
 132:	4BEF  2266FD  		LD	(PRMPTR),HL	;USE DUAL DENSITY DISK PARAMETERS
 133:	4BF2  212500  		LD	HL,NTRAKS-RESERV
 134:	4BF5  E5      		PUSH	HL		;PUT TRACKS-PER-DISK PARAM ONTO STACK
 135:	0001          		IF	DOUBLE
 136:	4BF6  3E09    		LD	A,SIDSEL+ON
 137:	4BF8  D3C8    		OUT	(PORT0),A	;SELECT TOP SIDE OF DISK
 138:	4BFA  2170FD  		LD	HL,IDTOP
 139:	4BFD  CD2AF0  		CALL	MONITR+42	;ELSE READ AN ID MARK FROM TOP SIDE
 140:	4C00          		JR	NZ,PARM3A	;JUMP IF NOT FORMATTED ON SECOND SIDE
V Value error
 141:	4C00  2168FD  		LD	HL,IDBUFF
 142:	4C03  1170FD  		LD	DE,IDTOP	;ELSE COMPARE ID FIELDS TO EACH OTHER
 143:	4C06  CDC1EC  		CALL	EXOR1
 144:	4C09          		JR	NZ,PARM3A	;JUMP IF TRACK NUMBERS NOT IDENTICAL
V Value error
 145:	4C09  CDC1EC  		CALL	EXOR1
 146:	4C0C  FE01    		CP	1
 147:	4C0E          		JR	NZ,PARM3A	;JUMP IF SIDE NUMBERS NOT COMPLIMENTARY
V Value error
 148:	4C0E  CDBFEC  		CALL	EXOR2
 149:	4C11          		JR	NZ,PARM3A	;JUMP IF SECTOR LENGTHS NOT IDENTICAL
V Value error
 150:	4C11  CDBDEC  		CALL	EXOR3
 151:	4C14          		JR	NZ,PARM3A	;JUMP IF DENSITIES NOT IDENTICAL
V Value error
 152:			
 153:	4C14  214D00  		LD	HL,2*NTRAKS-RESERV
 154:	4C17  E3      		EX	(SP),HL		;REPLACE DOUBLE SIDED #TRACKS ON STACK
 155:	4C18  3E01    	PARM3A:	LD	A,SIDSEL+OFF
 156:	4C1A  D3C8    		OUT	(PORT0),A	;SWITCH BACK TO REGULAR SIDE OF DISK
 157:				ENDIF
 158:	4C1C  3A6BFD  		LD	A,(IDBUFF+3)	;GET SECTOR LENGTH BYTE FROM ID RECORD
 159:	4C1F  E603    		AND	00000011B
 160:	4C21  320EED  		LD	(DDSTUFF+17),A	;STORE AS DEBLOCK MASK IN 'DDSTUFF'
 161:	4C24  2600    		LD	H,0
 162:	4C26  6F      		LD	L,A
 163:	4C27  29      		ADD	HL,HL
 164:	4C28  29      		ADD	HL,HL		;MULTIPLY LENGTH CODE BY 4 FOR INDEXING
 165:	4C29  01EDEC  		LD	BC,FRMTAB
 166:	4C2C  09      		ADD	HL,BC		;ADD BASE ADDRESS OF FORMAT POOP TABLE
 167:	4C2D  110FED  		LD	DE,DDSTUFF+18
 168:	4C30  010300  		LD	BC,3
 169:	4C33  EDB0    		LDIR			;STORE FORMAT PARAMS IN 'DDSTUFF'
 170:			
 171:	4C35  3C      		INC	A
 172:	4C36  47      		LD	B,A		;B=SECTOR LENGTH CODE+1 (RANGE 1..4)
 173:	4C37  3A69FD  		LD	A,(IDBUFF+1)	;GET SIDE# BYTE FROM ID RECORD
 174:	4C3A  CB3F    		SRL	A		;SHIFT OUT SIDE# BIT IN LSB
 175:	4C3C          		JR	NZ,PARM5	;JUMP IF UPPER 7 BITS ARE NON-ZERO
V Value error
 176:	4C3C  7E      		LD	A,(HL)		;ELSE USE STANDARD VALUE FOR 'SPT'
 177:	4C3D          		JR	PARM6		; FOUND IN PARAMETER TABLE
V Value error
 178:			;
 179:	4C3D  87      	PARM4:	ADD	A,A		;MULTIPLY PHYSICAL SPT BY 2,4 OR 8 TO
 180:	4C3E          	PARM5:	DJNZ	PARM4		; TO GET EQUIVALENT 128 BYTE SECTORS
V Value error
 181:	4C3E  32FFEC  	PARM6:	LD	(DDSTUFF+2),A	;STORE LOGICAL SPT CONST IN 'DDSTUFF'
 182:			
 183:	4C41  D1      		POP	DE		;POP TRACKS-PER-DISK PARAM OFF STACK
 184:	4C42  210000  		LD	HL,0
 185:	4C45  47      		LD	B,A		;PREPARE TO COMPUTE 'DRM' VALUE FOR DPB
 186:	4C46  19      	PARM7:	ADD	HL,DE
 187:	4C47          		DJNZ	PARM7		;GET PRODUCT OF SPT*(NTRAKS-RESERV)
V Value error
 188:	4C47  3A01ED  		LD	A,(DDSTUFF+4)
 189:	4C4A  47      		LD	B,A
 190:	4C4B  CB3C    	PARM8:	SRL	H		;DIVIDE TOTAL SECTORS BY 'BSH' TO GET
 191:	4C4D  CB1D    		RR	L		; NUMBER OF BLOCKS ON DISK
 192:	4C4F          		DJNZ	PARM8
V Value error
 193:	4C4F  2B      		DEC	HL		;RESULT LESS 1 IS 'DSM' VALUE FOR DPB
 194:	4C50  2204ED  		LD	(DDSTUFF+7),HL
 195:			
 196:	4C53  3A02ED  		LD	A,(DDSTUFF+5)	;GET BLOCK MASK FROM DPB
 197:	4C56  CB3F    		SRL	A
 198:	4C58  CB3F    		SRL	A
 199:	4C5A  CB3F    		SRL	A		;SHIFT RIGHT 3 TIMES GIVES EXTENT MASK
 200:	4C5C  24      		INC	H
 201:	4C5D  25      		DEC	H		;TEST IF 'DSM' IS > 255
 202:	4C5E          		JR	Z,PARM9
V Value error
 203:	4C5E  CB3F    		SRL	A
 204:	4C60  3203ED  	PARM9:	LD	(DDSTUFF+6),A	;STORE VALUE FOR 'EXM'
 205:			
 206:	4C63  2A66FD  	PARM10:	LD	HL,(PRMPTR)
 207:	4C66  ED5B64FD		LD	DE,(DPHPTR)
 208:	4C6A  D5      		PUSH	DE
 209:	4C6B  D5      		PUSH	DE
 210:	4C6C  D5      		PUSH	DE		;SAVE 3 COPIES OF POINTER TO DISK POOP
 211:	4C6D  010200  		LD	BC,2
 212:	4C70  EDB0    		LDIR			;COPY 'XLT' ADDRESS TO START OF DPH
 213:	4C72  EB      		EX	DE,HL
 214:	4C73  010E00  		LD	BC,14
 215:	4C76  09      		ADD	HL,BC		;POINT TO REST OF DPB STUFF NOW
 216:	4C77  EB      		EX	DE,HL
 217:	4C78  011300  		LD	BC,15+4
 218:	4C7B  EDB0    		LDIR			;COPY DPB AND DEBLOCK PARAMETERS
 219:	4C7D  DDE1    		POP	IX		;POINT IX TO BASE OF DISK STORAGE AREAS
 220:	4C7F  2180F8  		LD	HL,DIRBUF	;GET ADDRESS OF DIRECTORY BUFFER
 221:	4C82  DD7508  		LD	(IX+8),L
 222:	4C85  DD7409  		LD	(IX+9),H	;STORE IN 'DIR' POINTER SLOT
 223:	4C88  E1      		POP	HL
 224:	4C89  111000  		LD	DE,16
 225:	4C8C  19      		ADD	HL,DE		;COMPUTE ADDRESS OF DISK PARM BLOCK
 226:	4C8D  DD750A  		LD	(IX+10),L
 227:	4C90  DD740B  		LD	(IX+11),H	;STORE IN 'DPB' POINTER SLOT
 228:	4C93  111400  		LD	DE,15+4+1
 229:	4C96  19      		ADD	HL,DE		;COMPUTE ADDRESS OF CHECK VECTOR
 230:	4C97  DD750C  		LD	(IX+12),L
 231:	4C9A  DD740D  		LD	(IX+13),H	;STORE IN 'CKV' POINTER SLOT
 232:	4C9D  DD5E1B  		LD	E,(IX+16+11)
 233:	4CA0  DD561C  		LD	D,(IX+16+12)	;LOAD DE WITH CHECK VECTOR LENGTH
 234:	4CA3  19      		ADD	HL,DE		;COMPUTE ADDRESS OF ALLOCATION VECTOR
 235:	4CA4  DD750E  		LD	(IX+14),L
 236:	4CA7  DD740F  		LD	(IX+15),H	;STORE IN 'ALV' POINTER SLOT
 237:	4CAA  E1      		POP	HL
 238:	4CAB  AF      		XOR	A		;A=0 TO INDICATE PARAMS FOUND OK
 239:	4CAC  C9      		RET			;RETURN WITH DPH POINTER IN HL
 240:			;
 241:			;
 242:			;
 243:	4CAD  23      	EXOR3:	INC	HL
 244:	4CAE  13      		INC	DE
 245:	4CAF  23      	EXOR2:	INC	HL
 246:	4CB0  13      		INC	DE
 247:	4CB1  1A      	EXOR1:	LD	A,(DE)
 248:	4CB2  AE      		XOR	(HL)		;COMPARE ID FIELD BYTES @HL AND @DE
 249:	4CB3  23      		INC	HL
 250:	4CB4  13      		INC	DE
 251:	4CB5  C9      		RET
 252:			;
 254:			;
 255:	0000          		IF	EIGHT
 308:				ENDIF
 309:			;
 310:			;
 311:	0001          		IF	FIVE
 312:			;
 313:			;	DISK PARAMS FOR STANDARD SINGLE DENSITY FORMAT
 314:			;	18 SECTORS / 128 BYTES
 315:			;
 316:	4CB6          	SDSTUFF:
 317:	4CB6  DBEC    		DEFW	XLTAB		;1-IN-5 SECTOR SKEW TABLE
 318:			
 319:	4CB8  1200    		DEFW	NSECTS		;SECTORS PER TRACK
 320:	4CBA  03      		DEFB	3		;BLOCK SHIFT
 321:	4CBB  07      		DEFB	00000111B	;BLOCK MASK
 322:	4CBC  00      		DEFB	00000000B	;EXTENT MASK
 323:	4CBD  5100    		DEFW	81		;MAX BLOCK#
 324:	4CBF  1F00    		DEFW	31		;MAX DIRECTORY ENTRY#
 325:	4CC1  80      		DEFB	10000000B	;ALLOCATION MASK MSB
 326:	4CC2  00      		DEFB	00000000B	;'	       ' LSB
 327:	4CC3  0800    		DEFW	8		;CHECK SIZE
 328:	4CC5  0300    		DEFW	RESERV		;RESERVED TRACKS
 329:			
 330:	4CC7  00      		DEFB	0		;DEBLOCK SHIFT COUNT
 331:	4CC8  00      		DEFB	00000000B	;DEBLOCK MASK
 332:	4CC9  8000    		DEFW	128		;BYTES PER SECTOR
 333:			;
 334:			;
 335:			;	5 INCH SECTOR TRANSLATE TABLE (SAME AS XEROX/CROMEMCO/OSBORNE)
 336:			;
 337:	4CCB          	XLTAB:
 338:	4CCB  01060B10		DEFB	01,06,11,16
 339:	4CCF  03080D12		DEFB	03,08,13,18
 340:	4CD3  050A0F  		DEFB	05,10,15
 341:	4CD6  02070C11		DEFB	02,07,12,17
 342:	4CDA  04090E  		DEFB	04,09,14
 343:			;
 344:			;
 345:			;	SECTOR DEBLOCK PARAMS FOR 5 INCH DOUBLE DENSITY DISKS
 346:			;
 347:	4CDD          	FRMTAB:
 348:	4CDD  00      		DEFB	00000000B	;DEBLOCK MASK
 349:	4CDE  8000    		DEFW	128		;PHYSICAL SECTOR LENGTH
 350:	4CE0  1C      		DEFB	28		;LOGICAL SECTORS PER TRACK
 351:			
 352:	4CE1  01      		DEFB	00000001B
 353:	4CE2  0001    		DEFW	256
 354:	4CE4  24      		DEFB	18*2
 355:			
 356:	4CE5  03      		DEFB	00000011B
 357:	4CE6  0002    		DEFW	512
 358:	4CE8  24      		DEFB	9*4
 359:			
 360:	4CE9  07      		DEFB	00000111B
 361:	4CEA  0004    		DEFW	1024
 362:	4CEC  28      		DEFB	5*8
 363:			
 364:				ENDIF
 365:			;
 366:			;
 367:			;	BASIC DISK PARAMS FOR DOUBLE DENSITY FORMATS
 368:			;
 369:	4CED          		DPBGEN	BLS,DIRSIZ	;GENERATE BSH/BLM/DIRMSK CONSTS
 369:	4CED          		.xlist			; directory size (in directory entries)
M Mult. def. error
 369:	4CED          		rept	16
F Syntax error
M Mult. def. error
 370:			;
 371:	4CED          	DDSTUFF:
 372:	4CED  0000    		DEFW	0		;NO SECTOR SKEW TABLE
 373:			
 374:	4CEF  0000    		DEFW	0		;SECTORS PER TRACK (DUMMY)
 375:	4CF1  01      		DEFB	BSHFT		;BLOCK SHIFT
 376:	4CF2  01      		DEFB	BMASK		;BLOCK MASK
 377:	4CF3  00      		DEFB	0		;EXTENT MASK (DUMMY)
 378:	4CF4  0000    		DEFW	0		;MAX BLOCK# (DUMMY)
 379:	4CF6  3F00    		DEFW	DIRSIZ-1	;MAX DIRECTORY ENTRY#
 380:	4CF8  80      		DEFB	HIGH DIRMSK	;ALLOCATION MASK MSB
 381:	4CF9  00      		DEFB	LOW DIRMSK	;ALLOCATION MASK LSB
 382:	4CFA  1000    		DEFW	DIRSIZ/4	;CHECK VECTOR SIZE
 383:	4CFC  0300    		DEFW	RESERV		;RESERVED TRACKS
 384:			
 385:	4CFE  00      		DEFB	0		;DEBLOCK SHIFT COUNT (DUMMY)
 386:	4CFF  00      		DEFB	0		;DEBLOCK MASK (DUMMY)
 387:	4D00  0000    		DEFW	0		;BYTES PER SECTOR (DUMMY)
 
Anders,
5 INCH SECTOR TRANSLATE TABLE (SAME AS XEROX/CROMEMCO/OSBORNE)

The Cromeco Definitions are:

# CRO1 Cromemco CDOS - SSSD 48 tpi 5.25" - 128 x 18
diskdef cro1
seclen 128
tracks 40
sectrk 18
blocksize 1024
maxdir 64 # Xer2 has this as 32
skew 5
boottrk 3
os 2.2
end

# libdsk data below
[cro1]
description = CRO1 Cromemco CDOS - SSSD 48 tpi 5.25" - 128 x 18
cylinders = 40
heads = 1
secsize = 128
sectors = 18
secbase = 1
datarate = SD


# CRO2 Cromemco CDOS - DSSD 48 tpi 5.25" - 128 x 18
diskdef cro2
seclen 128
tracks 80
sectrk 18
blocksize 1024
maxdir 64
skew 5
boottrk 3
os 2.2
end

# libdsk data below
[cro2]
description = CRO2 Cromemco CDOS - DSSD 48 tpi 5.25" - 128 x 18
sides = alt
cylinders = 80
heads = 2
secsize = 128
sectors = 18
secbase = 1
datarate = SD


# CRO3 Cromemco CDOS - SSDD 48 tpi 5.25" - 512 x 10
diskdef cro3
seclen 512
tracks 40
sectrk 10
blocksize 1024
maxdir 64
skew 4
boottrk 2
os 2.2
end

# libdsk data below
[cro3]
description = CRO3 Cromemco CDOS - SSDD 48 tpi 5.25" - 512 x 10
cylinders = 40
heads = 1
secsize = 512
sectors = 10
secbase = 1
datarate = DD


# CRO4 Cromemco CDOS - DSDD 48 tpi 5.25" - 512 x 10
diskdef cro4
seclen 512
tracks 80
sectrk 10
blocksize 2048
maxdir 128
skew 4
boottrk 2
os 2.2
end

# libdsk data below
[cro4]
description = CRO4 Cromemco CDOS - DSDD 48 tpi 5.25" - 512 x 10
sides = alt
cylinders = 80
heads = 2
secsize = 512
sectors = 10
secbase = 1
datarate = DD


# CRO6 Cromemco CP/M - SSDD 48 tpi 5.25" - 512 x 10
diskdef cro6
seclen 512
tracks 40
sectrk 10
blocksize 2048
maxdir 128
skew 3
boottrk 2
os 2.2
end

# libdsk data below
[cro6]
description = CRO6 Cromemco CP/M - SSDD 48 tpi 5.25" - 512 x 10
cylinders = 40
heads = 1
secsize = 512
sectors = 10
secbase = 1
datarate = DD


# CRO7 Cromemco CP/M - DSDD 48 tpi 5.25" - 512 x 10
diskdef cro7
seclen 512
tracks 80
sectrk 10
blocksize 2048
maxdir 128
skew 3
boottrk 2
os 2.2
end

# libdsk data below
[cro7]
description = CRO7 Cromemco CP/M - DSDD 48 tpi 5.25" - 512 x 10
sides = alt
cylinders = 80
heads = 2
secsize = 512
sectors = 10
secbase = 1
datarate = DD


And these should work, but haven't been tested.

If you have the Monitor running you should be able to do this:
If you have a functional CP/M system, you can use DDT to find the Disk Parameter Block and the
information is stored there for each drive.

1. Log the drive you wish to locate the DPB data for. I will use A; for this example
2. Run DDT and enter the code below:
DDT
-f0100,0200,00
-A0100
0100 mvi c,1f
0102 call 5
0105 rst 7
0106 <Carriage Return>
-d0100
0100 0e1fcd0500FF
-g0100
*105
-x
The contents of register HL is the address of Drive A: DPB. If you display that address (mine was
F5E3) you will see F5E3: 2400040F0154007F00C00020000200.



RPT = 0024 = The number of 128 byte records per track.
BSH = 04 = The block shift count.
BLM = 0F = The block mask.
EXM = 01 = The extent mask.
DSM = 0054 = Disk storage maximum (the largest block number).
DRM = 007F = Directory maximum (the largest directory entry).
DAB = 000C= Directory Allocation Block AL0: = 00 & AL1: = 0C
CKS = 00020 = Directory check size.
OFF = 0002 = Track offset (number of reserved tracks).

SPT: Number of sectors per track. May differ from RPT if physical sectors are other than
128 bytes in size.

SSZ: Sector size code:
0 = 128 bytes per sector
1 = 256 bytes per sector
2 = 512 bytes per sector
3 = 1024 bytes per sector

NTK: Number of tracks (35, 40, 77, or 80). The number of tracks can be determined by formatting
a Floppy, or with Anadisk. Anadisk will also tell you the sector size and SKEW.


Larry
 
Last edited:
Problem is that I cannot format on the BB :) I have no formatting program that works. Thanks for the definitions. Will look into this tonight!
 
Anders, I don't see any physical difference between the image format and a standard MSDOS 360K 5.25" one. That is, they're both double-sided, 9 xectors per track, 40 cylinder with the first sector being 1. Why not format up a 360K floppy in the DOS box and use a utility such as rawwrite to write the data, then use IMD to create the new image?
 
I have no good 5.25 drives. The two in the BBII are 5.25" SS/SD :) Scrounged up an old 5.25 to put in the PC, but it is broken.

Anyway. I decided to keep it simple. Anadisk does not read the floppy at all. IMD works better. Created a really simple raw file:

Xerox/Cromemco, 40 tracks 18 sectors, 128 bytes

Code:
dd if=/dev/zero bs=92160 count=1 | tr "\000" "\345" >92160.raw

Added some files to that, using cro1 format, converted:

Code:
dsktrans -itype raw -otype imd -format cro1 xerox.raw xerox.imd

Code:
* b

 
.... Cal-Tex Computers 60K CP/M version 2.2 ....
......... release date 15-September-82 3........

A>ddt

DDT VERS 2.2
-f100,200,0
-a100
0100  mvi c,1f
0102  call 5
0105  rst 7
0106  
-g100
*0105
-x

C0Z1M0E1I0 A=10 B=FD00 D=0000 H=FD10 S=0100 P=0105 RST  07

-dfd10

FD10 24 00 04 0F 01 AC 00 3F 00 80 00 10 00 03 00 02 $......?........
FD20 03 00 02 00 DF 80 80 80 9C 80 80 80 9C 80 80 80 ................
FD30 9C 80 80 80 FF E0 00 00 00 00 00 00 00 00 00 00 ................
FD40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
FD50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
FD60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
FD70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
FD80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
FD90 00 00 00 00 00 00 00 00 00 00 18 07 00 00 80 00 ................
FDA0 06 07 00 00 00 F9 00 00 00 00 00 00 06 01 00 01 ................
FDB0 01 00 FD FD EC 03 00 08 02 EB 2B 03 00 03 01 01 ..........+.....
FDC0 02 66 83 03 00 00 FF FC 03 00 FF FC 03 00 FF FC .f..............
-a100

0100  mvi e,1
0102  mvi c,0e
0104  call 5
0107  mvi c,1f
0109  call 5
010C  rst 7
010D  
-g100
*010C
-x

C0Z1M0E1I0 A=5D B=FD3F D=003F H=FD5D S=0100 P=010C RST  07
-dfd5d

FD5D 1C 00 04 ...
FD60 0F 01 3F 00 3F 00 80 00 10 00 03 00 00 00 80 00 ..?.?...........
FD70 00 BB 80 80 80 80 87 80 80 55 80 88 80 80 20 80 .........U.... .
FD80 80 BF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 ................
FD90 00 00 00 00 00 00 00 00 00 00 10 03 00 01 80 00 ................
FDA0 10 03 00 01 80 F8 00 00 00 00 00 00 06 00 00 01 ................
FDB0 01 4D FD FD EC 03 00 01 00 71 F1 03 00 03 01 01 .M.......q......
FDC0 02 66 83 03 00 00 FF FC 03 00 FF FC 03 00 FF FC .f..............
FDD0 03 00 FF FC 03 00 FF FC 03 00 FF FC 03 00 FF FC ................
FDE0 03 00 FF FC 03 00 FF FC 03 00 FF FC 03 00 FF FC ................
FDF0 03 00 FF FC 03 00 FF FC 03 00 FF FC 03 00 FF FC ................
FE00 FC FF 00 03 FC FF 00 03 FC FF 00 03 FC FF 00 03 ................
-

DPB says disk is 28 sectors? Why that, then I noticed when I dump from the monitor:

Code:
* r1,3,1

 F800  00 41 53 4D 20 20 20 20 20 43 4F 4D 00 00 00 40 .ASM     COM...@
 F810  02 03 04 05 06 07 08 09 00 00 00 00 00 00 00 00 ................
 F820  00 42 42 32 43 50 4D 36 30 43 4F 4D 00 00 00 44 .BB2CPM60COM...D
 F830  0A 0B 0C 0D 0E 0F 10 11 12 00 00 00 00 00 00 00 ................
 F840  00 42 42 32 46 4F 52 4D 54 43 4F 4D 00 00 00 33 .BB2FORMTCOM...3
 F850  13 14 15 16 17 18 19 00 00 00 00 00 00 00 00 00 ................
 F860  00 42 49 4F 53 20 20 20 20 41 53 4D 00 00 00 60 .BIOS    ASM...`
 F870  1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 00 00 00 00 ...... !"#$%....
 DD  U01 T03 S01
Whoops.. DD, double density? Even if cro1 clearly is SD?? Converted the RAW file using RAW2IMD.EXE and forced SD. Worked MUCH better! Funmy why would dsktrans decide that the image is DD??

Anyway.. Will prepare a zipfile with that image, the image I used to assemble the BIOS and my utils and submit to bitsavers.
 
Last edited:
Back
Top