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 CARTRIDGE_MNETWORK_WIDGET_HXX
19#define CARTRIDGE_MNETWORK_WIDGET_HXX
20
21class CartridgeMNetwork;
22class PopUpWidget;
23
24#include "CartDebugWidget.hxx"
25
26class CartridgeMNetworkWidget : public CartDebugWidget
27{
28 public:
29 CartridgeMNetworkWidget(GuiObject* boss, const GUI::Font& lfont,
30 const GUI::Font& nfont,
31 int x, int y, int w, int h,
32 //CartridgeE7& cart);
33 CartridgeMNetwork& cart);
34 virtual ~CartridgeMNetworkWidget() = default;
35
36 protected:
37 //CartridgeE7& myCart;
38 CartridgeMNetwork& myCart;
39
40 PopUpWidget *myLower2K, *myUpper256B;
41
42 struct CartState
43 {
44 ByteArray internalram;
45 uInt16 lowerBank;
46 uInt16 upperBank;
47 };
48 CartState myOldState;
49
50 enum
51 {
52 kLowerChanged = 'lwCH',
53 kUpperChanged = 'upCH'
54 };
55
56 protected:
57 void initialize(GuiObject* boss, CartridgeMNetwork& cart, ostringstream& info);
58 virtual const char* getSpotLower(int idx) = 0;
59 virtual const char* getSpotUpper(int idx) = 0;
60
61 private:
62 void saveOldState() override;
63 void loadConfig() override;
64 void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
65 string bankState() override;
66 // start of functions for Cartridge RAM tab
67 uInt32 internalRamSize() override;
68 uInt32 internalRamRPort(int start) override;
69 string internalRamDescription() override;
70 const ByteArray& internalRamOld(int start, int count) override;
71 const ByteArray& internalRamCurrent(int start, int count) override;
72 void internalRamSetValue(int addr, uInt8 value) override;
73 uInt8 internalRamGetValue(int addr) override;
74 // end of functions for Cartridge RAM tab
75
76 private:
77 // Following constructors and assignment operators not supported
78 CartridgeMNetworkWidget() = delete;
79 CartridgeMNetworkWidget(const CartridgeMNetworkWidget&) = delete;
80 CartridgeMNetworkWidget(CartridgeMNetworkWidget&&) = delete;
81 CartridgeMNetworkWidget& operator=(const CartridgeMNetworkWidget&) = delete;
82 CartridgeMNetworkWidget& operator=(CartridgeMNetworkWidget&&) = delete;
83};
84
85#endif
86