mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Refactored platform code to use interfaces for patch code with a special feature and improved patch code file names
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "../LoaderPlatform.h"
|
||||
#include "g003ReadSdAsm.h"
|
||||
#include "g003ReadSdDmaAsm.h"
|
||||
#include "g003WriteSdAsm.h"
|
||||
#include "G003ReadSdPatchCode.h"
|
||||
#include "G003ReadSdDmaPatchCode.h"
|
||||
#include "G003WriteSdPatchCode.h"
|
||||
|
||||
/// @brief Implementation of LoaderPlatform for the GMP-Z003 flashcard
|
||||
class G003LoaderPlatform : public LoaderPlatform
|
||||
{
|
||||
public:
|
||||
const SdReadPatchCode* CreateSdReadPatchCode(
|
||||
const IReadSectorsPatchCode* CreateSdReadPatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
@@ -18,14 +17,14 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
const SdReadDmaPatchCode* CreateSdReadDmaPatchCode(PatchCodeCollection& patchCodeCollection,
|
||||
const IReadSectorsDmaPatchCode* CreateSdReadDmaPatchCode(PatchCodeCollection& patchCodeCollection,
|
||||
PatchHeap& patchHeap, const void* miiCardDmaCopy32Ptr) const override
|
||||
{
|
||||
return patchCodeCollection.AddUniquePatchCode<G003ReadSdDmaPatchCode>(
|
||||
patchHeap, miiCardDmaCopy32Ptr);
|
||||
}
|
||||
|
||||
const SdWritePatchCode* CreateSdWritePatchCode(
|
||||
const IWriteSectorsPatchCode* CreateSdWritePatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
|
||||
Reference in New Issue
Block a user