mcd: begin to remove the plugin interface

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2021-05-11 13:41:20 +02:00 committed by Kojin
parent f75ae3e046
commit 27cb700259
2 changed files with 25 additions and 10 deletions

View File

@ -34,37 +34,44 @@ struct _mcd
u32 ForceEjection_Timeout; // in SIO checks u32 ForceEjection_Timeout; // in SIO checks
wxDateTime ForceEjection_Timestamp; wxDateTime ForceEjection_Timestamp;
struct McdSizeInfo
{
u16 SectorSize; // Size of each sector, in bytes. (only 512 and 1024 are valid)
u16 EraseBlockSizeInSectors; // Size of the erase block, in sectors (max is 16)
u32 McdSizeInSectors; // Total size of the card, in sectors (no upper limit)
u8 Xor; // Checksum of previous data
};
void GetSizeInfo(PS2E_McdSizeInfo &info) void GetSizeInfo(McdSizeInfo &info)
{ {
SysPlugins.McdGetSizeInfo(port, slot, info); FileMcd_GetSizeInfo(port, slot, info);
} }
bool IsPSX() bool IsPSX()
{ {
return SysPlugins.McdIsPSX(port, slot); return FileMcd_IsPSX(port, slot);
} }
void EraseBlock() void EraseBlock()
{ {
SysPlugins.McdEraseBlock(port, slot, transferAddr); FileMcd_EraseBlock(port, slot, transferAddr);
} }
// Read from memorycard to dest // Read from memorycard to dest
void Read(u8 *dest, int size) void Read(u8 *dest, int size)
{ {
SysPlugins.McdRead(port, slot, dest, transferAddr, size); FileMcd_Read(port, slot, dest, transferAddr, size);
} }
// Write to memorycard from src // Write to memorycard from src
void Write(u8 *src, int size) void Write(u8 *src, int size)
{ {
SysPlugins.McdSave(port, slot, src,transferAddr, size); FileMcd_Save(port, slot, src,transferAddr, size);
} }
bool IsPresent() bool IsPresent()
{ {
return SysPlugins.McdIsPresent(port, slot); return FileMcd_IsPresent(port, slot);
} }
u8 DoXor(const u8 *buf, uint length) u8 DoXor(const u8 *buf, uint length)
@ -76,15 +83,15 @@ struct _mcd
u64 GetChecksum() u64 GetChecksum()
{ {
return SysPlugins.McdGetCRC(port, slot); return FileMcd_GetCRC(port, slot);
} }
void NextFrame() { void NextFrame() {
SysPlugins.McdNextFrame( port, slot ); FileMcd_NextFrame( port, slot );
} }
bool ReIndex(const wxString& filter = L"") { bool ReIndex(const wxString& filter = L"") {
return SysPlugins.McdReIndex( port, slot, filter ); return FileMcd_McdReIndex( port, slot, filter );
} }
}; };

View File

@ -37,6 +37,14 @@ class DisassemblyDialog;
#include "System.h" #include "System.h"
#include "System/SysThreads.h" #include "System/SysThreads.h"
#include "GS.h"
typedef struct _keyEvent
{
u32 key;
u32 evt;
} keyEvent;
typedef void FnType_OnThreadComplete(const wxCommandEvent& evt); typedef void FnType_OnThreadComplete(const wxCommandEvent& evt);
typedef void (Pcsx2App::*FnPtr_Pcsx2App)(); typedef void (Pcsx2App::*FnPtr_Pcsx2App)();