per-channel oscilloscope, part 7

YM2610 and YM2610B
only TIA is left
This commit is contained in:
tildearrow 2022-05-01 03:47:04 -05:00
parent 415e490025
commit 47f83c0472
12 changed files with 115 additions and 1 deletions

View file

@ -203,11 +203,15 @@ public:
// return a reference to our registers
adpcm_a_registers &regs() { return m_regs; }
// debug functions
adpcm_a_channel* debug_channel(uint32_t index) const { return m_channel[index].get(); }
private:
// internal state
ymfm_interface &m_intf; // reference to the interface
std::unique_ptr<adpcm_a_channel> m_channel[CHANNELS]; // array of channels
adpcm_a_registers m_regs; // registers
int32_t m_last_out[CHANNELS]; // last output of channels
};

View file

@ -697,6 +697,12 @@ public:
// generate one sample of sound
void generate(output_data *output, uint32_t numsamples = 1);
// get the engine
fm_engine* debug_fm_engine() { return &m_fm; }
ssg_engine* debug_ssg_engine() { return &m_ssg; }
adpcm_a_engine* debug_adpcm_a_engine() { return &m_adpcm_a; }
adpcm_b_engine* debug_adpcm_b_engine() { return &m_adpcm_b; }
protected:
// internal helpers
void update_prescale();

View file

@ -232,6 +232,8 @@ void ssg_engine::output(output_data &output)
// convert to amplitude
output.data[chan] = s_amplitudes[volume];
}
m_last_out=output;
}

View file

@ -187,6 +187,9 @@ public:
// indicate the prescale has changed
void prescale_changed() { if (m_override != nullptr) m_override->ssg_prescale_changed(); }
// get the last output
void get_last_out(output_data& out) { out=m_last_out; }
private:
// internal state
ymfm_interface &m_intf; // reference to the interface
@ -198,6 +201,7 @@ private:
uint32_t m_noise_state; // current noise state
ssg_registers m_regs; // registers
ssg_override *m_override; // override interface
output_data m_last_out;
};
}