mirror of https://github.com/stella-emu/stella.git
Use a more 'C++' way of initializing member variables.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2674 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
d9c05df0f2
commit
95f91262fd
|
@ -50,14 +50,14 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem)
|
||||||
// Banksizes greater than 4096 indicate multi-bank ROMs, but we handle only
|
// Banksizes greater than 4096 indicate multi-bank ROMs, but we handle only
|
||||||
// 4K pieces at a time
|
// 4K pieces at a time
|
||||||
// Banksizes less than 4K use the actual value
|
// Banksizes less than 4K use the actual value
|
||||||
BankInfo info;
|
|
||||||
info.start = info.end = info.offset = 0;
|
|
||||||
int banksize = 0;
|
int banksize = 0;
|
||||||
myConsole.cartridge().getImage(banksize);
|
myConsole.cartridge().getImage(banksize);
|
||||||
info.size = BSPF_min(banksize, 4096);
|
|
||||||
|
|
||||||
|
BankInfo info;
|
||||||
|
info.size = BSPF_min(banksize, 4096);
|
||||||
for(int i = 0; i < myConsole.cartridge().bankCount(); ++i)
|
for(int i = 0; i < myConsole.cartridge().bankCount(); ++i)
|
||||||
myBankInfo.push_back(info);
|
myBankInfo.push_back(info);
|
||||||
|
|
||||||
info.size = 128; // ZP RAM
|
info.size = 128; // ZP RAM
|
||||||
myBankInfo.push_back(info);
|
myBankInfo.push_back(info);
|
||||||
|
|
||||||
|
|
|
@ -82,10 +82,10 @@ class CartDebug : public DebuggerSystem
|
||||||
bool hllabel;
|
bool hllabel;
|
||||||
};
|
};
|
||||||
typedef Common::Array<DisassemblyTag> DisassemblyList;
|
typedef Common::Array<DisassemblyTag> DisassemblyList;
|
||||||
typedef struct {
|
struct Disassembly {
|
||||||
DisassemblyList list;
|
DisassemblyList list;
|
||||||
int fieldwidth;
|
int fieldwidth;
|
||||||
} Disassembly;
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CartDebug(Debugger& dbg, Console& console, const OSystem& osystem);
|
CartDebug(Debugger& dbg, Console& console, const OSystem& osystem);
|
||||||
|
@ -269,33 +269,35 @@ class CartDebug : public DebuggerSystem
|
||||||
};
|
};
|
||||||
AddrType addressType(uInt16 addr) const;
|
AddrType addressType(uInt16 addr) const;
|
||||||
|
|
||||||
typedef struct {
|
struct DirectiveTag {
|
||||||
DisasmType type;
|
DisasmType type;
|
||||||
uInt16 start;
|
uInt16 start;
|
||||||
uInt16 end;
|
uInt16 end;
|
||||||
} DirectiveTag;
|
};
|
||||||
typedef list<uInt16> AddressList;
|
typedef list<uInt16> AddressList;
|
||||||
typedef list<DirectiveTag> DirectiveList;
|
typedef list<DirectiveTag> DirectiveList;
|
||||||
|
|
||||||
typedef struct {
|
struct BankInfo {
|
||||||
uInt16 start; // start of address space
|
uInt16 start; // start of address space
|
||||||
uInt16 end; // end of address space
|
uInt16 end; // end of address space
|
||||||
uInt16 offset; // ORG value
|
uInt16 offset; // ORG value
|
||||||
uInt16 size; // size of a bank (in bytes)
|
uInt16 size; // size of a bank (in bytes)
|
||||||
AddressList addressList; // addresses which PC has hit
|
AddressList addressList; // addresses which PC has hit
|
||||||
DirectiveList directiveList; // overrides for automatic code determination
|
DirectiveList directiveList; // overrides for automatic code determination
|
||||||
} BankInfo;
|
|
||||||
|
BankInfo() : start(0), end(0), offset(0), size(0) { }
|
||||||
|
};
|
||||||
|
|
||||||
// Address type information determined by Distella
|
// Address type information determined by Distella
|
||||||
uInt8 myDisLabels[0x1000], myDisDirectives[0x1000];
|
uInt8 myDisLabels[0x1000], myDisDirectives[0x1000];
|
||||||
|
|
||||||
// Information on equates used in the disassembly
|
// Information on equates used in the disassembly
|
||||||
typedef struct {
|
struct ReservedEquates {
|
||||||
bool TIARead[64];
|
bool TIARead[64];
|
||||||
bool TIAWrite[128];
|
bool TIAWrite[128];
|
||||||
bool IOReadWrite[24];
|
bool IOReadWrite[24];
|
||||||
AddrToLabel Label;
|
AddrToLabel Label;
|
||||||
} ReservedEquates;
|
};
|
||||||
ReservedEquates myReserved;
|
ReservedEquates myReserved;
|
||||||
|
|
||||||
// Actually call DiStella to fill the DisassemblyList structure
|
// Actually call DiStella to fill the DisassemblyList structure
|
||||||
|
|
Loading…
Reference in New Issue