mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-10 10:29:43 +00:00
Remove dump logging, it was never overly useful anyway.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
parent
1a1d5ea807
commit
78b6e7b339
@ -29,8 +29,6 @@ namespace EightBit {
|
||||
int stepLength() const;
|
||||
void setStepLength(int value);
|
||||
|
||||
void dump() const;
|
||||
|
||||
private:
|
||||
int m_defaultValue;
|
||||
int m_direction;
|
||||
@ -56,8 +54,6 @@ namespace EightBit {
|
||||
int shift() const;
|
||||
void setShift(int value);
|
||||
|
||||
void dump() const;
|
||||
|
||||
private:
|
||||
int m_time;
|
||||
int m_direction;
|
||||
@ -80,8 +76,6 @@ namespace EightBit {
|
||||
bool initialise() const;
|
||||
void setInitialise(bool value);
|
||||
|
||||
virtual void dump() const;
|
||||
|
||||
private:
|
||||
int m_counterContinuous;
|
||||
int m_initialise;
|
||||
@ -104,8 +98,6 @@ namespace EightBit {
|
||||
|
||||
int hertz() const;
|
||||
|
||||
virtual void dump() const override;
|
||||
|
||||
private:
|
||||
const int m_cyclesPerSecond;
|
||||
int m_frequencyLowOrder; // 8 bits
|
||||
@ -125,8 +117,6 @@ namespace EightBit {
|
||||
int length() const;
|
||||
void setLength(int value);
|
||||
|
||||
virtual void dump() const override;
|
||||
|
||||
private:
|
||||
int m_waveFormDutyCycle;
|
||||
int m_soundLength;
|
||||
@ -142,8 +132,6 @@ namespace EightBit {
|
||||
|
||||
Envelope& envelope();
|
||||
|
||||
virtual void dump() const override;
|
||||
|
||||
private:
|
||||
Envelope m_envelope;
|
||||
};
|
||||
@ -158,8 +146,6 @@ namespace EightBit {
|
||||
|
||||
Sweep& sweep();
|
||||
|
||||
virtual void dump() const override;
|
||||
|
||||
private:
|
||||
Sweep m_sweep;
|
||||
};
|
||||
@ -241,8 +227,6 @@ namespace EightBit {
|
||||
bool& outputVoice3();
|
||||
bool& outputVoice4();
|
||||
|
||||
void dump() const;
|
||||
|
||||
private:
|
||||
bool m_vin;
|
||||
int m_outputLevel;
|
||||
@ -269,12 +253,6 @@ namespace EightBit {
|
||||
void reset();
|
||||
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;
|
||||
|
@ -41,10 +41,6 @@ void EightBit::GameBoy::Envelope::setStepLength(int 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() {}
|
||||
@ -85,10 +81,6 @@ void EightBit::GameBoy::Sweep::setShift(int 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() {}
|
||||
@ -118,10 +110,6 @@ void EightBit::GameBoy::AudioVoice::setInitialise(bool 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)
|
||||
@ -170,11 +158,6 @@ void EightBit::GameBoy::WaveVoice::setFrequency(int value) {
|
||||
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)
|
||||
@ -205,11 +188,6 @@ void EightBit::GameBoy::RectangularVoice::setLength(int 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)
|
||||
@ -228,11 +206,6 @@ EightBit::GameBoy::Envelope& EightBit::GameBoy::EnvelopedRectangularVoice::envel
|
||||
return m_envelope;
|
||||
}
|
||||
|
||||
void EightBit::GameBoy::EnvelopedRectangularVoice::dump() const {
|
||||
RectangularVoice::dump();
|
||||
m_envelope.dump();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
EightBit::GameBoy::SweptEnvelopedRectangularVoice::SweptEnvelopedRectangularVoice(int cyclesPerSecond)
|
||||
@ -251,11 +224,6 @@ EightBit::GameBoy::Sweep& EightBit::GameBoy::SweptEnvelopedRectangularVoice::swe
|
||||
return m_sweep;
|
||||
}
|
||||
|
||||
void EightBit::GameBoy::SweptEnvelopedRectangularVoice::dump() const {
|
||||
EnvelopedRectangularVoice::dump();
|
||||
m_sweep.dump();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
EightBit::GameBoy::UserDefinedWaveVoice::UserDefinedWaveVoice(int cyclesPerSecond)
|
||||
@ -423,16 +391,6 @@ bool& EightBit::GameBoy::OutputChannel::outputVoice4() {
|
||||
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)
|
||||
: m_frameSequencer(cyclesPerSecond),
|
||||
m_enabled(false) {
|
||||
@ -506,31 +464,6 @@ bool EightBit::GameBoy::Audio::zeroed() const {
|
||||
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 {
|
||||
|
@ -280,102 +280,82 @@ void EightBit::GameBoy::Bus::Bus_WrittenByte(const uint16_t address) {
|
||||
|
||||
case BASE + NR10: // Sound mode 1 register: Sweep
|
||||
audio().fromNR10(value);
|
||||
audio().dumpVoice(0);
|
||||
break;
|
||||
|
||||
case BASE + NR11: // Sound mode 1 register: Sound length / Wave pattern duty
|
||||
audio().fromNR11(value);
|
||||
audio().dumpVoice(0);
|
||||
break;
|
||||
|
||||
case BASE + NR12: // Sound mode 1 register: Envelope
|
||||
audio().fromNR12(value);
|
||||
audio().dumpVoice(0);
|
||||
break;
|
||||
|
||||
case BASE + NR13: // Sound mode 1 register: Frequency lo
|
||||
audio().fromNR13(value);
|
||||
audio().dumpVoice(0);
|
||||
break;
|
||||
|
||||
case BASE + NR14: // Sound mode 1 register: Frequency hi
|
||||
audio().fromNR14(value);
|
||||
audio().dumpVoice(0);
|
||||
break;
|
||||
|
||||
case BASE + NR21: // Sound mode 2 register: Sound length / Wave pattern duty
|
||||
audio().fromNR21(value);
|
||||
audio().dumpVoice(1);
|
||||
break;
|
||||
|
||||
case BASE + NR22: // Sound mode 2 register: Envelope
|
||||
audio().fromNR22(value);
|
||||
audio().dumpVoice(1);
|
||||
break;
|
||||
|
||||
case BASE + NR23: // Sound mode 2 register: Frequency lo
|
||||
audio().fromNR23(value);
|
||||
audio().dumpVoice(1);
|
||||
break;
|
||||
|
||||
case BASE + NR24: // Sound mode 2 register: Frequency hi
|
||||
audio().fromNR24(value);
|
||||
audio().dumpVoice(1);
|
||||
break;
|
||||
|
||||
case BASE + NR30: // Sound mode 3 register: Sound on/off
|
||||
audio().fromNR30(value);
|
||||
audio().dumpVoice(2);
|
||||
break;
|
||||
|
||||
case BASE + NR31: // Sound mode 3 register: Sound length
|
||||
audio().fromNR31(value);
|
||||
audio().dumpVoice(2);
|
||||
break;
|
||||
|
||||
case BASE + NR32: // Sound mode 3 register: Select output level
|
||||
audio().fromNR32(value);
|
||||
audio().dumpVoice(2);
|
||||
break;
|
||||
|
||||
case BASE + NR33: // Sound mode 3 register: Frequency lo
|
||||
audio().fromNR33(value);
|
||||
audio().dumpVoice(2);
|
||||
break;
|
||||
|
||||
case BASE + NR34: // Sound mode 3 register: Frequency hi
|
||||
audio().fromNR34(value);
|
||||
audio().dumpVoice(2);
|
||||
break;
|
||||
|
||||
case BASE + NR41: // Sound mode 4 register: Sound length
|
||||
audio().fromNR41(value);
|
||||
audio().dumpVoice(3);
|
||||
break;
|
||||
|
||||
case BASE + NR42: // Sound mode 4 register: Envelope
|
||||
audio().fromNR42(value);
|
||||
audio().dumpVoice(3);
|
||||
break;
|
||||
|
||||
case BASE + NR43: // Sound mode 4 register: Polynomial counter
|
||||
audio().fromNR43(value);
|
||||
audio().dumpVoice(3);
|
||||
break;
|
||||
|
||||
case BASE + NR44: // Sound mode 4 register: counter/consecutive; inital
|
||||
audio().fromNR44(value);
|
||||
audio().dumpVoice(3);
|
||||
break;
|
||||
|
||||
case BASE + NR50: // Channel control: on-off/volume
|
||||
audio().fromNR50(value);
|
||||
audio().dumpChannels();
|
||||
break;
|
||||
|
||||
case BASE + NR51:
|
||||
audio().fromNR51(value);
|
||||
audio().dumpChannels();
|
||||
break;
|
||||
|
||||
case BASE + NR52: // Sound on/off
|
||||
|
Loading…
x
Reference in New Issue
Block a user