23 #define ATA_DIR_READ 0
24 #define ATA_DIR_WRITE 1
43 #define ATA_RES_ERR_NOTREADY -501
44 #define ATA_RES_ERR_TIMEOUT -502
45 #define ATA_RES_ERR_IO -503
46 #define ATA_RES_ERR_NODATA -504
47 #define ATA_RES_ERR_NODEV -505
48 #define ATA_RES_ERR_CMD -506
49 #define ATA_RES_ERR_LOCKED -509
50 #define ATA_RES_ERR_ICRC -510
54 extern int sceAtaSoftReset(
void);
56 extern int sceAtaExecCmd(
void *buf, u32 blkcount, u16 feature, u16 nsector, u16 sector, u16 lcyl, u16 hcyl, u16 select, u16 command);
57 extern int sceAtaWaitResult(
void);
59 extern int sceAtaGetError(
void);
61 extern int sceAtaDmaTransfer(
int device,
void *buf, u32 lba, u32 nsectors,
int dir);
64 extern int sceAtaSecuritySetPassword(
int device,
void *password);
65 extern int sceAtaSecurityUnLock(
int device,
void *password);
66 extern int sceAtaSecurityEraseUnit(
int device);
68 extern int sceAtaIdle(
int device,
int period);
69 extern int sceAtaGetSceId(
int device,
void *data);
70 extern int sceAtaSmartReturnStatus(
int device);
71 extern int sceAtaSmartSaveAttr(
int device);
72 extern int sceAtaFlushCache(
int device);
73 extern int sceAtaIdleImmediate(
int device);
75 extern int ata_device_sector_io64(
int device,
void *buf, u64 lba, u32 nsectors,
int dir);
77 #define atad_IMPORTS_start DECLARE_IMPORT_TABLE(atad, 1, 3)
78 #define atad_IMPORTS_end END_IMPORT_TABLE
80 #define I_sceAtaInit DECLARE_IMPORT(4, sceAtaInit)
81 #define I_sceAtaSoftReset DECLARE_IMPORT(5, sceAtaSoftReset)
82 #define I_sceAtaExecCmd DECLARE_IMPORT(6, sceAtaExecCmd)
83 #define I_sceAtaWaitResult DECLARE_IMPORT(7, sceAtaWaitResult)
84 #define I_sceAtaGetError DECLARE_IMPORT(8, sceAtaGetError)
85 #define I_sceAtaDmaTransfer DECLARE_IMPORT(9, sceAtaDmaTransfer)
86 #define I_sceAtaSecuritySetPassword DECLARE_IMPORT(10, sceAtaSecuritySetPassword)
87 #define I_sceAtaSecurityUnLock DECLARE_IMPORT(11, sceAtaSecurityUnLock)
88 #define I_sceAtaSecurityEraseUnit DECLARE_IMPORT(12, sceAtaSecurityEraseUnit)
89 #define I_sceAtaIdle DECLARE_IMPORT(13, sceAtaIdle)
90 #define I_sceAtaGetSceId DECLARE_IMPORT(14, sceAtaGetSceId)
91 #define I_sceAtaSmartReturnStatus DECLARE_IMPORT(15, sceAtaSmartReturnStatus)
92 #define I_sceAtaSmartSaveAttr DECLARE_IMPORT(16, sceAtaSmartSaveAttr)
93 #define I_sceAtaFlushCache DECLARE_IMPORT(17, sceAtaFlushCache)
94 #define I_sceAtaIdleImmediate DECLARE_IMPORT(18, sceAtaIdleImmediate)
95 #define I_ata_device_sector_io64 DECLARE_IMPORT(19, ata_device_sector_io64)
98 #define ata_get_devinfo sceAtaInit
99 #define ata_reset_devices sceAtaSoftReset
100 #define ata_io_start sceAtaExecCmd
101 #define ata_io_finish sceAtaWaitResult
102 #define ata_get_error sceAtaGetError
103 #define ata_device_sector_io sceAtaDmaTransfer
104 #define ata_device_sce_sec_set_password sceAtaSecuritySetPassword
105 #define ata_device_sce_sec_unlock sceAtaSecurityUnLock
106 #define ata_device_sce_sec_erase sceAtaSecurityEraseUnit
107 #define ata_device_idle sceAtaIdle
108 #define ata_device_sce_identify_drive sceAtaGetSceId
109 #define ata_device_smart_get_status sceAtaSmartReturnStatus
110 #define ata_device_smart_save_attr sceAtaSmartSaveAttr
111 #define ata_device_flush_cache sceAtaFlushCache
112 #define ata_device_idle_immediate sceAtaIdleImmediate
113 #define ata_device_dma_transfer sceAtaDmaTransfer
115 #define I_ata_get_devinfo I_sceAtaInit
116 #define I_ata_reset_devices I_sceAtaSoftReset
117 #define I_ata_io_start I_sceAtaExecCmd
118 #define I_ata_io_finish I_sceAtaWaitResult
119 #define I_ata_get_error I_sceAtaGetError
120 #define I_ata_device_sector_io I_sceAtaDmaTransfer
121 #define I_ata_device_sce_sec_set_password I_sceAtaSecuritySetPassword
122 #define I_ata_device_sce_sec_unlock I_sceAtaSecurityUnLock
123 #define I_ata_device_sce_sec_erase I_sceAtaSecurityEraseUnit
124 #define I_ata_device_idle I_sceAtaIdle
125 #define I_ata_device_sce_identify_drive I_sceAtaGetSceId
126 #define I_ata_device_smart_get_status I_sceAtaSmartReturnStatus
127 #define I_ata_device_smart_save_attr I_sceAtaSmartSaveAttr
128 #define I_ata_device_flush_cache I_sceAtaFlushCache
129 #define I_ata_device_idle_immediate I_sceAtaIdleImmediate
130 #define I_ata_device_dma_transfer I_sceAtaDmaTransfer