mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 01:06:50 +02:00
@@ -1,7 +1,10 @@
|
||||
#pragma once
|
||||
#include "../LoaderPlatform.h"
|
||||
#include "DsttReadSdPatchCode.h"
|
||||
#include "DsttReadSdDmaPatchCode.h"
|
||||
#include "DsttWriteSdPatchCode.h"
|
||||
#include "DsttSdStopTransmissionPatchCode.h"
|
||||
#include "DsttReadSdHelperPatchCode.h"
|
||||
|
||||
/// @brief Implementation of LoaderPlatform for the DSTT flashcard
|
||||
class DsttLoaderPlatform : public LoaderPlatform
|
||||
@@ -15,11 +18,30 @@ public:
|
||||
return new DsttReadSdPatchCode(patchHeap,
|
||||
patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new DsttReadSdStopTransmissionPatchCode(patchHeap);
|
||||
return new DsttSdStopTransmissionPatchCode(patchHeap);
|
||||
}),
|
||||
patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new DsttReadSdHelperPatchCode(patchHeap);
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
const IReadSectorsDmaPatchCode* CreateSdReadDmaPatchCode(PatchCodeCollection& patchCodeCollection,
|
||||
PatchHeap& patchHeap, const void* miiCardDmaCopy32Ptr) const override
|
||||
{
|
||||
return patchCodeCollection.AddUniquePatchCode<DsttReadSdDmaPatchCode>(
|
||||
patchHeap, miiCardDmaCopy32Ptr,
|
||||
patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new DsttSdStopTransmissionPatchCode(patchHeap);
|
||||
}),
|
||||
patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new DsttReadSdHelperPatchCode(patchHeap);
|
||||
}));
|
||||
}
|
||||
|
||||
const IWriteSectorsPatchCode* CreateSdWritePatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
@@ -35,5 +57,7 @@ public:
|
||||
|
||||
LoaderPlatformType GetPlatformType() const override { return LoaderPlatformType::Slot1; }
|
||||
|
||||
bool HasDmaSdReads() const override { return true; }
|
||||
|
||||
bool InitializeSdCard() override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user