Initial commit

This commit is contained in:
Gericom
2025-11-22 11:08:28 +01:00
commit 9cf3ffbfcf
358 changed files with 58350 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#pragma once
#include "common.h"
#include "../LoaderPlatform.h"
#include "IsNitroSdReadAsm.h"
#include "IsNitroSdWriteAsm.h"
#include "sharedMemory.h"
/// @brief Implementation of LoaderPlatform for the IS-NITRO-EMULATOR with agb semihosting
class IsNitroLoaderPlatform : public LoaderPlatform
{
public:
const SdReadPatchCode* CreateSdReadPatchCode(
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
{
return patchCodeCollection.GetOrAddSharedPatchCode([&]
{
return new IsNitroSdReadPatchCode(patchHeap, GetAgbRamPtr());
});
}
const SdWritePatchCode* CreateSdWritePatchCode(
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
{
return patchCodeCollection.GetOrAddSharedPatchCode([&]
{
return new IsNitroSdWritePatchCode(patchHeap, GetAgbRamPtr());
});
}
private:
u32 GetAgbRamPtr() const
{
return *(vu32*)&TWL_SHARED_MEMORY->ntrSharedMem.isDebuggerData[0x1C];
}
};