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 CARTRIDGE3E_WIDGET_HXX |
19 | #define CARTRIDGE3E_WIDGET_HXX |
20 | |
21 | class Cartridge3E; |
22 | class ; |
23 | |
24 | #include "CartDebugWidget.hxx" |
25 | |
26 | class Cartridge3EWidget : public CartDebugWidget |
27 | { |
28 | public: |
29 | Cartridge3EWidget(GuiObject* boss, const GUI::Font& lfont, |
30 | const GUI::Font& nfont, |
31 | int x, int y, int w, int h, |
32 | Cartridge3E& cart); |
33 | virtual ~Cartridge3EWidget() = default; |
34 | |
35 | private: |
36 | Cartridge3E& myCart; |
37 | const uInt32 myNumRomBanks; |
38 | const uInt32 myNumRamBanks; |
39 | PopUpWidget *myROMBank, *myRAMBank; |
40 | |
41 | struct CartState { |
42 | ByteArray internalram; |
43 | uInt16 bank; |
44 | }; |
45 | CartState myOldState; |
46 | |
47 | enum { |
48 | kROMBankChanged = 'rmCH', |
49 | kRAMBankChanged = 'raCH' |
50 | }; |
51 | |
52 | private: |
53 | void saveOldState() override; |
54 | void loadConfig() override; |
55 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; |
56 | |
57 | string bankState() override; |
58 | |
59 | // start of functions for Cartridge RAM tab |
60 | uInt32 internalRamSize() override; |
61 | uInt32 internalRamRPort(int start) override; |
62 | string internalRamDescription() override; |
63 | const ByteArray& internalRamOld(int start, int count) override; |
64 | const ByteArray& internalRamCurrent(int start, int count) override; |
65 | void internalRamSetValue(int addr, uInt8 value) override; |
66 | uInt8 internalRamGetValue(int addr) override; |
67 | // end of functions for Cartridge RAM tab |
68 | |
69 | // Following constructors and assignment operators not supported |
70 | Cartridge3EWidget() = delete; |
71 | Cartridge3EWidget(const Cartridge3EWidget&) = delete; |
72 | Cartridge3EWidget(Cartridge3EWidget&&) = delete; |
73 | Cartridge3EWidget& operator=(const Cartridge3EWidget&) = delete; |
74 | Cartridge3EWidget& operator=(Cartridge3EWidget&&) = delete; |
75 | }; |
76 | |
77 | #endif |
78 | |