mirror of https://github.com/stella-emu/stella.git
Some more fixes for warnings from cppcheck.
This commit is contained in:
parent
e5fb010631
commit
558b071fbb
|
@ -42,7 +42,7 @@ bool CheatManager::add(const string& name, const string& code,
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Delete duplicate entries
|
// Delete duplicate entries
|
||||||
for(uInt32 i = 0; i < myCheatList.size(); i++)
|
for(uInt32 i = 0; i < myCheatList.size(); ++i)
|
||||||
{
|
{
|
||||||
if(myCheatList[i]->name() == name || myCheatList[i]->code() == code)
|
if(myCheatList[i]->name() == name || myCheatList[i]->code() == code)
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ void CheatManager::addPerFrame(const string& name, const string& code, bool enab
|
||||||
// Make sure there are no duplicates
|
// Make sure there are no duplicates
|
||||||
bool found = false;
|
bool found = false;
|
||||||
uInt32 i;
|
uInt32 i;
|
||||||
for(i = 0; i < myPerFrameList.size(); i++)
|
for(i = 0; i < myPerFrameList.size(); ++i)
|
||||||
{
|
{
|
||||||
if(myPerFrameList[i]->code() == cheat->code())
|
if(myPerFrameList[i]->code() == cheat->code())
|
||||||
{
|
{
|
||||||
|
@ -291,7 +291,7 @@ void CheatManager::loadCheats(const string& md5sum)
|
||||||
void CheatManager::saveCheats(const string& md5sum)
|
void CheatManager::saveCheats(const string& md5sum)
|
||||||
{
|
{
|
||||||
ostringstream cheats;
|
ostringstream cheats;
|
||||||
for(uInt32 i = 0; i < myCheatList.size(); i++)
|
for(uInt32 i = 0; i < myCheatList.size(); ++i)
|
||||||
{
|
{
|
||||||
cheats << myCheatList[i]->name() << ":"
|
cheats << myCheatList[i]->name() << ":"
|
||||||
<< myCheatList[i]->code() << ":"
|
<< myCheatList[i]->code() << ":"
|
||||||
|
|
|
@ -34,7 +34,7 @@ AudioQueue::AudioQueue(uInt32 fragmentSize, uInt32 capacity, bool isStereo)
|
||||||
|
|
||||||
myFragmentBuffer = make_unique<Int16[]>(myFragmentSize * sampleSize * (capacity + 2));
|
myFragmentBuffer = make_unique<Int16[]>(myFragmentSize * sampleSize * (capacity + 2));
|
||||||
|
|
||||||
for (uInt32 i = 0; i < capacity; i++)
|
for (uInt32 i = 0; i < capacity; ++i)
|
||||||
myFragmentQueue[i] = myAllFragments[i] = myFragmentBuffer.get() + i * sampleSize * myFragmentSize;
|
myFragmentQueue[i] = myAllFragments[i] = myFragmentBuffer.get() + i * sampleSize * myFragmentSize;
|
||||||
|
|
||||||
myAllFragments[capacity] = myFirstFragmentForEnqueue =
|
myAllFragments[capacity] = myFirstFragmentForEnqueue =
|
||||||
|
@ -92,7 +92,7 @@ Int16* AudioQueue::enqueue(Int16* fragment)
|
||||||
newFragment = myFragmentQueue.at(fragmentIndex);
|
newFragment = myFragmentQueue.at(fragmentIndex);
|
||||||
myFragmentQueue.at(fragmentIndex) = fragment;
|
myFragmentQueue.at(fragmentIndex) = fragment;
|
||||||
|
|
||||||
if (mySize < capacity) mySize++;
|
if (mySize < capacity) ++mySize;
|
||||||
else {
|
else {
|
||||||
myNextFragment = (myNextFragment + 1) % capacity;
|
myNextFragment = (myNextFragment + 1) % capacity;
|
||||||
if (!myIgnoreOverflows) (cerr << "audio buffer overflow\n").flush();
|
if (!myIgnoreOverflows) (cerr << "audio buffer overflow\n").flush();
|
||||||
|
@ -118,7 +118,7 @@ Int16* AudioQueue::dequeue(Int16* fragment)
|
||||||
Int16* nextFragment = myFragmentQueue.at(myNextFragment);
|
Int16* nextFragment = myFragmentQueue.at(myNextFragment);
|
||||||
myFragmentQueue.at(myNextFragment) = fragment;
|
myFragmentQueue.at(myNextFragment) = fragment;
|
||||||
|
|
||||||
mySize--;
|
--mySize;
|
||||||
myNextFragment = (myNextFragment + 1) % myFragmentQueue.size();
|
myNextFragment = (myNextFragment + 1) % myFragmentQueue.size();
|
||||||
|
|
||||||
return nextFragment;
|
return nextFragment;
|
||||||
|
|
|
@ -179,6 +179,7 @@ class RewindManager
|
||||||
// The goal of LinkedObjectPool is to not do any allocations at all
|
// The goal of LinkedObjectPool is to not do any allocations at all
|
||||||
RewindState() : cycles(0) { }
|
RewindState() : cycles(0) { }
|
||||||
RewindState(const RewindState& rs) : cycles(rs.cycles) { }
|
RewindState(const RewindState& rs) : cycles(rs.cycles) { }
|
||||||
|
RewindState& operator= (const RewindState& rs) { cycles = rs.cycles; return *this; }
|
||||||
|
|
||||||
// Output object info; used for debugging only
|
// Output object info; used for debugging only
|
||||||
friend ostream& operator<<(ostream& os, const RewindState& s) {
|
friend ostream& operator<<(ostream& os, const RewindState& s) {
|
||||||
|
|
|
@ -57,12 +57,13 @@ class StringParser
|
||||||
|
|
||||||
while(std::getline(buf, line, '\n'))
|
while(std::getline(buf, line, '\n'))
|
||||||
{
|
{
|
||||||
size_t beg = 0, len = maxlen, size = line.size();
|
size_t len = maxlen, size = line.size();
|
||||||
|
|
||||||
if(size <= len)
|
if(size <= len)
|
||||||
myStringList.push_back(line);
|
myStringList.push_back(line);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
size_t beg = 0;
|
||||||
while((beg+maxlen) < size)
|
while((beg+maxlen) < size)
|
||||||
{
|
{
|
||||||
size_t spos = line.find_last_of(' ', beg+len);
|
size_t spos = line.find_last_of(' ', beg+len);
|
||||||
|
|
|
@ -38,7 +38,7 @@ float ConvolutionBuffer::convoluteWith(float* kernel) const
|
||||||
{
|
{
|
||||||
float result = 0.;
|
float result = 0.;
|
||||||
|
|
||||||
for (uInt32 i = 0; i < mySize; i++) {
|
for (uInt32 i = 0; i < mySize; ++i) {
|
||||||
result += kernel[i] * myData[(myFirstIndex + i) % mySize];
|
result += kernel[i] * myData[(myFirstIndex + i) % mySize];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace {
|
||||||
|
|
||||||
uInt32 reducedDenominator(uInt32 n, uInt32 d)
|
uInt32 reducedDenominator(uInt32 n, uInt32 d)
|
||||||
{
|
{
|
||||||
for (uInt32 i = std::min(n ,d); i > 1; i--) {
|
for (uInt32 i = std::min(n ,d); i > 1; --i) {
|
||||||
if ((n % i == 0) && (d % i == 0)) {
|
if ((n % i == 0) && (d % i == 0)) {
|
||||||
n /= i;
|
n /= i;
|
||||||
d /= i;
|
d /= i;
|
||||||
|
@ -103,13 +103,13 @@ void LanczosResampler::precomputeKernels()
|
||||||
// timeIndex = time * formatFrom.sampleRate * formatTo.sampleRAte
|
// timeIndex = time * formatFrom.sampleRate * formatTo.sampleRAte
|
||||||
uInt32 timeIndex = 0;
|
uInt32 timeIndex = 0;
|
||||||
|
|
||||||
for (uInt32 i = 0; i < myPrecomputedKernelCount; i++) {
|
for (uInt32 i = 0; i < myPrecomputedKernelCount; ++i) {
|
||||||
float* kernel = myPrecomputedKernels.get() + myKernelSize * i;
|
float* kernel = myPrecomputedKernels.get() + myKernelSize * i;
|
||||||
// The kernel is normalized such to be evaluate on time * formatFrom.sampleRate
|
// The kernel is normalized such to be evaluate on time * formatFrom.sampleRate
|
||||||
float center =
|
float center =
|
||||||
static_cast<float>(timeIndex) / static_cast<float>(myFormatTo.sampleRate);
|
static_cast<float>(timeIndex) / static_cast<float>(myFormatTo.sampleRate);
|
||||||
|
|
||||||
for (uInt32 j = 0; j < 2 * myKernelParameter; j++) {
|
for (uInt32 j = 0; j < 2 * myKernelParameter; ++j) {
|
||||||
kernel[j] = lanczosKernel(
|
kernel[j] = lanczosKernel(
|
||||||
center - static_cast<float>(j) + static_cast<float>(myKernelParameter) - 1.f, myKernelParameter
|
center - static_cast<float>(j) + static_cast<float>(myKernelParameter) - 1.f, myKernelParameter
|
||||||
) * CLIPPING_FACTOR;
|
) * CLIPPING_FACTOR;
|
||||||
|
@ -150,7 +150,7 @@ void LanczosResampler::fillFragment(float* fragment, uInt32 length)
|
||||||
|
|
||||||
const uInt32 outputSamples = myFormatTo.stereo ? (length >> 1) : length;
|
const uInt32 outputSamples = myFormatTo.stereo ? (length >> 1) : length;
|
||||||
|
|
||||||
for (uInt32 i = 0; i < outputSamples; i++) {
|
for (uInt32 i = 0; i < outputSamples; ++i) {
|
||||||
float* kernel = myPrecomputedKernels.get() + (myCurrentKernelIndex * myKernelSize);
|
float* kernel = myPrecomputedKernels.get() + (myCurrentKernelIndex * myKernelSize);
|
||||||
myCurrentKernelIndex = (myCurrentKernelIndex + 1) % myPrecomputedKernelCount;
|
myCurrentKernelIndex = (myCurrentKernelIndex + 1) % myPrecomputedKernelCount;
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ inline void LanczosResampler::shiftSamples(uInt32 samplesToShift)
|
||||||
else
|
else
|
||||||
myBuffer->shift(myHighPass.apply(myCurrentFragment[myFragmentIndex] / static_cast<float>(0x7fff)));
|
myBuffer->shift(myHighPass.apply(myCurrentFragment[myFragmentIndex] / static_cast<float>(0x7fff)));
|
||||||
|
|
||||||
myFragmentIndex++;
|
++myFragmentIndex;
|
||||||
|
|
||||||
if (myFragmentIndex >= myFormatFrom.fragmentSize) {
|
if (myFragmentIndex >= myFormatFrom.fragmentSize) {
|
||||||
myFragmentIndex %= myFormatFrom.fragmentSize;
|
myFragmentIndex %= myFormatFrom.fragmentSize;
|
||||||
|
|
|
@ -33,7 +33,7 @@ class LanczosResampler : public Resampler
|
||||||
uInt32 kernelParameter
|
uInt32 kernelParameter
|
||||||
);
|
);
|
||||||
|
|
||||||
virtual void fillFragment(float* fragment, uInt32 length);
|
void fillFragment(float* fragment, uInt32 length) override;
|
||||||
|
|
||||||
virtual ~LanczosResampler() = default;
|
virtual ~LanczosResampler() = default;
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ void SimpleResampler::fillFragment(float* fragment, uInt32 length)
|
||||||
const uInt32 outputSamples = myFormatTo.stereo ? (length >> 1) : length;
|
const uInt32 outputSamples = myFormatTo.stereo ? (length >> 1) : length;
|
||||||
|
|
||||||
// For the following math, remember that myTimeIndex = time * myFormatFrom.sampleRate * myFormatTo.sampleRate
|
// For the following math, remember that myTimeIndex = time * myFormatFrom.sampleRate * myFormatTo.sampleRate
|
||||||
for (uInt32 i = 0; i < outputSamples; i++) {
|
for (uInt32 i = 0; i < outputSamples; ++i) {
|
||||||
if (myFormatFrom.stereo) {
|
if (myFormatFrom.stereo) {
|
||||||
float sampleL = static_cast<float>(myCurrentFragment[2*myFragmentIndex]) / static_cast<float>(0x7fff);
|
float sampleL = static_cast<float>(myCurrentFragment[2*myFragmentIndex]) / static_cast<float>(0x7fff);
|
||||||
float sampleR = static_cast<float>(myCurrentFragment[2*myFragmentIndex + 1]) / static_cast<float>(0x7fff);
|
float sampleR = static_cast<float>(myCurrentFragment[2*myFragmentIndex + 1]) / static_cast<float>(0x7fff);
|
||||||
|
|
|
@ -30,7 +30,7 @@ class SimpleResampler : public Resampler
|
||||||
Resampler::NextFragmentCallback NextFragmentCallback
|
Resampler::NextFragmentCallback NextFragmentCallback
|
||||||
);
|
);
|
||||||
|
|
||||||
virtual void fillFragment(float* fragment, uInt32 length);
|
void fillFragment(float* fragment, uInt32 length) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ namespace BSPF
|
||||||
if(BSPF::startsWithIgnoreCase(s1, s2.substr(0, 1)))
|
if(BSPF::startsWithIgnoreCase(s1, s2.substr(0, 1)))
|
||||||
{
|
{
|
||||||
size_t pos = 1;
|
size_t pos = 1;
|
||||||
for(uInt32 j = 1; j < s2.size(); j++)
|
for(uInt32 j = 1; j < s2.size(); ++j)
|
||||||
{
|
{
|
||||||
size_t found = BSPF::findIgnoreCase(s1, s2.substr(j, 1), pos);
|
size_t found = BSPF::findIgnoreCase(s1, s2.substr(j, 1), pos);
|
||||||
if(found == string::npos)
|
if(found == string::npos)
|
||||||
|
|
|
@ -426,8 +426,8 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
uInt32 count = 0, argRequiredCount = 0;
|
uInt32 count = 0, argRequiredCount = 0;
|
||||||
while(*p != kARG_END_ARGS && *p != kARG_MULTI_BYTE)
|
while(*p != kARG_END_ARGS && *p != kARG_MULTI_BYTE)
|
||||||
{
|
{
|
||||||
count++;
|
++count;
|
||||||
p++;
|
++p;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Evil hack: some commands intentionally take multiple arguments
|
// Evil hack: some commands intentionally take multiple arguments
|
||||||
|
@ -500,8 +500,8 @@ bool DebuggerParser::validateArgs(int cmd)
|
||||||
case kARG_END_ARGS:
|
case kARG_END_ARGS:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
curCount++;
|
++curCount;
|
||||||
p++;
|
++p;
|
||||||
|
|
||||||
} while(*p != kARG_END_ARGS && curCount < argRequiredCount);
|
} while(*p != kARG_END_ARGS && curCount < argRequiredCount);
|
||||||
|
|
||||||
|
@ -571,7 +571,7 @@ void DebuggerParser::listTraps(bool listCond)
|
||||||
StringList names = debugger.m6502().getCondTrapNames();
|
StringList names = debugger.m6502().getCondTrapNames();
|
||||||
|
|
||||||
commandResult << (listCond ? "trapifs:" : "traps:") << endl;
|
commandResult << (listCond ? "trapifs:" : "traps:") << endl;
|
||||||
for(uInt32 i = 0; i < names.size(); i++)
|
for(uInt32 i = 0; i < names.size(); ++i)
|
||||||
{
|
{
|
||||||
bool hasCond = names[i] != "";
|
bool hasCond = names[i] != "";
|
||||||
if(hasCond == listCond)
|
if(hasCond == listCond)
|
||||||
|
@ -753,7 +753,7 @@ void DebuggerParser::executeBreakif()
|
||||||
if(res == 0)
|
if(res == 0)
|
||||||
{
|
{
|
||||||
string condition = argStrings[0];
|
string condition = argStrings[0];
|
||||||
for(uInt32 i = 0; i < debugger.m6502().getCondBreakNames().size(); i++)
|
for(uInt32 i = 0; i < debugger.m6502().getCondBreakNames().size(); ++i)
|
||||||
{
|
{
|
||||||
if(condition == debugger.m6502().getCondBreakNames()[i])
|
if(condition == debugger.m6502().getCondBreakNames()[i])
|
||||||
{
|
{
|
||||||
|
@ -1164,9 +1164,9 @@ void DebuggerParser::executeExec()
|
||||||
prefix << std::hex << std::setw(8) << std::setfill('0') << uInt32(debugger.myOSystem.getTicks()/1000);
|
prefix << std::hex << std::setw(8) << std::setfill('0') << uInt32(debugger.myOSystem.getTicks()/1000);
|
||||||
execPrefix = prefix.str();
|
execPrefix = prefix.str();
|
||||||
}
|
}
|
||||||
execDepth++;
|
++execDepth;
|
||||||
commandResult << exec(node);
|
commandResult << exec(node);
|
||||||
execDepth--;
|
--execDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -1419,7 +1419,7 @@ void DebuggerParser::executeListbreaks()
|
||||||
if(count)
|
if(count)
|
||||||
commandResult << endl;
|
commandResult << endl;
|
||||||
commandResult << "breakifs:" << endl;
|
commandResult << "breakifs:" << endl;
|
||||||
for(uInt32 i = 0; i < conds.size(); i++)
|
for(uInt32 i = 0; i < conds.size(); ++i)
|
||||||
{
|
{
|
||||||
commandResult << Base::toString(i) << ": " << conds[i];
|
commandResult << Base::toString(i) << ": " << conds[i];
|
||||||
if(i != (conds.size() - 1)) commandResult << endl;
|
if(i != (conds.size() - 1)) commandResult << endl;
|
||||||
|
@ -1465,7 +1465,7 @@ void DebuggerParser::executeListsavestateifs()
|
||||||
if(conds.size() > 0)
|
if(conds.size() > 0)
|
||||||
{
|
{
|
||||||
commandResult << "savestateif:" << endl;
|
commandResult << "savestateif:" << endl;
|
||||||
for(uInt32 i = 0; i < conds.size(); i++)
|
for(uInt32 i = 0; i < conds.size(); ++i)
|
||||||
{
|
{
|
||||||
commandResult << Base::toString(i) << ": " << conds[i];
|
commandResult << Base::toString(i) << ": " << conds[i];
|
||||||
if(i != (conds.size() - 1)) commandResult << endl;
|
if(i != (conds.size() - 1)) commandResult << endl;
|
||||||
|
@ -1492,7 +1492,7 @@ void DebuggerParser::executeListtraps()
|
||||||
if (names.size() > 0)
|
if (names.size() > 0)
|
||||||
{
|
{
|
||||||
bool trapFound = false, trapifFound = false;
|
bool trapFound = false, trapifFound = false;
|
||||||
for(uInt32 i = 0; i < names.size(); i++)
|
for(uInt32 i = 0; i < names.size(); ++i)
|
||||||
if(names[i] == "")
|
if(names[i] == "")
|
||||||
trapFound = true;
|
trapFound = true;
|
||||||
else
|
else
|
||||||
|
@ -1820,7 +1820,7 @@ void DebuggerParser::executeSavestateif()
|
||||||
if(res == 0)
|
if(res == 0)
|
||||||
{
|
{
|
||||||
string condition = argStrings[0];
|
string condition = argStrings[0];
|
||||||
for(uInt32 i = 0; i < debugger.m6502().getCondSaveStateNames().size(); i++)
|
for(uInt32 i = 0; i < debugger.m6502().getCondSaveStateNames().size(); ++i)
|
||||||
{
|
{
|
||||||
if(condition == debugger.m6502().getCondSaveStateNames()[i])
|
if(condition == debugger.m6502().getCondSaveStateNames()[i])
|
||||||
{
|
{
|
||||||
|
@ -1997,7 +1997,7 @@ void DebuggerParser::executeTraps(bool read, bool write, const string& command,
|
||||||
{
|
{
|
||||||
// duplicates will remove each other
|
// duplicates will remove each other
|
||||||
bool add = true;
|
bool add = true;
|
||||||
for(uInt32 i = 0; i < myTraps.size(); i++)
|
for(uInt32 i = 0; i < myTraps.size(); ++i)
|
||||||
{
|
{
|
||||||
if(myTraps[i]->begin == begin && myTraps[i]->end == end &&
|
if(myTraps[i]->begin == begin && myTraps[i]->end == end &&
|
||||||
myTraps[i]->read == read && myTraps[i]->write == write &&
|
myTraps[i]->read == read && myTraps[i]->write == write &&
|
||||||
|
|
|
@ -132,7 +132,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
mark(myPC + myOffset, CartDebug::VALID_ENTRY);
|
mark(myPC + myOffset, CartDebug::VALID_ENTRY);
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
outputGraphics();
|
outputGraphics();
|
||||||
myPC++;
|
++myPC;
|
||||||
} else if (checkBits(myPC, CartDebug::DATA,
|
} else if (checkBits(myPC, CartDebug::DATA,
|
||||||
CartDebug::CODE | CartDebug::GFX | CartDebug::PGFX)) {
|
CartDebug::CODE | CartDebug::GFX | CartDebug::PGFX)) {
|
||||||
if (pass == 2)
|
if (pass == 2)
|
||||||
|
@ -140,7 +140,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
outputBytes(CartDebug::DATA);
|
outputBytes(CartDebug::DATA);
|
||||||
else
|
else
|
||||||
myPC++;
|
++myPC;
|
||||||
} else if (checkBits(myPC, CartDebug::ROW,
|
} else if (checkBits(myPC, CartDebug::ROW,
|
||||||
CartDebug::CODE | CartDebug::DATA | CartDebug::GFX | CartDebug::PGFX)) {
|
CartDebug::CODE | CartDebug::DATA | CartDebug::GFX | CartDebug::PGFX)) {
|
||||||
FIX_LAST:
|
FIX_LAST:
|
||||||
|
@ -150,7 +150,7 @@ FIX_LAST:
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
outputBytes(CartDebug::ROW);
|
outputBytes(CartDebug::ROW);
|
||||||
else
|
else
|
||||||
myPC++;
|
++myPC;
|
||||||
} else {
|
} else {
|
||||||
// The following sections must be CODE
|
// The following sections must be CODE
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ FIX_LAST:
|
||||||
else
|
else
|
||||||
myDisasmBuf << Base::HEX4 << myPC + myOffset << "' '";
|
myDisasmBuf << Base::HEX4 << myPC + myOffset << "' '";
|
||||||
}
|
}
|
||||||
myPC++;
|
++myPC;
|
||||||
|
|
||||||
// detect labels inside instructions (e.g. BIT masks)
|
// detect labels inside instructions (e.g. BIT masks)
|
||||||
labelFound = false;
|
labelFound = false;
|
||||||
|
@ -252,7 +252,7 @@ FIX_LAST:
|
||||||
else
|
else
|
||||||
myDisasmBuf << Base::HEX4 << myPC + myOffset << "' '";
|
myDisasmBuf << Base::HEX4 << myPC + myOffset << "' '";
|
||||||
|
|
||||||
opcode = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
opcode = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
myDisasmBuf << ".byte $" << Base::HEX2 << int(opcode) << " $"
|
myDisasmBuf << ".byte $" << Base::HEX2 << int(opcode) << " $"
|
||||||
<< Base::HEX4 << myPC + myOffset << "'"
|
<< Base::HEX4 << myPC + myOffset << "'"
|
||||||
<< Base::HEX2 << int(opcode);
|
<< Base::HEX2 << int(opcode);
|
||||||
|
@ -277,7 +277,7 @@ FIX_LAST:
|
||||||
nextLine.str("");
|
nextLine.str("");
|
||||||
nextLineBytes.str("");
|
nextLineBytes.str("");
|
||||||
}
|
}
|
||||||
myPC++;
|
++myPC;
|
||||||
myPCEnd = myAppData.end + myOffset;
|
myPCEnd = myAppData.end + myOffset;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ FIX_LAST:
|
||||||
|
|
||||||
case ZERO_PAGE:
|
case ZERO_PAGE:
|
||||||
{
|
{
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
labelFound = mark(d1, CartDebug::REFERENCED);
|
labelFound = mark(d1, CartDebug::REFERENCED);
|
||||||
if (pass == 3) {
|
if (pass == 3) {
|
||||||
nextLine << " ";
|
nextLine << " ";
|
||||||
|
@ -342,7 +342,7 @@ FIX_LAST:
|
||||||
|
|
||||||
case IMMEDIATE:
|
case IMMEDIATE:
|
||||||
{
|
{
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
if (pass == 3) {
|
if (pass == 3) {
|
||||||
nextLine << " #$" << Base::HEX2 << int(d1) << " ";
|
nextLine << " #$" << Base::HEX2 << int(d1) << " ";
|
||||||
nextLineBytes << Base::HEX2 << int(d1);
|
nextLineBytes << Base::HEX2 << int(d1);
|
||||||
|
@ -430,7 +430,7 @@ FIX_LAST:
|
||||||
|
|
||||||
case INDIRECT_X:
|
case INDIRECT_X:
|
||||||
{
|
{
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
if (pass == 3) {
|
if (pass == 3) {
|
||||||
labelFound = mark(d1, 0); // dummy call to get address type
|
labelFound = mark(d1, 0); // dummy call to get address type
|
||||||
nextLine << " (";
|
nextLine << " (";
|
||||||
|
@ -443,7 +443,7 @@ FIX_LAST:
|
||||||
|
|
||||||
case INDIRECT_Y:
|
case INDIRECT_Y:
|
||||||
{
|
{
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
if (pass == 3) {
|
if (pass == 3) {
|
||||||
labelFound = mark(d1, 0); // dummy call to get address type
|
labelFound = mark(d1, 0); // dummy call to get address type
|
||||||
nextLine << " (";
|
nextLine << " (";
|
||||||
|
@ -456,7 +456,7 @@ FIX_LAST:
|
||||||
|
|
||||||
case ZERO_PAGE_X:
|
case ZERO_PAGE_X:
|
||||||
{
|
{
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
labelFound = mark(d1, CartDebug::REFERENCED);
|
labelFound = mark(d1, CartDebug::REFERENCED);
|
||||||
if (pass == 3) {
|
if (pass == 3) {
|
||||||
nextLine << " ";
|
nextLine << " ";
|
||||||
|
@ -469,7 +469,7 @@ FIX_LAST:
|
||||||
|
|
||||||
case ZERO_PAGE_Y:
|
case ZERO_PAGE_Y:
|
||||||
{
|
{
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
labelFound = mark(d1, CartDebug::REFERENCED);
|
labelFound = mark(d1, CartDebug::REFERENCED);
|
||||||
if (pass == 3) {
|
if (pass == 3) {
|
||||||
nextLine << " ";
|
nextLine << " ";
|
||||||
|
@ -485,7 +485,7 @@ FIX_LAST:
|
||||||
// SA - 04-06-2010: there seemed to be a bug in distella,
|
// SA - 04-06-2010: there seemed to be a bug in distella,
|
||||||
// where wraparound occurred on a 32-bit int, and subsequent
|
// where wraparound occurred on a 32-bit int, and subsequent
|
||||||
// indexing into the labels array caused a crash
|
// indexing into the labels array caused a crash
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
ad = ((myPC + Int8(d1)) & 0xfff) + myOffset;
|
ad = ((myPC + Int8(d1)) & 0xfff) + myOffset;
|
||||||
|
|
||||||
labelFound = mark(ad, CartDebug::REFERENCED);
|
labelFound = mark(ad, CartDebug::REFERENCED);
|
||||||
|
@ -607,7 +607,7 @@ void DiStella::disasmPass1(CartDebug::AddressList& debuggerAddresses)
|
||||||
// However, addresses *specifically* marked as DATA/GFX/PGFX
|
// However, addresses *specifically* marked as DATA/GFX/PGFX
|
||||||
// in the emulation core indicate that the CODE range has finished
|
// in the emulation core indicate that the CODE range has finished
|
||||||
// Therefore, we stop at the first such address encountered
|
// Therefore, we stop at the first such address encountered
|
||||||
for (uInt32 k = pcBeg; k <= myPCEnd; k++) {
|
for (uInt32 k = pcBeg; k <= myPCEnd; ++k) {
|
||||||
if (checkBits(k, CartDebug::CartDebug::DATA | CartDebug::GFX | CartDebug::PGFX,
|
if (checkBits(k, CartDebug::CartDebug::DATA | CartDebug::GFX | CartDebug::PGFX,
|
||||||
CartDebug::CODE)) {
|
CartDebug::CODE)) {
|
||||||
//if (Debugger::debugger().getAccessFlags(k) &
|
//if (Debugger::debugger().getAccessFlags(k) &
|
||||||
|
@ -694,7 +694,7 @@ void DiStella::disasmFromAddress(uInt32 distart)
|
||||||
|
|
||||||
// so this should be code now...
|
// so this should be code now...
|
||||||
// get opcode
|
// get opcode
|
||||||
opcode = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
opcode = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
// get address mode for opcode
|
// get address mode for opcode
|
||||||
addrMode = ourLookup[opcode].addr_mode;
|
addrMode = ourLookup[opcode].addr_mode;
|
||||||
|
|
||||||
|
@ -716,7 +716,7 @@ void DiStella::disasmFromAddress(uInt32 distart)
|
||||||
case ZERO_PAGE_Y:
|
case ZERO_PAGE_Y:
|
||||||
case RELATIVE:
|
case RELATIVE:
|
||||||
if (myPC > myAppData.end) {
|
if (myPC > myAppData.end) {
|
||||||
myPC++;
|
++myPC;
|
||||||
myPCEnd = myAppData.end + myOffset;
|
myPCEnd = myAppData.end + myOffset;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -745,7 +745,7 @@ void DiStella::disasmFromAddress(uInt32 distart)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ZERO_PAGE:
|
case ZERO_PAGE:
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
mark(d1, CartDebug::REFERENCED);
|
mark(d1, CartDebug::REFERENCED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -772,12 +772,12 @@ void DiStella::disasmFromAddress(uInt32 distart)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ZERO_PAGE_X:
|
case ZERO_PAGE_X:
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
mark(d1, CartDebug::REFERENCED);
|
mark(d1, CartDebug::REFERENCED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ZERO_PAGE_Y:
|
case ZERO_PAGE_Y:
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
mark(d1, CartDebug::REFERENCED);
|
mark(d1, CartDebug::REFERENCED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -785,7 +785,7 @@ void DiStella::disasmFromAddress(uInt32 distart)
|
||||||
// SA - 04-06-2010: there seemed to be a bug in distella,
|
// SA - 04-06-2010: there seemed to be a bug in distella,
|
||||||
// where wraparound occurred on a 32-bit int, and subsequent
|
// where wraparound occurred on a 32-bit int, and subsequent
|
||||||
// indexing into the labels array caused a crash
|
// indexing into the labels array caused a crash
|
||||||
d1 = Debugger::debugger().peek(myPC + myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC + myOffset); ++myPC;
|
||||||
ad = ((myPC + Int8(d1)) & 0xfff) + myOffset;
|
ad = ((myPC + Int8(d1)) & 0xfff) + myOffset;
|
||||||
mark(ad, CartDebug::REFERENCED);
|
mark(ad, CartDebug::REFERENCED);
|
||||||
// do NOT use flags set by debugger, else known CODE will not analyzed statically.
|
// do NOT use flags set by debugger, else known CODE will not analyzed statically.
|
||||||
|
@ -1079,14 +1079,14 @@ void DiStella::outputBytes(CartDebug::DisasmType type)
|
||||||
myDisasmBuf << Base::HEX4 << myPC + myOffset << "'L" << Base::HEX4
|
myDisasmBuf << Base::HEX4 << myPC + myOffset << "'L" << Base::HEX4
|
||||||
<< myPC + myOffset << "'.byte " << "$" << Base::HEX2
|
<< myPC + myOffset << "'.byte " << "$" << Base::HEX2
|
||||||
<< int(Debugger::debugger().peek(myPC + myOffset));
|
<< int(Debugger::debugger().peek(myPC + myOffset));
|
||||||
myPC++;
|
++myPC;
|
||||||
numBytes = 1;
|
numBytes = 1;
|
||||||
lineEmpty = false;
|
lineEmpty = false;
|
||||||
} else if (lineEmpty) {
|
} else if (lineEmpty) {
|
||||||
// start a new line without a label
|
// start a new line without a label
|
||||||
myDisasmBuf << Base::HEX4 << myPC + myOffset << "' '"
|
myDisasmBuf << Base::HEX4 << myPC + myOffset << "' '"
|
||||||
<< ".byte $" << Base::HEX2 << int(Debugger::debugger().peek(myPC + myOffset));
|
<< ".byte $" << Base::HEX2 << int(Debugger::debugger().peek(myPC + myOffset));
|
||||||
myPC++;
|
++myPC;
|
||||||
numBytes = 1;
|
numBytes = 1;
|
||||||
lineEmpty = false;
|
lineEmpty = false;
|
||||||
}
|
}
|
||||||
|
@ -1096,7 +1096,7 @@ void DiStella::outputBytes(CartDebug::DisasmType type)
|
||||||
lineEmpty = true;
|
lineEmpty = true;
|
||||||
} else {
|
} else {
|
||||||
myDisasmBuf << ",$" << Base::HEX2 << int(Debugger::debugger().peek(myPC + myOffset));
|
myDisasmBuf << ",$" << Base::HEX2 << int(Debugger::debugger().peek(myPC + myOffset));
|
||||||
myPC++;
|
++myPC;
|
||||||
}
|
}
|
||||||
isType = checkBits(myPC, type,
|
isType = checkBits(myPC, type,
|
||||||
CartDebug::CODE | (type != CartDebug::DATA ? CartDebug::DATA : 0) | CartDebug::GFX | CartDebug::PGFX);
|
CartDebug::CODE | (type != CartDebug::DATA ? CartDebug::DATA : 0) | CartDebug::GFX | CartDebug::PGFX);
|
||||||
|
|
|
@ -1061,7 +1061,7 @@ string TIADebug::toString()
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
|
|
||||||
buf << "00: ";
|
buf << "00: ";
|
||||||
for (uInt8 j = 0; j < 0x010; j++)
|
for (uInt8 j = 0; j < 0x010; ++j)
|
||||||
{
|
{
|
||||||
buf << Common::Base::HEX2 << int(mySystem.peek(j)) << " ";
|
buf << Common::Base::HEX2 << int(mySystem.peek(j)) << " ";
|
||||||
if(j == 0x07) buf << "- ";
|
if(j == 0x07) buf << "- ";
|
||||||
|
|
|
@ -98,7 +98,7 @@ void AudioWidget::loadConfig()
|
||||||
|
|
||||||
// AUDF0/1
|
// AUDF0/1
|
||||||
alist.clear(); vlist.clear(); changed.clear();
|
alist.clear(); vlist.clear(); changed.clear();
|
||||||
for(uInt32 i = 0; i < 2; i++)
|
for(uInt32 i = 0; i < 2; ++i)
|
||||||
{
|
{
|
||||||
alist.push_back(i);
|
alist.push_back(i);
|
||||||
vlist.push_back(state.aud[i]);
|
vlist.push_back(state.aud[i]);
|
||||||
|
@ -108,7 +108,7 @@ void AudioWidget::loadConfig()
|
||||||
|
|
||||||
// AUDC0/1
|
// AUDC0/1
|
||||||
alist.clear(); vlist.clear(); changed.clear();
|
alist.clear(); vlist.clear(); changed.clear();
|
||||||
for(uInt32 i = 2; i < 4; i++)
|
for(uInt32 i = 2; i < 4; ++i)
|
||||||
{
|
{
|
||||||
alist.push_back(i-2);
|
alist.push_back(i-2);
|
||||||
vlist.push_back(state.aud[i]);
|
vlist.push_back(state.aud[i]);
|
||||||
|
@ -118,7 +118,7 @@ void AudioWidget::loadConfig()
|
||||||
|
|
||||||
// AUDV0/1
|
// AUDV0/1
|
||||||
alist.clear(); vlist.clear(); changed.clear();
|
alist.clear(); vlist.clear(); changed.clear();
|
||||||
for(uInt32 i = 4; i < 6; i++)
|
for(uInt32 i = 4; i < 6; ++i)
|
||||||
{
|
{
|
||||||
alist.push_back(i-4);
|
alist.push_back(i-4);
|
||||||
vlist.push_back(state.aud[i]);
|
vlist.push_back(state.aud[i]);
|
||||||
|
|
|
@ -122,7 +122,7 @@ void Cartridge3EPlusWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,10 +90,8 @@ void Cartridge3EWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
|
|
||||||
myOldState.bank = myCart.myCurrentBank;
|
myOldState.bank = myCart.myCurrentBank;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,10 +46,8 @@ void Cartridge4KSCWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -127,10 +127,9 @@ void CartridgeBFSCWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,7 @@ void CartridgeBUSWidget::saveOldState()
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
myOldState.samplepointer.clear();
|
myOldState.samplepointer.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < 18; i++)
|
for(uInt32 i = 0; i < 18; ++i)
|
||||||
{
|
{
|
||||||
// Pointers are stored as:
|
// Pointers are stored as:
|
||||||
// PPPFF---
|
// PPPFF---
|
||||||
|
@ -221,20 +221,14 @@ void CartridgeBUSWidget::saveOldState()
|
||||||
myOldState.datastreamincrements.push_back(0x100);
|
myOldState.datastreamincrements.push_back(0x100);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(uInt32 i = 0; i < 37; i++) // only 37 map values
|
for(uInt32 i = 0; i < 37; ++i) // only 37 map values
|
||||||
{
|
|
||||||
myOldState.addressmaps.push_back(myCart.getAddressMap(i));
|
myOldState.addressmaps.push_back(myCart.getAddressMap(i));
|
||||||
}
|
|
||||||
|
|
||||||
for(uInt32 i = 37; i < 40; i++) // but need 40 for the grid
|
for(uInt32 i = 37; i < 40; ++i) // but need 40 for the grid
|
||||||
{
|
|
||||||
myOldState.addressmaps.push_back(0);
|
myOldState.addressmaps.push_back(0);
|
||||||
}
|
|
||||||
|
|
||||||
for(uInt32 i = 0; i < 3; ++i)
|
for(uInt32 i = 0; i < 3; ++i)
|
||||||
{
|
|
||||||
myOldState.mcounters.push_back(myCart.myMusicCounters[i]);
|
myOldState.mcounters.push_back(myCart.myMusicCounters[i]);
|
||||||
}
|
|
||||||
|
|
||||||
for(uInt32 i = 0; i < 3; ++i)
|
for(uInt32 i = 0; i < 3; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -193,7 +193,7 @@ void CartridgeCDFWidget::saveOldState()
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
myOldState.samplepointer.clear();
|
myOldState.samplepointer.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < 34; i++)
|
for(uInt32 i = 0; i < 34; ++i)
|
||||||
{
|
{
|
||||||
// Pointers are stored as:
|
// Pointers are stored as:
|
||||||
// PPPFF---
|
// PPPFF---
|
||||||
|
@ -210,9 +210,7 @@ void CartridgeCDFWidget::saveOldState()
|
||||||
}
|
}
|
||||||
|
|
||||||
for(uInt32 i = 0; i < 3; ++i)
|
for(uInt32 i = 0; i < 3; ++i)
|
||||||
{
|
|
||||||
myOldState.mcounters.push_back(myCart.myMusicCounters[i]);
|
myOldState.mcounters.push_back(myCart.myMusicCounters[i]);
|
||||||
}
|
|
||||||
|
|
||||||
for(uInt32 i = 0; i < 3; ++i)
|
for(uInt32 i = 0; i < 3; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -153,7 +153,7 @@ void CartridgeCMWidget::saveOldState()
|
||||||
myOldState.column = myCart.column();
|
myOldState.column = myCart.column();
|
||||||
|
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
|
|
|
@ -60,10 +60,9 @@ void CartridgeCTYWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,8 @@ string CartridgeCVPlusWidget::bankState()
|
||||||
void CartridgeCVPlusWidget::saveOldState()
|
void CartridgeCVPlusWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
|
||||||
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
|
|
|
@ -46,7 +46,8 @@ CartridgeCVWidget::CartridgeCVWidget(
|
||||||
void CartridgeCVWidget::saveOldState()
|
void CartridgeCVWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
|
||||||
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ void CartridgeDASHWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,10 +95,8 @@ void CartridgeDFSCWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,8 @@ class CartridgeE78KWidget : public CartridgeMNetworkWidget
|
||||||
virtual ~CartridgeE78KWidget() = default;
|
virtual ~CartridgeE78KWidget() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const char* getSpotLower(int idx);
|
const char* getSpotLower(int idx) override;
|
||||||
const char* getSpotUpper(int idx);
|
const char* getSpotUpper(int idx) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Following constructors and assignment operators not supported
|
// Following constructors and assignment operators not supported
|
||||||
|
|
|
@ -30,8 +30,8 @@ class CartridgeE7Widget : public CartridgeMNetworkWidget
|
||||||
virtual ~CartridgeE7Widget() = default;
|
virtual ~CartridgeE7Widget() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const char* getSpotLower(int idx);
|
const char* getSpotLower(int idx) override;
|
||||||
const char* getSpotUpper(int idx);
|
const char* getSpotUpper(int idx) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Following constructors and assignment operators not supported
|
// Following constructors and assignment operators not supported
|
||||||
|
|
|
@ -79,10 +79,8 @@ void CartridgeEFSCWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,10 +70,9 @@ void CartridgeF4SCWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,8 @@ void CartridgeF6SCWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,10 +64,8 @@ void CartridgeF8SCWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,10 +102,8 @@ void CartridgeFA2Widget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,10 +65,8 @@ void CartridgeFAWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
|
|
||||||
myOldState.bank = myCart.getBank();
|
myOldState.bank = myCart.getBank();
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,10 +68,8 @@ void CartridgeMNetworkWidget::saveOldState()
|
||||||
{
|
{
|
||||||
myOldState.internalram.clear();
|
myOldState.internalram.clear();
|
||||||
|
|
||||||
for(uInt32 i = 0; i < this->internalRamSize(); i++)
|
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||||
{
|
|
||||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||||
}
|
|
||||||
|
|
||||||
myOldState.lowerBank = myCart.myCurrentSlice[0];
|
myOldState.lowerBank = myCart.myCurrentSlice[0];
|
||||||
myOldState.upperBank = myCart.myCurrentRAM;
|
myOldState.upperBank = myCart.myCurrentRAM;
|
||||||
|
|
|
@ -148,7 +148,7 @@ void CartRamWidget::InternalRamWidget::fillList(uInt32 start, uInt32 size,
|
||||||
const ByteArray& oldRam = myCart.internalRamOld(start, size);
|
const ByteArray& oldRam = myCart.internalRamOld(start, size);
|
||||||
const ByteArray& currRam = myCart.internalRamCurrent(start, size);
|
const ByteArray& currRam = myCart.internalRamCurrent(start, size);
|
||||||
|
|
||||||
for(uInt32 i = 0; i < size; i++)
|
for(uInt32 i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
alist.push_back(i+start);
|
alist.push_back(i+start);
|
||||||
vlist.push_back(currRam[i]);
|
vlist.push_back(currRam[i]);
|
||||||
|
|
|
@ -69,14 +69,14 @@ class CartRamWidget : public Widget, public CommandSender
|
||||||
virtual ~InternalRamWidget();
|
virtual ~InternalRamWidget();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uInt8 getValue(int addr) const;
|
uInt8 getValue(int addr) const override;
|
||||||
void setValue(int addr, uInt8 value);
|
void setValue(int addr, uInt8 value) override;
|
||||||
string getLabel(int addr) const;
|
string getLabel(int addr) const override;
|
||||||
|
|
||||||
void fillList(uInt32 start, uInt32 size, IntArray& alist,
|
void fillList(uInt32 start, uInt32 size, IntArray& alist,
|
||||||
IntArray& vlist, BoolArray& changed) const;
|
IntArray& vlist, BoolArray& changed) const override;
|
||||||
uInt32 readPort(uInt32 start) const;
|
uInt32 readPort(uInt32 start) const override;
|
||||||
const ByteArray& currentRam(uInt32 start) const;
|
const ByteArray& currentRam(uInt32 start) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CartDebugWidget& myCart;
|
CartDebugWidget& myCart;
|
||||||
|
|
|
@ -88,22 +88,22 @@ void PointingDeviceWidget::handleCommand(CommandSender* sender, int cmd, int dat
|
||||||
switch(cmd)
|
switch(cmd)
|
||||||
{
|
{
|
||||||
case kTBLeft:
|
case kTBLeft:
|
||||||
pDev.myCountH++;
|
++pDev.myCountH;
|
||||||
pDev.myTrackBallLeft = false;
|
pDev.myTrackBallLeft = false;
|
||||||
setGrayCodeH();
|
setGrayCodeH();
|
||||||
break;
|
break;
|
||||||
case kTBRight:
|
case kTBRight:
|
||||||
pDev.myCountH--;
|
--pDev.myCountH;
|
||||||
pDev.myTrackBallLeft = true;
|
pDev.myTrackBallLeft = true;
|
||||||
setGrayCodeH();
|
setGrayCodeH();
|
||||||
break;
|
break;
|
||||||
case kTBUp:
|
case kTBUp:
|
||||||
pDev.myCountV++;
|
++pDev.myCountV;
|
||||||
pDev.myTrackBallDown = true;
|
pDev.myTrackBallDown = true;
|
||||||
setGrayCodeV();
|
setGrayCodeV();
|
||||||
break;
|
break;
|
||||||
case kTBDown:
|
case kTBDown:
|
||||||
pDev.myCountV--;
|
--pDev.myCountV;
|
||||||
pDev.myTrackBallDown = false;
|
pDev.myTrackBallDown = false;
|
||||||
setGrayCodeV();
|
setGrayCodeV();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -523,7 +523,7 @@ void PromptWidget::loadConfig()
|
||||||
// fill the history from the saved breaks, traps and watches commands
|
// fill the history from the saved breaks, traps and watches commands
|
||||||
StringList history;
|
StringList history;
|
||||||
print(instance().debugger().autoExec(&history));
|
print(instance().debugger().autoExec(&history));
|
||||||
for(uInt32 i = 0; i < history.size(); i++)
|
for(uInt32 i = 0; i < history.size(); ++i)
|
||||||
{
|
{
|
||||||
addToHistory(history[i].c_str());
|
addToHistory(history[i].c_str());
|
||||||
}
|
}
|
||||||
|
@ -931,9 +931,9 @@ bool PromptWidget::saveBuffer(const FilesystemNode& file)
|
||||||
string PromptWidget::getCompletionPrefix(const StringList& completions)
|
string PromptWidget::getCompletionPrefix(const StringList& completions)
|
||||||
{
|
{
|
||||||
// Find the number of characters matching for each of the completions provided
|
// Find the number of characters matching for each of the completions provided
|
||||||
for(uInt32 len = 1;; len++)
|
for(uInt32 len = 1;; ++len)
|
||||||
{
|
{
|
||||||
for(uInt32 i = 0; i < completions.size(); i++)
|
for(uInt32 i = 0; i < completions.size(); ++i)
|
||||||
{
|
{
|
||||||
string s1 = completions[i];
|
string s1 = completions[i];
|
||||||
if(s1.length() < len)
|
if(s1.length() < len)
|
||||||
|
@ -942,7 +942,7 @@ string PromptWidget::getCompletionPrefix(const StringList& completions)
|
||||||
}
|
}
|
||||||
string find = s1.substr(0, len);
|
string find = s1.substr(0, len);
|
||||||
|
|
||||||
for(uInt32 j = i + 1; j < completions.size(); j++)
|
for(uInt32 j = i + 1; j < completions.size(); ++j)
|
||||||
{
|
{
|
||||||
if(!BSPF::startsWithIgnoreCase(completions[j], find))
|
if(!BSPF::startsWithIgnoreCase(completions[j], find))
|
||||||
return s1.substr(0, len - 1);
|
return s1.substr(0, len - 1);
|
||||||
|
|
|
@ -56,7 +56,7 @@ void RiotRamWidget::fillList(uInt32 start, uInt32 size, IntArray& alist,
|
||||||
const CartState& state = static_cast<const CartState&>(myDbg.getState());
|
const CartState& state = static_cast<const CartState&>(myDbg.getState());
|
||||||
const CartState& oldstate = static_cast<const CartState&>(myDbg.getOldState());
|
const CartState& oldstate = static_cast<const CartState&>(myDbg.getOldState());
|
||||||
|
|
||||||
for(uInt32 i = 0; i < size; i++)
|
for(uInt32 i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
alist.push_back(i+start);
|
alist.push_back(i+start);
|
||||||
vlist.push_back(state.ram[i]);
|
vlist.push_back(state.ram[i]);
|
||||||
|
|
|
@ -37,14 +37,14 @@ class RiotRamWidget : public RamWidget
|
||||||
virtual ~RiotRamWidget() = default;
|
virtual ~RiotRamWidget() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uInt8 getValue(int addr) const;
|
uInt8 getValue(int addr) const override;
|
||||||
void setValue(int addr, uInt8 value);
|
void setValue(int addr, uInt8 value) override;
|
||||||
string getLabel(int addr) const;
|
string getLabel(int addr) const override;
|
||||||
|
|
||||||
void fillList(uInt32 start, uInt32 size, IntArray& alist,
|
void fillList(uInt32 start, uInt32 size, IntArray& alist,
|
||||||
IntArray& vlist, BoolArray& changed) const;
|
IntArray& vlist, BoolArray& changed) const override;
|
||||||
uInt32 readPort(uInt32 start) const;
|
uInt32 readPort(uInt32 start) const override;
|
||||||
const ByteArray& currentRam(uInt32 start) const;
|
const ByteArray& currentRam(uInt32 start) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CartDebug& myDbg;
|
CartDebug& myDbg;
|
||||||
|
|
|
@ -941,7 +941,7 @@ void TiaWidget::loadConfig()
|
||||||
|
|
||||||
// Color registers
|
// Color registers
|
||||||
alist.clear(); vlist.clear(); changed.clear();
|
alist.clear(); vlist.clear(); changed.clear();
|
||||||
for(uInt32 i = 0; i < 4; i++)
|
for(uInt32 i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
alist.push_back(i);
|
alist.push_back(i);
|
||||||
vlist.push_back(state.coluRegs[i]);
|
vlist.push_back(state.coluRegs[i]);
|
||||||
|
|
|
@ -235,7 +235,7 @@ void Cartridge3EPlus::bankROMSlot(uInt16 bank)
|
||||||
void Cartridge3EPlus::initializeBankState()
|
void Cartridge3EPlus::initializeBankState()
|
||||||
{
|
{
|
||||||
// Switch in each 512b slot
|
// Switch in each 512b slot
|
||||||
for(uInt32 b = 0; b < 8; b++)
|
for(uInt32 b = 0; b < 8; ++b)
|
||||||
{
|
{
|
||||||
if(bankInUse[b] == BANK_UNDEFINED)
|
if(bankInUse[b] == BANK_UNDEFINED)
|
||||||
{
|
{
|
||||||
|
|
|
@ -212,8 +212,8 @@ uInt8 CartridgeBUS::peek(uInt16 address)
|
||||||
uInt32 pointer;
|
uInt32 pointer;
|
||||||
uInt8 value;
|
uInt8 value;
|
||||||
|
|
||||||
myFastJumpActive--;
|
--myFastJumpActive;
|
||||||
myJMPoperandAddress++;
|
++myJMPoperandAddress;
|
||||||
|
|
||||||
pointer = getDatastreamPointer(JUMPSTREAM);
|
pointer = getDatastreamPointer(JUMPSTREAM);
|
||||||
value = myDisplayImage[ pointer >> 20 ];
|
value = myDisplayImage[ pointer >> 20 ];
|
||||||
|
|
|
@ -196,8 +196,8 @@ uInt8 CartridgeCDF::peek(uInt16 address)
|
||||||
uInt32 pointer;
|
uInt32 pointer;
|
||||||
uInt8 value;
|
uInt8 value;
|
||||||
|
|
||||||
myFastJumpActive--;
|
--myFastJumpActive;
|
||||||
myJMPoperandAddress++;
|
++myJMPoperandAddress;
|
||||||
|
|
||||||
pointer = getDatastreamPointer(JUMPSTREAM);
|
pointer = getDatastreamPointer(JUMPSTREAM);
|
||||||
value = myDisplayImage[ pointer >> 20 ];
|
value = myDisplayImage[ pointer >> 20 ];
|
||||||
|
|
|
@ -44,7 +44,7 @@ void CartridgeDASH::reset()
|
||||||
|
|
||||||
// Initialise bank values for all ROM/RAM access
|
// Initialise bank values for all ROM/RAM access
|
||||||
// This is used to reverse-lookup from address to bank location
|
// This is used to reverse-lookup from address to bank location
|
||||||
for(uInt32 b = 0; b < 8; b++)
|
for(uInt32 b = 0; b < 8; ++b)
|
||||||
{
|
{
|
||||||
bankInUse[b] = BANK_UNDEFINED; // bank is undefined and inaccessible!
|
bankInUse[b] = BANK_UNDEFINED; // bank is undefined and inaccessible!
|
||||||
segmentInUse[b/2] = BANK_UNDEFINED;
|
segmentInUse[b/2] = BANK_UNDEFINED;
|
||||||
|
@ -69,7 +69,7 @@ void CartridgeDASH::install(System& system)
|
||||||
|
|
||||||
// Initialise bank values for all ROM/RAM access
|
// Initialise bank values for all ROM/RAM access
|
||||||
// This is used to reverse-lookup from address to bank location
|
// This is used to reverse-lookup from address to bank location
|
||||||
for (uInt32 b = 0; b < 8; b++)
|
for (uInt32 b = 0; b < 8; ++b)
|
||||||
{
|
{
|
||||||
bankInUse[b] = BANK_UNDEFINED; // bank is undefined and inaccessible!
|
bankInUse[b] = BANK_UNDEFINED; // bank is undefined and inaccessible!
|
||||||
segmentInUse[b/2] = BANK_UNDEFINED;
|
segmentInUse[b/2] = BANK_UNDEFINED;
|
||||||
|
@ -240,7 +240,7 @@ void CartridgeDASH::bankROMSlot(uInt16 bank)
|
||||||
void CartridgeDASH::initializeBankState()
|
void CartridgeDASH::initializeBankState()
|
||||||
{
|
{
|
||||||
// Switch in each 512b slot
|
// Switch in each 512b slot
|
||||||
for(uInt32 b = 0; b < 8; b++)
|
for(uInt32 b = 0; b < 8; ++b)
|
||||||
{
|
{
|
||||||
if(bankInUse[b] == BANK_UNDEFINED)
|
if(bankInUse[b] == BANK_UNDEFINED)
|
||||||
{
|
{
|
||||||
|
|
|
@ -639,7 +639,7 @@ void Console::changeYStart(int direction)
|
||||||
myOSystem.frameBuffer().showMessage("YStart at maximum");
|
myOSystem.frameBuffer().showMessage("YStart at maximum");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ystart++;
|
++ystart;
|
||||||
}
|
}
|
||||||
else if(direction == -1) // decrease YStart
|
else if(direction == -1) // decrease YStart
|
||||||
{
|
{
|
||||||
|
@ -654,7 +654,7 @@ void Console::changeYStart(int direction)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ystart--;
|
--ystart;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
@ -689,7 +689,7 @@ void Console::changeHeight(int direction)
|
||||||
|
|
||||||
if(direction == +1) // increase Height
|
if(direction == +1) // increase Height
|
||||||
{
|
{
|
||||||
height++;
|
++height;
|
||||||
if(height > TIAConstants::maxViewableHeight || height > dheight)
|
if(height > TIAConstants::maxViewableHeight || height > dheight)
|
||||||
{
|
{
|
||||||
myOSystem.frameBuffer().showMessage("Height at maximum");
|
myOSystem.frameBuffer().showMessage("Height at maximum");
|
||||||
|
@ -698,7 +698,7 @@ void Console::changeHeight(int direction)
|
||||||
}
|
}
|
||||||
else if(direction == -1) // decrease Height
|
else if(direction == -1) // decrease Height
|
||||||
{
|
{
|
||||||
height--;
|
--height;
|
||||||
if(height < TIAConstants::minViewableHeight) height = 0;
|
if(height < TIAConstants::minViewableHeight) height = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -62,7 +62,7 @@ class System;
|
||||||
class Controller : public Serializable
|
class Controller : public Serializable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
Riot debug class needs special access to the underlying controller state
|
Various classes that need special access to the underlying controller state
|
||||||
*/
|
*/
|
||||||
friend class M6532;
|
friend class M6532;
|
||||||
friend class RiotDebug;
|
friend class RiotDebug;
|
||||||
|
|
|
@ -61,15 +61,15 @@ void Driving::update()
|
||||||
// Digital events (from keyboard or joystick hats & buttons)
|
// Digital events (from keyboard or joystick hats & buttons)
|
||||||
myDigitalPinState[Six] = (myEvent.get(myFireEvent) == 0);
|
myDigitalPinState[Six] = (myEvent.get(myFireEvent) == 0);
|
||||||
int d_axis = myEvent.get(myXAxisValue);
|
int d_axis = myEvent.get(myXAxisValue);
|
||||||
if(myEvent.get(myCCWEvent) != 0 || d_axis < -16384) myCounter--;
|
if(myEvent.get(myCCWEvent) != 0 || d_axis < -16384) --myCounter;
|
||||||
else if(myEvent.get(myCWEvent) != 0 || d_axis > 16384) myCounter++;
|
else if(myEvent.get(myCWEvent) != 0 || d_axis > 16384) ++myCounter;
|
||||||
|
|
||||||
// Mouse motion and button events
|
// Mouse motion and button events
|
||||||
if(myControlID > -1)
|
if(myControlID > -1)
|
||||||
{
|
{
|
||||||
int m_axis = myEvent.get(Event::MouseAxisXValue);
|
int m_axis = myEvent.get(Event::MouseAxisXValue);
|
||||||
if(m_axis < -2) myCounter--;
|
if(m_axis < -2) --myCounter;
|
||||||
else if(m_axis > 2) myCounter++;
|
else if(m_axis > 2) ++myCounter;
|
||||||
if(myEvent.get(Event::MouseButtonLeftValue) ||
|
if(myEvent.get(Event::MouseButtonLeftValue) ||
|
||||||
myEvent.get(Event::MouseButtonRightValue))
|
myEvent.get(Event::MouseButtonRightValue))
|
||||||
myDigitalPinState[Six] = false;
|
myDigitalPinState[Six] = false;
|
||||||
|
@ -81,8 +81,8 @@ void Driving::update()
|
||||||
if(myControlIDX > -1)
|
if(myControlIDX > -1)
|
||||||
{
|
{
|
||||||
int m_axis = myEvent.get(Event::MouseAxisXValue);
|
int m_axis = myEvent.get(Event::MouseAxisXValue);
|
||||||
if(m_axis < -2) myCounter--;
|
if(m_axis < -2) --myCounter;
|
||||||
else if(m_axis > 2) myCounter++;
|
else if(m_axis > 2) ++myCounter;
|
||||||
if(myEvent.get(Event::MouseButtonLeftValue))
|
if(myEvent.get(Event::MouseButtonLeftValue))
|
||||||
myDigitalPinState[Six] = false;
|
myDigitalPinState[Six] = false;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ void Driving::update()
|
||||||
myGrayIndex = 1; // down
|
myGrayIndex = 1; // down
|
||||||
else if(yaxis >= 16384-4096)
|
else if(yaxis >= 16384-4096)
|
||||||
myGrayIndex = 2; // up + down
|
myGrayIndex = 2; // up + down
|
||||||
else if(yaxis < 16384-4096)
|
else /* if(yaxis < 16384-4096) */
|
||||||
myGrayIndex = 0; // no movement
|
myGrayIndex = 0; // no movement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Font::Font(FontDesc desc)
|
Font::Font(const FontDesc& desc)
|
||||||
: myFontDesc(desc)
|
: myFontDesc(desc)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace GUI {
|
||||||
class Font
|
class Font
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Font(FontDesc desc);
|
Font(const FontDesc& desc);
|
||||||
|
|
||||||
const FontDesc& desc() const { return myFontDesc; }
|
const FontDesc& desc() const { return myFontDesc; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue