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:
21
arm9/source/patches/arm7/OsGetInitArenaLoPatch.h
Normal file
21
arm9/source/patches/arm7/OsGetInitArenaLoPatch.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "../Patch.h"
|
||||
|
||||
/// @brief Arm7 patch to get and update the arena low addresses for wram and main memory.
|
||||
class OsGetInitArenaLoPatch : public Patch
|
||||
{
|
||||
public:
|
||||
bool FindPatchTarget(PatchContext& patchContext) override;
|
||||
void ApplyPatch(PatchContext& patchContext) override;
|
||||
|
||||
void* GetArm7PrivateWramArenaLo() const { return _wramBssEnd; }
|
||||
void SetArm7PrivateWramArenaLo(void* wramBssEnd) { _wramBssEnd = wramBssEnd; }
|
||||
void* GetMainMemoryArenaLo() const { return _mainMemoryArenaLo; }
|
||||
void SetMainMemoryArenaLo(void* mainMemoryArenaLo) { _mainMemoryArenaLo = mainMemoryArenaLo; }
|
||||
|
||||
private:
|
||||
u32* _osGetInitArenaLo = nullptr;
|
||||
u32 _wramBssOffset = 0;
|
||||
void* _wramBssEnd = nullptr;
|
||||
void* _mainMemoryArenaLo = nullptr;
|
||||
};
|
||||
Reference in New Issue
Block a user