|
|
| version 1.3, 2004/01/22 01:10:04 | version 1.9, 2005/02/09 20:11:34 |
|---|---|
| Line 1 | Line 1 |
| #if defined(SUPPORT_SCSI) | |
| enum { | enum { |
| SASIHDD_MAX = 2, | SASIHDD_MAX = 2, |
| SCSIHDD_MAX = 4 | SCSIHDD_MAX = 4 |
| }; | }; |
| #else | |
| enum { | |
| SASIHDD_MAX = 2, | |
| SCSIHDD_MAX = 0 | |
| }; | |
| #endif | |
| enum { | enum { |
| SXSITYPE_NONE = 0x0000, | SXSITYPE_NONE = 0x0000, |
| Line 25 enum { | Line 32 enum { |
| typedef struct { | typedef struct { |
| char sig[3]; | UINT8 sectors; |
| char ver[4]; | UINT8 surfaces; |
| char delimita; | UINT16 cylinders; |
| char comment[128]; | } SASIHDD; |
| BYTE padding1[4]; | |
| BYTE mbsize[2]; | |
| BYTE sectorsize[2]; | |
| BYTE sectors; | |
| BYTE surfaces; | |
| BYTE cylinders[2]; | |
| BYTE totals[4]; | |
| BYTE padding2[0x44]; | |
| } VHDHDR; | |
| typedef struct { | typedef struct { |
| BYTE cylinders[2]; | UINT8 cylinders[2]; |
| } THDHDR; | } THDHDR; |
| typedef struct { | typedef struct { |
| BYTE dummy[4]; | char sig[16]; |
| BYTE hddtype[4]; | char comment[0x100]; |
| BYTE headersize[4]; | UINT8 headersize[4]; |
| BYTE hddsize[4]; | UINT8 cylinders[4]; |
| BYTE sectorsize[4]; | UINT8 surfaces[2]; |
| BYTE sectors[4]; | UINT8 sectors[2]; |
| BYTE surfaces[4]; | UINT8 sectorsize[2]; |
| BYTE cylinders[4]; | UINT8 reserved[0xe2]; |
| } NHDHDR; | |
| typedef struct { | |
| UINT8 dummy[4]; | |
| UINT8 hddtype[4]; | |
| UINT8 headersize[4]; | |
| UINT8 hddsize[4]; | |
| UINT8 sectorsize[4]; | |
| UINT8 sectors[4]; | |
| UINT8 surfaces[4]; | |
| UINT8 cylinders[4]; | |
| } HDIHDR; | } HDIHDR; |
| typedef struct { | typedef struct { |
| char sig[3]; | |
| char ver[4]; | |
| char delimita; | |
| char comment[128]; | |
| UINT8 padding1[4]; | |
| UINT8 mbsize[2]; | |
| UINT8 sectorsize[2]; | |
| UINT8 sectors; | |
| UINT8 surfaces; | |
| UINT8 cylinders[2]; | |
| UINT8 totals[4]; | |
| UINT8 padding2[0x44]; | |
| } VHDHDR; | |
| typedef struct { | |
| long totals; | long totals; |
| UINT16 cylinders; | UINT16 cylinders; |
| UINT16 size; | UINT16 size; |
| Line 63 typedef struct { | Line 87 typedef struct { |
| UINT16 type; | UINT16 type; |
| UINT32 headersize; | UINT32 headersize; |
| long fh; | long fh; |
| char fname[MAX_PATH]; | OEMCHAR fname[MAX_PATH]; |
| } _SXSIDEV, *SXSIDEV; | } _SXSIDEV, *SXSIDEV; |
| typedef struct { | |
| UINT8 sectors; | |
| UINT8 surfaces; | |
| UINT16 cylinders; | |
| } SASIHDD; | |
| #ifdef __cplusplus | #ifdef __cplusplus |
| extern "C" { | extern "C" { |
| #endif | #endif |
| extern const char sig_vhd[8]; | |
| extern const char sig_nhd[15]; | |
| extern const SASIHDD sasihdd[7]; | extern const SASIHDD sasihdd[7]; |
| void sxsi_initialize(void); | void sxsi_initialize(void); |
| SXSIDEV sxsi_getptr(REG8 drv); | SXSIDEV sxsi_getptr(REG8 drv); |
| const char *sxsi_getname(REG8 drv); | const OEMCHAR *sxsi_getname(REG8 drv); |
| BOOL sxsi_hddopen(REG8 drv, const char *file); | BOOL sxsi_hddopen(REG8 drv, const OEMCHAR *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); |
| REG8 sxsi_read(REG8 drv, long pos, BYTE *buf, UINT size); | BOOL sxsi_issasi(void); |
| REG8 sxsi_write(REG8 drv, long pos, const BYTE *buf, UINT size); | BOOL sxsi_isscsi(void); |
| BOOL sxsi_iside(void); | |
| REG8 sxsi_read(REG8 drv, long pos, UINT8 *buf, UINT size); | |
| REG8 sxsi_write(REG8 drv, long pos, const UINT8 *buf, UINT size); | |
| REG8 sxsi_format(REG8 drv, long pos); | REG8 sxsi_format(REG8 drv, long pos); |
| #ifdef __cplusplus | #ifdef __cplusplus |