|
|
| version 1.1, 2003/10/16 17:58:29 | version 1.3, 2004/01/22 01:10:04 |
|---|---|
| Line 1 | Line 1 |
| enum { | enum { |
| HDDTYPE_SASI, | SASIHDD_MAX = 2, |
| HDDTYPE_SCSI, | SCSIHDD_MAX = 4 |
| HDDTYPE_NONE | |
| }; | }; |
| enum { | |
| SXSITYPE_NONE = 0x0000, | |
| SXSITYPE_HDD = 0x0001, | |
| SXSITYPE_CDROM = 0x0002, | |
| SXSITYPE_MO = 0x0003, | |
| SXSITYPE_SCANNER = 0x0004, | |
| SXSITYPE_DEVMASK = 0x000f, | |
| SXSITYPE_REMOVE = 0x0010, | |
| SXSITYPE_SASIMASK = 0x0700, | |
| SXSITYPE_SASI = 0x1000, | |
| SXSITYPE_IDE = 0x2000, | |
| SXSITYPE_SCSI = 0x3000, | |
| SXSITYPE_IFMASK = 0xf000 | |
| }; | |
| typedef struct { | typedef struct { |
| long totals; | char sig[3]; |
| UINT16 tracks; | char ver[4]; |
| UINT16 size; | char delimita; |
| char comment[128]; | |
| BYTE padding1[4]; | |
| BYTE mbsize[2]; | |
| BYTE sectorsize[2]; | |
| BYTE sectors; | BYTE sectors; |
| BYTE surfaces; | BYTE surfaces; |
| BYTE cylinders[2]; | |
| BYTE totals[4]; | |
| BYTE padding2[0x44]; | |
| } VHDHDR; | |
| typedef struct { | |
| BYTE cylinders[2]; | |
| } THDHDR; | |
| typedef struct { | |
| BYTE dummy[4]; | |
| BYTE hddtype[4]; | |
| BYTE headersize[4]; | |
| BYTE hddsize[4]; | |
| BYTE sectorsize[4]; | |
| BYTE sectors[4]; | |
| BYTE surfaces[4]; | |
| BYTE cylinders[4]; | |
| } HDIHDR; | |
| typedef struct { | |
| long totals; | |
| UINT16 cylinders; | |
| UINT16 size; | |
| UINT8 sectors; | |
| UINT8 surfaces; | |
| UINT16 type; | UINT16 type; |
| UINT32 headersize; | UINT32 headersize; |
| long fh; | |
| char fname[MAX_PATH]; | char fname[MAX_PATH]; |
| void *fh; | } _SXSIDEV, *SXSIDEV; |
| } _SXSIHDD, *SXSIHDD; | |
| typedef struct { | |
| UINT8 sectors; | |
| UINT8 surfaces; | |
| UINT16 cylinders; | |
| } SASIHDD; | |
| #ifdef __cplusplus | #ifdef __cplusplus |
| extern "C" { | extern "C" { |
| #endif | #endif |
| extern _SXSIHDD sxsi_hd[4]; | extern const SASIHDD sasihdd[7]; |
| void sxsi_initialize(void); | void sxsi_initialize(void); |
| SXSIHDD sxsi_getptr(BYTE drv); | SXSIDEV sxsi_getptr(REG8 drv); |
| const char *sxsi_getname(BYTE drv); | const char *sxsi_getname(REG8 drv); |
| BOOL sxsi_hddopen(BYTE drv, const char *file); | BOOL sxsi_hddopen(REG8 drv, const char *file); |
| void sxsi_open(void); | void sxsi_open(void); |
| void sxsi_flash(void); | void sxsi_flash(void); |
| void sxsi_trash(void); | void sxsi_trash(void); |
| BYTE sxsi_read(BYTE drv, long pos, BYTE *buf, UINT16 size); | REG8 sxsi_read(REG8 drv, long pos, BYTE *buf, UINT size); |
| BYTE sxsi_write(BYTE drv, long pos, const BYTE *buf, UINT16 size); | REG8 sxsi_write(REG8 drv, long pos, const BYTE *buf, UINT size); |
| BYTE sxsi_format(BYTE drv, long pos); | REG8 sxsi_format(REG8 drv, long pos); |
| #ifdef __cplusplus | #ifdef __cplusplus |
| } | } |