Commit Graph
114 Commits
Author SHA1 Message Date
Henrik Rydgård 9205eb642a UWP buildfix, tweaks and de-clauding 2026-08-24 12:15:31 +02:00
Henrik RydgårdandClaude Opus 5 e7e8d362f0 Add sceResmgr, which is what the VSH uses to decrypt the XMB index
Found the cause of the red error screen the VSH ends on. Every resource load in
the boot succeeds - fonts, all the plugin RCOs, topmenu_icon.rco - and then:

  sceIoOpen(flash0:/vsh/etc/index_02g.dat) -> fd 8
  sceIoRead(8, 092a2d40, 496)
  sceIoClose(8)
  unresolved import sceResmgr/9dc14891, called from 'vsh_module'
  sceKernelExitDeleteThread(1)

index_02g.dat is the index of what the XMB displays, and it is encrypted (it
starts "PSPsysGP"). sceResmgr_9DC14891 decrypts it. There was no sceResmgr module
at all, so the call trapped, the index stayed encrypted, and the ScePafJob thread
building the top menu exited - a shell with everything loaded and nothing to show.

This adds the module and the three tags it needs (0x0B2B90F0/91F0/92F0, keys and
code 0x5C) to PrxDecrypter.

It is not the whole fix yet: pspDecryptPRX() tries decryption types 0, 1, 2, 5
and 6, and this needs type 9, which JPCSP passes explicitly. So the call is now
reached and fails cleanly with a logged error instead of trapping, but does not
yet decrypt. Type 9 is a variant of type 2 and is the next job; the notes in
docs/VSHBootInvestigation.md say where it is in JPCSP and how to check a port
(159 bytes out, starting "release:").

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
2026-08-24 11:12:59 +02:00
Henrik Rydgård ed5c05fb28 VSH boot: load real kd/ kernel driver modules
Extends LoadAndStartVshKernelModules() to load the 11 real kd/*.prx
kernel drivers for --vsh (dmacman, systimer, memlmd_01g,
loadexec_01g, lowio, idstorage, syscon, rtc, wlan, wlanfirm_01g, utility),
ahead of the existing 4 VSH-specific modules.
Only active when g_runningVSH, no effect on normal game boot.

Improve implementations of sceKernelSm1ReferOperations and sceKernelIsIntrContext.

Add some more MMIO stubs (GPIO, SYSCON).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
(cherry picked from commit 7f3168b7df85e47438900016c9ee7d7ef01a0a28)
2026-08-24 10:58:35 +02:00
Henrik RydgårdandClaude Sonnet 5 04a8948ded Add a VSH-only allowlist for real-loading flash0 modules, sceVshCommonUtil stub and sceVshBridge
Load and start VSH's kernel modules before booting vshmain.prx

A few flash0 modules (vshbridge.prx, paf.prx, common_gui.prx,
common_util.prx) should run for real once we know we're
actually booting the VSH rather than a game, since our fakes are unlikely
to be good substitutes for the genuine thing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
2026-08-24 10:58:34 +02:00
Henrik Rydgård a0ecf545a6 Implement or stub assorted functions the VSH is calling 2026-08-21 10:56:06 +02:00
Henrik Rydgård 31decccb9a Style and comment settings. Surface a setting in the ImDebugger. 2026-08-20 01:05:19 +02:00
Henrik RydgårdandClaude Sonnet 5 43dccd5903 HLE: implement assorted stubs and minor functionality
This is stuff encountered in the VSH boot research.

sceRtc_driver, scePower_driver, sceImpose_driver, ThreadManForKernel funcs,
sceRtcGetAlarmTick, sceHprm_driver/sceHprmReadLatch

sceVshBridge_Driver imports sceKernelResumeDispatchThread, SuspendDispatchThread,
and NotifyCallback from ThreadManForKernel, but they were only registered under
ThreadManForUser. Added sceKernelGetUserLevel and sceKernelIsUserModeThread (new).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
2026-08-19 18:38:03 +02:00
Henrik Rydgård a555fe8924 Partially implement sceReg 2025-04-03 14:13:50 +02:00
Henrik Rydgård 4e25f44eef Rename some module-related functions to include HLE where appropriate 2025-03-31 11:17:50 +02:00
Henrik Rydgård fdb606c8cb Break out sceAac from sceMp4.cpp/h 2025-02-14 09:50:55 -06:00
Nemoumbra 4e8b1f24d6 Added dummy funcs + registered the module 2025-02-12 16:49:43 +03:00
Nemoumbra ef11d80b84 UPnP logs, wrong NpMatching2 syscall name, more names 2025-01-10 23:34:11 +03:00
Henrik Rydgård 56dd10f283 Fix savestates 2025-01-05 00:00:06 +01:00
White Blood CellandAdamN ee0b0fce6c sceNetInet and sceNetResolver support.
Co-authored-by: AdamN <anr2000@gmail.com>
2025-01-04 17:28:36 +01:00
Nemoumbra 60e502c259 Restored the order of HLE module registration 2025-01-03 23:33:09 +03:00
Nemoumbra 96f9749e2e Split out the matching code from sceNetAdhoc.cpp 2025-01-03 04:59:26 +03:00
Henrik Rydgård ccd5bcaa45 Add facility for __KernelGPUReplay to request to be called again 2024-12-10 01:27:25 +01:00
Florin9doi cad232e60e sceSircs/Infrared support on Android 2024-01-12 20:29:53 +02:00
Unknown W. Brackets c122ee0a11 HLE: Add some assorted detected func names.
These come from here:
https://github.com/SiSTR0/sce_symbols/blob/main/psp_names.txt
2023-06-06 23:50:49 -07:00
sum2012 63606634bb Add InterruptManagerForKernel
Find in #16297
2022-10-31 20:17:12 +08:00
sum2012 4764c54803 Fix save states 2022-10-16 15:23:33 +08:00
Henrik Rydgård 52c6169a59 Merge pull request #13241 from ANR2ME/openpsid
Added some missing OpenPSID nids and some stub functions
2020-12-20 14:18:13 +01:00
sum 37737ceaa1 Add draft sceKernelFindModuleByUID (#13380)
* Add draft sceKernelFindModuleByUID

#13205

* Add KERNEL_SYSCALL flag

* oop

* oop2

* Not sure why make this change before

* Last night I might be too tried
2020-09-05 07:29:56 +02:00
ANR2ME 051bbb6e14 Added 1 new NID of OpenPSID Service, also added Init & Shutdown function 2020-08-22 19:47:33 +07:00
sum a897be92c7 Imp sceUtilsBufferCopyWithRange and sceUtilsBufferCopyByPollingWithRange (#13206)
* Imp sceUtilsBufferCopyWithRange

Used in Shin Sangoku Musou 6 Special chinese patach #13205

* Fix sceUtilsBufferCopyByPollingWithRange

* Add logging and reporting

* Fix logging and remove report by @hrydgard
2020-08-01 14:15:12 +02:00
sum2012 a6b1f9d1f8 oop 2020-06-21 11:03:04 +08:00
sum2012 2fcb55a772 Add a sceOpenPSID_driver nid
Used in  "Shin Sangoku Musou 6 special" chinese patched game
2020-06-21 11:01:21 +08:00
Henrik Rydgård e3aa2f5e4c Assorted fixes (build and crash) 2020-04-26 11:19:31 +02:00
Unknown W. Brackets 9cb74691b6 Core: Add argmask for threadhacks to prevent crash.
Every HLEFunction should have an argmask.  Some asserts for shutdown
crashes someone was seeing when calling HLE funcs from a shutdown
function.
2020-03-22 23:33:05 -07:00
Unknown W. Brackets 54e1afda1e HLE: Make calling mips funcs simpler.
This makes their return value handling, scheduling, etc. more
straight-forward.
2020-03-22 06:59:43 -07:00
Florin9doi 99c4a00dae sceUsbMic 2019-08-03 21:09:33 +03:00
LunaMoo f038b6489a Add sceUsbAcc stubs, improves EyePet(fixes endless loop on boot) 2018-08-15 18:35:07 +02:00
Florin9doi 892bc8617d Integrate sceUsbGps and sceUsbCam with Android 2017-08-27 17:19:11 +03:00
Unknown W. Brackets 36069d1446 GE Debugger: Simple framework to load dumps.
This tries to execute them within the context of the emulator as much as
possible, so we don't have weird bugs.  Going with a file type so we can
easily load the dump by opening the file directly.
2017-06-03 15:29:11 -07:00
Henrik Rydgard d3305b88b9 Partially implement KUBridge, trying to help #8925. However, it doesn't even call the function.... Odd. 2016-10-09 12:40:40 +02:00
Unknown W. Brackets e78a389ecc Move sceIo kernel tables to sceIo. 2016-08-04 09:46:29 -07:00
Unknown W. Brackets 4b4770bbc5 Log kernel syscalls with a K.
This way they can be properly differentiated.
2016-08-04 09:46:26 -07:00
Unknown W. Brackets 9b706975ad Module: Reimport stubs on load state. 2016-05-29 08:27:19 -07:00
sum2012 29f24a600e Add sceNetIfhandle staff
Used in Yu-Gi-Oh 5Ds Tag Force 4
2016-02-13 20:27:07 +08:00
Unknown W. Brackets fcf0518223 Update all the HLE tables with arg and ret info. 2015-03-22 20:51:55 -07:00
sum2012 c2435c1e9b Add sceNetUpnp module 2015-03-08 20:07:03 +08:00
sum2012 18e7e73646 Type missing in HLETable.cpp 2015-03-08 16:53:49 +08:00
sum2012 8b2712975a Forget update HLETables.cpp 2015-03-08 16:27:12 +08:00
sum2012 0157f88035 Fix sceUsbCam 2015-03-08 12:37:56 +08:00
sum2012 7b262949aa Add sceAudioRouting
First step to fix "Invizimals" 's game
2015-03-08 10:58:12 +08:00
daniel229 21b0c2992b Implement sceSfmt19937 module. 2015-02-15 13:22:20 +08:00
daniel229 851070a6f8 Implement sceAdler32 2015-02-08 09:35:00 +08:00
daniel229 49b2939f0d sceSha256 2014-12-04 22:44:41 +08:00
sum2012 9f4efaf142 Add sceLibFttt
Same as sceFont
2014-08-15 22:42:08 +08:00
daniel229 1ff9507f7c Add sceUsbGps module 2014-08-13 00:11:26 +08:00