| 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 CARTRIDGE3EPLUS_WIDGET_HXX |
| 19 | #define CARTRIDGE3EPLUS_WIDGET_HXX |
| 20 | |
| 21 | class Cartridge3EPlus; |
| 22 | class ButtonWidget; |
| 23 | class EditTextWidget; |
| 24 | class ; |
| 25 | |
| 26 | #include "CartDebugWidget.hxx" |
| 27 | |
| 28 | class Cartridge3EPlusWidget : public CartDebugWidget |
| 29 | { |
| 30 | public: |
| 31 | Cartridge3EPlusWidget(GuiObject* boss, const GUI::Font& lfont, |
| 32 | const GUI::Font& nfont, |
| 33 | int x, int y, int w, int h, |
| 34 | Cartridge3EPlus& cart); |
| 35 | virtual ~Cartridge3EPlusWidget() = default; |
| 36 | |
| 37 | private: |
| 38 | void updateUIState(); |
| 39 | |
| 40 | private: |
| 41 | Cartridge3EPlus& myCart; |
| 42 | |
| 43 | PopUpWidget* myBankNumber[4]; |
| 44 | PopUpWidget* myBankType[4]; |
| 45 | ButtonWidget* myBankCommit[4]; |
| 46 | EditTextWidget* myBankState[8]; |
| 47 | |
| 48 | struct CartState { |
| 49 | ByteArray internalram; |
| 50 | }; |
| 51 | CartState myOldState; |
| 52 | |
| 53 | enum BankID { |
| 54 | kBank0Changed = 'b0CH', |
| 55 | kBank1Changed = 'b1CH', |
| 56 | kBank2Changed = 'b2CH', |
| 57 | kBank3Changed = 'b3CH' |
| 58 | }; |
| 59 | static const BankID bankEnum[4]; |
| 60 | |
| 61 | private: |
| 62 | void saveOldState() override; |
| 63 | void loadConfig() override; |
| 64 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; |
| 65 | |
| 66 | string bankState() override; |
| 67 | |
| 68 | // start of functions for Cartridge RAM tab |
| 69 | uInt32 internalRamSize() override; |
| 70 | uInt32 internalRamRPort(int start) override; |
| 71 | string internalRamDescription() override; |
| 72 | const ByteArray& internalRamOld(int start, int count) override; |
| 73 | const ByteArray& internalRamCurrent(int start, int count) override; |
| 74 | void internalRamSetValue(int addr, uInt8 value) override; |
| 75 | uInt8 internalRamGetValue(int addr) override; |
| 76 | // end of functions for Cartridge RAM tab |
| 77 | |
| 78 | // Following constructors and assignment operators not supported |
| 79 | Cartridge3EPlusWidget() = delete; |
| 80 | Cartridge3EPlusWidget(const Cartridge3EPlusWidget&) = delete; |
| 81 | Cartridge3EPlusWidget(Cartridge3EPlusWidget&&) = delete; |
| 82 | Cartridge3EPlusWidget& operator=(const Cartridge3EPlusWidget&) = delete; |
| 83 | Cartridge3EPlusWidget& operator=(Cartridge3EPlusWidget&&) = delete; |
| 84 | }; |
| 85 | |
| 86 | #endif |
| 87 | |