mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
Merge pull request #6997 from cam900/k053260_side
k053260.cpp: Allow side effects
This commit is contained in:
commit
7249e5e5bb
@ -210,7 +210,7 @@ u8 k053260_device::read(offs_t offset)
|
||||
|
||||
case 0x2e: // read ROM
|
||||
if (m_mode & 1)
|
||||
ret = m_voice[0].read_rom();
|
||||
ret = m_voice[0].read_rom(!(machine().side_effects_disabled()));
|
||||
else
|
||||
logerror("%s: Attempting to read K053260 ROM without mode bit set\n", machine().describe_context());
|
||||
break;
|
||||
@ -494,11 +494,12 @@ void k053260_device::KDSC_Voice::play(stream_sample_t *outputs)
|
||||
outputs[1] += (m_output * m_pan_volume[1]) >> 15;
|
||||
}
|
||||
|
||||
u8 k053260_device::KDSC_Voice::read_rom()
|
||||
u8 k053260_device::KDSC_Voice::read_rom(bool side_effects)
|
||||
{
|
||||
u32 offs = m_start + m_position;
|
||||
|
||||
m_position = (m_position + 1) & 0xffff;
|
||||
if (side_effects)
|
||||
m_position = (m_position + 1) & 0xffff;
|
||||
|
||||
return m_device.read_byte(offs);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ private:
|
||||
inline void key_off();
|
||||
inline void play(stream_sample_t *outputs);
|
||||
inline bool playing() { return m_playing; }
|
||||
inline u8 read_rom();
|
||||
inline u8 read_rom(bool side_effects);
|
||||
|
||||
private:
|
||||
// pointer to owning device
|
||||
|
Loading…
Reference in New Issue
Block a user