diff options
-rw-r--r-- | src/mame/audio/williams.cpp | 14 | ||||
-rw-r--r-- | src/mame/audio/wpcsnd.cpp | 31 | ||||
-rw-r--r-- | src/mame/audio/wpcsnd.h | 4 | ||||
-rw-r--r-- | src/mame/drivers/wpc_an.cpp | 13 |
4 files changed, 43 insertions, 19 deletions
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp index 582b7f9bb48..b685d102652 100644 --- a/src/mame/audio/williams.cpp +++ b/src/mame/audio/williams.cpp @@ -142,8 +142,8 @@ void williams_cvsd_sound_device::talkback_w(u8 data) void williams_cvsd_sound_device::cvsd_digit_clock_clear_w(u8 data) { - m_hc55516->digit_w(data); m_hc55516->clock_w(0); + m_hc55516->digit_w(data&1); } @@ -436,20 +436,20 @@ void williams_narc_sound_device::slave_sync_w(u8 data) //------------------------------------------------- -// cvsd_digit_clock_clear_w - clear the clock on -// the HC55516 and clock the data +// cvsd_digit_clock_clear_w - clear the clk pin on +// the HC555xx and clock the data latch //------------------------------------------------- void williams_narc_sound_device::cvsd_digit_clock_clear_w(u8 data) { - m_hc55516->digit_w(data); m_hc55516->clock_w(0); + m_hc55516->digit_w(data&1); } -//------------------------------------------------- -// cvsd_clock_set_w - set the clock on the HC55516 -//------------------------------------------------- +//--------------------------------------------------- +// cvsd_clock_set_w - set the clk pin on the HC555xx +//--------------------------------------------------- void williams_narc_sound_device::cvsd_clock_set_w(u8 data) { diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp index 287e80ac473..e048fdcb32a 100644 --- a/src/mame/audio/wpcsnd.cpp +++ b/src/mame/audio/wpcsnd.cpp @@ -37,11 +37,11 @@ void wpcsnd_device::wpcsnd_map(address_map &map) map(0x2000, 0x2000).mirror(0x03ff).w(FUNC(wpcsnd_device::rombank_w)); map(0x2400, 0x2401).mirror(0x03fe).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write)); map(0x2800, 0x2800).mirror(0x03ff).w("dac", FUNC(dac_byte_interface::data_w)); - map(0x2c00, 0x2fff).w(FUNC(wpcsnd_device::bg_speech_digit_w)); - map(0x3000, 0x33ff).r(FUNC(wpcsnd_device::latch_r)); - map(0x3400, 0x37ff).w(FUNC(wpcsnd_device::bg_speech_clock_w)); - map(0x3800, 0x3bff).w(FUNC(wpcsnd_device::volume_w)); - map(0x3c00, 0x3fff).w(FUNC(wpcsnd_device::latch_w)); + map(0x2c00, 0x2c00).mirror(0x03ff).w(FUNC(wpcsnd_device::bg_cvsd_clock_set_w)); + map(0x3000, 0x3000).mirror(0x03ff).r(FUNC(wpcsnd_device::latch_r)); + map(0x3400, 0x3400).mirror(0x03ff).w(FUNC(wpcsnd_device::bg_cvsd_digit_clock_clear_w)); + map(0x3800, 0x3800).mirror(0x03ff).w(FUNC(wpcsnd_device::volume_w)); + map(0x3c00, 0x3c00).mirror(0x03ff).w(FUNC(wpcsnd_device::latch_w)); map(0x4000, 0xbfff).bankr("rombank"); map(0xc000, 0xffff).bankr("fixed"); } @@ -113,16 +113,24 @@ WRITE_LINE_MEMBER( wpcsnd_device::ym2151_irq_w) m_cpu->set_input_line(M6809_FIRQ_LINE,state ? ASSERT_LINE : CLEAR_LINE); } -void wpcsnd_device::bg_speech_clock_w(uint8_t data) +//------------------------------------------------------ +// bg_cvsd_clock_set_w - set the clk pin on the HC555xx +//------------------------------------------------------ + +void wpcsnd_device::bg_cvsd_clock_set_w(uint8_t data) { - // pulses clock input? m_hc55516->clock_w(1); - m_hc55516->clock_w(0); } -void wpcsnd_device::bg_speech_digit_w(uint8_t data) +//---------------------------------------------------- +// bg_cvsd_digit_clock_clear_w - clear the clk pin on +// the HC555xx and clock the data latch +//---------------------------------------------------- + +void wpcsnd_device::bg_cvsd_digit_clock_clear_w(uint8_t data) { - m_hc55516->digit_w(data); + m_hc55516->clock_w(0); + m_hc55516->digit_w(data&1); } void wpcsnd_device::rombank_w(uint8_t data) @@ -146,12 +154,14 @@ void wpcsnd_device::rombank_w(uint8_t data) LOG("WPCSND: Bank set to %02x\n",bank); } +/// TODO: 74ls374@U39? plus 74LS74@U24B, replace this with a generic_latch_8 device uint8_t wpcsnd_device::latch_r() { m_cpu->set_input_line(M6809_IRQ_LINE,CLEAR_LINE); return m_latch; } +/// TODO: 74ls374@U23? plus 74LS74@U24A, replace this with a generic_latch_8 device void wpcsnd_device::latch_w(uint8_t data) { m_reply_available = true; @@ -159,6 +169,7 @@ void wpcsnd_device::latch_w(uint8_t data) m_reply_cb(1); } +/// TODO: actually implement this void wpcsnd_device::volume_w(uint8_t data) { } diff --git a/src/mame/audio/wpcsnd.h b/src/mame/audio/wpcsnd.h index 385f15592b4..52aa5182c6b 100644 --- a/src/mame/audio/wpcsnd.h +++ b/src/mame/audio/wpcsnd.h @@ -56,8 +56,8 @@ private: DECLARE_WRITE_LINE_MEMBER(ym2151_irq_w); - void bg_speech_clock_w(uint8_t data); - void bg_speech_digit_w(uint8_t data); + void bg_cvsd_clock_set_w(uint8_t data); + void bg_cvsd_digit_clock_clear_w(uint8_t data); void rombank_w(uint8_t data); uint8_t latch_r(); void latch_w(uint8_t data); diff --git a/src/mame/drivers/wpc_an.cpp b/src/mame/drivers/wpc_an.cpp index 94325baa4e3..f9fdbf8260b 100644 --- a/src/mame/drivers/wpc_an.cpp +++ b/src/mame/drivers/wpc_an.cpp @@ -2,6 +2,19 @@ // copyright-holders:Olivier Galibert, Miodrag Milanovic /* Williams WPC (Alpha Numeric) + + Note: It is possible to get funhouse (fh_l3 at least) in-game by coining it up, then holding the following keys, + and pressing the start button, or else you get "PINBALL MISSING": + W (right ball shooter, c6 r2) + E (right trough, c6 r3) + [ (dummy jaw opto, c5 r1) + ] (right outlane, c5 r2) + \ (right slingshot kicker, c5 r3) + It's possible not all of these are strictly necessary to make it work. + + TODO: replace the 8x8 pinball input matrix keymap by some sort of common interface for the williams system 6, 9, 10, 11 and wpc_an; + while the actual purpose of the switches differ per machine (and some machines like wpc_an have one switch permanently closed as a test switch), + the entire matrix should be mapped to keyboard keys, there are more than enough keys on a 104 key keyboard to do it, even avoiding MAME's reserved keys. */ |