mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 23:13:01 +00:00
again
This commit is contained in:
parent
9492edcdab
commit
23ff23f7e7
2 changed files with 10 additions and 5 deletions
|
@ -1263,11 +1263,16 @@ void ay8910_device::device_start()
|
|||
}
|
||||
|
||||
|
||||
void ay8910_device::ay8910_reset_ym()
|
||||
void ay8910_device::ay8910_reset_ym(bool ay8930)
|
||||
{
|
||||
m_active = false;
|
||||
m_register_latch = 0;
|
||||
if (ay8930) {
|
||||
printf("8930 reset\n");
|
||||
m_rng = 0x1ffff;
|
||||
} else {
|
||||
m_rng = 1;
|
||||
}
|
||||
m_mode = 0; // ay-3-8910 compatible mode
|
||||
m_noise_and = 0xff;
|
||||
m_noise_or = 0;
|
||||
|
@ -1376,7 +1381,7 @@ unsigned char ay8910_device::ay8910_read_ym()
|
|||
|
||||
void ay8910_device::device_reset()
|
||||
{
|
||||
ay8910_reset_ym();
|
||||
ay8910_reset_ym(chip_type == AY8930);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
void data_w(unsigned char data);
|
||||
|
||||
// /RES
|
||||
void reset_w(unsigned char data = 0) { ay8910_reset_ym(); }
|
||||
void reset_w(unsigned char data = 0) { ay8910_reset_ym(chip_type == AY8930); }
|
||||
|
||||
// use this when BC1 == A0; here, BC1=0 selects 'data' and BC1=1 selects 'latch address'
|
||||
void data_address_w(int offset, unsigned char data) { ay8910_write_ym(~offset & 1, data); } // note that directly connecting BC1 to A0 puts data on 0 and address on 1
|
||||
|
@ -138,7 +138,7 @@ public:
|
|||
|
||||
void ay8910_write_ym(int addr, unsigned char data);
|
||||
unsigned char ay8910_read_ym();
|
||||
void ay8910_reset_ym();
|
||||
void ay8910_reset_ym(bool ay8930);
|
||||
|
||||
private:
|
||||
static constexpr int NUM_CHANNELS = 3;
|
||||
|
|
Loading…
Reference in a new issue