mirror of
https://github.com/libretro/parallel-dc.git
synced 2026-11-07 18:36:29 -10:00
The linker was asked which functions of the core no code path reaches
(-ffunction-sections with --gc-sections --print-gc-sections), and each
one it named was then looked up by name across the whole source,
every platform's code and the tools included. These have no caller
anywhere:
MemWrite32 hw/pvr/pvr_mem.cpp
pvr_ReadReg hw/pvr/pvr_regs.cpp
rend_framePending hw/pvr/ta_ctx.cpp
rend_init, rend_resize hw/pvr/Renderer_if.cpp
emit_WriteCodeCache hw/sh4/dyna/driver.cpp
bm_WriteBlockMap hw/sh4/dyna/blockmanager.cpp
dec_Un_rNrN, dec_Un_frNfrM, dec_rz hw/sh4/sh4_opcode_list.cpp
cpu_iWarn hw/sh4/interpr/sh4_opcodes.cpp
get_nvmem_data hw/holly/sb_mem.cpp
aica_Term hw/aica/aica_if.cpp
reios_term reios/reios.cpp
cryptoReset hw/naomi/decrypt.cpp
printtoc imgread/common.cpp
dc_start nullDC.cpp
shutdown_thread_pool rend/TexCache.cpp
gl_DebugOutput rend/gl4/gles.cpp
libPvr_GetRenderTarget,
libPvr_GetRenderSurface libretro/libretro.cpp
VArray2::LockRegion libretro/common.cpp
LogManager::SetEnable log/LogManagerLibretro.cpp
set_user_data_dir,
add_system_config_dir,
add_system_data_dir stdclass.cpp, with the three
variables only they wrote
The two *_Term functions were empty. cryptoReset was not: but the
cartridge decryption it would have cleared starts itself afresh
whenever a key or an address is set.
Left alone, though the linker named them on x86-64: what the ARM,
ARM64 and x86 recompilers and the cached interpreter call (rdv_*,
emit_Write32, emit_SetBaseAddr, bm_GetStaleBlock, the block reference
counting, _vmem_ReadMem8SX32/16SX32, shil_opcode_name), cpu_iNimp,
which a build without an MMU calls, mmu_QACR_SQ, which is called but
inlined so that only its separate copy goes unused, and
archive_num_entries, which tools/archive uses.
libARM_Term, also empty and never called, stays for now: its file has
CRLF line endings, and a patch that touches it does not go through a
plain git am.
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
#include <string.h>
|
|
#include <vector>
|
|
#include <sys/stat.h>
|
|
#include "types.h"
|
|
|
|
#ifdef _MSC_VER
|
|
#include <io.h>
|
|
#else
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
#include "hw/mem/_vmem.h"
|
|
|
|
|
|
std::string get_writable_data_path(const std::string& filename)
|
|
{
|
|
extern char game_dir_no_slash[1024];
|
|
return std::string(game_dir_no_slash +
|
|
#ifdef _WIN32
|
|
std::string("\\")
|
|
#else
|
|
std::string("/")
|
|
#endif
|
|
+ filename);
|
|
}
|
|
|
|
std::string get_writable_vmu_path(const char *logical_port)
|
|
{
|
|
extern char vmu_dir_no_slash[PATH_MAX];
|
|
extern char content_name[PATH_MAX];
|
|
extern unsigned per_content_vmus;
|
|
char filename[512];
|
|
|
|
if ((per_content_vmus == 1 && !strcmp("A1", logical_port)) ||
|
|
(per_content_vmus == 2))
|
|
{
|
|
sprintf(filename, "%s.%s.bin", content_name, logical_port);
|
|
return std::string(vmu_dir_no_slash +
|
|
#ifdef _WIN32
|
|
std::string("\\")
|
|
#else
|
|
std::string("/")
|
|
#endif
|
|
+ filename);
|
|
}
|
|
else
|
|
{
|
|
sprintf(filename, "vmu_save_%s.bin", logical_port);
|
|
return get_writable_data_path(filename);
|
|
}
|
|
}
|