diff options
| author | 2021-06-05 21:47:21 +0200 | |
|---|---|---|
| committer | 2021-06-05 21:47:32 +0200 | |
| commit | 80f1aecc8ec008dfe7c9d45e1fed13fd0dff13e2 (patch) | |
| tree | ba8723d9a4e2cc6a2d2cbe5d72f40a5b0e6a186b /src/devices | |
| parent | d3397e05d67f8668a40b5541b0e7141e31235f34 (diff) | |
c140: fix regression with namcos2 assault engine noise
Diffstat (limited to 'src/devices')
| -rw-r--r-- | src/devices/sound/c140.cpp | 12 | ||||
| -rw-r--r-- | src/devices/sound/c140.h | 4 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp index f8cfe01fa06..c6e5a05271e 100644 --- a/src/devices/sound/c140.cpp +++ b/src/devices/sound/c140.cpp @@ -467,11 +467,11 @@ inline u8 c140_device::keyon_status_read(u16 offset) { m_stream->update(); C140_VOICE const &v = m_voi[offset >> 4]; - // suzuka 8 hours and final lap games reads from here, - // expecting bit 6 to be an inprogress sample flag. + + // suzuka 8 hours and final lap games read from here, expecting bit 6 to be an in-progress sample flag. // four trax also expects bit 4 high for some specific channels to make engine noises to work properly // (sounds kinda bogus when player crashes in an object and jump spin, needs real HW verification) - return (v.key ? 0x40 : 0x00) | (v.mode & 0x3f); + return (v.key ? 0x40 : 0x00) | (m_REG[offset] & 0x3f); } @@ -552,13 +552,9 @@ void c140_device::c140_w(offs_t offset, u8 data) u8 c219_device::c219_r(offs_t offset) { - offset &= 0x1ff; // assume same as c140 // TODO: what happens here on reading unmapped voice regs? - if ((offset & 0xf) == 0x5) - return keyon_status_read(offset); - - return m_REG[offset]; + return c140_r(offset); } diff --git a/src/devices/sound/c140.h b/src/devices/sound/c140.h index 4c2b18efa46..abbe72b1053 100644 --- a/src/devices/sound/c140.h +++ b/src/devices/sound/c140.h @@ -79,6 +79,8 @@ protected: virtual const inline bool ch_mulaw(C140_VOICE *v) { return BIT(v->mode, 3); } // bit 6 used, unknown + u8 keyon_status_read(u16 offset); + TIMER_CALLBACK_MEMBER(int1_on); devcb_write_line m_int1_callback; @@ -97,8 +99,6 @@ protected: C140_VOICE m_voi[MAX_VOICE]; emu_timer *m_int1_timer; - - u8 keyon_status_read(u16 offset); }; class c219_device : public c140_device |
