sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
ioptrap.h File Reference
#include <types.h>
#include <irx.h>

Go to the source code of this file.

Classes

struct  exception_frame

Macros

#define DCIC_WR   (1 << 27)
#define DCIC_RD   (1 << 26)
#define DCIC_DA   (1 << 25)
#define DCIC_PC   (1 << 24)
#define ioptrap_IMPORTS_start   DECLARE_IMPORT_TABLE(ioptrap, 1, 1)
#define ioptrap_IMPORTS_end   END_IMPORT_TABLE
#define I_get_exception_name   DECLARE_IMPORT(4, get_exception_name)
#define I_dbg_setjmp   DECLARE_IMPORT(5, dbg_setjmp)
#define I_set_exception_handler   DECLARE_IMPORT(6, set_exception_handler)
#define I_get_exception_handler   DECLARE_IMPORT(7, get_exception_handler)
#define I_set_dba   DECLARE_IMPORT(8, set_dba)
#define I_set_dbam   DECLARE_IMPORT(9, set_dbam)
#define I_set_dcic   DECLARE_IMPORT(10, set_dcic)
#define I_get_dba   DECLARE_IMPORT(11, get_dba)
#define I_get_dbam   DECLARE_IMPORT(12, get_dbam)
#define I_get_dcic   DECLARE_IMPORT(13, get_dcic)

Typedefs

typedef struct exception_frame exception_frame_t
typedef void(*) trap_exception_handler_t(exception_type_t type, exception_frame_t *ex)

Enumerations

enum  exception_type_t {
  EXCEPTION_Int , EXCEPTION_Mod , EXCEPTION_TLBL , EXCEPTION_TLBS ,
  EXCEPTION_AdEL , EXCEPTION_AdES , EXCEPTION_IBE , EXCEPTION_DBE ,
  EXCEPTION_Syscall , EXCEPTION_Bp , EXCEPTION_RI , EXCEPTION_CpU ,
  EXCEPTION_Ov , EXCEPTION_RESERVED13 , EXCEPTION_RESERVED14
}

Functions

const char * get_exception_name (exception_type_t type)
exception_type_t dbg_setjmp ()
trap_exception_handler_t set_exception_handler (exception_type_t type, trap_exception_handler_t handler)
trap_exception_handler_t get_exception_handler (exception_type_t type)
void set_dba (u32 v)
void set_dbam (u32 v)
void set_dcic (u32 v)
u32 get_dba ()
u32 get_dbam ()
u32 get_dcic ()

Detailed Description

IOP exception handling.

Definition in file ioptrap.h.

Macro Definition Documentation

◆ DCIC_DA

#define DCIC_DA   (1 << 25)

Definition at line 59 of file ioptrap.h.

◆ DCIC_PC

#define DCIC_PC   (1 << 24)

Definition at line 60 of file ioptrap.h.

◆ DCIC_RD

#define DCIC_RD   (1 << 26)

Definition at line 58 of file ioptrap.h.

◆ DCIC_WR

#define DCIC_WR   (1 << 27)

Definition at line 57 of file ioptrap.h.

◆ I_dbg_setjmp

#define I_dbg_setjmp   DECLARE_IMPORT(5, dbg_setjmp)

Definition at line 86 of file ioptrap.h.

◆ I_get_dba

#define I_get_dba   DECLARE_IMPORT(11, get_dba)

Definition at line 92 of file ioptrap.h.

◆ I_get_dbam

#define I_get_dbam   DECLARE_IMPORT(12, get_dbam)

Definition at line 93 of file ioptrap.h.

◆ I_get_dcic

#define I_get_dcic   DECLARE_IMPORT(13, get_dcic)

Definition at line 94 of file ioptrap.h.

◆ I_get_exception_handler

#define I_get_exception_handler   DECLARE_IMPORT(7, get_exception_handler)

Definition at line 88 of file ioptrap.h.

◆ I_get_exception_name

#define I_get_exception_name   DECLARE_IMPORT(4, get_exception_name)

Definition at line 85 of file ioptrap.h.

◆ I_set_dba

#define I_set_dba   DECLARE_IMPORT(8, set_dba)

Definition at line 89 of file ioptrap.h.

◆ I_set_dbam

#define I_set_dbam   DECLARE_IMPORT(9, set_dbam)

Definition at line 90 of file ioptrap.h.

◆ I_set_dcic

#define I_set_dcic   DECLARE_IMPORT(10, set_dcic)

Definition at line 91 of file ioptrap.h.

◆ I_set_exception_handler

#define I_set_exception_handler   DECLARE_IMPORT(6, set_exception_handler)

Definition at line 87 of file ioptrap.h.

◆ ioptrap_IMPORTS_end

#define ioptrap_IMPORTS_end   END_IMPORT_TABLE

Definition at line 83 of file ioptrap.h.

◆ ioptrap_IMPORTS_start

#define ioptrap_IMPORTS_start   DECLARE_IMPORT_TABLE(ioptrap, 1, 1)

Definition at line 82 of file ioptrap.h.

Typedef Documentation

◆ trap_exception_handler_t

typedef void(*) trap_exception_handler_t(exception_type_t type, exception_frame_t *ex)

Definition at line 55 of file ioptrap.h.

Enumeration Type Documentation

◆ exception_type_t

enum exception_type_t

Definition at line 23 of file ioptrap.h.

Function Documentation

◆ dbg_setjmp()

exception_type_t dbg_setjmp ( )
extern

Definition at line 64 of file ioptrap.c.

◆ get_dba()

u32 get_dba ( )
extern

Definition at line 29 of file breakpoint.c.

◆ get_dbam()

u32 get_dbam ( )
extern

Definition at line 36 of file breakpoint.c.

◆ get_dcic()

u32 get_dcic ( )
extern

Definition at line 43 of file breakpoint.c.

◆ get_exception_handler()

trap_exception_handler_t get_exception_handler ( exception_type_t type)
extern

Definition at line 154 of file ioptrap.c.

◆ get_exception_name()

const char * get_exception_name ( exception_type_t type)
extern

Definition at line 52 of file ioptrap.c.

◆ set_dba()

void set_dba ( u32 v)
extern

Definition at line 14 of file breakpoint.c.

◆ set_dbam()

void set_dbam ( u32 v)
extern

Definition at line 19 of file breakpoint.c.

◆ set_dcic()

void set_dcic ( u32 v)
extern

Definition at line 24 of file breakpoint.c.

◆ set_exception_handler()

trap_exception_handler_t set_exception_handler ( exception_type_t type,
trap_exception_handler_t handler )
extern

Definition at line 147 of file ioptrap.c.