AppleWin/source/SNESMAX.h
TomCh 685b93f387
Add 4Play & SNES MAX card support (#946, #972, PR #982)
Support these new cards in slots 3, 4 or 5; based on code from Lukazi.
- extend Configuration's Input prop sheet page.
- add save/load snapshot for both cards.
- add command line switch for alt controller type (for SNES MAX card).
Change to using Registry's 'Configuration\Slot 3' for slot 3 cards (Uthernet, 4Play & SNES MAX).
Update help doc.
2021-09-10 13:57:55 +01:00

43 lines
1.0 KiB
C++

#pragma once
#include "Card.h"
#include "CmdLine.h"
class SNESMAXCard : public Card
{
public:
SNESMAXCard(UINT slot) :
Card(CT_SNESMAX),
m_slot(slot)
{
buttonIndex = 0;
controller1Buttons = 0;
controller2Buttons = 0;
m_altControllerType[0] = g_cmdLine.snesMaxAltControllerType[0];
m_altControllerType[1] = g_cmdLine.snesMaxAltControllerType[1];
}
virtual ~SNESMAXCard(void) {}
virtual void Init(void) {};
virtual void Reset(const bool powerCycle) {};
void InitializeIO(LPBYTE pCxRomPeripheral, UINT slot);
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);
void SaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
bool LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version);
private:
UINT m_slot;
UINT buttonIndex;
UINT controller1Buttons;
UINT controller2Buttons;
bool m_altControllerType[2];
};