[comp.sys.atari.st] DMA Programming... DLII-Boot Read

cs325ec@ux1.cso.uiuc.edu (Gregory Lemperle-Kerr) (02/28/90)

	Does anyone know how DLII accomplishes the reading of boot sector
	0 of a hard drive?  Must this be done in assembler, or can I do
	it with Turbo C?

	Also: if I change the partition info on the boot sector and reboot,			will everything conform?

	Also:  I noticed that ICD allows more than 4 partitions/drive
		by turning to $156 offset after filling those starting
		at $1c6... is this OK and compatible with everything?
		Some program, I forget which, says "Unable to read boot
		sector" when accessing partitions beyond F:.  This is
		with two mac partitions in between E and F also.

	Thanks...  Can anyone send me some source code which will read
		a logical sector from the hard disk through ICD/DMA?

	-Greg

woodside@ttidca.TTI.COM (George Woodside) (03/01/90)

In article <1990Feb28.122940.2051@ux1.cso.uiuc.edu> cs325ec@ux1.cso.uiuc.edu (Gregory Lemperle-Kerr) writes:
...[edited]...
>	Does anyone know how DLII accomplishes the reading of boot sector
>	0 of a hard drive?  Must this be done in assembler, or can I do
>	it with Turbo C?

You can do it with whatever you please. It is nothing more than a Rwabs
function call.

Rwabs normally accesses the drive as a logical device, so a read of
sector 0 will return logical sector 0 of a drive. If you set the
absolute address bit (bit 4, I believe), it will read the physical
sector 0 (partition map) of a partitioned drive. If the drive is not
partitioned, physical and logical sectors are the same. 

> Also: if I change the partition info on the boot sector and reboot,
>will everything conform?

Conform to what? A trashed drive? Yes. A drive with a different partitioning
scheme? No. Partitioning a drive is vastly more complex than just the
values in the partition maps and boot sectors. If you don't know what
you are doing, I strongly recommend good backups prior to experimentation.

>Also:  I noticed that ICD allows more than 4 partitions/drive 
>	by turning to $156 offset after filling those starting 
>	at $1c6... is this OK and compatible with everything? 

No. It is specific to the driver you are using. The original Atari
partitioning system supported four partitions. The extended method
devised by SUPRA is what you are describing, and is supported by
SUPRA and ICD (I think Astra also used it). The extended partitioning
announced by Atari with HDX 3 is not the same.
-- 
* George R. Woodside - Citicorp/TTI - Santa Monica, CA *
* Path:       woodside@ttidca                          *
*   or:       ..!{philabs|csun|psivax}!ttidca!woodside *