mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
26 lines
685 B
C++
26 lines
685 B
C++
#pragma once
|
|
#include "sections.h"
|
|
#include "patches/PatchCode.h"
|
|
#include "../IReadSectorsPatchCode.h"
|
|
|
|
DEFINE_SECTION_SYMBOLS(sdread);
|
|
|
|
extern "C" void sdread_asm(u32 srcSector, void* dst, u32 sectorCount);
|
|
|
|
extern u32 sdread_asm_agbRamPtr;
|
|
|
|
class IsNitroSdReadPatchCode : public PatchCode, public IReadSectorsPatchCode
|
|
{
|
|
public:
|
|
IsNitroSdReadPatchCode(PatchHeap& patchHeap, u32 agbRamPtr)
|
|
: PatchCode(SECTION_START(sdread), SECTION_SIZE(sdread), patchHeap)
|
|
{
|
|
sdread_asm_agbRamPtr = agbRamPtr;
|
|
}
|
|
|
|
const ReadSectorsFunc GetReadSectorsFunction() const override
|
|
{
|
|
return (const ReadSectorsFunc)GetAddressAtTarget((void*)sdread_asm);
|
|
}
|
|
};
|