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