|
|
| version 1.2, 2003/11/07 18:31:24 | version 1.12, 2005/03/22 04:03:15 |
|---|---|
| Line 1 | Line 1 |
| #if defined(SUPPORT_SCSI) | |
| enum { | enum { |
| HDDTYPE_SASI, | SASIHDD_MAX = 4, |
| HDDTYPE_SCSI, | SCSIHDD_MAX = 8 |
| HDDTYPE_NONE | }; |
| #else | |
| enum { | |
| SASIHDD_MAX = 4, | |
| SCSIHDD_MAX = 0 | |
| }; | |
| #endif | |
| enum { | |
| SXSIDRV_UNITMASK = 0x0f, | |
| SXSIDRV_SASI = 0x00, | |
| SXSIDRV_SCSI = 0x20, | |
| SXSIDRV_IFMASK = 0x20, | |
| SXSIDEV_NC = 0x00, | |
| SXSIDEV_HDD = 0x01, | |
| SXSIDEV_CDROM = 0x02, | |
| SXSIDEV_MO = 0x03, | |
| SXSIDEV_SCANNER = 0x04, | |
| SXSIFLAG_READY = 0x01 | |
| }; | }; |
| typedef struct { | |
| struct _sxsidev; | |
| typedef struct _sxsidev _SXSIDEV; | |
| typedef struct _sxsidev *SXSIDEV; | |
| #include "sxsihdd.h" | |
| #include "sxsicd.h" | |
| struct _sxsidev { | |
| UINT8 drv; | |
| UINT8 devtype; | |
| UINT8 flag; | |
| UINT8 __caps; | |
| INTPTR fh; | |
| REG8 (*read)(SXSIDEV sxsi, long pos, UINT8 *buf, UINT size); | |
| REG8 (*write)(SXSIDEV sxsi, long pos, const UINT8 *buf, UINT size); | |
| REG8 (*format)(SXSIDEV sxsi, long pos); | |
| long totals; | long totals; |
| UINT16 tracks; | UINT16 cylinders; |
| UINT16 size; | UINT16 size; |
| BYTE sectors; | UINT8 sectors; |
| BYTE surfaces; | UINT8 surfaces; |
| UINT16 type; | UINT8 mediatype; |
| UINT8 padding; | |
| UINT32 headersize; | UINT32 headersize; |
| long fh; | |
| char fname[MAX_PATH]; | OEMCHAR fname[MAX_PATH]; |
| } _SXSIHDD, *SXSIHDD; | UINT ftype; |
| }; | |
| #ifdef __cplusplus | #ifdef __cplusplus |
| extern "C" { | extern "C" { |
| #endif | #endif |
| extern _SXSIHDD sxsi_hd[4]; | |
| void sxsi_initialize(void); | void sxsi_initialize(void); |
| void sxsi_allflash(void); | |
| SXSIHDD sxsi_getptr(BYTE drv); | void sxsi_alltrash(void); |
| const char *sxsi_getname(BYTE drv); | BOOL sxsi_isconnect(SXSIDEV sxsi); |
| BOOL sxsi_hddopen(BYTE drv, const char *file); | BRESULT sxsi_prepare(SXSIDEV sxsi); |
| void sxsi_open(void); | SXSIDEV sxsi_getptr(REG8 drv); |
| void sxsi_flash(void); | const OEMCHAR *sxsi_getfilename(REG8 drv); |
| void sxsi_trash(void); | BRESULT sxsi_setdevtype(REG8 drv, UINT8 dev); |
| UINT8 sxsi_getdevtype(REG8 drv); | |
| BYTE sxsi_read(BYTE drv, long pos, BYTE *buf, UINT16 size); | BRESULT sxsi_devopen(REG8 drv, const OEMCHAR *file); |
| BYTE sxsi_write(BYTE drv, long pos, const BYTE *buf, UINT16 size); | void sxsi_devclose(REG8 drv); |
| BYTE sxsi_format(BYTE drv, long pos); | 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); | |
| BOOL sxsi_issasi(void); | |
| BOOL sxsi_isscsi(void); | |
| BOOL sxsi_iside(void); | |
| #ifdef __cplusplus | #ifdef __cplusplus |
| } | } |