17#include "SubComponent.h"
38class ExpansionPort final :
public SubComponent,
public Inspectable<CartridgeInfo> {
40 Descriptions descriptions = {{
43 .description =
"Expansion Port"
47 std::unique_ptr<Cartridge> cartridge;
50 CartridgeType crtType = CRT_NONE;
63 ExpansionPort(C64 &ref) : SubComponent(ref) { };
64 ExpansionPort& operator= (
const ExpansionPort& other);
74 void serialize(T& worker)
76 if (isResetter(worker))
return;
85 void operator << (SerResetter &worker)
override;
86 void operator << (SerChecker &worker)
override;
87 void operator << (SerCounter &worker)
override;
88 void operator << (SerReader &worker)
override;
89 void operator << (SerWriter &worker)
override;
98 const Descriptions &getDescriptions()
const override {
return descriptions; }
102 void _dump(Category category, std::ostream& os)
const override;
103 void _reset(
bool hard)
override;
112 const CartridgeTraits &getCartridgeTraits()
const;
113 const CartridgeInfo &getInfo()
const;
114 CartridgeRomInfo getRomInfo(isize nr)
const;
115 CartridgeType getCartridgeType()
const;
125 u8 spypeek(u16 addr)
const;
126 u8 peekIO1(u16 addr);
127 u8 spypeekIO1(u16 addr)
const;
128 u8 peekIO2(u16 addr);
129 u8 spypeekIO2(u16 addr)
const;
131 void poke(u16 addr, u8 value);
132 void pokeIO1(u16 addr, u8 value);
133 void pokeIO2(u16 addr, u8 value);
142 bool getGameLine()
const {
return gameLine; }
143 void setGameLine(
bool value);
145 bool getExromLine()
const {
return exromLine; }
146 void setExromLine(
bool value);
148 void setGameAndExrom(
bool game,
bool exrom);
150 CRTMode getCartridgeMode()
const;
151 void setCartridgeMode(CRTMode mode);
153 void resetCartConfig();
161 void attachCartridge(
const fs::path &path,
bool reset =
true) throws;
162 void attachCartridge(const MediaFile &file,
bool reset = true) throws;
163 void attachCartridge(Cartridge *c);
164 void attachReu(isize capacity);
165 void attachGeoRam(isize capacity);
166 void attachIsepicCartridge();
169 void detachCartridge();
177 void pressButton(isize nr);
180 void releaseButton(isize nr);
183 void setSwitch(isize pos) {
if (cartridge) cartridge->setSwitch(pos); }
186 void setLED(
bool value);
196 void processCommand(
const Cmd &cmd);
215 void updatePeekPokeLookupTables();
218 void nmiWillTrigger();
221 void nmiDidTrigger();
VirtualC64 project namespace.
Definition CmdQueue.cpp:16