platform: add DMA support for M3DS (#167)

This commit is contained in:
lifehackerhansol
2026-05-03 02:18:31 -07:00
committed by GitHub
parent 63ded4b33b
commit 5d908d6fb0
4 changed files with 224 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include "../LoaderPlatform.h"
#include "M3DSReadSdSectorsDmaPatchCode.h"
#include "M3DSReadSdSectorsPatchCode.h"
#include "M3DSWriteSdSectorsPatchCode.h"
@@ -20,6 +21,15 @@ public:
});
}
const IReadSectorsDmaPatchCode* CreateSdReadDmaPatchCode(PatchCodeCollection& patchCodeCollection,
PatchHeap& patchHeap, const void* miiCardDmaCopy32Ptr) const override
{
return patchCodeCollection.AddUniquePatchCode<M3DSReadSdSectorsDmaPatchCode>(
patchHeap, miiCardDmaCopy32Ptr,
patchCodeCollection.AddUniquePatchCode<M3DSReadSdSectorsDmaHelperPatchCode>(patchHeap)
);
}
const IWriteSectorsPatchCode* CreateSdWritePatchCode(
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
{
@@ -34,4 +44,6 @@ public:
}
LoaderPlatformType GetPlatformType() const override { return LoaderPlatformType::Slot1; }
bool HasDmaSdReads() const override { return true; }
};