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 CARTRIDGECM_WIDGET_HXX |
19 | #define CARTRIDGECM_WIDGET_HXX |
20 | |
21 | class CartridgeCM; |
22 | class CheckboxWidget; |
23 | class DataGridWidget; |
24 | class EditTextWidget; |
25 | class ; |
26 | class ToggleBitWidget; |
27 | |
28 | #include "CartDebugWidget.hxx" |
29 | |
30 | class CartridgeCMWidget : public CartDebugWidget |
31 | { |
32 | public: |
33 | CartridgeCMWidget(GuiObject* boss, const GUI::Font& lfont, |
34 | const GUI::Font& nfont, |
35 | int x, int y, int w, int h, |
36 | CartridgeCM& cart); |
37 | virtual ~CartridgeCMWidget() = default; |
38 | |
39 | private: |
40 | struct CartState { |
41 | uInt8 swcha; |
42 | uInt8 column; |
43 | ByteArray internalram; |
44 | uInt16 bank; |
45 | }; |
46 | |
47 | CartridgeCM& myCart; |
48 | PopUpWidget* myBank; |
49 | |
50 | ToggleBitWidget* mySWCHA; |
51 | DataGridWidget* myColumn; |
52 | CheckboxWidget *myAudIn, *myAudOut, *myIncrease, *myReset; |
53 | CheckboxWidget* myRow[4]; |
54 | CheckboxWidget *myFunc, *myShift; |
55 | EditTextWidget* myRAM; |
56 | |
57 | CartState myOldState; |
58 | |
59 | enum { kBankChanged = 'bkCH' }; |
60 | |
61 | private: |
62 | void saveOldState() override; |
63 | |
64 | void loadConfig() override; |
65 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; |
66 | |
67 | string bankState() override; |
68 | |
69 | // start of functions for Cartridge RAM tab |
70 | uInt32 internalRamSize() override; |
71 | uInt32 internalRamRPort(int start) override; |
72 | string internalRamDescription() override; |
73 | const ByteArray& internalRamOld(int start, int count) override; |
74 | const ByteArray& internalRamCurrent(int start, int count) override; |
75 | void internalRamSetValue(int addr, uInt8 value) override; |
76 | uInt8 internalRamGetValue(int addr) override; |
77 | string internalRamLabel(int addr) override; |
78 | // end of functions for Cartridge RAM tab |
79 | |
80 | // Following constructors and assignment operators not supported |
81 | CartridgeCMWidget() = delete; |
82 | CartridgeCMWidget(const CartridgeCMWidget&) = delete; |
83 | CartridgeCMWidget(CartridgeCMWidget&&) = delete; |
84 | CartridgeCMWidget& operator=(const CartridgeCMWidget&) = delete; |
85 | CartridgeCMWidget& operator=(CartridgeCMWidget&&) = delete; |
86 | }; |
87 | |
88 | #endif |
89 | |