mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 17:26:48 +02:00
Initial commit
This commit is contained in:
26
arm9/source/patches/platform/r4idsn/r4idsnSdReadSectorAsm.h
Normal file
26
arm9/source/patches/platform/r4idsn/r4idsnSdReadSectorAsm.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "sections.h"
|
||||
#include "thumbInstructions.h"
|
||||
#include "../acekard-common/iorpgSdWaitForStateAsm.h"
|
||||
|
||||
DEFINE_SECTION_SYMBOLS(r4idsn_sdreadsector);
|
||||
|
||||
extern "C" void r4idsn_sdReadSector(u32 srcSector, void* dst, u32 sectorCount);
|
||||
|
||||
extern u32 r4idsn_sdReadSector_sdWaitForState_address;
|
||||
|
||||
class R4iDSNSDReadSectorPatchCode : public PatchCode
|
||||
{
|
||||
public:
|
||||
explicit R4iDSNSDReadSectorPatchCode(PatchHeap& patchHeap,
|
||||
const ioRPGSDWaitForStatePatchCode* iorpgSdWaitForStatePatchCode)
|
||||
: PatchCode(SECTION_START(r4idsn_sdreadsector), SECTION_SIZE(r4idsn_sdreadsector), patchHeap)
|
||||
{
|
||||
r4idsn_sdReadSector_sdWaitForState_address = (u32)iorpgSdWaitForStatePatchCode->GetSDWaitForStateFunction();
|
||||
}
|
||||
|
||||
const void* GetSDReadSectorFunction() const
|
||||
{
|
||||
return GetAddressAtTarget((void*)r4idsn_sdReadSector);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user