rf5c68.cpp : Sync to current commit

This commit is contained in:
cam900 2018-05-11 18:59:53 +09:00 committed by Vas Crabb
parent 74301434ae
commit 36946bb332
2 changed files with 11 additions and 11 deletions

View File

@ -44,7 +44,7 @@ void rf5c68_device::device_start()
{
m_data = &space(0);
// Find our direct access
m_direct = space().direct<0>();
m_cache = space().cache<0, 0, ENDIANNESS_LITTLE>();
m_sample_end_cb.bind_relative_to(*owner());
/* allocate the stream */
@ -114,11 +114,11 @@ void rf5c68_device::sound_stream_update(sound_stream &stream, stream_sample_t **
}
/* fetch the sample and handle looping */
sample = m_direct->read_byte((chan.addr >> 11) & 0xffff);
sample = m_cache->read_byte((chan.addr >> 11) & 0xffff);
if (sample == 0xff)
{
chan.addr = chan.loopst << 11;
sample = m_direct->read_byte((chan.addr >> 11) & 0xffff);
sample = m_cache->read_byte((chan.addr >> 11) & 0xffff);
/* if we loop to a loop point, we're effectively dead */
if (sample == 0xff)
@ -243,7 +243,7 @@ WRITE8_MEMBER( rf5c68_device::rf5c68_w )
READ8_MEMBER( rf5c68_device::rf5c68_mem_r )
{
return m_direct->read_byte(m_wbank | offset);
return m_cache->read_byte(m_wbank | offset);
}

View File

@ -70,13 +70,13 @@ private:
uint16_t loopst = 0;
};
address_space *m_data;
direct_read_data<0> *m_direct;
sound_stream* m_stream;
pcm_channel m_chan[NUM_CHANNELS];
uint8_t m_cbank;
uint16_t m_wbank;
uint8_t m_enable;
address_space *m_data;
memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_cache;
sound_stream* m_stream;
pcm_channel m_chan[NUM_CHANNELS];
uint8_t m_cbank;
uint16_t m_wbank;
uint8_t m_enable;
sample_end_cb_delegate m_sample_end_cb;
};