PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
pvrdrv.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2021-2021, 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
17#ifndef __PVRDRV_H__
18#define __PVRDRV_H__
19
20#include <types.h>
21#include <irx.h>
22
23typedef struct __attribute__((aligned(4))) drvdrv_exec_cmd_ack_
24{
25 u16 command;
26 u16 input_word[64];
27 u32 input_word_count;
28 u16 status_4220_ack;
29 u16 ack_status_ack;
30 u16 output_word[64];
31 u32 status_4228_ack;
32 u16 status_4220_comp;
33 u16 comp_status;
34 u16 return_result_word[64];
35 u32 status_4228_comp;
36 u32 timeout;
37 void *input_buffer;
38 u32 input_buffer_length;
39 void *output_buffer;
40 int ack_status_ack2;
41 int phase;
42} drvdrv_exec_cmd_ack;
43
44extern int DvrdrvResetSystem();
45extern int DvrdrvEnableIntr(u16 a1);
46extern int DvrdrvDisableIntr(s16 a1);
47extern int DvrdrvRegisterIntrHandler(int a1, void *arg, void (*a3)(int, void *));
48extern int DvrdrvUnregisterIntrHandler(void (*a1)(int, void *));
49extern int DvrdrvExecCmdAck(drvdrv_exec_cmd_ack *a1);
50extern int DvrdrvExecCmdAckComp(drvdrv_exec_cmd_ack *a1);
51extern int DvrdrvExecCmdAckDmaSendComp(drvdrv_exec_cmd_ack *a1);
52extern int DvrdrvExecCmdAckDmaRecvComp(drvdrv_exec_cmd_ack *a1);
53extern int DvrdrvExecCmdAckDma2Comp(drvdrv_exec_cmd_ack *a1);
54
55#define pvrdrv_IMPORTS_start DECLARE_IMPORT_TABLE(pvrdrv, 1, 1)
56#define pvrdrv_IMPORTS_end END_IMPORT_TABLE
57
58#define I_DvrdrvResetSystem DECLARE_IMPORT(4, DvrdrvResetSystem)
59#define I_DvrdrvEnableIntr DECLARE_IMPORT(5, DvrdrvEnableIntr)
60#define I_DvrdrvDisableIntr DECLARE_IMPORT(6, DvrdrvDisableIntr)
61#define I_DvrdrvRegisterIntrHandler DECLARE_IMPORT(7, DvrdrvRegisterIntrHandler)
62#define I_DvrdrvUnregisterIntrHandler DECLARE_IMPORT(8, DvrdrvUnregisterIntrHandler)
63#define I_DvrdrvExecCmdAck DECLARE_IMPORT(9, DvrdrvExecCmdAck)
64#define I_DvrdrvExecCmdAckComp DECLARE_IMPORT(10, DvrdrvExecCmdAckComp)
65#define I_DvrdrvExecCmdAckDmaSendComp DECLARE_IMPORT(11, DvrdrvExecCmdAckDmaSendComp)
66#define I_DvrdrvExecCmdAckDmaRecvComp DECLARE_IMPORT(12, DvrdrvExecCmdAckDmaRecvComp)
67#define I_DvrdrvExecCmdAckDma2Comp DECLARE_IMPORT(13, DvrdrvExecCmdAckDma2Comp)
68
69#endif