2021-11-30 21:41:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Card.h"
|
|
|
|
#include "Interface.h"
|
|
|
|
|
|
|
|
class VidHDCard : public Card
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VidHDCard(UINT slot) :
|
|
|
|
Card(CT_VidHD, slot)
|
|
|
|
{
|
2021-12-19 14:17:51 +00:00
|
|
|
m_memMode = 0;
|
2021-11-30 21:41:02 +00:00
|
|
|
m_SCREENCOLOR = 0;
|
|
|
|
m_NEWVIDEO = 0;
|
|
|
|
m_BORDERCOLOR = 0;
|
|
|
|
m_SHADOW = 0;
|
|
|
|
|
|
|
|
GetVideo().SetVidHD(true);
|
|
|
|
}
|
|
|
|
virtual ~VidHDCard(void) {}
|
|
|
|
|
2022-03-11 22:17:03 +00:00
|
|
|
virtual void Destroy(void) {}
|
2021-11-30 21:41:02 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
void VideoIOWrite(WORD pc, WORD addr, BYTE bWrite, BYTE value, ULONG nExecutedCycles);
|
|
|
|
|
2021-12-19 14:17:51 +00:00
|
|
|
bool IsSHR(void) { return (m_NEWVIDEO & 0xC0) == 0xC0; } // 11000000 = Enable SHR(b7) | Linearize SHR video memory(b6)
|
2021-11-30 21:41:02 +00:00
|
|
|
bool IsDHGRBlackAndWhite(void) { return (m_NEWVIDEO & (1 << 5)) ? true : false; }
|
2021-12-19 14:17:51 +00:00
|
|
|
bool IsWriteAux(void);
|
2021-11-30 21:41:02 +00:00
|
|
|
|
|
|
|
static void UpdateSHRCell(bool is640Mode, bool isColorFillMode, uint16_t addrPalette, bgra_t* pVideoAddress, uint32_t a);
|
|
|
|
|
2022-02-28 20:52:18 +00:00
|
|
|
static const std::string& GetSnapshotCardName(void);
|
2021-11-30 21:41:02 +00:00
|
|
|
virtual void SaveSnapshot(YamlSaveHelper& yamlSaveHelper);
|
|
|
|
virtual bool LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version);
|
|
|
|
|
|
|
|
private:
|
2021-12-19 19:26:07 +00:00
|
|
|
static const UINT SHR_MEMORY_END = 0x9FFF;
|
2021-12-19 14:17:51 +00:00
|
|
|
UINT m_memMode; // Only used by II/II+
|
2021-11-30 21:41:02 +00:00
|
|
|
BYTE m_SCREENCOLOR;
|
|
|
|
BYTE m_NEWVIDEO;
|
|
|
|
BYTE m_BORDERCOLOR;
|
|
|
|
BYTE m_SHADOW;
|
|
|
|
};
|