mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-08 16:33:04 +00:00
Add VolumeParam and some 'unneeded' volume functions...
This commit is contained in:
parent
8a7c567e1d
commit
bf1bdb6f92
@ -424,6 +424,55 @@ GetKeys:
|
||||
unlk %fp
|
||||
rts
|
||||
|
||||
/* void InitFS(short CntFCBs) */
|
||||
|
||||
.global InitFS
|
||||
InitFS:
|
||||
link %fp, #0
|
||||
move.l 8(%fp), %d0
|
||||
dc.w 0xA06C /* InitFS */
|
||||
unlk %fp
|
||||
rts
|
||||
|
||||
/* void InitEvents(short CntEvts) */
|
||||
|
||||
.global InitEvents
|
||||
InitEvents:
|
||||
link %fp, #0
|
||||
move.l 8(%fp), %d0
|
||||
dc.w 0xA06D /* InitEvents */
|
||||
unlk %fp
|
||||
rts
|
||||
|
||||
/* void FInitQueue(void) */
|
||||
|
||||
.global FInitQueue
|
||||
FInitQueue:
|
||||
link %fp, #0
|
||||
dc.w 0xA016 /* FInitQueue */
|
||||
unlk %fp
|
||||
rts
|
||||
|
||||
/* OSErr PBGetVInfoSync(ParmBlkPtr paramBlock) */
|
||||
|
||||
.global PBGetVInfoSync
|
||||
PBGetVInfoSync:
|
||||
link %fp, #0
|
||||
move.l 8(%fp), %a0
|
||||
dc.w 0xA007 /* GetVolInfo */
|
||||
unlk %fp
|
||||
rts
|
||||
|
||||
/* OSErr PBMountVol(ParmBlkPtr paramBlock) */
|
||||
|
||||
.global PBMountVol
|
||||
PBMountVol:
|
||||
link %fp, #0
|
||||
move.l 8(%fp), %a0
|
||||
dc.w 0xA00F /* MountVol */
|
||||
unlk %fp
|
||||
rts
|
||||
|
||||
#if defined(NEED_SLOT_RESOURCES)
|
||||
/* OSErr SGetCString(SpBlockPtr spBlkPtr) */
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
typedef int16_t OSErr;
|
||||
typedef unsigned char Str255[256];
|
||||
typedef const unsigned char * ConstStr255Param;
|
||||
typedef unsigned char Str27[28];
|
||||
|
||||
enum {
|
||||
noErr = 0,
|
||||
@ -136,17 +137,19 @@ enum {
|
||||
kSERD230KBaud = 230
|
||||
};
|
||||
|
||||
typedef struct ParamBlockRec ParamBlockRec_t;
|
||||
|
||||
struct ParamBlockRec {
|
||||
u_int32_t qLink; /* next queue entry */
|
||||
u_int16_t qType; /* queue type */
|
||||
u_int16_t ioTrap; /* routine trap */
|
||||
u_int32_t ioCmdAddr; /* routine address */
|
||||
u_int32_t ioCompletion; /* pointer to completion routine */
|
||||
u_int16_t ioResult; /* result code */
|
||||
u_int32_t ioNamePtr; /* pointer to pathname */
|
||||
#define COMMON_PARAMS \
|
||||
void* qLink; /* next queue entry */ \
|
||||
u_int16_t qType; /* queue type */ \
|
||||
u_int16_t ioTrap; /* routine trap */ \
|
||||
void* ioCmdAddr; /* routine address */ \
|
||||
void* ioCompletion; /* ptr to completion routine */ \
|
||||
u_int16_t ioResult; /* result code */ \
|
||||
unsigned char* ioNamePtr; /* pointer to pathname */ \
|
||||
int16_t ioVRefNum; /* volume specification */
|
||||
|
||||
typedef struct ParamBlockRec ParamBlockRec_t;
|
||||
struct ParamBlockRec {
|
||||
COMMON_PARAMS
|
||||
int16_t ioRefNum; /* file reference number */
|
||||
int8_t ioVersNum; /* version number */
|
||||
int8_t ioPermssn; /* read/write permission */
|
||||
@ -161,14 +164,7 @@ typedef struct ParamBlockRec ParamBlockRec;
|
||||
typedef struct ParamBlockRec* ParmBlkPtr;
|
||||
|
||||
struct CntrlParam {
|
||||
u_int32_t qLink;
|
||||
int16_t qType;
|
||||
int16_t ioTrap;
|
||||
u_int32_t ioCmdAddr;
|
||||
u_int32_t ioCompletion;
|
||||
volatile OSErr ioResult;
|
||||
char* ioNamePtr;
|
||||
int16_t ioVRefNum;
|
||||
COMMON_PARAMS
|
||||
int16_t ioCRefNum;
|
||||
int16_t csCode;
|
||||
int16_t csParam[11];
|
||||
@ -176,6 +172,35 @@ struct CntrlParam {
|
||||
typedef struct CntrlParam CntrlParam;
|
||||
typedef CntrlParam* CntrlParamPtr;
|
||||
|
||||
struct VolumeParam {
|
||||
COMMON_PARAMS
|
||||
int32_t filler2;
|
||||
int16_t ioVolIndex; /* Volume index number */
|
||||
u_int32_t ioVCrDate; /* Creation date/time */
|
||||
u_int32_t ioVLsBkUp; /* Last backup date/time */
|
||||
u_int16_t ioVAtrb; /* Volume attr */
|
||||
u_int16_t ioVNmFls; /* Number of files in directory */
|
||||
u_int16_t ioVDirSt; /* Start block of file directory */
|
||||
int16_t ioVBlLn; /* GetVolInfo:
|
||||
* length of dir in blocks
|
||||
*/
|
||||
u_int16_t ioVNmAlBlks; /* For compatibilty:
|
||||
* ioVNmAlBlks * ioVAlBlkSiz <= 2 GB
|
||||
*/
|
||||
u_int32_t ioVAlBlkSiz; /* For compatibilty:
|
||||
* ioVAlBlkSiz is <= $0000FE00 (65,024)
|
||||
*/
|
||||
u_int32_t ioVClpSiz; /*GetVolInfo: bytes to allocate at a time*/
|
||||
u_int16_t ioAlBlSt; /* Starting disk(512-byte) block in block map */
|
||||
u_int32_t ioVNxtFNum; /* GetVolInfo:
|
||||
* next free file number
|
||||
*/
|
||||
u_int16_t ioVFrBlk; /* GetVolInfo:
|
||||
* # free alloc blks for this volume
|
||||
*/
|
||||
};
|
||||
typedef struct VolumeParam VolumeParam;
|
||||
typedef VolumeParam* VolumeParamPtr;
|
||||
#define ASSERT_PBR(a) if ( sizeof(ParamBlockRec_t) != 50 ) { a }
|
||||
|
||||
struct Rect {
|
||||
@ -334,20 +359,19 @@ typedef VDFlagRec *VDFlagPtr;
|
||||
|
||||
typedef struct VDParamBlock
|
||||
{
|
||||
void* qLink;
|
||||
short qType;
|
||||
short ioTrap;
|
||||
void* ioCmdAddr;
|
||||
void* ioCompletion;
|
||||
OSErr ioResult;
|
||||
unsigned char* ioNamePtr;
|
||||
short ioVRefNum;
|
||||
COMMON_PARAMS
|
||||
short ioRefNum;
|
||||
short csCode;
|
||||
void* csParam;
|
||||
} VDParamBlock;
|
||||
typedef VDParamBlock *VDParamBlockPtr;
|
||||
|
||||
extern void InitFS(short CntFCBs);
|
||||
extern void InitEvents(short CntEvts);
|
||||
extern void FInitQueue(void);
|
||||
extern OSErr PBMountVol(ParmBlkPtr paramBlock) ;
|
||||
extern OSErr PBGetVInfoSync(ParmBlkPtr paramBlock) ;
|
||||
|
||||
#if defined(SCSI_SUPPORT)
|
||||
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user