sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
main.c
1#include <stdio.h>
2#include <string.h>
3#include <kernel.h>
4
5#include <loadfile.h>
6#include <sbv_patches.h>
7#include <sifrpc.h>
8
9extern int kputs(char *s);
10
11extern unsigned char mmio_irx[];
12extern unsigned int size_mmio_irx;
13
14static int test_main(void) {
15 int result = -1;
16 SifInitRpc(0);
18 int id = SifExecModuleBuffer(mmio_irx, size_mmio_irx, 0, NULL, &result);
19 /* The module returns 1 (no resident end) when constant-address accesses match explicit ones. */
20 kputs(id > 0 && result == 1 ? "iop-mmio: PASS\n" : "iop-mmio: FAIL\n");
21 return id > 0 && result == 1 ? 0 : 1;
22}
23
24int main(void) {
25 int result = test_main();
26 printf("[ps2rig] exit=%d\n", result ? 1 : 0);
27 SleepThread();
28 return 0;
29}
int SifExecModuleBuffer(void *ptr, u32 size, u32 arg_len, const char *args, int *mod_res)
Definition loadfile.c:314
int sbv_patch_enable_lmb(void)