mirror of https://github.com/stella-emu/stella.git
More default initialization updates, in the process making c'tors smaller/non-existent.
I've already found a few potential bugs where instance variables weren't being initialized at all.
This commit is contained in:
parent
0a9b289b44
commit
54de3415ea
|
@ -161,13 +161,13 @@ class AtariNTSC
|
|||
|
||||
struct init_t
|
||||
{
|
||||
std::array<float, burst_count * 6> to_rgb;
|
||||
std::array<float, gamma_size> to_float;
|
||||
std::array<float, burst_count * 6> to_rgb{0.F};
|
||||
std::array<float, gamma_size> to_float{0.F};
|
||||
float contrast{0.F};
|
||||
float brightness{0.F};
|
||||
float artifacts{0.F};
|
||||
float fringing{0.F};
|
||||
std::array<float, rescale_out * kernel_size * 2> kernel;
|
||||
std::array<float, rescale_out * kernel_size * 2> kernel{0.F};
|
||||
|
||||
init_t() {
|
||||
to_rgb.fill(0.0);
|
||||
|
@ -181,7 +181,7 @@ class AtariNTSC
|
|||
{
|
||||
int offset{0};
|
||||
float negate{0.F};
|
||||
std::array<float, 4> kernel;
|
||||
std::array<float, 4> kernel{0.F};
|
||||
};
|
||||
static const std::array<pixel_info_t, alignment_count> atari_ntsc_pixels;
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ class AudioWidget : public Widget, public CommandSender
|
|||
kAUDVID
|
||||
};
|
||||
|
||||
DataGridWidget* myAudF;
|
||||
DataGridWidget* myAudC;
|
||||
DataGridWidget* myAudV;
|
||||
StaticTextWidget* myAudEffV;
|
||||
DataGridWidget* myAudF{nullptr};
|
||||
DataGridWidget* myAudC{nullptr};
|
||||
DataGridWidget* myAudV{nullptr};
|
||||
StaticTextWidget* myAudEffV{nullptr};
|
||||
|
||||
// Audio channels
|
||||
enum
|
||||
|
|
|
@ -31,7 +31,7 @@ class BoosterWidget : public ControllerWidget
|
|||
private:
|
||||
enum { kJUp = 0, kJDown, kJLeft, kJRight, kJFire, kJBooster, kJTrigger };
|
||||
|
||||
std::array<CheckboxWidget*, 7> myPins;
|
||||
std::array<CheckboxWidget*, 7> myPins{nullptr};
|
||||
static constexpr std::array<Controller::DigitalPin, 5> ourPinNo = {{
|
||||
Controller::DigitalPin::One, Controller::DigitalPin::Two,
|
||||
Controller::DigitalPin::Three, Controller::DigitalPin::Four,
|
||||
|
|
|
@ -34,7 +34,7 @@ class Cartridge0840Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
Cartridge0840& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ class Cartridge3EPlusWidget : public CartDebugWidget
|
|||
private:
|
||||
Cartridge3EPlus& myCart;
|
||||
|
||||
std::array<PopUpWidget*, 4> myBankNumber;
|
||||
std::array<PopUpWidget*, 4> myBankType;
|
||||
std::array<ButtonWidget*, 4> myBankCommit;
|
||||
std::array<EditTextWidget*, 8> myBankState;
|
||||
std::array<PopUpWidget*, 4> myBankNumber{nullptr};
|
||||
std::array<PopUpWidget*, 4> myBankType{nullptr};
|
||||
std::array<ButtonWidget*, 4> myBankCommit{nullptr};
|
||||
std::array<EditTextWidget*, 8> myBankState{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
|
|
|
@ -34,9 +34,9 @@ class Cartridge3EWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
Cartridge3E& myCart;
|
||||
const uInt32 myNumRomBanks;
|
||||
const uInt32 myNumRamBanks;
|
||||
PopUpWidget *myROMBank, *myRAMBank;
|
||||
const uInt32 myNumRomBanks{0};
|
||||
const uInt32 myNumRamBanks{0};
|
||||
PopUpWidget *myROMBank{nullptr}, *myRAMBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
|
|
|
@ -34,7 +34,7 @@ class Cartridge3FWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
Cartridge3F& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@ class Cartridge4A50Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
Cartridge4A50& myCart;
|
||||
PopUpWidget *myROMLower, *myRAMLower;
|
||||
PopUpWidget *myROMMiddle, *myRAMMiddle;
|
||||
PopUpWidget *myROMHigh, *myRAMHigh;
|
||||
PopUpWidget *myROMLower{nullptr}, *myRAMLower{nullptr};
|
||||
PopUpWidget *myROMMiddle{nullptr}, *myRAMMiddle{nullptr};
|
||||
PopUpWidget *myROMHigh{nullptr}, *myRAMHigh{nullptr};
|
||||
|
||||
enum {
|
||||
kROMLowerChanged = 'rmLW',
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeARWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeAR& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ class CartridgeBFSCWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeBFSC& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeBFWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeBF& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -46,26 +46,26 @@ class CartridgeBUSWidget : public CartDebugWidget
|
|||
IntArray mwaves;
|
||||
IntArray mwavesizes;
|
||||
IntArray samplepointer;
|
||||
uInt32 random;
|
||||
uInt32 random{0};
|
||||
ByteArray internalram;
|
||||
};
|
||||
|
||||
CartridgeBUS& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
DataGridWidget* myDatastreamPointers;
|
||||
DataGridWidget* myDatastreamIncrements;
|
||||
DataGridWidget* myDatastreamPointers2;
|
||||
DataGridWidget* myDatastreamIncrements2;
|
||||
DataGridWidget* myAddressMaps;
|
||||
DataGridWidget* myMusicCounters;
|
||||
DataGridWidget* myMusicFrequencies;
|
||||
DataGridWidget* myMusicWaveforms;
|
||||
DataGridWidget* myMusicWaveformSizes;
|
||||
DataGridWidget* mySamplePointer;
|
||||
CheckboxWidget* myBusOverdrive;
|
||||
CheckboxWidget* myDigitalSample;
|
||||
std::array<StaticTextWidget*, 6> myDatastreamLabels;
|
||||
DataGridWidget* myDatastreamPointers{nullptr};
|
||||
DataGridWidget* myDatastreamIncrements{nullptr};
|
||||
DataGridWidget* myDatastreamPointers2{nullptr};
|
||||
DataGridWidget* myDatastreamIncrements2{nullptr};
|
||||
DataGridWidget* myAddressMaps{nullptr};
|
||||
DataGridWidget* myMusicCounters{nullptr};
|
||||
DataGridWidget* myMusicFrequencies{nullptr};
|
||||
DataGridWidget* myMusicWaveforms{nullptr};
|
||||
DataGridWidget* myMusicWaveformSizes{nullptr};
|
||||
DataGridWidget* mySamplePointer{nullptr};
|
||||
CheckboxWidget* myBusOverdrive{nullptr};
|
||||
CheckboxWidget* myDigitalSample{nullptr};
|
||||
std::array<StaticTextWidget*, 6> myDatastreamLabels{nullptr};
|
||||
CartState myOldState;
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
|
|
@ -47,28 +47,28 @@ class CartridgeCDFWidget : public CartDebugWidget
|
|||
IntArray mwaves;
|
||||
IntArray mwavesizes;
|
||||
IntArray samplepointer;
|
||||
uInt32 random;
|
||||
uInt32 random{0};
|
||||
ByteArray internalram;
|
||||
};
|
||||
|
||||
CartridgeCDF& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
DataGridWidget* myDatastreamPointers;
|
||||
DataGridWidget* myDatastreamIncrements;
|
||||
DataGridWidget* myCommandStreamPointer;
|
||||
DataGridWidget* myCommandStreamIncrement;
|
||||
DataGridWidget* myJumpStreamPointers;
|
||||
DataGridWidget* myJumpStreamIncrements;
|
||||
DataGridWidget* myMusicCounters;
|
||||
DataGridWidget* myMusicFrequencies;
|
||||
DataGridWidget* myMusicWaveforms;
|
||||
DataGridWidget* myMusicWaveformSizes;
|
||||
DataGridWidget* mySamplePointer;
|
||||
std::array<StaticTextWidget*, 10> myDatastreamLabels;
|
||||
DataGridWidget* myDatastreamPointers{nullptr};
|
||||
DataGridWidget* myDatastreamIncrements{nullptr};
|
||||
DataGridWidget* myCommandStreamPointer{nullptr};
|
||||
DataGridWidget* myCommandStreamIncrement{nullptr};
|
||||
DataGridWidget* myJumpStreamPointers{nullptr};
|
||||
DataGridWidget* myJumpStreamIncrements{nullptr};
|
||||
DataGridWidget* myMusicCounters{nullptr};
|
||||
DataGridWidget* myMusicFrequencies{nullptr};
|
||||
DataGridWidget* myMusicWaveforms{nullptr};
|
||||
DataGridWidget* myMusicWaveformSizes{nullptr};
|
||||
DataGridWidget* mySamplePointer{nullptr};
|
||||
std::array<StaticTextWidget*, 10> myDatastreamLabels{nullptr};
|
||||
|
||||
CheckboxWidget* myFastFetch;
|
||||
CheckboxWidget* myDigitalSample;
|
||||
CheckboxWidget* myFastFetch{nullptr};
|
||||
CheckboxWidget* myDigitalSample{nullptr};
|
||||
CartState myOldState;
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
|
|
@ -38,21 +38,22 @@ class CartridgeCMWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
struct CartState {
|
||||
uInt8 swcha;
|
||||
uInt8 column;
|
||||
uInt8 swcha{0};
|
||||
uInt8 column{0};
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
|
||||
CartridgeCM& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
ToggleBitWidget* mySWCHA;
|
||||
DataGridWidget* myColumn;
|
||||
CheckboxWidget *myAudIn, *myAudOut, *myIncrease, *myReset;
|
||||
CheckboxWidget *myFunc, *myShift;
|
||||
EditTextWidget* myRAM;
|
||||
std::array<CheckboxWidget*, 4> myRow;
|
||||
ToggleBitWidget* mySWCHA{nullptr};
|
||||
DataGridWidget* myColumn{nullptr};
|
||||
CheckboxWidget *myAudIn{nullptr}, *myAudOut{nullptr},
|
||||
*myIncrease{nullptr}, *myReset{nullptr};
|
||||
CheckboxWidget *myFunc{nullptr}, *myShift{nullptr};
|
||||
EditTextWidget* myRAM{nullptr};
|
||||
std::array<CheckboxWidget*, 4> myRow{nullptr};
|
||||
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ class CartridgeCTYWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeCTY& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,10 +34,10 @@ class CartridgeCVPlusWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeCVPlus& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ class CartridgeDASHWidget : public CartDebugWidget
|
|||
private:
|
||||
CartridgeDASH& myCart;
|
||||
|
||||
std::array<PopUpWidget*, 4> myBankNumber;
|
||||
std::array<PopUpWidget*, 4> myBankType;
|
||||
std::array<ButtonWidget*, 4> myBankCommit;
|
||||
std::array<EditTextWidget*, 8> myBankState;
|
||||
std::array<PopUpWidget*, 4> myBankNumber{nullptr};
|
||||
std::array<PopUpWidget*, 4> myBankType{nullptr};
|
||||
std::array<ButtonWidget*, 4> myBankCommit{nullptr};
|
||||
std::array<EditTextWidget*, 8> myBankState{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
|
|
|
@ -34,11 +34,11 @@ class CartridgeDFSCWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeDFSC& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeDFWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeDF& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -45,26 +45,26 @@ class CartridgeDPCPlusWidget : public CartDebugWidget
|
|||
IntArray mcounters;
|
||||
IntArray mfreqs;
|
||||
IntArray mwaves;
|
||||
uInt32 random;
|
||||
uInt32 random{0};
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
|
||||
CartridgeDPCPlus& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
DataGridWidget* myTops;
|
||||
DataGridWidget* myBottoms;
|
||||
DataGridWidget* myCounters;
|
||||
DataGridWidget* myFracCounters;
|
||||
DataGridWidget* myFracIncrements;
|
||||
DataGridWidget* myParameter;
|
||||
DataGridWidget* myMusicCounters;
|
||||
DataGridWidget* myMusicFrequencies;
|
||||
DataGridWidget* myMusicWaveforms;
|
||||
CheckboxWidget* myFastFetch;
|
||||
CheckboxWidget* myIMLDA;
|
||||
DataGridWidget* myRandom;
|
||||
DataGridWidget* myTops{nullptr};
|
||||
DataGridWidget* myBottoms{nullptr};
|
||||
DataGridWidget* myCounters{nullptr};
|
||||
DataGridWidget* myFracCounters{nullptr};
|
||||
DataGridWidget* myFracIncrements{nullptr};
|
||||
DataGridWidget* myParameter{nullptr};
|
||||
DataGridWidget* myMusicCounters{nullptr};
|
||||
DataGridWidget* myMusicFrequencies{nullptr};
|
||||
DataGridWidget* myMusicWaveforms{nullptr};
|
||||
CheckboxWidget* myFastFetch{nullptr};
|
||||
CheckboxWidget* myIMLDA{nullptr};
|
||||
DataGridWidget* myRandom{nullptr};
|
||||
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -40,20 +40,20 @@ class CartridgeDPCWidget : public CartDebugWidget
|
|||
IntArray counters;
|
||||
ByteArray flags;
|
||||
BoolArray music;
|
||||
uInt8 random;
|
||||
uInt8 random{0};
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
|
||||
CartridgeDPC& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
DataGridWidget* myTops;
|
||||
DataGridWidget* myBottoms;
|
||||
DataGridWidget* myCounters;
|
||||
DataGridWidget* myFlags;
|
||||
DataGridWidget* myMusicMode;
|
||||
DataGridWidget* myRandom;
|
||||
DataGridWidget* myTops{nullptr};
|
||||
DataGridWidget* myBottoms{nullptr};
|
||||
DataGridWidget* myCounters{nullptr};
|
||||
DataGridWidget* myFlags{nullptr};
|
||||
DataGridWidget* myMusicMode{nullptr};
|
||||
DataGridWidget* myRandom{nullptr};
|
||||
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -33,8 +33,9 @@ CartDebugWidget::CartDebugWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
myFontWidth(lfont.getMaxCharWidth()),
|
||||
myFontHeight(lfont.getFontHeight()),
|
||||
myLineHeight(lfont.getLineHeight()),
|
||||
myButtonHeight(myLineHeight + 4),
|
||||
myDesc(nullptr) { }
|
||||
myButtonHeight(myLineHeight + 4)
|
||||
{
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartDebugWidget::addBaseInformation(size_t bytes, const string& manufacturer,
|
||||
|
|
|
@ -77,12 +77,12 @@ class CartDebugWidget : public Widget, public CommandSender
|
|||
|
||||
// These will be needed by most of the child classes;
|
||||
// we may as well make them protected variables
|
||||
int myFontWidth, myFontHeight, myLineHeight, myButtonHeight;
|
||||
int myFontWidth{0}, myFontHeight{0}, myLineHeight{0}, myButtonHeight{0};
|
||||
|
||||
ostringstream& buffer() { myBuffer.str(""); return myBuffer; }
|
||||
|
||||
private:
|
||||
StringListWidget* myDesc;
|
||||
StringListWidget* myDesc{nullptr};
|
||||
ostringstream myBuffer;
|
||||
|
||||
private:
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeE0Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeE0& myCart;
|
||||
PopUpWidget *mySlice0, *mySlice1, *mySlice2;
|
||||
PopUpWidget *mySlice0{nullptr}, *mySlice1{nullptr}, *mySlice2{nullptr};
|
||||
|
||||
enum {
|
||||
kSlice0Changed = 's0CH',
|
||||
|
|
|
@ -34,11 +34,11 @@ class CartridgeEFSCWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeEFSC& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeEFWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeEF& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeF0Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeF0& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ class CartridgeF4SCWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeF4SC& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeF4Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeF4& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@ class CartridgeF6SCWidget : public CartDebugWidget
|
|||
private:
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartridgeF6SC& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
CartState myOldState;
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeF6Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeF6& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ class CartridgeF8SCWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeF8SC& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeF8Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeF8& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -35,12 +35,12 @@ class CartridgeFA2Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeFA2& myCart;
|
||||
PopUpWidget* myBank;
|
||||
ButtonWidget *myFlashErase, *myFlashLoad, *myFlashSave;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
ButtonWidget *myFlashErase{nullptr}, *myFlashLoad{nullptr}, *myFlashSave{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ class CartridgeFAWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeFA& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
uInt16 bank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -47,9 +47,8 @@ CartridgeFCWidget::CartridgeFCWidget(
|
|||
" ($FFF8 = " + Variant(i & 0b11).toString() +
|
||||
"/$FFF9 = " + Variant(i >> 2).toString() +")");
|
||||
|
||||
|
||||
myBank =
|
||||
new PopUpWidget(boss, _font, xpos, ypos - 2, _font.getStringWidth("7 ($FFF8 = 3/$FFF9 = 1)"),
|
||||
myBank = new PopUpWidget(boss, _font, xpos, ypos - 2,
|
||||
_font.getStringWidth("7 ($FFF8 = 3/$FFF9 = 1)"),
|
||||
myLineHeight, items, "Set bank ",
|
||||
0, kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
|
|
|
@ -25,31 +25,31 @@ class PopUpWidget;
|
|||
|
||||
class CartridgeFCWidget : public CartDebugWidget
|
||||
{
|
||||
public:
|
||||
CartridgeFCWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
const GUI::Font& nfont,
|
||||
int x, int y, int w, int h,
|
||||
CartridgeFC& cart);
|
||||
virtual ~CartridgeFCWidget() = default;
|
||||
public:
|
||||
CartridgeFCWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
const GUI::Font& nfont,
|
||||
int x, int y, int w, int h,
|
||||
CartridgeFC& cart);
|
||||
virtual ~CartridgeFCWidget() = default;
|
||||
|
||||
private:
|
||||
CartridgeFC& myCart;
|
||||
PopUpWidget* myBank;
|
||||
private:
|
||||
CartridgeFC& myCart;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
private:
|
||||
void loadConfig() override;
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
||||
private:
|
||||
void loadConfig() override;
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
||||
|
||||
string bankState() override;
|
||||
string bankState() override;
|
||||
|
||||
// Following constructors and assignment operators not supported
|
||||
CartridgeFCWidget() = delete;
|
||||
CartridgeFCWidget(const CartridgeFCWidget&) = delete;
|
||||
CartridgeFCWidget(CartridgeFCWidget&&) = delete;
|
||||
CartridgeFCWidget& operator=(const CartridgeFCWidget&) = delete;
|
||||
CartridgeFCWidget& operator=(CartridgeFCWidget&&) = delete;
|
||||
// Following constructors and assignment operators not supported
|
||||
CartridgeFCWidget() = delete;
|
||||
CartridgeFCWidget(const CartridgeFCWidget&) = delete;
|
||||
CartridgeFCWidget(CartridgeFCWidget&&) = delete;
|
||||
CartridgeFCWidget& operator=(const CartridgeFCWidget&) = delete;
|
||||
CartridgeFCWidget& operator=(CartridgeFCWidget&&) = delete;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeFEWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeFE& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ class CartridgeMDMWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeMDM& myCart;
|
||||
PopUpWidget* myBank;
|
||||
CheckboxWidget* myBankDisabled;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
CheckboxWidget* myBankDisabled{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH', kBankDisabled = 'bkDI' };
|
||||
|
||||
|
|
|
@ -37,13 +37,13 @@ class CartridgeMNetworkWidget : public CartDebugWidget
|
|||
//CartridgeE7& myCart;
|
||||
CartridgeMNetwork& myCart;
|
||||
|
||||
PopUpWidget *myLower2K, *myUpper256B;
|
||||
PopUpWidget *myLower2K{nullptr}, *myUpper256B{nullptr};
|
||||
|
||||
struct CartState
|
||||
{
|
||||
ByteArray internalram;
|
||||
uInt16 lowerBank;
|
||||
uInt16 upperBank;
|
||||
uInt16 lowerBank{0};
|
||||
uInt16 upperBank{0};
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class CartRamWidget : public Widget, public CommandSender
|
|||
|
||||
// These will be needed by most of the child classes;
|
||||
// we may as well make them protected variables
|
||||
int myFontWidth, myFontHeight, myLineHeight, myButtonHeight;
|
||||
int myFontWidth{0}, myFontHeight{0}, myLineHeight{0}, myButtonHeight{0};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
@ -91,8 +91,8 @@ class CartRamWidget : public Widget, public CommandSender
|
|||
};
|
||||
|
||||
private:
|
||||
StringListWidget* myDesc;
|
||||
InternalRamWidget* myRam;
|
||||
StringListWidget* myDesc{nullptr};
|
||||
InternalRamWidget* myRam{nullptr};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeSBWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeSB& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeUAWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeUA& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
bool mySwappedHotspots;
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ class CartridgeWDWidget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeWD& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank; // Current banking layout
|
||||
uInt16 bank{0}; // Current banking layout
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class CartridgeX07Widget : public CartDebugWidget
|
|||
|
||||
private:
|
||||
CartridgeX07& myCart;
|
||||
PopUpWidget* myBank;
|
||||
PopUpWidget* myBank{nullptr};
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
|
||||
|
|
|
@ -69,13 +69,13 @@ class CpuWidget : public Widget, public CommandSender
|
|||
kPSRegC = 7
|
||||
};
|
||||
|
||||
DataGridWidget* myPCGrid;
|
||||
DataGridWidget* myCpuGrid;
|
||||
DataGridWidget* myCpuGridDecValue;
|
||||
DataGridWidget* myCpuGridBinValue;
|
||||
ToggleBitWidget* myPSRegister;
|
||||
EditTextWidget* myPCLabel;
|
||||
std::array<EditTextWidget*, 4> myCpuDataSrc;
|
||||
DataGridWidget* myPCGrid{nullptr};
|
||||
DataGridWidget* myCpuGrid{nullptr};
|
||||
DataGridWidget* myCpuGridDecValue{nullptr};
|
||||
DataGridWidget* myCpuGridBinValue{nullptr};
|
||||
ToggleBitWidget* myPSRegister{nullptr};
|
||||
EditTextWidget* myPCLabel{nullptr};
|
||||
std::array<EditTextWidget*, 4> myCpuDataSrc{nullptr};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -22,14 +22,7 @@
|
|||
DataGridOpsWidget::DataGridOpsWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y)
|
||||
: Widget(boss, font, x, y, 16, 16),
|
||||
CommandSender(boss),
|
||||
_zeroButton(nullptr),
|
||||
_invButton(nullptr),
|
||||
_negButton(nullptr),
|
||||
_incButton(nullptr),
|
||||
_decButton(nullptr),
|
||||
_shiftLeftButton(nullptr),
|
||||
_shiftRightButton(nullptr)
|
||||
CommandSender(boss)
|
||||
{
|
||||
const int bwidth = _font.getMaxCharWidth() * 4+2,
|
||||
bheight = _font.getFontHeight() + 3,
|
||||
|
|
|
@ -42,13 +42,13 @@ class DataGridOpsWidget : public Widget, public CommandSender
|
|||
void setEnabled(bool e);
|
||||
|
||||
private:
|
||||
ButtonWidget* _zeroButton;
|
||||
ButtonWidget* _invButton;
|
||||
ButtonWidget* _negButton;
|
||||
ButtonWidget* _incButton;
|
||||
ButtonWidget* _decButton;
|
||||
ButtonWidget* _shiftLeftButton;
|
||||
ButtonWidget* _shiftRightButton;
|
||||
ButtonWidget* _zeroButton{nullptr};
|
||||
ButtonWidget* _invButton{nullptr};
|
||||
ButtonWidget* _negButton{nullptr};
|
||||
ButtonWidget* _incButton{nullptr};
|
||||
ButtonWidget* _decButton{nullptr};
|
||||
ButtonWidget* _shiftLeftButton{nullptr};
|
||||
ButtonWidget* _shiftRightButton{nullptr};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -38,20 +38,12 @@ DataGridWidget::DataGridWidget(GuiObject* boss, const GUI::Font& font,
|
|||
font.getLineHeight()*rows + 1),
|
||||
_rows(rows),
|
||||
_cols(cols),
|
||||
_currentRow(0),
|
||||
_currentCol(0),
|
||||
_rowHeight(font.getLineHeight()),
|
||||
_colWidth(colchars * font.getMaxCharWidth() + 8),
|
||||
_bits(bits),
|
||||
_crossGrid(false),
|
||||
_base(base),
|
||||
_selectedItem(0),
|
||||
_currentKeyDown(KBDK_UNKNOWN),
|
||||
_opsWidget(nullptr),
|
||||
_scrollBar(nullptr)
|
||||
_base(base)
|
||||
{
|
||||
_flags = Widget::FLAG_ENABLED | Widget::FLAG_RETAIN_FOCUS | Widget::FLAG_WANTS_RAWDATA;
|
||||
_editMode = false;
|
||||
|
||||
// The item is selected, thus _bgcolor is used to draw the caret and
|
||||
// _textcolorhi to erase it
|
||||
|
|
|
@ -108,16 +108,16 @@ class DataGridWidget : public EditableWidget
|
|||
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
||||
|
||||
protected:
|
||||
int _rows;
|
||||
int _cols;
|
||||
int _currentRow;
|
||||
int _currentCol;
|
||||
int _rowHeight;
|
||||
int _colWidth;
|
||||
int _bits;
|
||||
int _lowerBound;
|
||||
int _upperBound;
|
||||
bool _crossGrid;
|
||||
int _rows{0};
|
||||
int _cols{0};
|
||||
int _currentRow{0};
|
||||
int _currentCol{0};
|
||||
int _rowHeight{0};
|
||||
int _colWidth{0};
|
||||
int _bits{0};
|
||||
int _lowerBound{0};
|
||||
int _upperBound{0};
|
||||
bool _crossGrid{false};
|
||||
|
||||
Common::Base::Fmt _base;
|
||||
|
||||
|
@ -127,13 +127,13 @@ class DataGridWidget : public EditableWidget
|
|||
BoolArray _changedList;
|
||||
BoolArray _hiliteList;
|
||||
|
||||
bool _editMode;
|
||||
int _selectedItem;
|
||||
StellaKey _currentKeyDown;
|
||||
bool _editMode{false};
|
||||
int _selectedItem{0};
|
||||
StellaKey _currentKeyDown{KBDK_UNKNOWN};
|
||||
string _backupString;
|
||||
|
||||
DataGridOpsWidget* _opsWidget;
|
||||
ScrollBarWidget* _scrollBar;
|
||||
DataGridOpsWidget* _opsWidget{nullptr};
|
||||
ScrollBarWidget* _scrollBar{nullptr};
|
||||
|
||||
private:
|
||||
/** Common operations on the currently selected cell */
|
||||
|
|
|
@ -51,11 +51,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
DebuggerDialog::DebuggerDialog(OSystem& osystem, DialogContainer& parent,
|
||||
int x, int y, int w, int h)
|
||||
: Dialog(osystem, parent, x, y, w, h),
|
||||
myTab(nullptr),
|
||||
myRomTab(nullptr),
|
||||
myFatalError(nullptr),
|
||||
myFirstLoad(true)
|
||||
: Dialog(osystem, parent, x, y, w, h)
|
||||
{
|
||||
createFont(); // Font is sized according to available space
|
||||
|
||||
|
|
|
@ -115,28 +115,28 @@ class DebuggerDialog : public Dialog
|
|||
kDDOptionsCmd = 'DDop'
|
||||
};
|
||||
|
||||
TabWidget *myTab, *myRomTab;
|
||||
TabWidget *myTab{nullptr}, *myRomTab{nullptr};
|
||||
|
||||
PromptWidget* myPrompt;
|
||||
TiaInfoWidget* myTiaInfo;
|
||||
TiaOutputWidget* myTiaOutput;
|
||||
TiaZoomWidget* myTiaZoom;
|
||||
CpuWidget* myCpu;
|
||||
RamWidget* myRam;
|
||||
RomWidget* myRom;
|
||||
CartDebugWidget* myCartInfo;
|
||||
CartDebugWidget* myCartDebug;
|
||||
CartRamWidget* myCartRam;
|
||||
EditTextWidget* myMessageBox;
|
||||
ButtonWidget* myRewindButton;
|
||||
ButtonWidget* myUnwindButton;
|
||||
PromptWidget* myPrompt{nullptr};
|
||||
TiaInfoWidget* myTiaInfo{nullptr};
|
||||
TiaOutputWidget* myTiaOutput{nullptr};
|
||||
TiaZoomWidget* myTiaZoom{nullptr};
|
||||
CpuWidget* myCpu{nullptr};
|
||||
RamWidget* myRam{nullptr};
|
||||
RomWidget* myRom{nullptr};
|
||||
CartDebugWidget* myCartInfo{nullptr};
|
||||
CartDebugWidget* myCartDebug{nullptr};
|
||||
CartRamWidget* myCartRam{nullptr};
|
||||
EditTextWidget* myMessageBox{nullptr};
|
||||
ButtonWidget* myRewindButton{nullptr};
|
||||
ButtonWidget* myUnwindButton{nullptr};
|
||||
|
||||
unique_ptr<GUI::MessageBox> myFatalError;
|
||||
unique_ptr<OptionsDialog> myOptions;
|
||||
|
||||
unique_ptr<GUI::Font> myLFont; // used for labels
|
||||
unique_ptr<GUI::Font> myNFont; // used for normal text
|
||||
bool myFirstLoad;
|
||||
bool myFirstLoad{true};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
DrivingWidget::DrivingWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y, Controller& controller)
|
||||
: ControllerWidget(boss, font, x, y, controller),
|
||||
myGrayIndex(0)
|
||||
: ControllerWidget(boss, font, x, y, controller)
|
||||
{
|
||||
const string& label = getHeader();
|
||||
|
||||
|
|
|
@ -38,11 +38,11 @@ class DrivingWidget : public ControllerWidget
|
|||
kGrayDownCmd = 'DWdn',
|
||||
kFireCmd = 'DWfr'
|
||||
};
|
||||
ButtonWidget *myGrayUp, *myGrayDown;
|
||||
DataGridWidget* myGrayValue;
|
||||
CheckboxWidget* myFire;
|
||||
ButtonWidget *myGrayUp{nullptr}, *myGrayDown{nullptr};
|
||||
DataGridWidget* myGrayValue{nullptr};
|
||||
CheckboxWidget* myFire{nullptr};
|
||||
|
||||
int myGrayIndex;
|
||||
int myGrayIndex{0};
|
||||
|
||||
static const std::array<uInt8, 4> ourGrayTable;
|
||||
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FlashWidget::FlashWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y, Controller& controller)
|
||||
: ControllerWidget(boss, font, x, y, controller),
|
||||
myEEPROMEraseCurrent(nullptr)
|
||||
: ControllerWidget(boss, font, x, y, controller)
|
||||
{
|
||||
myPage.fill(nullptr);
|
||||
}
|
||||
|
|
|
@ -34,11 +34,11 @@ class FlashWidget : public ControllerWidget
|
|||
void init(GuiObject* boss, const GUI::Font& font, int x, int y);
|
||||
|
||||
private:
|
||||
ButtonWidget* myEEPROMEraseCurrent;
|
||||
ButtonWidget* myEEPROMEraseCurrent{nullptr};
|
||||
enum { kEEPROMEraseCurrent = 'eeEC' };
|
||||
|
||||
static constexpr uInt32 MAX_PAGES = 5;
|
||||
std::array<StaticTextWidget*, MAX_PAGES> myPage;
|
||||
std::array<StaticTextWidget*, MAX_PAGES> myPage{nullptr};
|
||||
|
||||
private:
|
||||
void loadConfig() override;
|
||||
|
|
|
@ -31,7 +31,7 @@ class GenesisWidget : public ControllerWidget
|
|||
private:
|
||||
enum { kJUp = 0, kJDown, kJLeft, kJRight, kJBbtn, kJCbtn };
|
||||
|
||||
std::array<CheckboxWidget*, 6> myPins;
|
||||
std::array<CheckboxWidget*, 6> myPins{nullptr};
|
||||
static constexpr std::array<Controller::DigitalPin, 5> ourPinNo = {{
|
||||
Controller::DigitalPin::One, Controller::DigitalPin::Two,
|
||||
Controller::DigitalPin::Three, Controller::DigitalPin::Four,
|
||||
|
|
|
@ -31,7 +31,7 @@ class JoystickWidget : public ControllerWidget
|
|||
private:
|
||||
enum { kJUp = 0, kJDown, kJLeft, kJRight, kJFire };
|
||||
|
||||
std::array<CheckboxWidget*, 5> myPins;
|
||||
std::array<CheckboxWidget*, 5> myPins{nullptr};
|
||||
static constexpr std::array<Controller::DigitalPin, 5> ourPinNo = {{
|
||||
Controller::DigitalPin::One, Controller::DigitalPin::Two,
|
||||
Controller::DigitalPin::Three, Controller::DigitalPin::Four,
|
||||
|
|
|
@ -29,8 +29,8 @@ class KeyboardWidget : public ControllerWidget
|
|||
virtual ~KeyboardWidget() = default;
|
||||
|
||||
private:
|
||||
std::array<CheckboxWidget*, 12> myBox;
|
||||
const Event::Type* myEvent;
|
||||
std::array<CheckboxWidget*, 12> myBox{nullptr};
|
||||
const Event::Type* myEvent{nullptr};
|
||||
|
||||
static constexpr std::array<Event::Type, 12> ourLeftEvents = {{
|
||||
Event::KeyboardZero1, Event::KeyboardZero2, Event::KeyboardZero3,
|
||||
|
|
|
@ -33,8 +33,8 @@ class PaddleWidget : public ControllerWidget
|
|||
enum { kP0Changed = 'P0ch', kP1Changed = 'P1ch',
|
||||
kP0Fire = 'P0fr', kP1Fire = 'P1fr' };
|
||||
|
||||
SliderWidget *myP0Resistance, *myP1Resistance;
|
||||
CheckboxWidget *myP0Fire, *myP1Fire;
|
||||
SliderWidget *myP0Resistance{nullptr}, *myP1Resistance{nullptr};
|
||||
CheckboxWidget *myP0Fire{nullptr}, *myP1Fire{nullptr};
|
||||
|
||||
private:
|
||||
void loadConfig() override;
|
||||
|
|
|
@ -39,11 +39,11 @@ class PointingDeviceWidget : public ControllerWidget
|
|||
kTBDown = 'TWdn',
|
||||
kTBFire = 'TWfr'
|
||||
};
|
||||
ButtonWidget *myGrayLeft, *myGrayRight;
|
||||
DataGridWidget* myGrayValueH;
|
||||
ButtonWidget *myGrayUp, *myGrayDown;
|
||||
DataGridWidget* myGrayValueV;
|
||||
CheckboxWidget* myFire;
|
||||
ButtonWidget *myGrayLeft{nullptr}, *myGrayRight{nullptr};
|
||||
DataGridWidget* myGrayValueH{nullptr};
|
||||
ButtonWidget *myGrayUp{nullptr}, *myGrayDown{nullptr};
|
||||
DataGridWidget* myGrayValueV{nullptr};
|
||||
CheckboxWidget* myFire{nullptr};
|
||||
|
||||
private:
|
||||
virtual uInt8 getGrayCodeTable(const int index, const int direction) const = 0;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#define PROMPT "> "
|
||||
|
||||
// TODO: Github issue #361
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PromptWidget::PromptWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y, int w, int h)
|
||||
|
|
|
@ -38,7 +38,6 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
|
|||
myFontHeight(lfont.getFontHeight()),
|
||||
myLineHeight(lfont.getLineHeight()),
|
||||
myButtonHeight(myLineHeight + 4),
|
||||
myCurrentRamBank(0),
|
||||
myRamSize(ramsize),
|
||||
myNumRows(numrows),
|
||||
myPageSize(pagesize)
|
||||
|
|
|
@ -68,7 +68,7 @@ class RamWidget : public Widget, public CommandSender
|
|||
|
||||
// These will be needed by most of the child classes;
|
||||
// we may as well make them protected variables
|
||||
int myFontWidth, myFontHeight, myLineHeight, myButtonHeight;
|
||||
int myFontWidth{0}, myFontHeight{0}, myLineHeight{0}, myButtonHeight{0};
|
||||
|
||||
private:
|
||||
enum {
|
||||
|
@ -84,27 +84,27 @@ class RamWidget : public Widget, public CommandSender
|
|||
kRamBinID
|
||||
};
|
||||
|
||||
uInt32 myUndoAddress, myUndoValue;
|
||||
uInt32 myCurrentRamBank;
|
||||
uInt32 myRamSize;
|
||||
uInt32 myNumRows;
|
||||
uInt32 myPageSize;
|
||||
uInt32 myUndoAddress{0}, myUndoValue{0};
|
||||
uInt32 myCurrentRamBank{0};
|
||||
uInt32 myRamSize{0};
|
||||
uInt32 myNumRows{0};
|
||||
uInt32 myPageSize{0};
|
||||
|
||||
unique_ptr<InputTextDialog> myInputBox;
|
||||
|
||||
StaticTextWidget* myRamStart;
|
||||
std::array<StaticTextWidget*, 16> myRamLabels;
|
||||
StaticTextWidget* myRamStart{nullptr};
|
||||
std::array<StaticTextWidget*, 16> myRamLabels{nullptr};
|
||||
|
||||
DataGridWidget* myRamGrid;
|
||||
DataGridWidget* myDecValue;
|
||||
DataGridWidget* myBinValue;
|
||||
EditTextWidget* myLabel;
|
||||
DataGridWidget* myRamGrid{nullptr};
|
||||
DataGridWidget* myDecValue{nullptr};
|
||||
DataGridWidget* myBinValue{nullptr};
|
||||
EditTextWidget* myLabel{nullptr};
|
||||
|
||||
ButtonWidget* myRevertButton;
|
||||
ButtonWidget* myUndoButton;
|
||||
ButtonWidget* mySearchButton;
|
||||
ButtonWidget* myCompareButton;
|
||||
ButtonWidget* myRestartButton;
|
||||
ButtonWidget* myRevertButton{nullptr};
|
||||
ButtonWidget* myUndoButton{nullptr};
|
||||
ButtonWidget* mySearchButton{nullptr};
|
||||
ButtonWidget* myCompareButton{nullptr};
|
||||
ButtonWidget* myRestartButton{nullptr};
|
||||
|
||||
ByteArray myOldValueList;
|
||||
IntArray mySearchAddr;
|
||||
|
|
|
@ -45,30 +45,30 @@ class RiotWidget : public Widget, public CommandSender
|
|||
void loadConfig() override;
|
||||
|
||||
private:
|
||||
ToggleBitWidget* mySWCHAReadBits;
|
||||
ToggleBitWidget* mySWCHAWriteBits;
|
||||
ToggleBitWidget* mySWACNTBits;
|
||||
ToggleBitWidget* mySWCHBReadBits;
|
||||
ToggleBitWidget* mySWCHBWriteBits;
|
||||
ToggleBitWidget* mySWBCNTBits;
|
||||
ToggleBitWidget* mySWCHAReadBits{nullptr};
|
||||
ToggleBitWidget* mySWCHAWriteBits{nullptr};
|
||||
ToggleBitWidget* mySWACNTBits{nullptr};
|
||||
ToggleBitWidget* mySWCHBReadBits{nullptr};
|
||||
ToggleBitWidget* mySWCHBWriteBits{nullptr};
|
||||
ToggleBitWidget* mySWBCNTBits{nullptr};
|
||||
|
||||
DataGridWidget* myLeftINPT;
|
||||
DataGridWidget* myRightINPT;
|
||||
CheckboxWidget* myINPTLatch;
|
||||
CheckboxWidget* myINPTDump;
|
||||
DataGridWidget* myLeftINPT{nullptr};
|
||||
DataGridWidget* myRightINPT{nullptr};
|
||||
CheckboxWidget* myINPTLatch{nullptr};
|
||||
CheckboxWidget* myINPTDump{nullptr};
|
||||
|
||||
DataGridWidget* myTimWrite;
|
||||
DataGridWidget* myTimRead;
|
||||
DataGridWidget* myTimDivider;
|
||||
DataGridWidget* myTimWrite{nullptr};
|
||||
DataGridWidget* myTimRead{nullptr};
|
||||
DataGridWidget* myTimDivider{nullptr};
|
||||
|
||||
ControllerWidget *myLeftControl, *myRightControl;
|
||||
PopUpWidget *myP0Diff, *myP1Diff;
|
||||
PopUpWidget *myTVType;
|
||||
CheckboxWidget* mySelect;
|
||||
CheckboxWidget* myReset;
|
||||
CheckboxWidget* myPause;
|
||||
ControllerWidget *myLeftControl{nullptr}, *myRightControl{nullptr};
|
||||
PopUpWidget *myP0Diff{nullptr}, *myP1Diff{nullptr};
|
||||
PopUpWidget *myTVType{nullptr};
|
||||
CheckboxWidget* mySelect{nullptr};
|
||||
CheckboxWidget* myReset{nullptr};
|
||||
CheckboxWidget* myPause{nullptr};
|
||||
|
||||
EditTextWidget* myConsole;
|
||||
EditTextWidget* myConsole{nullptr};
|
||||
|
||||
// ID's for the various widgets
|
||||
// We need ID's, since there are more than one of several types of widgets
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
RomListSettings::RomListSettings(GuiObject* boss, const GUI::Font& font)
|
||||
: Dialog(boss->instance(), boss->parent()),
|
||||
CommandSender(boss),
|
||||
_xorig(0),
|
||||
_yorig(0),
|
||||
_item(0)
|
||||
CommandSender(boss)
|
||||
{
|
||||
const int buttonWidth = font.getStringWidth("RunTo PC @ current line") + 20,
|
||||
buttonHeight = font.getLineHeight() + 4;
|
||||
|
|
|
@ -42,13 +42,13 @@ class RomListSettings : public Dialog, public CommandSender
|
|||
void center() override;
|
||||
|
||||
private:
|
||||
uInt32 _xorig, _yorig;
|
||||
int _item; // currently selected line number in the disassembly list
|
||||
uInt32 _xorig{0}, _yorig{0};
|
||||
int _item{0}; // currently selected line number in the disassembly list
|
||||
|
||||
CheckboxWidget* myShowTentative;
|
||||
CheckboxWidget* myShowAddresses;
|
||||
CheckboxWidget* myShowGFXBinary;
|
||||
CheckboxWidget* myUseRelocation;
|
||||
CheckboxWidget* myShowTentative{nullptr};
|
||||
CheckboxWidget* myShowAddresses{nullptr};
|
||||
CheckboxWidget* myShowGFXBinary{nullptr};
|
||||
CheckboxWidget* myUseRelocation{nullptr};
|
||||
|
||||
private:
|
||||
void loadConfig() override;
|
||||
|
|
|
@ -30,16 +30,7 @@
|
|||
RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
const GUI::Font& nfont,
|
||||
int x, int y, int w, int h)
|
||||
: EditableWidget(boss, nfont, x, y, 16, 16),
|
||||
_rows(0),
|
||||
_cols(0),
|
||||
_currentPos(0),
|
||||
_selectedItem(-1),
|
||||
_highlightedItem(-1),
|
||||
_editMode(false),
|
||||
_currentKeyDown(KBDK_UNKNOWN),
|
||||
_base(Common::Base::Fmt::_DEFAULT),
|
||||
myDisasm(nullptr)//,
|
||||
: EditableWidget(boss, nfont, x, y, 16, 16)
|
||||
{
|
||||
_flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS;
|
||||
_bgcolor = kWidColor;
|
||||
|
|
|
@ -87,21 +87,21 @@ class RomListWidget : public EditableWidget
|
|||
|
||||
private:
|
||||
unique_ptr<RomListSettings> myMenu;
|
||||
ScrollBarWidget* myScrollBar;
|
||||
ScrollBarWidget* myScrollBar{nullptr};
|
||||
|
||||
int _labelWidth;
|
||||
int _bytesWidth;
|
||||
int _rows;
|
||||
int _cols;
|
||||
int _currentPos; // position of first line in visible window
|
||||
int _selectedItem;
|
||||
int _highlightedItem;
|
||||
bool _editMode;
|
||||
StellaKey _currentKeyDown;
|
||||
Common::Base::Fmt _base; // base used during editing
|
||||
int _labelWidth{0};
|
||||
int _bytesWidth{0};
|
||||
int _rows{0};
|
||||
int _cols{0};
|
||||
int _currentPos{0}; // position of first line in visible window
|
||||
int _selectedItem{-1};
|
||||
int _highlightedItem{-1};
|
||||
bool _editMode{false};
|
||||
StellaKey _currentKeyDown{KBDK_UNKNOWN};
|
||||
Common::Base::Fmt _base{Common::Base::Fmt::_DEFAULT}; // base used during editing
|
||||
|
||||
const CartDebug::Disassembly* myDisasm;
|
||||
vector<CheckboxWidget*> myCheckList;
|
||||
const CartDebug::Disassembly* myDisasm{nullptr};
|
||||
vector<CheckboxWidget*> myCheckList{nullptr};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
RomWidget::RomWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
|
||||
int x, int y, int w, int h)
|
||||
: Widget(boss, lfont, x, y, w, h),
|
||||
CommandSender(boss),
|
||||
myListIsDirty(true)
|
||||
CommandSender(boss)
|
||||
{
|
||||
int xpos, ypos;
|
||||
StaticTextWidget* t;
|
||||
|
|
|
@ -55,10 +55,10 @@ class RomWidget : public Widget, public CommandSender
|
|||
Common::Base::Fmt base);
|
||||
|
||||
private:
|
||||
RomListWidget* myRomList;
|
||||
EditTextWidget* myBank;
|
||||
RomListWidget* myRomList{nullptr};
|
||||
EditTextWidget* myBank{nullptr};
|
||||
|
||||
bool myListIsDirty;
|
||||
bool myListIsDirty{true};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -36,17 +36,17 @@ class TiaInfoWidget : public Widget, public CommandSender
|
|||
void loadConfig() override;
|
||||
|
||||
private:
|
||||
EditTextWidget* myFrameCount;
|
||||
EditTextWidget* myFrameCycles;
|
||||
EditTextWidget* myFrameCount{nullptr};
|
||||
EditTextWidget* myFrameCycles{nullptr};
|
||||
|
||||
EditTextWidget* myScanlineCount;
|
||||
EditTextWidget* myScanlineCountLast;
|
||||
EditTextWidget* myScanlineCycles;
|
||||
EditTextWidget* myPixelPosition;
|
||||
EditTextWidget* myColorClocks;
|
||||
EditTextWidget* myScanlineCount{nullptr};
|
||||
EditTextWidget* myScanlineCountLast{nullptr};
|
||||
EditTextWidget* myScanlineCycles{nullptr};
|
||||
EditTextWidget* myPixelPosition{nullptr};
|
||||
EditTextWidget* myColorClocks{nullptr};
|
||||
|
||||
CheckboxWidget* myVSync;
|
||||
CheckboxWidget* myVBlank;
|
||||
CheckboxWidget* myVSync{nullptr};
|
||||
CheckboxWidget* myVBlank{nullptr};
|
||||
|
||||
private:
|
||||
void handleMouseDown(int x, int y, MouseButton b, int clickCount) override;
|
||||
|
|
|
@ -38,10 +38,7 @@
|
|||
TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y, int w, int h)
|
||||
: Widget(boss, font, x, y, w, h),
|
||||
CommandSender(boss),
|
||||
myZoom(nullptr),
|
||||
myClickX(0),
|
||||
myClickY(0)
|
||||
CommandSender(boss)
|
||||
{
|
||||
// Create context menu for commands
|
||||
VariantList l;
|
||||
|
|
|
@ -49,9 +49,9 @@ class TiaOutputWidget : public Widget, public CommandSender
|
|||
*/
|
||||
private:
|
||||
unique_ptr<ContextMenu> myMenu;
|
||||
TiaZoomWidget* myZoom;
|
||||
TiaZoomWidget* myZoom{nullptr};
|
||||
|
||||
int myClickX, myClickY;
|
||||
int myClickX{0}, myClickY{0};
|
||||
|
||||
// Create this buffer once, instead of allocating it each time the
|
||||
// TIA image is redrawn
|
||||
|
|
|
@ -39,64 +39,64 @@ class TiaWidget : public Widget, public CommandSender
|
|||
virtual ~TiaWidget() = default;
|
||||
|
||||
private:
|
||||
DataGridWidget* myColorRegs;
|
||||
DataGridWidget* myColorRegs{nullptr};
|
||||
|
||||
ColorWidget* myCOLUP0Color;
|
||||
ColorWidget* myCOLUP1Color;
|
||||
ColorWidget* myCOLUPFColor;
|
||||
ColorWidget* myCOLUBKColor;
|
||||
ColorWidget* myCOLUP0Color{nullptr};
|
||||
ColorWidget* myCOLUP1Color{nullptr};
|
||||
ColorWidget* myCOLUPFColor{nullptr};
|
||||
ColorWidget* myCOLUBKColor{nullptr};
|
||||
|
||||
CheckboxWidget* myFixedEnabled;
|
||||
std::array<ColorWidget*, 8> myFixedColors;
|
||||
CheckboxWidget* myFixedEnabled{nullptr};
|
||||
std::array<ColorWidget*, 8> myFixedColors{nullptr};
|
||||
|
||||
TogglePixelWidget* myGRP0;
|
||||
TogglePixelWidget* myGRP0Old;
|
||||
TogglePixelWidget* myGRP1;
|
||||
TogglePixelWidget* myGRP1Old;
|
||||
TogglePixelWidget* myGRP0{nullptr};
|
||||
TogglePixelWidget* myGRP0Old{nullptr};
|
||||
TogglePixelWidget* myGRP1{nullptr};
|
||||
TogglePixelWidget* myGRP1Old{nullptr};
|
||||
|
||||
DataGridWidget* myPosP0;
|
||||
DataGridWidget* myPosP1;
|
||||
DataGridWidget* myPosM0;
|
||||
DataGridWidget* myPosM1;
|
||||
DataGridWidget* myPosBL;
|
||||
DataGridWidget* myPosP0{nullptr};
|
||||
DataGridWidget* myPosP1{nullptr};
|
||||
DataGridWidget* myPosM0{nullptr};
|
||||
DataGridWidget* myPosM1{nullptr};
|
||||
DataGridWidget* myPosBL{nullptr};
|
||||
|
||||
DataGridWidget* myHMP0;
|
||||
DataGridWidget* myHMP1;
|
||||
DataGridWidget* myHMM0;
|
||||
DataGridWidget* myHMM1;
|
||||
DataGridWidget* myHMBL;
|
||||
DataGridWidget* myHMP0{nullptr};
|
||||
DataGridWidget* myHMP1{nullptr};
|
||||
DataGridWidget* myHMM0{nullptr};
|
||||
DataGridWidget* myHMM1{nullptr};
|
||||
DataGridWidget* myHMBL{nullptr};
|
||||
|
||||
DataGridWidget* myNusizP0;
|
||||
DataGridWidget* myNusizP1;
|
||||
DataGridWidget* myNusizM0;
|
||||
DataGridWidget* myNusizM1;
|
||||
DataGridWidget* mySizeBL;
|
||||
EditTextWidget* myNusizP0Text;
|
||||
EditTextWidget* myNusizP1Text;
|
||||
DataGridWidget* myNusizP0{nullptr};
|
||||
DataGridWidget* myNusizP1{nullptr};
|
||||
DataGridWidget* myNusizM0{nullptr};
|
||||
DataGridWidget* myNusizM1{nullptr};
|
||||
DataGridWidget* mySizeBL{nullptr};
|
||||
EditTextWidget* myNusizP0Text{nullptr};
|
||||
EditTextWidget* myNusizP1Text{nullptr};
|
||||
|
||||
CheckboxWidget* myRefP0;
|
||||
CheckboxWidget* myRefP1;
|
||||
CheckboxWidget* myDelP0;
|
||||
CheckboxWidget* myDelP1;
|
||||
CheckboxWidget* myDelBL;
|
||||
CheckboxWidget* myRefP0{nullptr};
|
||||
CheckboxWidget* myRefP1{nullptr};
|
||||
CheckboxWidget* myDelP0{nullptr};
|
||||
CheckboxWidget* myDelP1{nullptr};
|
||||
CheckboxWidget* myDelBL{nullptr};
|
||||
|
||||
TogglePixelWidget* myEnaM0;
|
||||
TogglePixelWidget* myEnaM1;
|
||||
TogglePixelWidget* myEnaBL;
|
||||
TogglePixelWidget* myEnaBLOld;
|
||||
TogglePixelWidget* myEnaM0{nullptr};
|
||||
TogglePixelWidget* myEnaM1{nullptr};
|
||||
TogglePixelWidget* myEnaBL{nullptr};
|
||||
TogglePixelWidget* myEnaBLOld{nullptr};
|
||||
|
||||
CheckboxWidget* myResMP0;
|
||||
CheckboxWidget* myResMP1;
|
||||
CheckboxWidget* myResMP0{nullptr};
|
||||
CheckboxWidget* myResMP1{nullptr};
|
||||
|
||||
/** Collision register bits */
|
||||
std::array<CheckboxWidget*, 15> myCollision;
|
||||
std::array<CheckboxWidget*, 15> myCollision{nullptr};
|
||||
|
||||
std::array<TogglePixelWidget*, 3> myPF;
|
||||
CheckboxWidget* myRefPF;
|
||||
CheckboxWidget* myScorePF;
|
||||
CheckboxWidget* myPriorityPF;
|
||||
std::array<TogglePixelWidget*, 3> myPF{nullptr};
|
||||
CheckboxWidget* myRefPF{nullptr};
|
||||
CheckboxWidget* myScorePF{nullptr};
|
||||
CheckboxWidget* myPriorityPF{nullptr};
|
||||
|
||||
DelayQueueWidget* myDelayQueueWidget;
|
||||
DelayQueueWidget* myDelayQueueWidget{nullptr};
|
||||
|
||||
// ID's for the various widgets
|
||||
// We need ID's, since there are more than one of several types of widgets
|
||||
|
|
|
@ -55,13 +55,13 @@ class TiaZoomWidget : public Widget, public CommandSender
|
|||
private:
|
||||
unique_ptr<ContextMenu> myMenu;
|
||||
|
||||
int myZoomLevel;
|
||||
int myNumCols, myNumRows;
|
||||
int myOffX, myOffY;
|
||||
int myOffXLo, myOffYLo;
|
||||
int myZoomLevel{0};
|
||||
int myNumCols{0}, myNumRows{0};
|
||||
int myOffX{0}, myOffY{0};
|
||||
int myOffXLo{0}, myOffYLo{0};
|
||||
|
||||
bool myMouseMoving;
|
||||
int myClickX, myClickY;
|
||||
bool myMouseMoving{false};
|
||||
int myClickX{0}, myClickY{0};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -35,8 +35,8 @@ class ToggleBitWidget : public ToggleWidget
|
|||
void drawWidget(bool hilite) override;
|
||||
|
||||
protected:
|
||||
StringList _offList;
|
||||
StringList _onList;
|
||||
StringList _offList;
|
||||
StringList _onList;
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -25,11 +25,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
TogglePixelWidget::TogglePixelWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y, int cols, int rows)
|
||||
: ToggleWidget(boss, font, x, y, cols, rows, 1),
|
||||
_pixelColor(kNone),
|
||||
_backgroundColor(kDlgColor),
|
||||
_swapBits(false),
|
||||
_crossBits(false)
|
||||
: ToggleWidget(boss, font, x, y, cols, rows, 1)
|
||||
{
|
||||
_rowHeight = _colWidth = font.getLineHeight();
|
||||
|
||||
|
|
|
@ -41,9 +41,9 @@ class TogglePixelWidget : public ToggleWidget
|
|||
void setCrossed(bool enable) { _crossBits = enable; }
|
||||
|
||||
private:
|
||||
ColorId _pixelColor, _backgroundColor;
|
||||
bool _swapBits;
|
||||
bool _crossBits;
|
||||
ColorId _pixelColor{kNone}, _backgroundColor{kDlgColor};
|
||||
bool _swapBits{false};
|
||||
bool _crossBits{false};
|
||||
|
||||
private:
|
||||
void drawWidget(bool hilite) override;
|
||||
|
|
|
@ -24,10 +24,7 @@
|
|||
AtariVox::AtariVox(Jack jack, const Event& event, const System& system,
|
||||
const string& portname, const string& eepromfile,
|
||||
const onMessageCallback& callback)
|
||||
: SaveKey(jack, event, system, eepromfile, callback, Controller::Type::AtariVox),
|
||||
myShiftCount(0),
|
||||
myShiftRegister(0),
|
||||
myLastDataWriteCycle(0)
|
||||
: SaveKey(jack, event, system, eepromfile, callback, Controller::Type::AtariVox)
|
||||
{
|
||||
mySerialPort = MediaFactory::createSerialPort();
|
||||
if(mySerialPort->openPort(portname))
|
||||
|
|
|
@ -97,19 +97,19 @@ class AtariVox : public SaveKey
|
|||
unique_ptr<SerialPort> mySerialPort;
|
||||
|
||||
// How many bits have been shifted into the shift register?
|
||||
uInt8 myShiftCount;
|
||||
uInt8 myShiftCount{0};
|
||||
|
||||
// Shift register. Data comes in serially:
|
||||
// 1 start bit, always 0
|
||||
// 8 data bits, LSB first
|
||||
// 1 stop bit, always 1
|
||||
uInt16 myShiftRegister;
|
||||
uInt16 myShiftRegister{0};
|
||||
|
||||
// When did the last data write start, in CPU cycles?
|
||||
// The real SpeakJet chip reads data at 19200 bits/sec. Alex's
|
||||
// driver code sends data at 62 CPU cycles per bit, which is
|
||||
// "close enough".
|
||||
uInt64 myLastDataWriteCycle;
|
||||
uInt64 myLastDataWriteCycle{0};
|
||||
|
||||
// Holds information concerning serial port usage
|
||||
string myAboutString;
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
BoosterGrip::BoosterGrip(Jack jack, const Event& event, const System& system)
|
||||
: Controller(jack, event, system, Controller::Type::BoosterGrip),
|
||||
myControlID(-1)
|
||||
: Controller(jack, event, system, Controller::Type::BoosterGrip)
|
||||
{
|
||||
if(myJack == Jack::Left)
|
||||
{
|
||||
|
|
|
@ -80,7 +80,7 @@ class BoosterGrip : public Controller
|
|||
myXAxisValue, myYAxisValue;
|
||||
|
||||
// Controller to emulate in normal mouse axis mode
|
||||
int myControlID;
|
||||
int myControlID{-1};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -27,12 +27,7 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Cartridge::Cartridge(const Settings& settings, const string& md5)
|
||||
: mySettings(settings),
|
||||
myBankChanged(true),
|
||||
myCodeAccessBase(nullptr),
|
||||
myRamWriteAccess(0),
|
||||
myStartBank(0),
|
||||
myBankLocked(false)
|
||||
: mySettings(settings)
|
||||
{
|
||||
auto to_uInt32 = [](const string& s, uInt32 pos) {
|
||||
return uInt32(std::stoul(s.substr(pos, 8), nullptr, 16));
|
||||
|
|
|
@ -318,22 +318,22 @@ class Cartridge : public Device
|
|||
const Settings& mySettings;
|
||||
|
||||
// Indicates if the bank has changed somehow (a bankswitch has occurred)
|
||||
bool myBankChanged;
|
||||
bool myBankChanged{true};
|
||||
|
||||
// The array containing information about every byte of ROM indicating
|
||||
// whether it is used as code.
|
||||
ByteBuffer myCodeAccessBase;
|
||||
|
||||
// Contains address of illegal RAM write access or 0
|
||||
uInt16 myRamWriteAccess;
|
||||
uInt16 myRamWriteAccess{0};
|
||||
|
||||
private:
|
||||
// The startup bank to use (where to look for the reset vector address)
|
||||
uInt16 myStartBank;
|
||||
uInt16 myStartBank{0};
|
||||
|
||||
// If myBankLocked is true, ignore attempts at bankswitching. This is used
|
||||
// by the debugger, when disassembling/dumping ROM.
|
||||
bool myBankLocked;
|
||||
bool myBankLocked{false};
|
||||
|
||||
// Semi-random values to use when a read from write port occurs
|
||||
std::array<uInt8, 256> myRWPRandomValues;
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Cartridge0840::Cartridge0840(const ByteBuffer& image, size_t size,
|
||||
const string& md5, const Settings& settings)
|
||||
: Cartridge(settings, md5),
|
||||
myBankOffset(0)
|
||||
: Cartridge(settings, md5)
|
||||
{
|
||||
// Copy the ROM image into my buffer
|
||||
std::copy_n(image.get(), std::min(myImage.size(), size), myImage.begin());
|
||||
|
|
|
@ -156,7 +156,7 @@ class Cartridge0840 : public Cartridge
|
|||
std::array<uInt8, 8_KB> myImage;
|
||||
|
||||
// Indicates the offset into the ROM image (aligns to current bank)
|
||||
uInt16 myBankOffset;
|
||||
uInt16 myBankOffset{0};
|
||||
|
||||
// Previous Device's page access
|
||||
std::array<System::PageAccess, 8> myHotSpotPageAccess;
|
||||
|
|
|
@ -130,10 +130,10 @@ class Cartridge2K : public Cartridge
|
|||
ByteBuffer myImage;
|
||||
|
||||
// Size of the ROM image
|
||||
size_t mySize;
|
||||
size_t mySize{0};
|
||||
|
||||
// Mask to use for mirroring
|
||||
uInt16 myMask;
|
||||
uInt16 myMask{0};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
Cartridge3E::Cartridge3E(const ByteBuffer& image, size_t size,
|
||||
const string& md5, const Settings& settings)
|
||||
: Cartridge(settings, md5),
|
||||
mySize(size),
|
||||
myCurrentBank(0)
|
||||
mySize(size)
|
||||
{
|
||||
// Allocate array for the ROM image
|
||||
myImage = make_unique<uInt8[]>(mySize);
|
||||
|
|
|
@ -188,10 +188,10 @@ class Cartridge3E : public Cartridge
|
|||
std::array<uInt8, 32_KB> myRAM;
|
||||
|
||||
// Size of the ROM image
|
||||
size_t mySize;
|
||||
size_t mySize{0};
|
||||
|
||||
// Indicates which bank is currently active for the first segment
|
||||
uInt16 myCurrentBank;
|
||||
uInt16 myCurrentBank{0};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -191,7 +191,7 @@ class Cartridge3EPlus: public Cartridge
|
|||
static constexpr uInt16 RAM_WRITE_OFFSET = 0x200;
|
||||
|
||||
ByteBuffer myImage; // Pointer to a dynamically allocated ROM image of the cartridge
|
||||
size_t mySize; // Size of the ROM image
|
||||
size_t mySize{0}; // Size of the ROM image
|
||||
std::array<uInt8, RAM_TOTAL_SIZE> myRAM;
|
||||
|
||||
private:
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
Cartridge3F::Cartridge3F(const ByteBuffer& image, size_t size,
|
||||
const string& md5, const Settings& settings)
|
||||
: Cartridge(settings, md5),
|
||||
mySize(size),
|
||||
myCurrentBank(0)
|
||||
mySize(size)
|
||||
{
|
||||
// Allocate array for the ROM image
|
||||
myImage = make_unique<uInt8[]>(mySize);
|
||||
|
|
|
@ -162,10 +162,10 @@ class Cartridge3F : public Cartridge
|
|||
ByteBuffer myImage;
|
||||
|
||||
// Size of the ROM image
|
||||
size_t mySize;
|
||||
size_t mySize{0};
|
||||
|
||||
// Indicates which bank is currently active for the first segment
|
||||
uInt16 myCurrentBank;
|
||||
uInt16 myCurrentBank{0};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -24,15 +24,7 @@
|
|||
Cartridge4A50::Cartridge4A50(const ByteBuffer& image, size_t size,
|
||||
const string& md5, const Settings& settings)
|
||||
: Cartridge(settings, md5),
|
||||
mySize(size),
|
||||
mySliceLow(0),
|
||||
mySliceMiddle(0),
|
||||
mySliceHigh(0),
|
||||
myIsRomLow(true),
|
||||
myIsRomMiddle(true),
|
||||
myIsRomHigh(true),
|
||||
myLastAddress(0),
|
||||
myLastData(0)
|
||||
mySize(size)
|
||||
{
|
||||
// Copy the ROM image into my buffer
|
||||
// Supported file sizes are 32/64/128K, which are duplicated if necessary
|
||||
|
|
|
@ -225,21 +225,21 @@ class Cartridge4A50 : public Cartridge
|
|||
std::array<uInt8, 32_KB> myRAM;
|
||||
|
||||
// (Actual) Size of the ROM image
|
||||
size_t mySize;
|
||||
size_t mySize{0};
|
||||
|
||||
// Indicates the slice mapped into each of the three segments
|
||||
uInt16 mySliceLow; /* index pointer for $1000-$17ff slice */
|
||||
uInt16 mySliceMiddle; /* index pointer for $1800-$1dff slice */
|
||||
uInt16 mySliceHigh; /* index pointer for $1e00-$1eff slice */
|
||||
uInt16 mySliceLow{0}; // index pointer for $1000-$17ff slice
|
||||
uInt16 mySliceMiddle{0}; // index pointer for $1800-$1dff slice
|
||||
uInt16 mySliceHigh{0}; // index pointer for $1e00-$1eff slice
|
||||
|
||||
// Indicates whether the given slice is mapped to ROM or RAM
|
||||
bool myIsRomLow; /* true = ROM -- false = RAM at $1000-$17ff */
|
||||
bool myIsRomMiddle; /* true = ROM -- false = RAM at $1800-$1dff */
|
||||
bool myIsRomHigh; /* true = ROM -- false = RAM at $1e00-$1eFF */
|
||||
bool myIsRomLow{true}; // true = ROM -- false = RAM at $1000-$17ff
|
||||
bool myIsRomMiddle{true}; // true = ROM -- false = RAM at $1800-$1dff
|
||||
bool myIsRomHigh{true}; // true = ROM -- false = RAM at $1e00-$1eFF
|
||||
|
||||
// The previous address and data values (from peek and poke)
|
||||
uInt16 myLastAddress;
|
||||
uInt8 myLastData;
|
||||
uInt16 myLastAddress{0};
|
||||
uInt8 myLastData{0};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -23,13 +23,7 @@
|
|||
CartridgeAR::CartridgeAR(const ByteBuffer& image, size_t size,
|
||||
const string& md5, const Settings& settings)
|
||||
: Cartridge(settings, md5),
|
||||
mySize(std::max<size_t>(size, 8448)),
|
||||
myWriteEnabled(false),
|
||||
myPower(true),
|
||||
myDataHoldRegister(0),
|
||||
myNumberOfDistinctAccesses(0),
|
||||
myWritePending(false),
|
||||
myCurrentBank(0)
|
||||
mySize(std::max<size_t>(size, 8448))
|
||||
{
|
||||
// Create a load image buffer and copy the given image
|
||||
myLoadImages = make_unique<uInt8[]>(mySize);
|
||||
|
@ -38,7 +32,8 @@ CartridgeAR::CartridgeAR(const ByteBuffer& image, size_t size,
|
|||
|
||||
// Add header if image doesn't include it
|
||||
if(size < 8448)
|
||||
std::copy_n(ourDefaultHeader.data(), ourDefaultHeader.size(), myLoadImages.get()+myImage.size());
|
||||
std::copy_n(ourDefaultHeader.data(), ourDefaultHeader.size(),
|
||||
myLoadImages.get()+myImage.size());
|
||||
|
||||
// We use System::PageAccess.codeAccessBase, but don't allow its use
|
||||
// through a pointer, since the AR scheme doesn't support bankswitching
|
||||
|
|
|
@ -196,31 +196,31 @@ class CartridgeAR : public Cartridge
|
|||
std::array<uInt8, 256> myHeader;
|
||||
|
||||
// Size of the ROM image
|
||||
size_t mySize;
|
||||
size_t mySize{0};
|
||||
|
||||
// All of the 8448 byte loads associated with the game
|
||||
ByteBuffer myLoadImages;
|
||||
|
||||
// Indicates how many 8448 loads there are
|
||||
uInt8 myNumberOfLoadImages;
|
||||
uInt8 myNumberOfLoadImages{0};
|
||||
|
||||
// Indicates if the RAM is write enabled
|
||||
bool myWriteEnabled;
|
||||
bool myWriteEnabled{false};
|
||||
|
||||
// Indicates if the ROM's power is on or off
|
||||
bool myPower;
|
||||
bool myPower{true};
|
||||
|
||||
// Data hold register used for writing
|
||||
uInt8 myDataHoldRegister;
|
||||
uInt8 myDataHoldRegister{0};
|
||||
|
||||
// Indicates number of distinct accesses when data hold register was set
|
||||
uInt32 myNumberOfDistinctAccesses;
|
||||
uInt32 myNumberOfDistinctAccesses{0};
|
||||
|
||||
// Indicates if a write is pending or not
|
||||
bool myWritePending;
|
||||
bool myWritePending{false};
|
||||
|
||||
// Indicates which bank is currently active
|
||||
uInt16 myCurrentBank;
|
||||
uInt16 myCurrentBank{0};
|
||||
|
||||
// Fake SC-BIOS code to simulate the Supercharger load bars
|
||||
static std::array<uInt8, 294> ourDummyROMCode;
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
CartridgeBF::CartridgeBF(const ByteBuffer& image, size_t size,
|
||||
const string& md5, const Settings& settings)
|
||||
: Cartridge(settings, md5),
|
||||
myBankOffset(0)
|
||||
: Cartridge(settings, md5)
|
||||
{
|
||||
// Copy the ROM image into my buffer
|
||||
std::copy_n(image.get(), std::min(myImage.size(), size), myImage.begin());
|
||||
|
|
|
@ -157,7 +157,7 @@ class CartridgeBF : public Cartridge
|
|||
std::array<uInt8, 256_KB> myImage;
|
||||
|
||||
// Indicates the offset into the ROM image (aligns to current bank)
|
||||
uInt32 myBankOffset;
|
||||
uInt32 myBankOffset{0};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
CartridgeBFSC::CartridgeBFSC(const ByteBuffer& image, size_t size,
|
||||
const string& md5, const Settings& settings)
|
||||
: Cartridge(settings, md5),
|
||||
myBankOffset(0)
|
||||
: Cartridge(settings, md5)
|
||||
{
|
||||
// Copy the ROM image into my buffer
|
||||
std::copy_n(image.get(), std::min(myImage.size(), size), myImage.begin());
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue