mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
come on ES5506 gotta move
This commit is contained in:
parent
9cd6c397f3
commit
efba4e29f9
4 changed files with 26 additions and 24 deletions
|
@ -46,14 +46,14 @@ void es5504_core::tick()
|
|||
}
|
||||
if (m_e.current_edge()) // Host interface
|
||||
{
|
||||
if (m_host_intf.host_access())
|
||||
if (m_host_intf.m_host_access)
|
||||
{
|
||||
if (m_host_intf.rw() && (m_e.cycle() == 2)) // Read
|
||||
if (m_host_intf.m_rw && (m_e.cycle() == 2)) // Read
|
||||
{
|
||||
m_hd = read(m_ha);
|
||||
m_host_intf.clear_host_access();
|
||||
}
|
||||
else if ((!m_host_intf.rw()) && (m_e.cycle() == 2))
|
||||
else if ((!m_host_intf.m_rw) && (m_e.cycle() == 2))
|
||||
{ // Write
|
||||
write(m_ha, m_hd);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ void es5504_core::voice_t::reset()
|
|||
// Accessors
|
||||
u16 es5504_core::host_r(u8 address)
|
||||
{
|
||||
if (!m_host_intf.host_access())
|
||||
if (!m_host_intf.m_host_access)
|
||||
{
|
||||
m_ha = address;
|
||||
if (m_e.rising_edge())
|
||||
|
@ -210,7 +210,7 @@ u16 es5504_core::host_r(u8 address)
|
|||
|
||||
void es5504_core::host_w(u8 address, u16 data)
|
||||
{
|
||||
if (!m_host_intf.host_access())
|
||||
if (!m_host_intf.m_host_access)
|
||||
{
|
||||
m_ha = address;
|
||||
m_hd = data;
|
||||
|
|
|
@ -117,14 +117,14 @@ void es5505_core::tick()
|
|||
}
|
||||
if (m_e.current_edge()) // Host interface
|
||||
{
|
||||
if (m_host_intf.host_access())
|
||||
if (m_host_intf.m_host_access)
|
||||
{
|
||||
if (m_host_intf.rw() && (m_e.cycle() == 2)) // Read
|
||||
if (m_host_intf.m_rw && (m_e.cycle() == 2)) // Read
|
||||
{
|
||||
m_hd = read(m_ha);
|
||||
m_host_intf.clear_host_access();
|
||||
}
|
||||
else if ((!m_host_intf.rw()) && (m_e.cycle() == 2))
|
||||
else if ((!m_host_intf.m_rw) && (m_e.cycle() == 2))
|
||||
{ // Write
|
||||
write(m_ha, m_hd);
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ void es5505_core::voice_t::reset()
|
|||
// Accessors
|
||||
u16 es5505_core::host_r(u8 address)
|
||||
{
|
||||
if (!m_host_intf.host_access())
|
||||
if (!m_host_intf.m_host_access)
|
||||
{
|
||||
m_ha = address;
|
||||
if (m_e.rising_edge())
|
||||
|
@ -318,7 +318,7 @@ u16 es5505_core::host_r(u8 address)
|
|||
|
||||
void es5505_core::host_w(u8 address, u16 data)
|
||||
{
|
||||
if (!m_host_intf.host_access())
|
||||
if (!m_host_intf.m_host_access)
|
||||
{
|
||||
m_ha = address;
|
||||
m_hd = data;
|
||||
|
|
|
@ -162,14 +162,14 @@ void es5506_core::tick()
|
|||
}
|
||||
if (m_e.current_edge()) // Host interface
|
||||
{
|
||||
if (m_host_intf.host_access())
|
||||
if (m_host_intf.m_host_access)
|
||||
{
|
||||
if (m_host_intf.rw() && (m_e.cycle() == 0)) // Read
|
||||
if (m_host_intf.m_rw && (m_e.cycle() == 0)) // Read
|
||||
{
|
||||
m_hd = read(m_ha);
|
||||
m_host_intf.clear_host_access();
|
||||
}
|
||||
else if ((!m_host_intf.rw()) && (m_e.cycle() == 2))
|
||||
else if ((!m_host_intf.m_rw) && (m_e.cycle() == 2))
|
||||
{ // Write
|
||||
write(m_ha, m_hd);
|
||||
}
|
||||
|
@ -212,19 +212,25 @@ void es5506_core::tick_perf()
|
|||
}
|
||||
}
|
||||
|
||||
bool bounce=m_voice_end;
|
||||
|
||||
// update
|
||||
if (bounce) {
|
||||
// falling edge
|
||||
m_e.edge().set(false);
|
||||
m_intf.e_pin(false);
|
||||
m_host_intf.clear_host_access();
|
||||
m_host_intf.clear_strobe();
|
||||
}
|
||||
m_voice[m_voice_cycle].fetch(m_voice_cycle, 0);
|
||||
m_voice[m_voice_cycle].fetch(m_voice_cycle, 1);
|
||||
voice_tick();
|
||||
if (bounce) {
|
||||
// rising edge
|
||||
m_e.edge().set(true);
|
||||
m_intf.e_pin(true);
|
||||
m_host_intf.update_strobe();
|
||||
}
|
||||
}
|
||||
|
||||
void es5506_core::voice_tick()
|
||||
|
@ -407,7 +413,7 @@ void es5506_core::voice_t::reset()
|
|||
// Accessors
|
||||
u8 es5506_core::host_r(u8 address)
|
||||
{
|
||||
if (!m_host_intf.host_access())
|
||||
if (!m_host_intf.m_host_access)
|
||||
{
|
||||
m_ha = address;
|
||||
if (m_e.rising_edge())
|
||||
|
@ -424,7 +430,7 @@ u8 es5506_core::host_r(u8 address)
|
|||
|
||||
void es5506_core::host_w(u8 address, u8 data)
|
||||
{
|
||||
if (!m_host_intf.host_access())
|
||||
if (!m_host_intf.m_host_access)
|
||||
{
|
||||
m_ha = address;
|
||||
m_hd = data;
|
||||
|
|
|
@ -516,16 +516,12 @@ class es550x_shared_core : public vgsound_emu_core
|
|||
m_host_access = m_host_access_strobe;
|
||||
}
|
||||
|
||||
// Getters
|
||||
bool host_access() { return m_host_access; }
|
||||
|
||||
bool rw() { return m_rw; }
|
||||
|
||||
private:
|
||||
u8 m_host_access : 1; // Host access trigger
|
||||
u8 m_host_access_strobe : 1; // Host access strobe
|
||||
u8 m_rw : 1; // R/W state
|
||||
u8 m_rw_strobe : 1; // R/W strobe
|
||||
public:
|
||||
u8 m_host_access ; // Host access trigger
|
||||
u8 m_host_access_strobe ; // Host access strobe
|
||||
u8 m_rw ; // R/W state
|
||||
u8 m_rw_strobe ; // R/W strobe
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue