PSP Emulation
Jump to navigation
Jump to search
PSPHD
LUA
basic
- axInsnReplace (mem, org opcode, new opcode) - Replace allegrex memory
- axFuncReplace - Replace allegrex function. Known implemented functions are: I3dVecSet, I3dRender__ReserveTrashQwc, I3dVecAdd, I3dVecScaleXYZ, I3dGuSetMatrix_PSP, patapon_memcpy
hooks/registers
Hooks, and registers that can be called in lua api.
Allegrex (usage - remove AX_):
- AX_GetPC
- AX_SetPC
- AX_GetHi
- AX_SetHi
- AX_GetLo
- AX_SetLo
- AX_GetReg
- AX_SetReg
- AX_GetFpr
- AX_SetFpr
- AX_ReadMem8
- AX_ReadMem16
- AX_ReadMem32
- AX_ReadMemFloat
- AX_ReadMemString
- AX_WriteMem8
- AX_WriteMem16
- AX_WriteMem32
- AX_WriteMemFloat
- AX_WriteMemString
- AX_WriteMemStringZ
- AX_AddHook
- AX_RemoveHook
- AX_Overlay
- AX_InsnReplace
- AX_FuncReplace
Emulator (usage - remove EM_):
- EM_SetTextureHashMode
- EM_SetTextureScaleOffset
- EM_SetTextureSaveSubdir
- EM_SetSampleTitle
- EM_SetDrawEDRam
- EM_ToggleTextures
- EM_PadRead
- EM_PadReadPitch
- EM_PadReadRoll
- EM_PadVibrate
- EM_PadRegisterSamples
- EM_PadSetButtonsMode
- EM_AddVsyncHook
- EM_RemoveVsyncHook
- EM_ThrottleMax
- EM_ThrottleNormal
- EM_Log
- EM_GetLanguage
- EM_GetNativeLanguage
- EM_DisplayManual
- EM_LoadConfig
- EM_SaveConfig
- EM_LoadMIDI
- EM_GetMIDINotesAtTick
- EM_LoadSlideshow
- EM_StartSlideshow
- EM_LoadState
- EM_SaveState
config psp
Desc: https://pastebin.com/CXRpVLdd
1,0 is done by true/false commands.
- --boot [disc0:/PSP_GAME/SYSDIR/BOOT.BIN - path (no loaders support like on PS3? vide ct2, psc)]
- --notrophies
- --texsave
- --texmissingsave
- --samplesave
- --texreplace
- --samplereplace
- --replacementalpha [true]
- --parappaalphahack
- --locorocomeshsmooth
- --replacementfilter
- --gputhread
- --antialias [MSAA4x, SSAA4x]
- --texcachemode [drawbounds, drawboundsloco]
- --texclutmode [filter, full]
- --texloadmode [launch, ondemand_lz4]
- --parappajapanesefonthack
- --parappareplacecolor [%08x (rgb?)]
- --volume [ ? (Adjusting volume level to %d%%)]
- --image [umd0 ,disc0]
- --addon
- --host [host0, flash0]
Standard:
- patches/
- _patches.lua
- feature_data/
- _features.lua
- tooling/
- _tooling.lua
- trophy_data/
- _trophies.lua
other
- XXXXYYYYY_config.txt
- --vms
- --autoresampler [true]
- videos/
- .mp4
- videos/%08x.mp4
- audio/%08x.ogg
- --texswitch [original, replacement]
Paths:
- /app0/
- /download0/
- /savedata
- /host/
- /hostapp/
- /data/
sample
; PS4 configuration file for PSPHD ; Game Image --image="data/USER_L0.IMG" ; Redirect host0: to a specific directory (uncomment to enable). ; By default it's mapped to either "/hostapp/" if available, or "/app0/" if "/hostapp/" is not available. ;--host="/hostapp/" ; To dump the original video in PMF format, uncomment the --dumpvideos line ; For example, with the current setting, it will save them in a "videos" directory inside the File Serving Directory ;--dumpvideos="host0:videos" ; To dump the original audio in Atrac3 format, uncomment the --dumpaudio line ; For example, with the current setting, it will save them in a "audio" directory inside the File Serving Directory ;--dumpaudio="host0:audio" ; To replace atrac3 audio samples, use this. --samplereplace="host0:samplereplace" ; To save the in-game textures as the game runs, uncomment the --texsave line ; For example, with the current setting, it will save them in a "texdump" directory inside the File Serving Directory ;--texsave="host0:texdump" ;--texmissingsave="host0:texdump" ; To replace specific textures as the game runs, uncomment the --texreplace line ; For example, with the current setting, it will load them from the "texreplace" directory inside the File Serving Directory --texreplace="host0:texreplace" ; This forces alpha blending to on for replaced textures. (uncomment to enable) ; With this we can freely make use of a normal alpha channel on replacement textures --replacementalpha=true ; This enables bilinear filtering on replaced textures. (uncomment to enable) --replacementfilter=true ; Antialiasing mode. SSAA4x looks best, MSAA4x only smooths edges. ; Choices: off, SSAA4x, MSAA4x --antialias=SSAA4x ; Enable switching between original and replacement textures at runtime using the L3 button on a DS4 or the 'T' key on Windows ;--texswitch=true ; Turns on the auto-resampler. Assumes textures in texreplace are at 8x resolution and resamples them at load --autoresampler=true ; Parappa Alpha Hack --parappaalphahack=true ; Adjust overall volume level (does not include pad speaker volume). Range from 0.0 (min) to 1.0 (max) --volume="0.25" ; Special thanks to Matsuura, Rodney, Allan and all the awesome people at Japan Studio! Also HUUUUGE thanks to Ernesto, Adam, Henrick, Taku, Tim, Nick, Mayene, Tyler, Dave Thach and Scott Rohde whose support made this project of love possible! PaRappa-4-Ever!!!!! ; If you're reading this message, congratulations! you win !!! ; we love you so much. you’ve made hacking great again.
NIDs in HLE
HLEInterruptManager
- sceKernelRegisterSubIntrHandler
- sceKernelReleaseSubIntrHandler
- sceKernelEnableSubIntr
HLEStdioForUser
- sceIoOpen
- sceIoClose
- sceIoRead
- sceIoWrite
- sceIoLseek
- sceIoLseek32
- sceIoDopen
- sceIoDread
- sceIoDclose
- sceIoChdir
- sceIoGetstat
- sceIoDevctl
- sceIoRename
- sceIoMkDir
- sceIoChstat
- sceIoRemove
- sceIoRmdir
- sceIoOpenAsync
- sceIoReadAsync
- sceIoIoctlAsync
- sceIoWaitAsync
- sceIoWaitAsyncCB
- sceIoCloseAsync
- sceIoSetAsyncCallback
- sceIoPollAsync
- sceIoLseekAsync
- sceIoGetAsyncStat
- asyncWaitTimerCallback
- asyncCallbackTimerCallback
- sceKernelStdin
- sceKernelStdout
- sceKernelStderr
HLELoadExecForUser
- sceKernelCpuSuspendIntr
- sceKernelCpuResumeIntr
- sceKernelIsCpuIntrEnable
- sceKernelExitGame
- sceKernelRegisterExitCallback
- sceKernelLoadModule
- sceKernelUnloadModule
- sceKernelStartModule
- sceKernelStopModule
- sceKernelStopUnloadSelfModule
- sceKernelGetModuleIdByAddress
- sceKernelStopUnloadSelfModuleWithStatus
- sceKernelGetModuleId
HLEsceAtrac3plus
- sceAtracReinit
- sceAtracDecodeData
- sceAtracGetNextDecodePosition
- sceAtracSetHalfwayBufferAndGetID
- sceAtracGetSoundSample
- sceAtracGetStreamDataInfo
- sceAtracGetRemainFrame
- sceAtracSetLoopNum
- sceAtracResetPlayPosition
- sceAtracReleaseAtracID
- sceAtracGetAtracID
- sceAtracGetNextSample
- sceAtracSetData
- sceAtracAddStreamData
HLEsceAudio
- sceAudioChReserve
- sceAudioChRelease
- sceAudioOutputBlocking
- sceAudioChangeChannelConfig
- sceAudioGetChannelRestLength
- sceAudioChangeChannelVolume
- sceAudioSetChannelDataLen
- sceAudioOutputPanned
- sceAudioOutputPannedBlocking
- sceAudioGetChannelRestLen
- sceAudioOutput2Reserve
- sceAudioOutput2OutputBlocking
- sceAudioOutput2Release
- outputCallback
HLEsceCtrl
- sceCtrlSetSamplingCycle
- sceCtrlSetSamplingMode
- sceCtrlReadBufferPositive
- sceCtrlReadBufferNegative
- sceCtrlPeekBufferPositive
- sceCtrlPeekBufferNegative
- sceCtrlGetIdleCancelThreshold
- sceCtrlSetIdleCancelThreshold
- sceCtrlReadLatch
- sceCtrlPeekLatch
- sampleControllerCallback
- vibrationControllerCallback
HLEsceDisplay
- sceDisplaySetMode
- sceDisplaySetFramebuf
- sceDisplayGetFramebuf
- sceDisplayGetVcount
- sceDisplayWaitVblankStart
- sceDisplayWaitVblankStartCB
- sceDisplayGetCurrentHcount
- sceDisplayGetAccumulatedHcount
- sceDisplayGetFramePerSec
- sceDisplayWaitVblank
- sceDisplayWaitVblankCB
- sceDisplayIsVblank
- sceDisplaySetHoldMode
- vblankStart
- vblankEnd
HLEsceGe_user
- sceGeEdramGetAddr
- sceGeEdramGetSize
- sceGeGetCmd
- sceGeGetMtx
- sceGeListEnQueue
- sceGeListEnQueueHead
- sceGeListDeQueue
- sceGeListSync
- sceGeListUpdateStallAddr
- sceGeDrawSync
- sceGeSetCallback
- sceGeUnsetCallback
- sceGeBreak
- sceGeContinue
- interruptCallback
HLEsceImpose
- sceImposeGetLanguageMode
- sceImposeSetLanguageMode
- sceImposeSetUMDPopup
HLEsceMpeg
- sceMpegInit
- sceMpegFinish
- sceMpegCreate
- sceMpegDelete
- sceMpegQueryMemSize
- sceMpegMallocAvcEsBuf
- sceMpegFreeAvcEsBuf
- sceMpegInitAu
- sceMpegGetAvcAu
- sceMpegGetAtracAu
- sceMpegQueryAtracEsSize
- sceMpegAtracDecode
- sceMpegRingbufferQueryMemSize
- sceMpegRingbufferConstruct
- sceMpegRingbufferDestruct
- sceMpegRingbufferPut
- sceMpegRingbufferAvailableSize
- sceMpegAvcCsc
- sceMpegAvcDecodeMode
- sceMpegAvcDecodeDetail
- sceMpegAvcDecodeFlush
- sceMpegAvcQueryYCbCrSize
- sceMpegAvcInitYCbCr
- sceMpegAvcDecodeYCbCr
- sceMpegAvcDecodeStopYCbCr
- sceMpegRegistStream
- sceMpegUnRegistStream
- sceMpegQueryStreamSize
- sceMpegQueryStreamOffset
- sceMpegFlushAllStream
HLEsceNet
- sceNetInit
- sceNetInetGetsockopt
- sceNetInetSetsockopt
- sceNetInetGetErrno
HLEscePower
- scePowerRegisterCallback
- scePowerUnregisterCallback
- scePowerSetClockFrequency
- scePowerSetCpuClockFrequency
- scePowerSetBusClockFrequency
HLEscePsmf
- scePsmfVerifyPsmf
- scePsmfSetPsmf
- scePsmfSpecifyStreamWithStreamTypeNumber
- scePsmfCheckEPmap
- scePsmfGetVideoInfo
- scePsmfGetNumberOfStreams
- scePsmfGetNumberOfEPentries
- scePsmfGetEPWithId
- scePsmfGetPsmfVersion
- scePsmfGetNumberOfSpecificStreams
- scePsmfSpecifyStream
- scePsmfGetCurrentStreamType
HLEscePsmfPlayer
- scePsmfPlayerCreate
- scePsmfPlayerDelete
- scePsmfPlayerSetPsmf
- scePsmfPlayerReleasePsmf
- scePsmfPlayerStart
- scePsmfPlayerGetAudioOutSize
- scePsmfPlayerStop
- scePsmfPlayerUpdate
- scePsmfPlayerGetVideoData
- scePsmfPlayerGetAudioData
- scePsmfPlayerGetCurrentStatus
- scePsmfPlayerGetPsmfInfo
- scePsmfPlayerConfigPlayer
- scePsmfPlayerBreak
- scePsmfPlayerChangePlayMode
HLEsceRtc
- sceRtcGetCurrentTick
- sceRtcGetAccumulativeTime
- sceRtcGetCurrentClockLocalTime
HLEsceSasCore
- sceSasInit
- sceSasCore
- sceSasCoreWithMix
- sceSasGetEndFlag
- sceSasGetPauseFlag
- sceSasGetEnvelopeHeight
- sceSasGetAllEnvelopeHeights
- sceSasGetOutputMode
- sceSasSetOutputMode
- sceSasGetGrain
- sceSasSetGrain
- sceSasSetVoice
- sceSasSetNoise
- sceSasSetPitch
- sceSasSetVolume
- sceSasSetSimpleADSR
- sceSasSetKeyOn
- sceSasSetKeyOff
- sceSasSetPause
- sceSasSetSL
- sceSasSetADSR
- sceSasSetADSRMode
- sceSasRevEVOL
- sceSasRevType
- sceSasRevParam
- sceSasRevVON
HLEsceSuspendForUser
- sceKernelPowerTick
- sceKernelPowerLock
- sceKernelPowerUnlock
- sceKernelVolatileMemTryLock
- sceKernelVolatileMemUnlock
- sceKernelVolatileMemLock
HLEsceUmdUser
- sceUmdActivate
- sceUmdGetDriveStat
- sceUmdCheckMedium
- sceUmdRegisterUMDCallback
- sceUmdUnRegisterUMDCallBack
- sceUmdWaitDriveStat
- sceUmdWaitDriveStatWithTimer
- sceUmdWaitDriveStatCB
- sceUmdCancelWaitDriveStat
- _UmdWaitDriveTimeout
HLEsceUtility
- sceUtilityLoadModule
- sceUtilityUnloadModule
- sceUtilityLoadNetModule
- sceUtilityUnloadNetModule
- sceUtilityLoadAvModule
- sceUtilityUnloadAvModule
- sceUtilityGetSystemParamInt
- sceUtilityGetSystemParamString
- sceUtilitySavedataGetStatus
- sceUtilitySavedataShutdownStart
- sceUtilitySavedataInitStart
- sceUtilitySavedataUpdate
- sceUtilityMsgDialogGetStatus
- sceUtilityMsgDialogShutdownStart
- sceUtilityMsgDialogInitStart
- sceUtilityMsgDialogUpdate
- sceUtilityMsgDialogAbort
- sceUtilityOskGetStatus
- sceUtilityOskShutdownStart
- sceUtilityOskInitStart
- sceUtilityOskUpdate
- saveDataUpdateCallback
- oskUpdateCallback
HLEsceWlanDrv
- sceWlanGetSwitchState
- sceWlanGetEtherAddr
HLESysMemUserForUser
- sceKernelMaxFreeMemSize
- sceKernelTotalFreeMemSize
- sceKernelQueryMemoryInfo
- sceKernelDevkitVersion
- sceKernelPrintf
- sceKernelGetPTRIG
- sceKernelSetPTRIG
- sceKernelAllocPartitionMemory
- sceKernelFreePartitionMemory
- sceKernelGetBlockHeadAddr
- sceKernelGetMemoryBlockAddr
- sceKernelAllocMemoryBlock
- sceKernelFreeMemoryBlock
- sceKernelSetCompilerVersion
- sceKernelGetCompiledSdkVersion
- sceKernelSetCompiledSdkVersion
- sceKernelSetCompiledSdkVersion370
- sceKernelSetCompiledSdkVersion380_390
- sceKernelSetCompiledSdkVersion395
- sceKernelSetCompiledSdkVersion401_402
- sceKernelSetCompiledSdkVersion500_505
- sceKernelSetCompiledSdkVersion507
- sceKernelSetCompiledSdkVersion600_602
- sceKernelSetCompiledSdkVersion603_605
- sceKernelSetCompiledSdkVersion606
- sceKernelSetUsersystemLibWork
- sceKernelSysMemUserForUser_ACBD88CA
- sceKernelSysMemUserForUser_D8DE5C1E
- sceKernelSysMemUserForUser_945E45DA
HLEThreadManForUser
- sceKernelDelayThread
- sceKernelDelayThreadCB
- sceKernelCreateCallback
- sceKernelDeleteCallback
- sceKernelSleepThread
- sceKernelSleepThreadCB
- sceKernelWakeupThread
- sceKernelCreateMsgPipe
- sceKernelDeleteMsgPipe
- sceKernelSendMsgPipe
- sceKernelTrySendMsgPipe
- sceKernelReceiveMsgPipe
- sceKernelTryReceiveMsgPipe
- sceKernelReferMsgPipeStatus
- sceKernelCreateThread
- sceKernelStartThread
- sceKernelExitThread
- sceKernelDeleteThread
- sceKernelExitDeleteThread
- sceKernelGetThreadExitStatus
- sceKernelTerminateThread
- sceKernelTerminateDeleteThread
- sceKernelWaitThreadEnd
- sceKernelWaitThreadEndCB
- sceKernelRotateThreadReadyQueue
- sceKernelReferThreadStatus
- sceKernelSuspendDispatchThread
- sceKernelResumeDispatchThread
- sceKernelSuspendThread
- sceKernelResumeThread
- sceKernelCancelWakeupThread
- sceKernelGetThreadStackFreeSize
- sceKernelGetSystemTimeLow
- sceKernelGetSystemTime
- sceKernelGetSystemTimeWide
- sceKernelGetThreadCurrentPriority
- sceKernelChangeCurrentThreadAttr
- sceKernelGetThreadId
- sceKernelChangeThreadPriority
- sceKernelReferThreadProfiler
- sceKernelCheckCallback
- sceKernelCancelSema
- sceKernelCreateSema
- sceKernelDeleteSema
- sceKernelPollSema
- sceKernelSignalSema
- sceKernelReferSemaStatus
- sceKernelWaitSema
- sceKernelWaitSemaCB
- sceKernelCreateFpl
- sceKernelDeleteFpl
- sceKernelAllocateFpl
- sceKernelAllocateFplCB
- sceKernelTryAllocateFpl
- sceKernelFreeFpl
- sceKernelCancelFpl
- sceKernelReferFplStatus
- sceKernelCreateVpl
- sceKernelDeleteVpl
- sceKernelAllocateVpl
- sceKernelAllocateVplCB
- sceKernelTryAllocateVpl
- sceKernelFreeVpl
- sceKernelCancelVpl
- sceKernelReferVplStatus
- sceKernelCreateEventFlag
- sceKernelSetEventFlag
- sceKernelDeleteEventFlag
- sceKernelClearEventFlag
- sceKernelWaitEventFlag
- sceKernelWaitEventFlagCB
- sceKernelPollEventFlag
- sceKernelCancelEventFlag
- sceKernelReferEventFlagStatus
- sceKernelCreateMbx
- sceKernelDeleteMbx
- sceKernelSendMbx
- sceKernelReceiveMbx
- sceKernelReceiveMbxCB
- sceKernelPollMbx
- sceKernelCancelReceiveMbx
- sceKernelReferMbxStatus
- sceKernelCreateMutex
- sceKernelDeleteMutex
- sceKernelLockMutex
- sceKernelLockMutexCB
- sceKernelTryLockMutex
- sceKernelUnlockMutex
- sceKernelCancelMutex
- sceKernelReferMutexStatus
- _sceKernelDelayThreadCallback
- _sceKernelWaitThreadEndTimeout
- _sceKernelAllocateFplTimeout
- _sceKernelAllocateVplTimeout
- _sceKernelWaitEventFlagTimeout
- _sceKernelMsgPipeTimeout
- _sceKernelLockMutexTimeout
HLEUtilsForKernel
- sceKernelIcacheInvalidateRange
HLEUtilsForUser
- sceKernelIcacheInvalidateRange
- sceKernelDcacheInvalidateRange
- sceKernelDcacheWritebackInvalidateRange
- sceKernelDcacheWritebackAll
- sceKernelDcacheWritebackRange
- sceKernelDcacheWritebackInvalidateAll
- sceKernelSetGPO
- sceKernelGetGPI
- sceKernelLibcClock
- sceKernelLibcTime
- sceKernelLibcGettimeofday 0x71EC4271
Unimplemented functions
- sceIoChdir() unimplemented, ignoring
- sceIoChstat unimplemented, ignoring
- sceKernelExitGame() unimplemented
- sceKernelStopUnloadSelfModule() unimplemented
- sceKernelStopUnloadSelfModuleWithStatus() unimplemented
- sceGeGetMtx() unimplemented
- sceGeListDeQueue() unimplemented
- sceGeBreak unimplemented
- sceGeContinue unimplemented
- sceNetInetGetsockopt() unimplemented
- sceNetInetSetsockopt() unimplemented
- sceNetInetGetErrno() unimplemented
- sceWlanGetEtherAddr unimplemented
- sceKernelQueryMemoryInfo() unimplemented
- sceKernelGetPTRIG() unimplemented
- sceKernelSetPTRIG() unimplemented
- sceKernelSetCompiledSdkVersion401_402() unimplemented
- sceKernelSetCompiledSdkVersion507() unimplemented
- sceKernelSetCompiledSdkVersion600_602() unimplemented
- sceKernelSetCompiledSdkVersion603_605() unimplemented
- sceKernelSetUsersystemLibWork() unimplemented
- sceKernelSysMemUserForUser_ACBD88CA() unimplemented
- sceKernelSysMemUserForUser_D8DE5C1E() unimplemented -- sceKernelSafetyCheck0
- sceKernelSysMemUserForUser_945E45DA() unimplemented
- sceKernelTerminateDeleteThread() unimplemented
- sceKernelCancelSema unimplemented
- sceKernelCancelFpl unimplemented
- sceKernelReferFplStatus unimplemented
- sceKernelCancelVpl unimplemented
- sceKernelCreateMbx unimplemented
- sceKernelDeleteMbx unimplemented
- sceKernelSendMbx unimplemented
- sceKernelReceiveMbx unimplemented
- sceKernelReceiveMbxCB unimplemented
- sceKernelPollMbx unimplemented
- sceKernelCancelReceiveMbx unimplemented
- sceKernelReferMbxStatus unimplemented
- Not handled: sceIoIoctl, emu might black screen/crash if games make use of this api
- So probably also PGD not supported, as PGD header include hash generated from the sceIoIoctl key in dec/enc form.
Restricted:
- scePowerRegisterCallback - ignoring
- scePowerUnregisterCallback - ignoring
- scePowerSetClockFrequency - ignoring
- scePowerSetCpuClockFrequency(%d) - ignoring
- scePowerSetBusClockFrequency(%d) - ignoring
- sceUtilityMsgDialogInitStart ignored
More Information:
- https://gbatemp.net/threads/wip-psp-injection.503103/
- https://twitter.com/zordon605/status/993758941627772929
- https://twitter.com/notzecoxao/status/993950722600460296
- https://twitter.com/ZiL0G80/status/994112249810866176
- http://wololo.net/2018/05/09/psp-games-homebrews-might-come-hacked-ps4-soon/
- http://www.psx-place.com/threads/psp-emulation-on-ps4-early-stages-of-injecting-games-homebrew-on-discovered-psp-emulator.17830/
|