PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
xatapi.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16#ifndef _XATAPI_H
17#define _XATAPI_H
18
19#include <tamtypes.h>
20
21extern int xatapi_2_terminate(int with_quit);
22extern int xatapi_4_sceAtaSoftReset(void);
23extern int xatapi_5_sceAtaExecCmd(
24 void *buf,
25 u32 blkcount,
26 u16 feature,
27 u16 nsector,
28 u16 sector,
29 u16 lcyl,
30 u16 hcyl,
31 u16 select,
32 u16 command,
33 u32 unk10);
34extern int xatapi_6_sceAtaWaitResult(void);
35extern int xatapi_7_sceCdAtapiExecCmd(s16 n, void *buf, int nsec, int secsize, void *pkt, int pkt_len, int proto);
36extern int xatapi_8_sceCdAtapiWaitResult(void);
37extern void xatapi_9_sceCdSpdAtaDmaStart(int dir);
38extern void xatapi_10_sceCdSpdAtaDmaEnd(void);
39extern int xatapi_11_sceAtaGetError(void);
40extern int xatapi_12_get_ata_control(void);
41extern int xatapi_13_get_speed_reg(int regaddr);
42extern int xatapi_14_set_speed_reg(int regaddr, u16 regval);
43extern int xatapi_15_exec_f6_f9_scsi(void);
44
45#define xatapi_IMPORTS_start DECLARE_IMPORT_TABLE(xatapi, 1, 1)
46#define xatapi_IMPORTS_end END_IMPORT_TABLE
47
48#define I_xatapi_2_terminate DECLARE_IMPORT(2, xatapi_2_terminate)
49#define I_xatapi_4_sceAtaSoftReset DECLARE_IMPORT(4, xatapi_4_sceAtaSoftReset)
50#define I_xatapi_5_sceAtaExecCmd DECLARE_IMPORT(5, xatapi_5_sceAtaExecCmd)
51#define I_xatapi_6_sceAtaWaitResult DECLARE_IMPORT(6, xatapi_6_sceAtaWaitResult)
52#define I_xatapi_7_sceCdAtapiExecCmd DECLARE_IMPORT(7, xatapi_7_sceCdAtapiExecCmd)
53#define I_xatapi_8_sceCdAtapiWaitResult DECLARE_IMPORT(8, xatapi_8_sceCdAtapiWaitResult)
54#define I_xatapi_9_sceCdSpdAtaDmaStart DECLARE_IMPORT(9, xatapi_9_sceCdSpdAtaDmaStart)
55#define I_xatapi_10_sceCdSpdAtaDmaEnd DECLARE_IMPORT(10, xatapi_10_sceCdSpdAtaDmaEnd)
56#define I_xatapi_11_sceAtaGetError DECLARE_IMPORT(11, xatapi_11_sceAtaGetError)
57#define I_xatapi_12_get_ata_control DECLARE_IMPORT(12, xatapi_12_get_ata_control)
58#define I_xatapi_13_get_speed_reg DECLARE_IMPORT(13, xatapi_13_get_speed_reg)
59#define I_xatapi_14_set_speed_reg DECLARE_IMPORT(14, xatapi_14_set_speed_reg)
60#define I_xatapi_15_exec_f6_f9_scsi DECLARE_IMPORT(15, xatapi_15_exec_f6_f9_scsi)
61
62#endif