| 290 | } |
| 291 | |
| 292 | void initExceptionHandler() |
| 293 | { |
| 294 | SceKernelLMOption option; |
| 295 | int args[2], fd {0}, modid {0}; |
| 296 | |
| 297 | memset(&option, 0, sizeof(option)); |
| 298 | option.size = sizeof(option); |
| 299 | option.mpidtext = PSP_MEMORY_PARTITION_KERNEL; |
| 300 | option.mpiddata = PSP_MEMORY_PARTITION_KERNEL; |
| 301 | option.position = 0; |
| 302 | option.access = 1; |
| 303 | |
| 304 | if((modid = sceKernelLoadModule("exception.prx", 0, &option)) >= 0) |
| 305 | { |
| 306 | args[0] = (int)ExceptionHandler; |
| 307 | args[1] = (int)&exception_regs; |
| 308 | sceKernelStartModule(modid, 8, args, &fd, nullptr); |
| 309 | } |
| 310 | } |