DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
libpkt.h
1#pragma once
2
3/* Vendor SDK declarations. The reconstruction is given no system include path at all — only the
4 game's own headers — which is why this is reached with quotes rather than as <libpkt.h>. */
5
6#include "common.h"
7
8/* A cursor over a buffer the caller supplies, plus the tag currently left open so that closing it
9 can write the length nobody knew when it was opened. */
11 u_int *pCurrent;
12 u_int *pBase;
13 u_int *pOpenTag;
14 u_int *pOpenDma;
15 u_int *reserved[4];
16};
17
18/* The GIF channel's own packet, laid out the same way and driven by the same open/close pairs.
19 The reconstruction reaches only its base, which is the address the DMA channel is handed once
20 the packet is closed. */
22 u_long128 *pCurrent;
23 u_long128 *pBase;
24 u_long128 *pOpenTag;
25 u_int reserved;
26};
27
28extern "C" {
29
30void sceVif1PkInit(sceVif1Packet *packet, u_int *base);
31void sceVif1PkReset(sceVif1Packet *packet);
32u_int *sceVif1PkTerminate(sceVif1Packet *packet);
33u_int *sceVif1PkEnd(sceVif1Packet *packet, u_int next);
34void sceVif1PkReserve(sceVif1Packet *packet, int count);
35
36void sceVif1PkCnt(sceVif1Packet *packet, int irq);
37void sceVif1PkOpenDirectCode(sceVif1Packet *packet, int irq);
38void sceVif1PkCloseDirectCode(sceVif1Packet *packet);
39void sceVif1PkOpenGifTag(sceVif1Packet *packet, u_long128 giftag);
40void sceVif1PkCloseGifTag(sceVif1Packet *packet);
41void sceVif1PkAddGsAD(sceVif1Packet *packet, int reg, u_long data);
42void sceVif1PkRefLoadImage(sceVif1Packet *packet, u_short dbp, u_char dpsm, u_short dbw,
43 u_long128 *src, u_int qwc, u_int dsax, u_int dsay,
44 u_int rrw, u_int rrh);
45void sceVif1PkCall(sceVif1Packet *packet, u_long128 *address, u_int count);
46
47void sceGifPkInit(sceGifPacket *packet, u_long128 *base);
48void sceGifPkReset(sceGifPacket *packet);
49u_int *sceGifPkTerminate(sceGifPacket *packet);
50u_int *sceGifPkEnd(sceGifPacket *packet, int pce, int irq, int pad);
51void sceGifPkCnt(sceGifPacket *packet, int pce, int irq, int pad);
52void sceGifPkOpenGifTag(sceGifPacket *packet, u_long128 giftag);
53void sceGifPkCloseGifTag(sceGifPacket *packet);
54void sceGifPkAddGsAD(sceGifPacket *packet, int reg, u_long data);
55void sceGifPkRefLoadImage(sceGifPacket *packet, u_short dbp, u_char dpsm, u_short dbw,
56 u_long128 *src, u_int qwc, u_int dsax, u_int dsay,
57 u_int rrw, u_int rrh);
58}