PS2SDK
PS2 Homebrew Libraries
atad.h File Reference
#include <types.h>
#include <irx.h>
+ Include dependency graph for atad.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _ata_devinfo
 

Macros

#define ATA_DIR_READ   0
 
#define ATA_DIR_WRITE   1
 
#define ATA_RES_ERR_NOTREADY   -501
 
#define ATA_RES_ERR_TIMEOUT   -502
 
#define ATA_RES_ERR_IO   -503
 
#define ATA_RES_ERR_NODATA   -504
 
#define ATA_RES_ERR_NODEV   -505
 
#define ATA_RES_ERR_CMD   -506
 
#define ATA_RES_ERR_LOCKED   -509
 
#define ATA_RES_ERR_ICRC   -510
 
#define atad_IMPORTS_start   DECLARE_IMPORT_TABLE(atad, 1, 3)
 
#define atad_IMPORTS_end   END_IMPORT_TABLE
 
#define I_sceAtaInit   DECLARE_IMPORT(4, sceAtaInit)
 
#define I_sceAtaSoftReset   DECLARE_IMPORT(5, sceAtaSoftReset)
 
#define I_sceAtaExecCmd   DECLARE_IMPORT(6, sceAtaExecCmd)
 
#define I_sceAtaWaitResult   DECLARE_IMPORT(7, sceAtaWaitResult)
 
#define I_sceAtaGetError   DECLARE_IMPORT(8, sceAtaGetError)
 
#define I_sceAtaDmaTransfer   DECLARE_IMPORT(9, sceAtaDmaTransfer)
 
#define I_sceAtaSecuritySetPassword   DECLARE_IMPORT(10, sceAtaSecuritySetPassword)
 
#define I_sceAtaSecurityUnLock   DECLARE_IMPORT(11, sceAtaSecurityUnLock)
 
#define I_sceAtaSecurityEraseUnit   DECLARE_IMPORT(12, sceAtaSecurityEraseUnit)
 
#define I_sceAtaIdle   DECLARE_IMPORT(13, sceAtaIdle)
 
#define I_sceAtaGetSceId   DECLARE_IMPORT(14, sceAtaGetSceId)
 
#define I_sceAtaSmartReturnStatus   DECLARE_IMPORT(15, sceAtaSmartReturnStatus)
 
#define I_sceAtaSmartSaveAttr   DECLARE_IMPORT(16, sceAtaSmartSaveAttr)
 
#define I_sceAtaFlushCache   DECLARE_IMPORT(17, sceAtaFlushCache)
 
#define I_sceAtaIdleImmediate   DECLARE_IMPORT(18, sceAtaIdleImmediate)
 
#define I_ata_device_sector_io64   DECLARE_IMPORT(19, ata_device_sector_io64)
 
#define ata_get_devinfo   sceAtaInit
 
#define ata_reset_devices   sceAtaSoftReset
 
#define ata_io_start   sceAtaExecCmd
 
#define ata_io_finish   sceAtaWaitResult
 
#define ata_get_error   sceAtaGetError
 
#define ata_device_sector_io   sceAtaDmaTransfer
 
#define ata_device_sce_sec_set_password   sceAtaSecuritySetPassword
 
#define ata_device_sce_sec_unlock   sceAtaSecurityUnLock
 
#define ata_device_sce_sec_erase   sceAtaSecurityEraseUnit
 
#define ata_device_idle   sceAtaIdle
 
#define ata_device_sce_identify_drive   sceAtaGetSceId
 
#define ata_device_smart_get_status   sceAtaSmartReturnStatus
 
#define ata_device_smart_save_attr   sceAtaSmartSaveAttr
 
#define ata_device_flush_cache   sceAtaFlushCache
 
#define ata_device_idle_immediate   sceAtaIdleImmediate
 
#define ata_device_dma_transfer   sceAtaDmaTransfer
 
#define I_ata_get_devinfo   I_sceAtaInit
 
#define I_ata_reset_devices   I_sceAtaSoftReset
 
#define I_ata_io_start   I_sceAtaExecCmd
 
#define I_ata_io_finish   I_sceAtaWaitResult
 
#define I_ata_get_error   I_sceAtaGetError
 
#define I_ata_device_sector_io   I_sceAtaDmaTransfer
 
#define I_ata_device_sce_sec_set_password   I_sceAtaSecuritySetPassword
 
#define I_ata_device_sce_sec_unlock   I_sceAtaSecurityUnLock
 
#define I_ata_device_sce_sec_erase   I_sceAtaSecurityEraseUnit
 
#define I_ata_device_idle   I_sceAtaIdle
 
#define I_ata_device_sce_identify_drive   I_sceAtaGetSceId
 
#define I_ata_device_smart_get_status   I_sceAtaSmartReturnStatus
 
#define I_ata_device_smart_save_attr   I_sceAtaSmartSaveAttr
 
#define I_ata_device_flush_cache   I_sceAtaFlushCache
 
#define I_ata_device_idle_immediate   I_sceAtaIdleImmediate
 
#define I_ata_device_dma_transfer   I_sceAtaDmaTransfer
 

Typedefs

typedef struct _ata_devinfo ata_devinfo_t
 

Functions

ata_devinfo_tsceAtaInit (int device)
 
int sceAtaSoftReset (void)
 
int sceAtaExecCmd (void *buf, u32 blkcount, u16 feature, u16 nsector, u16 sector, u16 lcyl, u16 hcyl, u16 select, u16 command)
 
int sceAtaWaitResult (void)
 
int sceAtaGetError (void)
 
int sceAtaDmaTransfer (int device, void *buf, u32 lba, u32 nsectors, int dir)
 
int sceAtaSecuritySetPassword (int device, void *password)
 
int sceAtaSecurityUnLock (int device, void *password)
 
int sceAtaSecurityEraseUnit (int device)
 
int sceAtaIdle (int device, int period)
 
int sceAtaGetSceId (int device, void *data)
 
int sceAtaSmartReturnStatus (int device)
 
int sceAtaSmartSaveAttr (int device)
 
int sceAtaFlushCache (int device)
 
int sceAtaIdleImmediate (int device)
 
int ata_device_sector_io64 (int device, void *buf, u64 lba, u32 nsectors, int dir)
 

Detailed Description

ATA Device Driver definitions and imports.

Definition in file atad.h.


Data Structure Documentation

◆ _ata_devinfo

struct _ata_devinfo

Definition at line 39 of file xatapi.c.

Data Fields
s32 exists

Was successfully probed.

s32 has_packet

Supports the PACKET command set.

u32 total_sectors

Total number of user sectors.

u32 security_status

Word 0x100 of the identify info.

u32 lba48

Supports the 48-bit LBA command set (unofficial).

u32 total_sectors_lba48

Total number of 48-bit LBA user sectors (unofficial).