mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
30 lines
993 B
C++
30 lines
993 B
C++
#pragma once
|
|
#include "../PatchCode.h"
|
|
#include "sections.h"
|
|
#include "LoaderInfo.h"
|
|
#include "../platform/SdReadPatchCode.h"
|
|
|
|
DEFINE_SECTION_SYMBOLS(patch_pokemondownloader9);
|
|
|
|
extern "C" void patch_pokemondownloader9_entry(void);
|
|
|
|
extern const loader_info_t* patch_pokemondownloader9_loader_info_address;
|
|
extern u32 patch_pokemondownloader9_readSdSectors_address;
|
|
|
|
class PokemonDownloaderArm9PatchCode : public PatchCode
|
|
{
|
|
public:
|
|
PokemonDownloaderArm9PatchCode(PatchHeap& patchHeap, const loader_info_t* loaderInfo,
|
|
const SdReadPatchCode* sdReadPatchCode)
|
|
: PatchCode(SECTION_START(patch_pokemondownloader9), SECTION_SIZE(patch_pokemondownloader9), patchHeap)
|
|
{
|
|
patch_pokemondownloader9_loader_info_address = loaderInfo;
|
|
patch_pokemondownloader9_readSdSectors_address = (u32)sdReadPatchCode->GetSdReadFunction();
|
|
}
|
|
|
|
const void* GetBoot9Function() const
|
|
{
|
|
return GetAddressAtTarget((void*)patch_pokemondownloader9_entry);
|
|
}
|
|
};
|