From b6cde8da9a6b99871d4ca240c2dc91f7558557af Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 21 Nov 2018 18:35:20 +0100 Subject: docastle: put maincpu irq back to vsync (nw) --- src/mame/drivers/docastle.cpp | 31 +++++++------------------------ src/mame/includes/docastle.h | 2 -- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/src/mame/drivers/docastle.cpp b/src/mame/drivers/docastle.cpp index 8f2c0c051eb..9242d7e2a53 100644 --- a/src/mame/drivers/docastle.cpp +++ b/src/mame/drivers/docastle.cpp @@ -117,8 +117,11 @@ Notes: TODO: ----- - - third CPU +- docastle schematics say that maincpu(and cpu3) interrupt comes from the 6845 + CURSOR pin. The cursor is configured at scanline 0, and causes the games to + update the next video frame during active display. What is the culprit here? + For now, it's simply hooked up to vsync. - dip switch reading bug. dorunrun and docastle are VERY timing sensitive, and dip switch reading will fail if timing is not completely accurate. - the dorunrun attract mode sequence is also very timing sensitive. The behaviour @@ -165,7 +168,6 @@ Dip locations verified with manual for docastle, dorunrun and dowild. #include "speaker.h" - /* Read/Write Handlers */ WRITE_LINE_MEMBER(docastle_state::docastle_tint) { @@ -178,24 +180,6 @@ WRITE_LINE_MEMBER(docastle_state::docastle_tint) } } -WRITE_LINE_MEMBER(docastle_state::stx_on_w) -{ - if (state) - { - m_maincpu->set_input_line(0, ASSERT_LINE); - m_cpu3->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); - } -} - -WRITE_LINE_MEMBER(docastle_state::stx_off_w) -{ - if (!state) - { - m_maincpu->set_input_line(0, CLEAR_LINE); - m_cpu3->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); - } -} - WRITE_LINE_MEMBER(docastle_state::idsoccer_adpcm_int) { if (m_adpcm_pos >= memregion("adpcm")->bytes()) @@ -637,9 +621,9 @@ MACHINE_CONFIG_START(docastle_state::docastle) m_crtc->set_show_border_area(false); m_crtc->set_visarea_adjust(8,-8,0,0); m_crtc->set_char_width(8); + m_crtc->out_vsync_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + m_crtc->out_vsync_callback().append_inputline(m_cpu3, INPUT_LINE_NMI); m_crtc->out_hsync_callback().set(FUNC(docastle_state::docastle_tint)); - m_crtc->out_cur_callback().set(FUNC(docastle_state::stx_on_w)); - m_crtc->out_de_callback().set(FUNC(docastle_state::stx_off_w)); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(XTAL(9'828'000)/2, 0x138, 8, 0x100-8, 0x108, 0, 0xc0) // from crtc @@ -688,7 +672,6 @@ MACHINE_CONFIG_START(docastle_state::idsoccer) MCFG_DEVICE_PROGRAM_MAP(idsoccer_map) m_inp[0]->read_port4_callback().set_ioport("JOYS_RIGHT"); - m_inp[1]->read_port4_callback().set_ioport("JOYS_RIGHT").rshift(4); /* video hardware */ @@ -697,7 +680,7 @@ MACHINE_CONFIG_START(docastle_state::idsoccer) /* sound hardware */ MCFG_DEVICE_ADD("msm", MSM5205, XTAL(384'000)) /* Crystal verified on American Soccer board. */ MCFG_MSM5205_VCLK_CB(WRITELINE(*this, docastle_state, idsoccer_adpcm_int)) // interrupt function - MCFG_MSM5205_PRESCALER_SELECTOR(S64_4B) // 6 kHz ??? + MCFG_MSM5205_PRESCALER_SELECTOR(S64_4B) // 6 kHz ??? MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) MACHINE_CONFIG_END diff --git a/src/mame/includes/docastle.h b/src/mame/includes/docastle.h index a838322f9f8..0a7e4fac548 100644 --- a/src/mame/includes/docastle.h +++ b/src/mame/includes/docastle.h @@ -87,8 +87,6 @@ private: void video_start_common( uint32_t tile_transmask ); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); DECLARE_WRITE_LINE_MEMBER(docastle_tint); - DECLARE_WRITE_LINE_MEMBER(stx_on_w); - DECLARE_WRITE_LINE_MEMBER(stx_off_w); DECLARE_WRITE_LINE_MEMBER(idsoccer_adpcm_int); void docastle_io_map(address_map &map); void docastle_map(address_map &map); -- cgit v1.2.3