2021-09-10 12:57:55 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Card.h"
|
|
|
|
#include "CmdLine.h"
|
|
|
|
|
|
|
|
class SNESMAXCard : public Card
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SNESMAXCard(UINT slot) :
|
2021-11-01 21:01:28 +00:00
|
|
|
Card(CT_SNESMAX, slot)
|
2021-09-10 12:57:55 +00:00
|
|
|
{
|
2021-09-10 13:19:13 +00:00
|
|
|
m_buttonIndex = 0;
|
|
|
|
m_controller1Buttons = 0;
|
|
|
|
m_controller2Buttons = 0;
|
2021-09-10 12:57:55 +00:00
|
|
|
|
|
|
|
m_altControllerType[0] = g_cmdLine.snesMaxAltControllerType[0];
|
|
|
|
m_altControllerType[1] = g_cmdLine.snesMaxAltControllerType[1];
|
|
|
|
}
|
|
|
|
virtual ~SNESMAXCard(void) {}
|
|
|
|
|
2021-11-11 21:45:55 +00:00
|
|
|
virtual void Init(void) {}
|
|
|
|
virtual void Reset(const bool powerCycle) {}
|
2021-11-13 18:13:01 +00:00
|
|
|
virtual void Update(const ULONG nExecutedCycles) {}
|
2021-09-10 12:57:55 +00:00
|
|
|
|
2021-11-11 21:45:55 +00:00
|
|
|
virtual void InitializeIO(LPBYTE pCxRomPeripheral);
|
2021-09-10 12:57:55 +00:00
|
|
|
|
|
|
|
static BYTE __stdcall IORead(WORD pc, WORD addr, BYTE bWrite, BYTE value, ULONG nExecutedCycles);
|
|
|
|
static BYTE __stdcall IOWrite(WORD pc, WORD addr, BYTE bWrite, BYTE value, ULONG nExecutedCycles);
|
|
|
|
|
|
|
|
static std::string GetSnapshotCardName(void);
|
2021-11-25 20:23:21 +00:00
|
|
|
virtual void SaveSnapshot(YamlSaveHelper& yamlSaveHelper);
|
|
|
|
virtual bool LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version);
|
2021-09-10 12:57:55 +00:00
|
|
|
|
|
|
|
private:
|
2021-09-10 13:19:13 +00:00
|
|
|
UINT m_buttonIndex;
|
|
|
|
UINT m_controller1Buttons;
|
|
|
|
UINT m_controller2Buttons;
|
2021-09-10 12:57:55 +00:00
|
|
|
|
|
|
|
bool m_altControllerType[2];
|
|
|
|
};
|