mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-02 04:21:41 +01:00
Sony renumbered the kernel NIDs between firmware versions, so a module from 6.3x imports the functions we implement under 6.60's NIDs by other ones. Rather than a second table entry per function, an alias table maps the older NID to the implemented one, and GetHLEFuncIndexByNib() falls back on it. Savestates store the table index, which this doesn't touch. The 6.30-6.39 entries cover what popsman.prx imports (the same NIDs in all of them). They come from matching the call sites in popsman.prx's 6.39 and 6.60 builds, whose code is the same, and agree with matching the exporting modules' code where that's unchanged. 6.30/6.31's popsman.prx also takes the semaphore the main CPU and the ME share through sysreg calls, which 6.60's does inline: implemented here as lowio.prx does them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
37 lines
1.3 KiB
C++
37 lines
1.3 KiB
C++
// Copyright (c) 2012- PPSSPP Project.
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
// Official git repository and contact information can be found at
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
#pragma once
|
|
|
|
#define NID_THREADRETURN 0xc0debabe
|
|
#define NID_CALLBACKRETURN 0xbadc0fee
|
|
#define NID_INTERRUPTRETURN 0xbadd00d5
|
|
#define NID_EXTENDRETURN 0xbad0b0c9
|
|
#define NID_MODULERETURN 0xbad0d318
|
|
#define NID_HLECALLRETURN 0xbad0259b
|
|
#define NID_IDLE 0x1d7e1d7e
|
|
#define NID_GPUREPLAY 0x9e45bd95
|
|
|
|
#include <cstdint>
|
|
#include <string_view>
|
|
|
|
void RegisterAllModules();
|
|
|
|
// The NID we implement a function under, for one an older firmware exported under another NID. 0 if
|
|
// there's no such alias.
|
|
uint32_t GetHLENidAlias(std::string_view moduleName, uint32_t nid);
|