From b28b449bc06c4bea805a31f2af7b926ef5ed50f6 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Tue, 5 May 2020 18:20:49 +0200 Subject: [PATCH] Machines promoted to working ---------------------------- Bingo Time [TeamEurope, Ivan Vangelista] (nw) game seems playable, as far as I understand the rules. Also added preliminary sound --- src/mame/audio/ad_sound.cpp | 23 +++++++++++++++-------- src/mame/audio/ad_sound.h | 4 +++- src/mame/drivers/equites.cpp | 10 +++++----- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/mame/audio/ad_sound.cpp b/src/mame/audio/ad_sound.cpp index d9eff0b74df..3b7fe72959f 100644 --- a/src/mame/audio/ad_sound.cpp +++ b/src/mame/audio/ad_sound.cpp @@ -432,9 +432,13 @@ void ad_59mc07_device::device_reset() /* Functions to emulate the Alpha Denshi "60MC01" audio board - CPU :Z80A - Sound:AY-3-8910A (unpopulated: another 8910 and a YM2203) - OSC :16.000MHz + CPU : Z80A + Sound: AY-3-8910A (unpopulated: another 8910 and a YM2203) + OSC : 16.000MHz + + TODO: This bears a lot of similarities with the Super Stingray audio board. Verify if PCB codes match and if so merge implementations; + fix interrupts; + is there really no music? */ //************************************************************************** @@ -449,19 +453,21 @@ DEFINE_DEVICE_TYPE(AD_60MC01, ad_60mc01_device, "ad_60mc01", "Alpha Denshi 60MC0 // MEMORY MAPS //************************************************************************** -void ad_60mc01_device::sound_map(address_map &map) // TODO: verify everything +void ad_60mc01_device::sound_map(address_map &map) { map(0x0000, 0x1fff).rom(); map(0x8000, 0x87ff).ram(); - // map(0xc100, 0xc100).r(m_soundlatch, FUNC(generic_latch_8_device::read)); - // map(0xc102, 0xc102).w(m_soundlatch, FUNC(generic_latch_8_device::clear_w)); + map(0xc100, 0xc100).r(m_soundlatch, FUNC(generic_latch_8_device::read)); + map(0xc102, 0xc102).w(m_soundlatch, FUNC(generic_latch_8_device::clear_w)); + map(0xc104, 0xc104).nopw(); // written at start up, would be DAC if it were populated + map(0xc106, 0xc10e).nopw(); // written continuously, it's audio board I/O according to Super Stingray's emulation } void ad_60mc01_device::sound_portmap(address_map &map) { map.global_mask(0xff); - // map(0x10, 0x11).w("aysnd", FUNC(ay8910_device::data_address_w)); - // map(0x80, 0x81).w + map(0x10, 0x11).nopw(); // written at start up, would be the YM2203 if it were populated + map(0x80, 0x81).w("aysnd", FUNC(ay8910_device::data_address_w)); } //************************************************************************** @@ -487,6 +493,7 @@ void ad_60mc01_device::device_add_mconfig(machine_config &config) Z80(config, m_audiocpu, 16_MHz_XTAL / 4); // divider not verified m_audiocpu->set_addrmap(AS_PROGRAM, &ad_60mc01_device::sound_map); m_audiocpu->set_addrmap(AS_IO, &ad_60mc01_device::sound_portmap); + m_audiocpu->set_periodic_int(FUNC(ad_60mc01_device::sound_irq), attotime::from_hz(128)); // sound hardware SPEAKER(config, "speaker").front_center(); diff --git a/src/mame/audio/ad_sound.h b/src/mame/audio/ad_sound.h index fd3e33e5421..1c169709cae 100644 --- a/src/mame/audio/ad_sound.h +++ b/src/mame/audio/ad_sound.h @@ -108,7 +108,7 @@ public: // construction/destruction ad_60mc01_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); - static constexpr feature_type unemulated_features() { return feature::SOUND; } + static constexpr feature_type imperfect_features() { return feature::SOUND; } // TODO: fix interrupts, missing music? void sound_command_w(uint8_t data) { m_soundlatch->write(data); } @@ -124,6 +124,8 @@ private: void sound_map(address_map &map); void sound_portmap(address_map &map); + + INTERRUPT_GEN_MEMBER(sound_irq) { m_audiocpu->set_input_line(0, HOLD_LINE); } }; #endif // MAME_AUDIO_AD_SOUND_BOARDS_H diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp index 2366be1a5a9..c9e0f1bd8bf 100644 --- a/src/mame/drivers/equites.cpp +++ b/src/mame/drivers/equites.cpp @@ -468,7 +468,7 @@ void equites_state::bngotime_map(address_map &map) { equites_common_map(map); map(0x040000, 0x040fff).ram(); - // map(0x180001, 0x180001).w("sound_board", FUNC(ad_60mc01_device::sound_command_w)); // where's this? + map(0x180001, 0x180001).w("sound_board", FUNC(ad_60mc01_device::sound_command_w)); } void splndrbt_state::splndrbt_map(address_map &map) @@ -722,7 +722,7 @@ static INPUT_PORTS_START( hvoltage ) PORT_ADJUSTER(27, "MSM5232 Clock") // approximate factory setting INPUT_PORTS_END -static INPUT_PORTS_START( bngotime ) +static INPUT_PORTS_START( bngotime ) // TODO: possibly still missing something? Couldn't find any use for the unknown inputs PORT_START("IN0") PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) // tilt up, only has effect when ball's in play PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -730,14 +730,14 @@ static INPUT_PORTS_START( bngotime ) PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) // tilt left, only has effect when ball's in play PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // spring launcher and tilt up (doubled?) PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 ) // starts game after betting, also changes background before launching first ball - PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // buys extra ball after game over PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_GAMBLE_BET ) PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_GAMBLE_TAKE ) PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -1742,7 +1742,7 @@ GAME( 1984, bullfgtr, 0, equites, bullfgtr, equites_state, init_equite GAME( 1984, bullfgtrs, bullfgtr, equites, bullfgtr, equites_state, init_equites, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1985, kouyakyu, 0, equites, kouyakyu, equites_state, init_equites, ROT0, "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1985, gekisou, 0, gekisou, gekisou, gekisou_state, init_equites, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1986, bngotime, 0, bngotime, bngotime, equites_state, init_equites, ROT90, "CLS", "Bingo Time", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verification of the inputs, emulation of the sound board (flag is in the audio device) +GAME( 1986, bngotime, 0, bngotime, bngotime, equites_state, init_equites, ROT90, "CLS", "Bingo Time", MACHINE_SUPPORTS_SAVE ) // emulation of the sound board is imperfect (flag is in the audio device) // Splendor Blast Hardware GAME( 1985, splndrbt, 0, splndrbt, splndrbt, splndrbt_state, init_splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )