🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.amiga.tech
1 messages
1 total messages Started by Tyler Sarna Tue, 08 Jan 1991 01:22
PART blocks and low-level HD access
#7916
Author: Tyler Sarna
Date: Tue, 08 Jan 1991 01:22
66 lines
2644 bytes
Hello all. I'm in the process of writing some hard disk driver code for
a GVP Series II controller under AmigaMINIX. I need to know about the
contents of the various elements of the environment array in the PART
blocks. Here's what I've figured out so far:

n	pb_Environment[n]
-------------------------------------------------
0	?
1	Longs per block (==128)
2	?
3	Heads per cyl
4	?
5	Sectors per track
6	Reserved blocks
7	?
8	?
9	Low cyl of partition
10	High cyl of partition
11	Number of buffers to use
12	?
13	MaxTransfer
14	Mask for address
15	Boot priority of partition
16	?

A few other questions:

1)	Can I safely use the reserved blocks? They wouldn't be needed
	for the Minix filesystem.

2)	Am I correct in assuming that:
	block = cyl * heads_per_cyl * secs_per track +
		head * secs_per_track +
		sec;
	is the correct formula, ie cyl is the most significant digit,
	followed by the head, followed by the sector? Or is a different
	convention used?

3)	Does anyone know how to program the GVP Series II at a low
	level, or know where to find such info (other than GVP, I'm
	asking them now but I suspect it may take a while).  All I
	really need are two functions:

	unknown	= scsiinit(unknown); 
	/* init/find the board, if needed */

	error = scsiread(short scsi_id, ulong block, void *addr);
	/* read block "block" of scsi device "scsi_id" into "addr" */

	error = scsiwrite(short scsi_id, ulong block, void *addr);
	/* write block at "addr" to block "block" of "scsi_id" */

	I am currently simulating this in a test program under AmigaDOS
	using the SCSI-Direct interface, but of course no AmigaDOS
	.devices are around under Minix, so some hardware-level code
	is needed.

	Would anyone who has code for the three functions above
	(preferably C, but well-commented assembly would be OK) for the
	GVP series II (or any other HD controller for that matter),
	please send it to me? Thanks!

------///------------------------------------------------------------
     /// Tyler "Ty" Sarna            E-Mail: tsarna@polar.bowdoin.edu 
 \\\///  "...and save up to 100% on brands you've never heard of!!!!"
--\XX/---------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads