sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
irx.h File Reference
#include <types.h>

Go to the source code of this file.

Classes

struct  irx_id
struct  irx_import_table
struct  irx_import_stub
struct  irx_export_table

Macros

#define IRX_VER(major, minor)
#define IRX_ID(name, major, minor)
#define IMPORT_MAGIC   0x41e00000
#define STR(val)
#define XSTR(val)
#define IRX_ASM_NAME(modname)
#define DECLARE_IMPORT_TABLE(modname, major, minor)
#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)
#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_table * next
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.

Macro Definition Documentation

◆ DECLARE_EXPORT

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

Definition at line 145 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, };
unsigned int version
Definition fileXio.h:3

Definition at line 138 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 97 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, };

Definition at line 89 of file irx.h.

◆ END_EXPORT_TABLE

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

Definition at line 148 of file irx.h.

◆ END_IMPORT_TABLE

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

Definition at line 103 of file irx.h.

◆ EXPORT_MAGIC

#define EXPORT_MAGIC   0x41c00000

Definition at line 113 of file irx.h.

◆ IMPORT_MAGIC

#define IMPORT_MAGIC   0x41e00000

Definition at line 41 of file irx.h.

◆ IRX_ASM_NAME

#define IRX_ASM_NAME ( modname)
Value:
".set\t.Lirx_name_len, 0\n\t" \
".irpc\tc, " #modname "\n\t" \
".if .Lirx_name_len < 8\n\t" \
".ascii\t\"\\c\"\n\t" \
".endif\n\t" \
".set\t.Lirx_name_len, .Lirx_name_len + 1\n\t" \
".endr\n\t" \
".if .Lirx_name_len < 8\n\t" \
".fill\t8 - .Lirx_name_len, 1, 0\n\t" \
".endif\n"

Definition at line 67 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:28

Definition at line 33 of file irx.h.

◆ IRX_VER

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

Definition at line 26 of file irx.h.

◆ STR

#define STR ( val)
Value:
#val

Definition at line 63 of file irx.h.

◆ XSTR

#define XSTR ( val)
Value:
STR(val)

Definition at line 64 of file irx.h.

Variable Documentation

◆ fno

u16 fno

Definition at line 1 of file irx.h.

◆ jump

u32 jump

Definition at line 0 of file irx.h.

◆ magic

u32 magic

Definition at line 0 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.

◆ next

struct irx_import_table* next ( void )

Definition at line 1 of file irx.h.

◆ ori_zero

u16 ori_zero

Definition at line 2 of file irx.h.

◆ stubs

void* stubs[]

Definition at line 5 of file irx.h.

◆ version

u16 version

Definition at line 2 of file irx.h.