summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/s11b.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/s11b.cpp')
-rw-r--r--src/mame/drivers/s11b.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/mame/drivers/s11b.cpp b/src/mame/drivers/s11b.cpp
index bad7139fc6a..28755accd16 100644
--- a/src/mame/drivers/s11b.cpp
+++ b/src/mame/drivers/s11b.cpp
@@ -5,17 +5,16 @@
Known issues:
- Background music is not working in some games
- - Black Knight 2000 randomly goes nuts or resets
- (some bug possibly relating to the 'lighting draws the "Ball 1"' animation???);
+ - Black Knight 2000 sometimes goes nuts or resets, although this is largely dependent on
+ whether the 'ball 1' animation was played or not.
if you insert 2 or more credits and hit start 2 times quickly so it doesn't
- play the animation, the game seems more stable afterwards; original
- game bug or 6802 core bug or something else?
- This bug behaves slightly differently in the different sets, depending on whether
- nvram is cleared beforehand or not, and whether the last reset was soft or hard.
+ play the animation, the game seems more stable afterwards; is this an original
+ game bug or 6802 core bug or something else? Activating a switch ('x' for instance) after
+ the ball 1 animation makes it significantly more stable, so this could be an original code bug,
+ or a code bug which is hit if the motor drawbridge limit sensors are not working/emulated, as in MAME.
Proximate cause is smashing the stack, after which the RTS at 61DE (in bk2k_l4)
transfers to 0000 (where no valid code exists).
- Black Knight 2000 LG-1 set reports U26 ROM FAILURE. Bad/hacked dump or original bug?
- - Advance button doesn't seem to work well (TODO: check if this may have been fixed with the irq and diagnostic button masking changes)
- Jokerz has an entirely different "Pin Sound '88" stereo audio board (D-12338-567)
Known keys necessary to get games to start (so the proper number of balls are detected):
@@ -252,6 +251,8 @@ void s11b_state::s11b(machine_config &config)
M6808(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &s11b_state::s11b_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s11b_state, s11b)
+ INPUT_MERGER_ANY_HIGH(config, m_mainirq).output_handler().set(FUNC(s11_state::main_irq));
+ INPUT_MERGER_ANY_HIGH(config, m_piairq).output_handler().set(FUNC(s11_state::pia_irq));
/* Video */
config.set_default_layout(layout_s11b);
@@ -267,15 +268,15 @@ void s11b_state::s11b(machine_config &config)
m_pia21->writepb_handler().set(FUNC(s11_state::sol2_w));
m_pia21->ca2_handler().set(FUNC(s11_state::pia21_ca2_w));
m_pia21->cb2_handler().set(FUNC(s11_state::pia21_cb2_w));
- m_pia21->irqa_handler().set(FUNC(s11_state::pia_irq));
- m_pia21->irqb_handler().set(FUNC(s11_state::pia_irq));
+ m_pia21->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<1>));
+ m_pia21->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<2>));
PIA6821(config, m_pia24, 0);
m_pia24->writepa_handler().set(FUNC(s11_state::lamp0_w));
m_pia24->writepb_handler().set(FUNC(s11_state::lamp1_w));
m_pia24->cb2_handler().set(FUNC(s11_state::pia24_cb2_w));
- m_pia24->irqa_handler().set(FUNC(s11_state::pia_irq));
- m_pia24->irqb_handler().set(FUNC(s11_state::pia_irq));
+ m_pia24->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<3>));
+ m_pia24->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<4>));
PIA6821(config, m_pia28, 0);
m_pia28->readpa_handler().set(FUNC(s11_state::pia28_w7_r));
@@ -284,29 +285,29 @@ void s11b_state::s11b(machine_config &config)
m_pia28->writepb_handler().set(FUNC(s11b_state::dig1_w));
m_pia28->ca2_handler().set(FUNC(s11_state::pia28_ca2_w));
m_pia28->cb2_handler().set(FUNC(s11_state::pia28_cb2_w));
- m_pia28->irqa_handler().set(FUNC(s11_state::pia_irq));
- m_pia28->irqb_handler().set(FUNC(s11_state::pia_irq));
+ m_pia28->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<5>));
+ m_pia28->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<6>));
PIA6821(config, m_pia2c, 0);
m_pia2c->writepa_handler().set(FUNC(s11b_state::pia2c_pa_w));
m_pia2c->writepb_handler().set(FUNC(s11b_state::pia2c_pb_w));
- m_pia2c->irqa_handler().set(FUNC(s11_state::pia_irq));
- m_pia2c->irqb_handler().set(FUNC(s11_state::pia_irq));
+ m_pia2c->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<7>));
+ m_pia2c->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<8>));
PIA6821(config, m_pia30, 0);
m_pia30->readpa_handler().set(FUNC(s11_state::switch_r));
m_pia30->set_port_a_input_overrides_output_mask(0xff);
m_pia30->writepb_handler().set(FUNC(s11_state::switch_w));
m_pia30->cb2_handler().set(FUNC(s11_state::pia30_cb2_w));
- m_pia30->irqa_handler().set(FUNC(s11_state::pia_irq));
- m_pia30->irqb_handler().set(FUNC(s11_state::pia_irq));
+ m_pia30->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<9>));
+ m_pia30->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<10>));
PIA6821(config, m_pia34, 0);
m_pia34->writepa_handler().set(FUNC(s11b_state::pia34_pa_w));
m_pia34->writepb_handler().set(FUNC(s11_state::pia34_pb_w));
m_pia34->cb2_handler().set(FUNC(s11_state::pia34_cb2_w));
- m_pia34->irqa_handler().set(FUNC(s11_state::pia_irq));
- m_pia34->irqb_handler().set(FUNC(s11_state::pia_irq));
+ m_pia34->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<11>));
+ m_pia34->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<12>));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
@@ -314,6 +315,7 @@ void s11b_state::s11b(machine_config &config)
M6802(config, m_audiocpu, XTAL(4'000'000));
m_audiocpu->set_ram_enable(false);
m_audiocpu->set_addrmap(AS_PROGRAM, &s11b_state::s11b_audio_map);
+ INPUT_MERGER_ANY_HIGH(config, m_audioirq).output_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE);
SPEAKER(config, "speaker").front_center();
MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
@@ -331,8 +333,8 @@ void s11b_state::s11b(machine_config &config)
m_pias->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pias->ca2_handler().set("hc55516", FUNC(hc55516_device::clock_w));
m_pias->cb2_handler().set("hc55516", FUNC(hc55516_device::digit_w));
- m_pias->irqa_handler().set_inputline("audiocpu", M6802_IRQ_LINE);
- m_pias->irqb_handler().set_inputline("audiocpu", M6802_IRQ_LINE);
+ m_pias->irqa_handler().set(m_audioirq, FUNC(input_merger_device::in_w<0>));
+ m_pias->irqb_handler().set(m_audioirq, FUNC(input_merger_device::in_w<1>));
/* Add the background music card */
MC6809E(config, m_bgcpu, XTAL(8'000'000) / 4); // MC68B09E