mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Initial commit
This commit is contained in:
24
arm9/source/patches/platform/isnitro/IsNitroSdReadAsm.h
Normal file
24
arm9/source/patches/platform/isnitro/IsNitroSdReadAsm.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include "sections.h"
|
||||
#include "../SdReadPatchCode.h"
|
||||
|
||||
DEFINE_SECTION_SYMBOLS(sdread);
|
||||
|
||||
extern "C" void sdread_asm(u32 srcSector, void* dst, u32 sectorCount);
|
||||
|
||||
extern u32 sdread_asm_agbRamPtr;
|
||||
|
||||
class IsNitroSdReadPatchCode : public SdReadPatchCode
|
||||
{
|
||||
public:
|
||||
IsNitroSdReadPatchCode(PatchHeap& patchHeap, u32 agbRamPtr)
|
||||
: SdReadPatchCode(SECTION_START(sdread), SECTION_SIZE(sdread), patchHeap)
|
||||
{
|
||||
sdread_asm_agbRamPtr = agbRamPtr;
|
||||
}
|
||||
|
||||
const SdReadFunc GetSdReadFunction() const override
|
||||
{
|
||||
return (const SdReadFunc)GetAddressAtTarget((void*)sdread_asm);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user