Nugget
Bare-metal libraries and examples for the original PlayStation
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
gpdplayer.c File Reference
#include "gpdplayer/gpdplayer.h"
#include <stddef.h>
#include <stdint.h>
#include "common/hardware/hwregs.h"
#include "common/kernel/pcdrv.h"
#include "common/syscalls/syscalls.h"
Include dependency graph for gpdplayer.c:

Classes

struct  MemoryReader
 

Macros

#define PKT_GP0   0x00
 
#define PKT_GP1   0x01
 
#define PKT_VSYNC   0x02
 
#define PKT_THROW_AWAY   0x03
 
#define PKT_READBACK   0x04
 
#define PKT_TRACE_BEGIN   0x05
 
#define PKT_GPU_VERSION   0x06
 
#define PKT_GAME_ID   0x10
 
#define PKT_VIDEO_FORMAT   0x11
 
#define PKT_COMMENT   0x12
 
#define GPUSTAT_FIFO_NOT_FULL   0x02000000
 
#define GPUSTAT_CMD_READY   0x04000000
 
#define GPUSTAT_READ_READY   0x08000000
 
#define GPUSTAT_FIFO_EMPTY   0x10000000
 
#define GPUSTAT_DMA_DIR   0x60000000
 
#define BUFFER_WORDS   256
 
#define CD_SECTOR_SIZE   2048
 
#define CD_BUFFER_SECTORS   8
 

Enumerations

enum  GP0State { GP0_COMMAND , GP0_PARAMS , GP0_UPLOAD , GP0_POLYLINE }
 

Functions

int GPD_Check (const void *header16)
 
int GPD_Init (GPD_ReadFn fn, void *ctx)
 
int GPD_PlayFrame ()
 
int GPD_InitMemory (const void *data, uint32_t size)
 
int GPD_InitPCdrv (const char *hostPath)
 
int GPD_InitCDRom (const char *path)
 
void GPD_Close ()
 

Variables

uint32_t GPD_GPUVersion = 0
 
uint32_t GPD_Frame = 0
 

Macro Definition Documentation

◆ BUFFER_WORDS

#define BUFFER_WORDS   256

◆ CD_BUFFER_SECTORS

#define CD_BUFFER_SECTORS   8

◆ CD_SECTOR_SIZE

#define CD_SECTOR_SIZE   2048

◆ GPUSTAT_CMD_READY

#define GPUSTAT_CMD_READY   0x04000000

◆ GPUSTAT_DMA_DIR

#define GPUSTAT_DMA_DIR   0x60000000

◆ GPUSTAT_FIFO_EMPTY

#define GPUSTAT_FIFO_EMPTY   0x10000000

◆ GPUSTAT_FIFO_NOT_FULL

#define GPUSTAT_FIFO_NOT_FULL   0x02000000

◆ GPUSTAT_READ_READY

#define GPUSTAT_READ_READY   0x08000000

◆ PKT_COMMENT

#define PKT_COMMENT   0x12

◆ PKT_GAME_ID

#define PKT_GAME_ID   0x10

◆ PKT_GP0

#define PKT_GP0   0x00

◆ PKT_GP1

#define PKT_GP1   0x01

◆ PKT_GPU_VERSION

#define PKT_GPU_VERSION   0x06

◆ PKT_READBACK

#define PKT_READBACK   0x04

◆ PKT_THROW_AWAY

#define PKT_THROW_AWAY   0x03

◆ PKT_TRACE_BEGIN

#define PKT_TRACE_BEGIN   0x05

◆ PKT_VIDEO_FORMAT

#define PKT_VIDEO_FORMAT   0x11

◆ PKT_VSYNC

#define PKT_VSYNC   0x02

Enumeration Type Documentation

◆ GP0State

enum GP0State
Enumerator
GP0_COMMAND 
GP0_PARAMS 
GP0_UPLOAD 
GP0_POLYLINE 

Function Documentation

◆ GPD_Check()

int GPD_Check ( const void *  header16)

◆ GPD_Close()

void GPD_Close ( )

◆ GPD_Init()

int GPD_Init ( GPD_ReadFn  fn,
void *  ctx 
)

◆ GPD_InitCDRom()

int GPD_InitCDRom ( const char *  path)

◆ GPD_InitMemory()

int GPD_InitMemory ( const void *  data,
uint32_t  size 
)

◆ GPD_InitPCdrv()

int GPD_InitPCdrv ( const char *  hostPath)

◆ GPD_PlayFrame()

int GPD_PlayFrame ( )

Variable Documentation

◆ GPD_Frame

uint32_t GPD_Frame = 0

◆ GPD_GPUVersion

uint32_t GPD_GPUVersion = 0