mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-30 08:16:38 +02:00
A survey of disc images found these shipped on a lot of them: LIBDEFLT and LIBMT19937, LIBADLER, LIBMD5 on about 1/6, LIBSHA256 on 1/7, LIBHEAP on 1/12, LIBSFMT19937 on 1/24. None appears in any firmware dump and none is loadable through sceUtility, so a game that imports one has to carry it - which makes running the game's own module the safe default, the same argument psmfplayer graduated on. Read off real discs with --re-module disc0:/..., all but sceHeap import nothing at all, and sceHeap only Kernel_Library and ThreadManForUser. sceFont joins them with a condition. Its module is on the disc like the others - the most-shipped of all, on a third of the discs - but it reads its fonts from flash0:/font and has nothing to fall back on, so it is only usable with a firmware dump installed (our own fallback fonts are just not good enough anyway, it chokes on them). CheckDisableHLEAvailability puts the HLE back when those fonts are missing, since ours does have a fallback. sceParseUri and sceParseHttp look like candidates and aren't: they are in the firmware and sceUtility can load them, so a game may import them without shipping one. Their headers say so. The HLE implementations stay - old savestates index these tables by syscall opcode - and are marked legacy the way scePsmf is. Also: Move HLEInit after the filesystems are mounted It ran before MountFileSystems, so the checks in it deciding whether a library can run its real module instead of our HLE couldn't ask the PSP filesystem and had to reach for host paths under the NAND directory. Nothing between CoreTiming::Init and here touches HLE, and the kernel and the game's modules are both loaded later, so it can simply move. Two things fall out. The checks now spell their paths flash0:/... like the rest of the emulator. And they run after AutoInstallFirmwareFromDisc, so a disc that carries a firmware counts on the launch that installs it rather than the next one - verified with an empty NAND and a disc carrying 3.11: the fonts land and sceFont runs the game's own module the same boot. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
27 lines
1.2 KiB
C
27 lines
1.2 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/.
|
|
|
|
// NOTE: This is now unmaintained legacy code. sceDeflt is a small leaf library that games ship
|
|
// on the disc themselves and that appears in no firmware dump, so we let the game's own module run
|
|
// and this HLE is only a fallback for the rare game that imports it without shipping it, and for
|
|
// old savestates - whose syscall opcodes index these tables, which is why nothing here is removed.
|
|
// See AlwaysDisableHLEFlags in Core/HLE/HLE.cpp.
|
|
|
|
#pragma once
|
|
|
|
void Register_sceDeflt();
|