Remove dump logging, it was never overly useful anyway.

Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian.Conlon 2017-09-22 19:17:34 +01:00
parent 1a1d5ea807
commit 78b6e7b339
3 changed files with 0 additions and 109 deletions

View File

@ -29,8 +29,6 @@ namespace EightBit {
int stepLength() const; int stepLength() const;
void setStepLength(int value); void setStepLength(int value);
void dump() const;
private: private:
int m_defaultValue; int m_defaultValue;
int m_direction; int m_direction;
@ -56,8 +54,6 @@ namespace EightBit {
int shift() const; int shift() const;
void setShift(int value); void setShift(int value);
void dump() const;
private: private:
int m_time; int m_time;
int m_direction; int m_direction;
@ -80,8 +76,6 @@ namespace EightBit {
bool initialise() const; bool initialise() const;
void setInitialise(bool value); void setInitialise(bool value);
virtual void dump() const;
private: private:
int m_counterContinuous; int m_counterContinuous;
int m_initialise; int m_initialise;
@ -104,8 +98,6 @@ namespace EightBit {
int hertz() const; int hertz() const;
virtual void dump() const override;
private: private:
const int m_cyclesPerSecond; const int m_cyclesPerSecond;
int m_frequencyLowOrder; // 8 bits int m_frequencyLowOrder; // 8 bits
@ -125,8 +117,6 @@ namespace EightBit {
int length() const; int length() const;
void setLength(int value); void setLength(int value);
virtual void dump() const override;
private: private:
int m_waveFormDutyCycle; int m_waveFormDutyCycle;
int m_soundLength; int m_soundLength;
@ -142,8 +132,6 @@ namespace EightBit {
Envelope& envelope(); Envelope& envelope();
virtual void dump() const override;
private: private:
Envelope m_envelope; Envelope m_envelope;
}; };
@ -158,8 +146,6 @@ namespace EightBit {
Sweep& sweep(); Sweep& sweep();
virtual void dump() const override;
private: private:
Sweep m_sweep; Sweep m_sweep;
}; };
@ -241,8 +227,6 @@ namespace EightBit {
bool& outputVoice3(); bool& outputVoice3();
bool& outputVoice4(); bool& outputVoice4();
void dump() const;
private: private:
bool m_vin; bool m_vin;
int m_outputLevel; int m_outputLevel;
@ -269,12 +253,6 @@ namespace EightBit {
void reset(); void reset();
bool zeroed() const; bool zeroed() const;
void dumpVoice(int i) const;
void dumpVoices() const;
void dumpChannel(int i) const;
void dumpChannels() const;
void dump() const;
// //
bool voice1On() const; bool voice1On() const;

View File

@ -41,10 +41,6 @@ void EightBit::GameBoy::Envelope::setStepLength(int value) {
m_stepLength = value; m_stepLength = value;
} }
void EightBit::GameBoy::Envelope::dump() const {
std::cout << "Envelope: default=" << default() << ",direction=" << direction() << ",step length=" << stepLength() << std::endl;
}
// //
EightBit::GameBoy::Sweep::Sweep() {} EightBit::GameBoy::Sweep::Sweep() {}
@ -85,10 +81,6 @@ void EightBit::GameBoy::Sweep::setShift(int value) {
m_shift = value; m_shift = value;
} }
void EightBit::GameBoy::Sweep::dump() const {
std::cout << "Sweep: time=" << time() << ",direction=" << direction() << ",shift=" << shift() << std::endl;
}
// //
EightBit::GameBoy::AudioVoice::AudioVoice() {} EightBit::GameBoy::AudioVoice::AudioVoice() {}
@ -118,10 +110,6 @@ void EightBit::GameBoy::AudioVoice::setInitialise(bool value) {
m_initialise = value; m_initialise = value;
} }
void EightBit::GameBoy::AudioVoice::dump() const {
std::cout << "Audio Voice: type=" << type() << ",initialise=" << initialise() << std::endl;
}
// //
EightBit::GameBoy::WaveVoice::WaveVoice(int cyclesPerSecond) EightBit::GameBoy::WaveVoice::WaveVoice(int cyclesPerSecond)
@ -170,11 +158,6 @@ void EightBit::GameBoy::WaveVoice::setFrequency(int value) {
m_frequencyLowOrder = value & Processor::Mask8; m_frequencyLowOrder = value & Processor::Mask8;
} }
void EightBit::GameBoy::WaveVoice::dump() const {
AudioVoice::dump();
std::cout << "Wave Voice: frequency=" << frequency() << " (" << hertz() << ")" << std::endl;
}
// //
EightBit::GameBoy::RectangularVoice::RectangularVoice(int cyclesPerSecond) EightBit::GameBoy::RectangularVoice::RectangularVoice(int cyclesPerSecond)
@ -205,11 +188,6 @@ void EightBit::GameBoy::RectangularVoice::setLength(int value) {
m_soundLength = value; m_soundLength = value;
} }
void EightBit::GameBoy::RectangularVoice::dump() const {
WaveVoice::dump();
std::cout << "Rectangular Voice: wave form duty=" << waveFormDutyCycle() << ",length=" << length() << std::endl;
}
// //
EightBit::GameBoy::EnvelopedRectangularVoice::EnvelopedRectangularVoice(int cyclesPerSecond) EightBit::GameBoy::EnvelopedRectangularVoice::EnvelopedRectangularVoice(int cyclesPerSecond)
@ -228,11 +206,6 @@ EightBit::GameBoy::Envelope& EightBit::GameBoy::EnvelopedRectangularVoice::envel
return m_envelope; return m_envelope;
} }
void EightBit::GameBoy::EnvelopedRectangularVoice::dump() const {
RectangularVoice::dump();
m_envelope.dump();
}
// //
EightBit::GameBoy::SweptEnvelopedRectangularVoice::SweptEnvelopedRectangularVoice(int cyclesPerSecond) EightBit::GameBoy::SweptEnvelopedRectangularVoice::SweptEnvelopedRectangularVoice(int cyclesPerSecond)
@ -251,11 +224,6 @@ EightBit::GameBoy::Sweep& EightBit::GameBoy::SweptEnvelopedRectangularVoice::swe
return m_sweep; return m_sweep;
} }
void EightBit::GameBoy::SweptEnvelopedRectangularVoice::dump() const {
EnvelopedRectangularVoice::dump();
m_sweep.dump();
}
// //
EightBit::GameBoy::UserDefinedWaveVoice::UserDefinedWaveVoice(int cyclesPerSecond) EightBit::GameBoy::UserDefinedWaveVoice::UserDefinedWaveVoice(int cyclesPerSecond)
@ -423,16 +391,6 @@ bool& EightBit::GameBoy::OutputChannel::outputVoice4() {
return m_outputVoices[3]; return m_outputVoices[3];
} }
void EightBit::GameBoy::OutputChannel::dump() const {
std::cout
<< "Output channel: "
<< "Vin:" << vin()
<< ",Output level=" << outputLevel()
<< ",Voices:" << (int)m_outputVoices[0] << (int)m_outputVoices[1] << (int)m_outputVoices[2] << (int)m_outputVoices[3]
<< std::endl;
}
EightBit::GameBoy::Audio::Audio(int cyclesPerSecond) EightBit::GameBoy::Audio::Audio(int cyclesPerSecond)
: m_frameSequencer(cyclesPerSecond), : m_frameSequencer(cyclesPerSecond),
m_enabled(false) { m_enabled(false) {
@ -506,31 +464,6 @@ bool EightBit::GameBoy::Audio::zeroed() const {
return !enabled() && channelsZeroed && voicesZeroed; return !enabled() && channelsZeroed && voicesZeroed;
} }
void EightBit::GameBoy::Audio::dumpVoice(int i) const {
std::cout << "** Voice " << i + 1 << std::endl;
m_voices[i]->dump();
}
void EightBit::GameBoy::Audio::dumpVoices() const {
for (int i = 0; i < 4; ++i)
dumpVoice(i);
}
void EightBit::GameBoy::Audio::dumpChannel(int i) const {
std::cout << "** Channel " << i + 1 << std::endl;
m_channels[i].dump();
}
void EightBit::GameBoy::Audio::dumpChannels() const {
for (int i = 0; i < 2; ++i)
dumpChannel(i);
}
void EightBit::GameBoy::Audio::dump() const {
dumpVoices();
dumpChannels();
}
// //
bool EightBit::GameBoy::Audio::voice1On() const { bool EightBit::GameBoy::Audio::voice1On() const {

View File

@ -280,102 +280,82 @@ void EightBit::GameBoy::Bus::Bus_WrittenByte(const uint16_t address) {
case BASE + NR10: // Sound mode 1 register: Sweep case BASE + NR10: // Sound mode 1 register: Sweep
audio().fromNR10(value); audio().fromNR10(value);
audio().dumpVoice(0);
break; break;
case BASE + NR11: // Sound mode 1 register: Sound length / Wave pattern duty case BASE + NR11: // Sound mode 1 register: Sound length / Wave pattern duty
audio().fromNR11(value); audio().fromNR11(value);
audio().dumpVoice(0);
break; break;
case BASE + NR12: // Sound mode 1 register: Envelope case BASE + NR12: // Sound mode 1 register: Envelope
audio().fromNR12(value); audio().fromNR12(value);
audio().dumpVoice(0);
break; break;
case BASE + NR13: // Sound mode 1 register: Frequency lo case BASE + NR13: // Sound mode 1 register: Frequency lo
audio().fromNR13(value); audio().fromNR13(value);
audio().dumpVoice(0);
break; break;
case BASE + NR14: // Sound mode 1 register: Frequency hi case BASE + NR14: // Sound mode 1 register: Frequency hi
audio().fromNR14(value); audio().fromNR14(value);
audio().dumpVoice(0);
break; break;
case BASE + NR21: // Sound mode 2 register: Sound length / Wave pattern duty case BASE + NR21: // Sound mode 2 register: Sound length / Wave pattern duty
audio().fromNR21(value); audio().fromNR21(value);
audio().dumpVoice(1);
break; break;
case BASE + NR22: // Sound mode 2 register: Envelope case BASE + NR22: // Sound mode 2 register: Envelope
audio().fromNR22(value); audio().fromNR22(value);
audio().dumpVoice(1);
break; break;
case BASE + NR23: // Sound mode 2 register: Frequency lo case BASE + NR23: // Sound mode 2 register: Frequency lo
audio().fromNR23(value); audio().fromNR23(value);
audio().dumpVoice(1);
break; break;
case BASE + NR24: // Sound mode 2 register: Frequency hi case BASE + NR24: // Sound mode 2 register: Frequency hi
audio().fromNR24(value); audio().fromNR24(value);
audio().dumpVoice(1);
break; break;
case BASE + NR30: // Sound mode 3 register: Sound on/off case BASE + NR30: // Sound mode 3 register: Sound on/off
audio().fromNR30(value); audio().fromNR30(value);
audio().dumpVoice(2);
break; break;
case BASE + NR31: // Sound mode 3 register: Sound length case BASE + NR31: // Sound mode 3 register: Sound length
audio().fromNR31(value); audio().fromNR31(value);
audio().dumpVoice(2);
break; break;
case BASE + NR32: // Sound mode 3 register: Select output level case BASE + NR32: // Sound mode 3 register: Select output level
audio().fromNR32(value); audio().fromNR32(value);
audio().dumpVoice(2);
break; break;
case BASE + NR33: // Sound mode 3 register: Frequency lo case BASE + NR33: // Sound mode 3 register: Frequency lo
audio().fromNR33(value); audio().fromNR33(value);
audio().dumpVoice(2);
break; break;
case BASE + NR34: // Sound mode 3 register: Frequency hi case BASE + NR34: // Sound mode 3 register: Frequency hi
audio().fromNR34(value); audio().fromNR34(value);
audio().dumpVoice(2);
break; break;
case BASE + NR41: // Sound mode 4 register: Sound length case BASE + NR41: // Sound mode 4 register: Sound length
audio().fromNR41(value); audio().fromNR41(value);
audio().dumpVoice(3);
break; break;
case BASE + NR42: // Sound mode 4 register: Envelope case BASE + NR42: // Sound mode 4 register: Envelope
audio().fromNR42(value); audio().fromNR42(value);
audio().dumpVoice(3);
break; break;
case BASE + NR43: // Sound mode 4 register: Polynomial counter case BASE + NR43: // Sound mode 4 register: Polynomial counter
audio().fromNR43(value); audio().fromNR43(value);
audio().dumpVoice(3);
break; break;
case BASE + NR44: // Sound mode 4 register: counter/consecutive; inital case BASE + NR44: // Sound mode 4 register: counter/consecutive; inital
audio().fromNR44(value); audio().fromNR44(value);
audio().dumpVoice(3);
break; break;
case BASE + NR50: // Channel control: on-off/volume case BASE + NR50: // Channel control: on-off/volume
audio().fromNR50(value); audio().fromNR50(value);
audio().dumpChannels();
break; break;
case BASE + NR51: case BASE + NR51:
audio().fromNR51(value); audio().fromNR51(value);
audio().dumpChannels();
break; break;
case BASE + NR52: // Sound on/off case BASE + NR52: // Sound on/off