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 CARTRIDGEDPCPLUS_WIDGET_HXX
19#define CARTRIDGEDPCPLUS_WIDGET_HXX
20
21class CartridgeDPCPlus;
22class PopUpWidget;
23class CheckboxWidget;
24class DataGridWidget;
25
26#include "CartDebugWidget.hxx"
27
28class CartridgeDPCPlusWidget : public CartDebugWidget
29{
30 public:
31 CartridgeDPCPlusWidget(GuiObject* boss, const GUI::Font& lfont,
32 const GUI::Font& nfont,
33 int x, int y, int w, int h,
34 CartridgeDPCPlus& cart);
35 virtual ~CartridgeDPCPlusWidget() = default;
36
37 private:
38 struct CartState {
39 ByteArray tops;
40 ByteArray bottoms;
41 IntArray counters;
42 IntArray fraccounters;
43 ByteArray fracinc;
44 ByteArray param;
45 IntArray mcounters;
46 IntArray mfreqs;
47 IntArray mwaves;
48 uInt32 random;
49 ByteArray internalram;
50 uInt16 bank;
51 };
52
53 CartridgeDPCPlus& myCart;
54 PopUpWidget* myBank;
55
56 DataGridWidget* myTops;
57 DataGridWidget* myBottoms;
58 DataGridWidget* myCounters;
59 DataGridWidget* myFracCounters;
60 DataGridWidget* myFracIncrements;
61 DataGridWidget* myParameter;
62 DataGridWidget* myMusicCounters;
63 DataGridWidget* myMusicFrequencies;
64 DataGridWidget* myMusicWaveforms;
65 CheckboxWidget* myFastFetch;
66 CheckboxWidget* myIMLDA;
67 DataGridWidget* myRandom;
68
69 CartState myOldState;
70
71 enum { kBankChanged = 'bkCH' };
72
73 private:
74 void saveOldState() override;
75
76 void loadConfig() override;
77 void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
78
79 string bankState() override;
80
81 // start of functions for Cartridge RAM tab
82 uInt32 internalRamSize() override;
83 uInt32 internalRamRPort(int start) override;
84 string internalRamDescription() override;
85 const ByteArray& internalRamOld(int start, int count) override;
86 const ByteArray& internalRamCurrent(int start, int count) override;
87 void internalRamSetValue(int addr, uInt8 value) override;
88 uInt8 internalRamGetValue(int addr) override;
89 // end of functions for Cartridge RAM tab
90
91 // Following constructors and assignment operators not supported
92 CartridgeDPCPlusWidget() = delete;
93 CartridgeDPCPlusWidget(const CartridgeDPCPlusWidget&) = delete;
94 CartridgeDPCPlusWidget(CartridgeDPCPlusWidget&&) = delete;
95 CartridgeDPCPlusWidget& operator=(const CartridgeDPCPlusWidget&) = delete;
96 CartridgeDPCPlusWidget& operator=(CartridgeDPCPlusWidget&&) = delete;
97};
98
99#endif
100