mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 08:51:05 -04:00
7562ec14c9
* feat: modularize elf analyzer feat: added experimental sce symbol scanner feat: change analyzer order feat: small optimizations on analyzer * feat: remove example_config.toml because its causing confusion on some people * feat: embed sce symbol but leave optional import path feat: killed skip function on analyzer but leave it so you can skip manual if you want * feat: pin elfio tag * feat: manually create string view with size * feat: update ghidra script
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
#ifndef PS2RECOMP_TOML_GENERATOR_H
|
|
#define PS2RECOMP_TOML_GENERATOR_H
|
|
|
|
#include "ps2recomp/elf_analysis_context.h"
|
|
#include "ps2recomp/types.h"
|
|
|
|
#include <cstdint>
|
|
#include <map>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <unordered_set>
|
|
#include <vector>
|
|
|
|
namespace ps2recomp
|
|
{
|
|
struct TomlGeneratorInput
|
|
{
|
|
const std::string &elfPath;
|
|
const ElfAnalysisContext &context;
|
|
const std::unordered_set<std::string> &libFunctions;
|
|
const std::unordered_set<std::string> &untrackedStubFunctions;
|
|
const std::unordered_map<uint32_t, uint32_t> &mmioByInstructionAddress;
|
|
const std::vector<JumpTable> &jumpTables;
|
|
const std::map<uint32_t, uint32_t> &patches;
|
|
const std::map<uint32_t, std::string> &patchReasons;
|
|
const std::map<uint32_t, std::string> &performanceCriticalReasons;
|
|
};
|
|
|
|
class TomlGenerator
|
|
{
|
|
public:
|
|
static bool generate(const TomlGeneratorInput &input, const std::string &outputPath);
|
|
|
|
private:
|
|
static std::string escapeBackslashes(const std::string &path);
|
|
};
|
|
}
|
|
|
|
#endif // PS2RECOMP_TOML_GENERATOR_H
|