AppleWin/source/SNESMAX.h
Andrea 12d1a0e1fe
Card: cleanup interface. (PR #1059)
1) Remove Init()
2) Call Reset() via CardManager
3) Call Destroy() via CardManager (only used by Disks/Harddisk) on WM_DESTROY

The only "real" changes are in CSuperSerialCard: ensure destructor cleans up and remove Destroy().
2022-03-11 22:17:03 +00:00

41 lines
1.1 KiB
C++

#pragma once
#include "Card.h"
#include "CmdLine.h"
class SNESMAXCard : public Card
{
public:
SNESMAXCard(UINT slot) :
Card(CT_SNESMAX, slot)
{
m_buttonIndex = 0;
m_controller1Buttons = 0;
m_controller2Buttons = 0;
m_altControllerType[0] = g_cmdLine.snesMaxAltControllerType[0];
m_altControllerType[1] = g_cmdLine.snesMaxAltControllerType[1];
}
virtual ~SNESMAXCard(void) {}
virtual void Destroy(void) {}
virtual void Reset(const bool powerCycle) {}
virtual void Update(const ULONG nExecutedCycles) {}
virtual void InitializeIO(LPBYTE pCxRomPeripheral);
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 const std::string& GetSnapshotCardName(void);
virtual void SaveSnapshot(YamlSaveHelper& yamlSaveHelper);
virtual bool LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version);
private:
UINT m_buttonIndex;
UINT m_controller1Buttons;
UINT m_controller2Buttons;
bool m_altControllerType[2];
};