mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Add support for Slot 2 flashcarts using Compact Flash (#84)
- Supercard CF (SUPERCARDCF) - GBA Media Player CF (MPCF) - M3 Adapter CF (M3CF) - Max Media Dock CF (MMCF)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "sections.h"
|
||||
#include "../LoaderPlatform.h"
|
||||
#include "CompactFlashRegisters.h"
|
||||
|
||||
DEFINE_SECTION_SYMBOLS(cf_wait_functions);
|
||||
|
||||
extern "C" bool cf_waitCardAvailableForCommands();
|
||||
extern "C" bool cf_waitNextBlockReady();
|
||||
|
||||
extern vu16* cf_waitFunctions_reg_cmd;
|
||||
|
||||
class CompactFlashStatusFunctionsPatchCode : public PatchCode
|
||||
{
|
||||
public:
|
||||
CompactFlashStatusFunctionsPatchCode(PatchHeap& patchHeap, const cf_registers_t& registers)
|
||||
: PatchCode(SECTION_START(cf_wait_functions), SECTION_SIZE(cf_wait_functions), patchHeap)
|
||||
{
|
||||
cf_waitFunctions_reg_cmd = registers.command;
|
||||
}
|
||||
|
||||
const void* GetWaitCardAvailableForCommandsFunction() const
|
||||
{
|
||||
return GetAddressAtTarget((void*)cf_waitCardAvailableForCommands);
|
||||
}
|
||||
|
||||
const void* GetWaitNextBlockReadyFunction() const
|
||||
{
|
||||
return GetAddressAtTarget((void*)cf_waitNextBlockReady);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user