
There have been a number of questions recently regarding using different
disks with a regular IBM-XT controller, so I thought I'd upload this infor-
mation.  I'm currently running a 10-meg & 20-meg disk on a Maynard
controller whose rom is configured for 2 10-meg only.  Only thing necessary
was to change the table and point the vector to it with Bootcfg (in DL6).
I use high-ram for the new table but have an old bios: this may not be so
easy for others, but if your disk matches one of the existing tables below
and you have an XT or PC with the IBM controller, all you should have to do
is change switches.

I've included the assembler file I use with Bootcfg at the end for reference.
That code works ok even if executed AFTER dos initialization (assuming
the disk parameters in the default table are sufficiently close to allow
booting, or the disk you're installing isn't the one booted from).  To
be used that way, the code should be changed to org at 100h and be made
into a .COM file with EXE2BIN.  A jump to the code should be the first
instruction, and the new tables should be placed before the code.  That
way you can do a terminate & stay resident call, leaving only the
tables resident. I put conditional code in to illustrate this.

Obviously the addresses will change if you're using the IBM fixed-disk
bios, and you need to be familiar with assembler and know the specific
parameters of your disk to get this working, but it's a relatively simple
way to install practically any disk.

If you have any questions, leave me a message on Compuserve PCS-131.

-- Skip Gilbrech (71445,534)

****************************************************************************

This is from PC Tech. Ref. dated Apr. '83 (says 2.02 on the cover), p. A-97
in the Fixed Disk Bios listing:
	
FIXED DISK PARAMETER TABLE
  - The table is composed of a block defined as:
	(1 word) - max. number of cylinders
	(1 byte) - max. number of heads
	(1 word) - starting reduced write current cyl
	(1 word) - starting write precompensation cyl
	(1 byte) - max. ecc data burst length
	(1 byte) - control byte (drive step option)
		bit 7 disable disk-access retries
		bit 6 disable ecc retries
		bits 5-3 zero
		bits 2-0 drive option (seems to be step rate - sg)
	(1 byte) - standard time out value (see below)
	(1 byte) - time out value for format drive
	(1 byte) - time out value for check drive
	(4 bytes) - reserved for future use
  - To dynamically define a set of parameters build a table of values and
    place the corresponding vector into interrupt 41.
  Note:  The default table is vectored in for an interrupt 19H (bootstrap).
	
ON THE CARD SWITCH SETTINGS			TRANSLATION TABLE
	
	  DRIVE 0	DRIVE 1			1/3  :  2/4  :  TABLE ENTRY
	
	----------------------------		---------------------------
ON	:	     /		   :		ON   :   ON  :	0
	: -1-   -2-  /  -3-   -4-  :		ON   :  OFF  :	1
OFF	:	     /		   :		OFF  :   ON  :	2
	----------------------------		OFF  :  OFF  :	3
	
DRIVE TABLES IN ROM (in above format, D = decimal, H = hex)
TYPE 00   0306D  02D  0306D  0000D  0BH  00H  0CH  0B4H  028H  0,0,0,0
TYPE 01   0375D  08D  0375D  0000D  0BH  05H  0CH  0B4H  028H  0,0,0,0
TYPE 02   0306D  06D  0128D  0256D  0BH  05H  0CH  0B4H  028H  0,0,0,0
TYPE 03   0306D  04D  0306D  0000D  0BH  05H  0CH  0B4H  028H  0,0,0,0
	
****************************************************************************

(Following is the code I use to change my tables)

****************************************************************************

page,	132
title	LOADROM.ASM -- change hard disk parm table (used w/bootcfg.com)

;**************************************************************************

ABS0	segment	at 0
	org 41h * 4

DISK_VECTOR	label dword	; pointer to disk parameter tables

ABS0	ends

;**************************************************************************

MAYNARD	segment	at 0F400H
	org 700H
MD_TBL		label byte	; this is where Maynard's default tables are

MAYNARD	ends

;**************************************************************************

BABY_BLUE	segment	at 0C000H
	org 0
BBD_TBL		label byte	; this is where I put the new tables

BABY_BLUE	ends

;**************************************************************************

DISKPARM_TBL	struc		; Masm structure for the table described above
    MAX_CYL	dw	?
    MAX_HEAD	db	?
    RED_WRITE	dw	?
    WRT_PRECMP	dw	?
    ECC_BURST	db	?
    CTRL_BYTE	db	?
    TO_VAL	db	?
    FTO_VAL	db	?
    CDTO_VAL	db	?
    RSVD	db	4 dup (?)
DISKPARM_TBL	ends

;**************************************************************************

FALSE	equ	0
TRUE	equ	not FALSE
.lfcond

RESCOM	equ	FALSE		; make resident .COM file?
;RESCOM	equ	TRUE

;**************************************************************************

CODE	segment
assume cs:CODE,ds:CODE

if RESCOM
    org	100H
endif

START:

if RESCOM
	jmp	INIT		; jump to initialization code

	db	13	dup (?)	; start tables on para. boundary

DKPT1	DISKPARM_TBL	<>	; space for resident tables
DKPT2	DISKPARM_TBL	<>

INIT:

endif		; making resident .COM file

	push	ds
	push	es

	cli		; not while setting vectors
	cld		;
	mov	ax,MAYNARD		; move the default tables to their
	mov	ds,ax			;  new home
if not RESCOM
	mov	ax,BABY_BLUE		; not necessary with .COM file
	mov	es,ax			;
	mov	di,offset BBD_TBL	; point to high-ram storage
else
	mov	di,offset DKPT1		; point to local storage
endif
	push	di			; save ptr to table beginning
	mov	si,offset MD_TBL	; point to default table
	mov	cx,(type DISKPARM_TBL)	; size of table entry
rep	movsw				; use 'movsw' (moves both tables)
	pop	di			; restore ptr to table beginning
	mov	ax,612			; new number of cylinders
	mov	es:[di].MAX_CYL,ax	; change new copy of table
	mov	es:[di].RED_WRITE,ax	;

	mov	ax,ABS0			; change vector to point to new tables
	mov	es,ax
if RESCOM
	mov	word ptr es:DISK_VECTOR+2,cs
	mov	word ptr es:DISK_VECTOR,offset DKPT1
else
	mov	word ptr es:DISK_VECTOR+2,BABY_BLUE
	mov	word ptr es:DISK_VECTOR,offset BBD_TBL
endif
	sti

	pop	es
	pop	ds

if RESCOM
	mov	dx,offset INIT		; point after tables
	int	27H			; leave tables resident
else
	ret
endif

CODE	ends
end	START		; starting address for .COM file

er tables
	int	27H			; leave tables resident
e