PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
irx.h File Reference
#include <types.h>
+ Include dependency graph for irx.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  irx_id
 
struct  irx_import_table
 
struct  irx_import_stub
 
struct  irx_export_table
 

Macros

#define IRX_VER(major, minor)   ((((major) & 0xff) << 8) + ((minor) & 0xff))
 
#define IRX_ID(name, major, minor)
 
#define IMPORT_MAGIC   0x41e00000
 
#define DECLARE_IMPORT_TABLE(modname, major, minor)
 
#define STR(val)   #val
 
#define DECLARE_IMPORT(ord, name)
 
#define END_IMPORT_TABLE    __asm__ (".section\t.text\n\t.word\t0, 0");
 
#define EXPORT_MAGIC   0x41c00000
 
#define DECLARE_EXPORT_TABLE(modname, major, minor)
 
#define DECLARE_EXPORT(fptr)    __asm__ (".section\t.text\n\t.word\t" STR(fptr));
 
#define END_EXPORT_TABLE   __asm__ (".section\t.text\n\t.word\t0");
 

Functions

struct irx_import_table __attribute ((packed))
 
void __attribute__ ((unused)) _retonly()
 

Variables

u32 magic
 
struct irx_import_tablenext
 
u16 version
 
u16 mode
 
char name [8]
 
void * stubs []
 
u32 jump
 
u16 fno
 
u16 ori_zero
 
struct irx_export_table __attribute
 

Detailed Description

Convienence macros for IRX modules.

Definition in file irx.h.


Data Structure Documentation

◆ irx_id

struct irx_id

Definition at line 27 of file irx.h.

Data Fields
const char * n
u16 v

◆ irx_import_table

struct irx_import_table

Definition at line 42 of file irx.h.

+ Collaboration diagram for irx_import_table:
Data Fields
u32 magic
struct irx_import_table * next
u16 version
u16 mode
char name[8]
void * stubs[]

◆ irx_import_stub

struct irx_import_stub

Definition at line 52 of file irx.h.

Data Fields
u32 jump
u16 fno
u16 ori_zero

◆ irx_export_table

struct irx_export_table

Definition at line 90 of file irx.h.

+ Collaboration diagram for irx_export_table:
Data Fields
u32 magic
struct irx_export_table * next
u16 version
u16 mode
u8 name[8]
void * fptrs[]

Macro Definition Documentation

◆ IRX_VER

#define IRX_VER (   major,
  minor 
)    ((((major) & 0xff) << 8) + ((minor) & 0xff))

Definition at line 25 of file irx.h.

◆ IRX_ID

#define IRX_ID (   name,
  major,
  minor 
)
Value:
struct irx_id _irx_id = { \
name, IRX_VER(major, minor) \
};
Definition irx.h:27

Definition at line 32 of file irx.h.

◆ IMPORT_MAGIC

#define IMPORT_MAGIC   0x41e00000

Definition at line 40 of file irx.h.

◆ DECLARE_IMPORT_TABLE

#define DECLARE_IMPORT_TABLE (   modname,
  major,
  minor 
)
Value:
static struct irx_import_table _imp_##modname \
__attribute__((section(".text\n\t#"), unused))= { \
magic: IMPORT_MAGIC, version: IRX_VER(major, minor), \
name: #modname, };
unsigned int version
Definition fileXio.h:3

Definition at line 62 of file irx.h.

◆ STR

#define STR (   val)    #val

Definition at line 68 of file irx.h.

◆ DECLARE_IMPORT

#define DECLARE_IMPORT (   ord,
  name 
)
Value:
__asm__ (".section\t.text\n\t" \
".globl\t"#name"\n\t"#name":\n\t" \
".word 0x03e00008\n\t" \
".word " STR(0x24000000|ord));

Definition at line 70 of file irx.h.

◆ END_IMPORT_TABLE

#define END_IMPORT_TABLE    __asm__ (".section\t.text\n\t.word\t0, 0");

Definition at line 76 of file irx.h.

◆ EXPORT_MAGIC

#define EXPORT_MAGIC   0x41c00000

Definition at line 86 of file irx.h.

◆ DECLARE_EXPORT_TABLE

#define DECLARE_EXPORT_TABLE (   modname,
  major,
  minor 
)
Value:
struct irx_export_table _exp_##modname \
__attribute__((section(".text\n\t#"), unused)) = { \
magic: EXPORT_MAGIC, version: IRX_VER(major, minor), \
name: #modname, };

Definition at line 99 of file irx.h.

◆ DECLARE_EXPORT

#define DECLARE_EXPORT (   fptr)     __asm__ (".section\t.text\n\t.word\t" STR(fptr));

Definition at line 105 of file irx.h.

◆ END_EXPORT_TABLE

#define END_EXPORT_TABLE   __asm__ (".section\t.text\n\t.word\t0");

Definition at line 108 of file irx.h.

Variable Documentation

◆ magic

u32 magic

Definition at line 0 of file irx.h.

◆ next

struct irx_import_table* next

Definition at line 1 of file irx.h.

◆ version

u16 version

Definition at line 2 of file irx.h.

◆ mode

u16 mode

Definition at line 3 of file irx.h.

◆ name

char name[8]

Definition at line 4 of file irx.h.

◆ stubs

void* stubs[]

Definition at line 5 of file irx.h.

◆ jump

u32 jump

Definition at line 0 of file irx.h.

◆ fno

u16 fno

Definition at line 1 of file irx.h.

◆ ori_zero

u16 ori_zero

Definition at line 2 of file irx.h.