1//============================================================================
2//
3// SSSS tt lll lll
4// SS SS tt ll ll
5// SS tttttt eeee ll ll aaaa
6// SSSS tt ee ee ll ll aa
7// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8// SS SS tt ee ll ll aa aa
9// SSSS ttt eeeee llll llll aaaaa
10//
11// Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
12// and the Stella Team
13//
14// See the file "License.txt" for information on usage and redistribution of
15// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16//============================================================================
17
18#ifndef CARTRIDGEF4SC_WIDGET_HXX
19#define CARTRIDGEF4SC_WIDGET_HXX
20
21class CartridgeF4SC;
22class PopUpWidget;
23
24#include "CartDebugWidget.hxx"
25
26class CartridgeF4SCWidget : public CartDebugWidget
27{
28 public:
29 CartridgeF4SCWidget(GuiObject* boss, const GUI::Font& lfont,
30 const GUI::Font& nfont,
31 int x, int y, int w, int h,
32 CartridgeF4SC& cart);
33 virtual ~CartridgeF4SCWidget() = default;
34
35 private:
36 CartridgeF4SC& myCart;
37 PopUpWidget* myBank;
38
39 struct CartState {
40 ByteArray internalram;
41 uInt16 bank;
42 };
43 CartState myOldState;
44
45
46 enum { kBankChanged = 'bkCH' };
47
48 private:
49 void saveOldState() override;
50 void loadConfig() override;
51 void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
52
53 string bankState() override;
54
55 // start of functions for Cartridge RAM tab
56 uInt32 internalRamSize() override;
57 uInt32 internalRamRPort(int start) override;
58 string internalRamDescription() override;
59 const ByteArray& internalRamOld(int start, int count) override;
60 const ByteArray& internalRamCurrent(int start, int count) override;
61 void internalRamSetValue(int addr, uInt8 value) override;
62 uInt8 internalRamGetValue(int addr) override;
63 string internalRamLabel(int addr) override;
64 // end of functions for Cartridge RAM tab
65
66 // Following constructors and assignment operators not supported
67 CartridgeF4SCWidget() = delete;
68 CartridgeF4SCWidget(const CartridgeF4SCWidget&) = delete;
69 CartridgeF4SCWidget(CartridgeF4SCWidget&&) = delete;
70 CartridgeF4SCWidget& operator=(const CartridgeF4SCWidget&) = delete;
71 CartridgeF4SCWidget& operator=(CartridgeF4SCWidget&&) = delete;
72};
73
74#endif
75