Two other expansion.library functions commonly used by expansion board
drivers are MakeDosNode() and AddDosNode(). These functions allow a
driver to create and add a DOS device node (for example DH0:) to the
system. A new function, AddBootNode(), is also available in Release 2
(V36 and later versions of the OS) that can be used to add an autobooting
DOS device node.
MakeDosNode() requires an initialized structure of environment information
for creating a DOS device node. The format of the function is:
struct DeviceNode *deviceNode = MakeDosNode(parameterPkt);
The parameterPkt argument is a pointer (passed in A0 from assembler) to an
initialized packet of environment parameters.
The parameter packet for MakeDosNode() consists of four longwords followed
by a DosEnvec structure:
;-----------------------------------------------------------------------
;
; Layout of parameter packet for MakeDosNode
;
;-----------------------------------------------------------------------
* The packet for MakeDosNode starts with the following four
* longwords, directly followed by a DosEnvec structure.
APTR dosName ; Points to a DOS device name (ex. 'RAM1',0)
APTR execName ; Points to device driver name (ex. 'ram.device',0)
ULONG unit ; Unit number
ULONG flags ; OpenDevice flags
* The DosEnvec disk "environment" is a longword array that describes the
* disk geometry. It is variable sized, with the length at the beginning.
* Here are the constants for a standard geometry.
* See libraries/filehandler.i for additional notes.
STRUCTURE DosEnvec,0
ULONG de_TableSize ; Size of Environment vector
ULONG de_SizeBlock ; in longwords: standard value is 128
ULONG de_SecOrg ; not used; must be 0
ULONG de_Surfaces ; # of heads (surfaces). drive specific
ULONG de_SectorPerBlock ; not used; must be 1
ULONG de_BlocksPerTrack ; blocks per track. drive specific
ULONG de_Reserved ; DOS reserved blocks at start of partition.
ULONG de_PreAlloc ; DOS reserved blocks at end of partition
ULONG de_Interleave ; usually 0
ULONG de_LowCyl ; starting cylinder. typically 0
ULONG de_HighCyl ; max cylinder. drive specific
ULONG de_NumBuffers ; Initial # DOS of buffers.
ULONG de_BufMemType ; type of mem to allocate for buffers
ULONG de_MaxTransfer ; Max number of bytes to transfer at a time
ULONG de_Mask ; Address Mask to block out certain memory
LONG de_BootPri ; Boot priority for autoboot
ULONG de_DosType ; ASCII (HEX) string showing filesystem type;
; 0X444F5300 is old filesystem,
; 0X444F5301 is fast file system
ULONG de_Baud ; Baud rate for serial handler
ULONG de_Control ; Control word for handler/filesystem
; (used as filesystem/handler desires)
ULONG de_BootBlocks ; Number of blocks containing boot code
; (for non-AmigaDOS filesystems)
LABEL DosEnvec_SIZEOF
After making a DOS device node, drivers (except for autoboot drivers) use
AddDosNode(deviceNode) to add their node to the system. Autoboot drivers
will instead use the new Release 2 expansion.library AddBootNode()
function (if running under V36 or higher) or the Exec Enqueue() function
(if running under pre-V36) to add a BootNode to the
ExpansionBase.eb_MountList.
[Back to Amiga Developer Docs]