Previous

Next

Bottom

Contents

Glossary

Index

 

CF1 User's Manual

DOS Storage Device Functions

May 1999

Revision 1.00

 Persistor Instruments Inc.
© 1998 All rights reserved.

 NOT FINALIZED!

The functions in this section exist to support new features of PicoDOS 2.0 and should be considered experimental. Even with the woefully inadequate documentation that currently exists, these may be useful to more complex applications. Be warned that unlike the finalized BIOS and PicoDOS functions, these functions are subject to much change, and you should not use them if you are not prepared to recode your projects as the functions mature.

Quick Reference Table

DSDReset

DSDValidate

DSDMountDrive

DSDMountATADevice

DSDSectorIO

DSDReadSectors

DSDWriteSectors

DSDCapacity

DSDMediaCheck

DSDGetBSD

DSDGetCurrentDrive

DSDSetCurrentDrive

DSDGetCurrentWorkingDir

DSDSetCurrentWorkingDir

DSDResetOptimizations

 

#define DSD_FIRST_DEV   2       // C: is first valid drive
#define DSD_LAST_DEV    10      // J: is last valid drive

enum
    {
      dsdErrorStart = DSD_ERRORS
    , dsdDriveOutOfRange            // requested drive number is out of range
    , dsdDriveReqAlreadyMounted     // attempted to mount to drive letter in use
    , dsdDriveReqNotMounted         // requested logical drive is not mounted
    , dsdNotEnoughMemory            // not enough memory to mount the drive
    , dsdInvalidWorkingDirectory    // tried to set invalid working directory
    };

DSDReset -- Reset DSD tables and dismount all logical drives

Description

Prototype:

void DSDReset(void);

Definition:

#include <cf1pico.h>

Inputs:

none

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDValidate -- Validate the requested logical drive number

Description

Prototype:

short DSDValidate(short logdrv);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDMountDrive -- Mount a logical DOS drive to an assigned drive letter

Description

Prototype:

short DSDMountDrive(ushort bsdid, short logdrv);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX
logdrv XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDMountATADevice -- Mount a DOS drive to a specific ATA drive and partition

Description

Prototype:

short DSDMountATADevice(char *name, void *iodvr, ushort prtn, short logdrv);

Definition:

#include <cf1pico.h>

Inputs:

name XXXXX
iodvr XXXXX
prtn XXXXX
logdrv XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDSectorIO -- Read or write a DOS drive logical sector

Description

Prototype:

short DSDSectorIO(bool write, short logdrv, ulong logsct, void *buffer, short count);

Definition:

#include <cf1pico.h>

Inputs:

write XXXXX
logdrv XXXXX
logsct XXXXX
buffer XXXXX
count XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDReadSectors -- Read logical device (LBA) sector(s)

Description

Prototype:

short DSDReadSectors(short logdrv, ulong sector, void *buffer, short count);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX
sector XXXXX
buffer XXXXX
count XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDWriteSectors -- Write logical device (LBA) sector(s)

Description

Prototype:

short DSDWriteSectors(short logdrv, ulong sector, void *buffer, short count);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX
sector XXXXX
buffer XXXXX
count XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDCapacity -- Fetch the logical DOS drive capacity and geometry information

Description

Prototype:

short DSDCapacity(short logdrv, ulong *sectors, ushort *spt, ushort *heads, struct ATADriveID **info);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX
sectors XXXXX
spt XXXXX
heads XXXXX
info XXXXX

Returns:

XXXXX

Notes:

see <dosdrive.h> for the ATADriveID definition
XXXXX

Timing:

TBD

DSDMediaCheck -- Return true if hardware and media are available

Description

Prototype:

bool DSDMediaCheck(short logdrv);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDGetBSD -- Return the BSD ID associated with this BSD

Description

Prototype:

short DSDGetBSD(short logdrv);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDGetCurrentDrive -- Return the current default DOS drive

Description

Prototype:

short DSDGetCurrentDrive(void);

Definition:

#include <cf1pico.h>

Inputs:

none

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDSetCurrentDrive -- Set the current default DOS drive

Description

Prototype:

short DSDSetCurrentDrive(short logdrv);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDGetCurrentWorkingDir -- Return the current working directory

Description

Prototype:

char DSDGetCurrentWorkingDir (short logdrv);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDSetCurrentWorkingDir -- Set the current working directory

Description

Prototype:

short DSDSetCurrentWorkingDir (short logdrv, char *cwd);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX
cwd XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DSDResetOptimizations -- Reset any assumptions or optimizations

Description

Prototype:

void DSDResetOptimizations (short logdrv);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

 

Previous

Next

Top

Contents

Glossary

Index

Tel: 508-759-6434

Fax: 508-759-6436

Copyright (C) 1998 Persistor Instruments Inc. - All Rights Reserved