PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
imgdrv.c File Reference
#include <ioman.h>
#include <irx.h>
#include <loadcore.h>
+ Include dependency graph for imgdrv.c:

Go to the source code of this file.

Data Structures

struct  _iop_device_ops_short
 

Macros

#define MODNAME   "imgdrv"
 
#define MAX_IMAGES   2
 

Typedefs

typedef struct _iop_device_ops_short iop_device_ops_short_t
 

Functions

 IRX_ID (MODNAME, 1, 1)
 
static int imgdrv_read (iop_file_t *f, void *buf, int size)
 
static int imgdrv_lseek (iop_file_t *f, int offset, int whence)
 
 IOMAN_RETURN_VALUE_IMPL (0)
 
int _start (int argc, char *argv[])
 

Variables

static iop_device_ops_short_t imgdrv_ops
 
void * img [MAX_IMAGES] = {(void *)0xDEC1DEC1, 0}
 
int img_size [MAX_IMAGES] = {0xDEC2DEC2, 0}
 
static iop_device_t img_device
 

Detailed Description

Image device driver (IMGDRV) Used by the special IOP reboot sequence, to reboot the IOP with a buffered IOPRP image.

Definition in file imgdrv.c.


Data Structure Documentation

◆ _iop_device_ops_short

struct _iop_device_ops_short

Definition at line 30 of file imgdrv.c.

Data Fields
int(*)(iop_device_t *) init
int(*)(iop_device_t *) deinit
int(*)(iop_file_t *) format
int(*)(iop_file_t *, const char *, int) open
int(*)(iop_file_t *) close
int(*)(iop_file_t *, void *, int) read
int(*)(iop_file_t *, void *, int) write
int(*)(iop_file_t *, int, int) lseek

Macro Definition Documentation

◆ MODNAME

#define MODNAME   "imgdrv"

Definition at line 20 of file imgdrv.c.

◆ MAX_IMAGES

#define MAX_IMAGES   2

Definition at line 55 of file imgdrv.c.

Function Documentation

◆ imgdrv_read()

static int imgdrv_read ( iop_file_t * f,
void * buf,
int size )
static

Definition at line 73 of file imgdrv.c.

◆ imgdrv_lseek()

static int imgdrv_lseek ( iop_file_t * f,
int offset,
int whence )
static

Definition at line 87 of file imgdrv.c.

◆ _start()

int _start ( int argc,
char * argv[] )

Definition at line 68 of file imgdrv.c.

Variable Documentation

◆ imgdrv_ops

iop_device_ops_short_t imgdrv_ops
static
Initial value:
= {
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
&imgdrv_read,
IOMAN_RETURN_VALUE(0),
&imgdrv_lseek,
}

Definition at line 44 of file imgdrv.c.

◆ img

void* img[MAX_IMAGES] = {(void *)0xDEC1DEC1, 0}

Definition at line 57 of file imgdrv.c.

◆ img_size

int img_size[MAX_IMAGES] = {0xDEC2DEC2, 0}

Definition at line 58 of file imgdrv.c.

◆ img_device

iop_device_t img_device
static
Initial value:
= {
"img",
IOP_DT_FS,
1,
"img",
(iop_device_ops_t *)&imgdrv_ops,
}

Definition at line 60 of file imgdrv.c.