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