PS2SDK
PS2 Homebrew Libraries
|
#include "screenshot.h"
#include <tamtypes.h>
#include <kernel.h>
#include <fcntl.h>
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | PS2SS_GIF_AD 0x0e |
#define | PS2SS_GIFTAG(NLOOP, EOP, PRE, PRIM, FLG, NREG) |
#define | PS2SS_GSBITBLTBUF_SET(sbp, sbw, spsm, dbp, dbw, dpsm) |
#define | PS2SS_GSTRXREG_SET(rrw, rrh) |
#define | PS2SS_GSTRXPOS_SET(ssax, ssay, dsax, dsay, dir) |
#define | PS2SS_GSTRXDIR_SET(xdr) |
#define | PS2SS_GSBITBLTBUF 0x50 |
#define | PS2SS_GSFINISH 0x61 |
#define | PS2SS_GSTRXPOS 0x51 |
#define | PS2SS_GSTRXREG 0x52 |
#define | PS2SS_GSTRXDIR 0x53 |
#define | PS2SS_GSPSMCT32 0 |
#define | PS2SS_GSPSMCT24 1 |
#define | PS2SS_GSPSMCT16 2 |
#define | PS2SS_D1_CHCR ((volatile unsigned int *)(0x10009000)) |
#define | PS2SS_D1_MADR ((volatile unsigned int *)(0x10009010)) |
#define | PS2SS_D1_QWC ((volatile unsigned int *)(0x10009020)) |
#define | PS2SS_D1_TADR ((volatile unsigned int *)(0x10009030)) |
#define | PS2SS_D1_ASR0 ((volatile unsigned int *)(0x10009040)) |
#define | PS2SS_D1_ASR1 ((volatile unsigned int *)(0x10009050)) |
#define | PS2SS_CSR_FINISH (1 << 1) |
#define | PS2SS_GS_CSR ((volatile u64 *)(0x12001000)) |
#define | PS2SS_GS_BUSDIR ((volatile u64 *)(0x12001040)) |
#define | PS2SS_VIF1_STAT ((volatile u32 *)(0x10003c00)) |
#define | PS2SS_VIF1_STAT_FDR (1<< 23) |
#define | PS2SS_VIF1_MSKPATH3(mask) |
#define | PS2SS_VIF1_NOP 0 |
#define | PS2SS_VIF1_FLUSHA (((u32)0x13 << 24)) |
#define | PS2SS_VIF1_DIRECT(count) |
#define | PS2SS_VIF1_FIFO ((volatile u128 *)(0x10005000)) |
Functions | |
void | ps2_screenshot_16to32_buffer (void *pTemp, u32 w, u32 h) |
void | ps2_screenshot_16to32_line (void *pTemp, u32 w) |
int | ps2_screenshot_file (const char *pFilename, unsigned int VramAdress, unsigned int Width, unsigned int Height, unsigned int Psm) |
int | ps2_screenshot (void *pDest, unsigned int VramAdress, unsigned int x, unsigned int y, unsigned int Width, unsigned int Height, unsigned int Psm) |
Screenshot
Definition in file screenshot.c.
#define PS2SS_GIF_AD 0x0e |
Definition at line 25 of file screenshot.c.
#define PS2SS_GIFTAG | ( | NLOOP, | |
EOP, | |||
PRE, | |||
PRIM, | |||
FLG, | |||
NREG ) |
Definition at line 27 of file screenshot.c.
#define PS2SS_GSBITBLTBUF_SET | ( | sbp, | |
sbw, | |||
spsm, | |||
dbp, | |||
dbw, | |||
dpsm ) |
Definition at line 35 of file screenshot.c.
#define PS2SS_GSTRXREG_SET | ( | rrw, | |
rrh ) |
Definition at line 40 of file screenshot.c.
#define PS2SS_GSTRXPOS_SET | ( | ssax, | |
ssay, | |||
dsax, | |||
dsay, | |||
dir ) |
Definition at line 43 of file screenshot.c.
#define PS2SS_GSTRXDIR_SET | ( | xdr | ) |
Definition at line 48 of file screenshot.c.
#define PS2SS_GSBITBLTBUF 0x50 |
Definition at line 50 of file screenshot.c.
#define PS2SS_GSFINISH 0x61 |
Definition at line 51 of file screenshot.c.
#define PS2SS_GSTRXPOS 0x51 |
Definition at line 52 of file screenshot.c.
#define PS2SS_GSTRXREG 0x52 |
Definition at line 53 of file screenshot.c.
#define PS2SS_GSTRXDIR 0x53 |
Definition at line 54 of file screenshot.c.
#define PS2SS_GSPSMCT32 0 |
Definition at line 56 of file screenshot.c.
#define PS2SS_GSPSMCT24 1 |
Definition at line 57 of file screenshot.c.
#define PS2SS_GSPSMCT16 2 |
Definition at line 58 of file screenshot.c.
#define PS2SS_D1_CHCR ((volatile unsigned int *)(0x10009000)) |
Definition at line 60 of file screenshot.c.
#define PS2SS_D1_MADR ((volatile unsigned int *)(0x10009010)) |
Definition at line 61 of file screenshot.c.
#define PS2SS_D1_QWC ((volatile unsigned int *)(0x10009020)) |
Definition at line 62 of file screenshot.c.
#define PS2SS_D1_TADR ((volatile unsigned int *)(0x10009030)) |
Definition at line 63 of file screenshot.c.
#define PS2SS_D1_ASR0 ((volatile unsigned int *)(0x10009040)) |
Definition at line 64 of file screenshot.c.
#define PS2SS_D1_ASR1 ((volatile unsigned int *)(0x10009050)) |
Definition at line 65 of file screenshot.c.
#define PS2SS_CSR_FINISH (1 << 1) |
Definition at line 67 of file screenshot.c.
#define PS2SS_GS_CSR ((volatile u64 *)(0x12001000)) |
Definition at line 68 of file screenshot.c.
#define PS2SS_GS_BUSDIR ((volatile u64 *)(0x12001040)) |
Definition at line 69 of file screenshot.c.
#define PS2SS_VIF1_STAT ((volatile u32 *)(0x10003c00)) |
Definition at line 71 of file screenshot.c.
#define PS2SS_VIF1_STAT_FDR (1<< 23) |
Definition at line 72 of file screenshot.c.
#define PS2SS_VIF1_MSKPATH3 | ( | mask | ) |
Definition at line 73 of file screenshot.c.
#define PS2SS_VIF1_NOP 0 |
Definition at line 74 of file screenshot.c.
#define PS2SS_VIF1_FLUSHA (((u32)0x13 << 24)) |
Definition at line 75 of file screenshot.c.
#define PS2SS_VIF1_DIRECT | ( | count | ) |
Definition at line 76 of file screenshot.c.
#define PS2SS_VIF1_FIFO ((volatile u128 *)(0x10005000)) |
Definition at line 77 of file screenshot.c.
void ps2_screenshot_16to32_buffer | ( | void * | pTemp, |
u32 | w, | ||
u32 | h ) |
Converts to a buffer that fits tga
Definition at line 308 of file screenshot.c.
void ps2_screenshot_16to32_line | ( | void * | pTemp, |
u32 | w ) |
Converts to a buffer that fits tga
Definition at line 300 of file screenshot.c.
int ps2_screenshot_file | ( | const char * | pFilename, |
unsigned int | VramAdress, | ||
unsigned int | Width, | ||
unsigned int | Height, | ||
unsigned int | Psm ) |
Definition at line 84 of file screenshot.c.
int ps2_screenshot | ( | void * | pDest, |
unsigned int | VramAdress, | ||
unsigned int | x, | ||
unsigned int | y, | ||
unsigned int | Width, | ||
unsigned int | Height, | ||
unsigned int | Psm ) |
Downloads vram back to host
pDest | Temporary storeage for the screen (allocated by user) |
VramAdress | pointer to where in vram to transfer from (wordaddress/64) |
Width | Width of Screen |
Height | Width of Screen |
Psm | Pixelformat of screen |
Definition at line 181 of file screenshot.c.