From 1506341503aba0f503bc150ca0af07424c96fb0d Mon Sep 17 00:00:00 2001 From: Jose Tejada Date: Tue, 14 Jan 2020 04:53:55 +0100 Subject: Remarks based on PCB exploration and FPGA conversion (#6158) * Remarks based on PCB exploration and FPGA conversion * Remarks based on PCB exploration and FPGA conversion --- src/mame/drivers/ddragon.cpp | 9 +++++---- src/mame/drivers/gunsmoke.cpp | 19 ++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/mame/drivers/ddragon.cpp b/src/mame/drivers/ddragon.cpp index 01f72a7197b..fb45982fc3b 100644 --- a/src/mame/drivers/ddragon.cpp +++ b/src/mame/drivers/ddragon.cpp @@ -1103,7 +1103,7 @@ void ddragon_state::ddragon2(machine_config &config) fmsnd.add_route(0, "mono", 0.60); fmsnd.add_route(1, "mono", 0.60); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 verified on bootleg PCB by Jose Tejada oki.add_route(ALL_OUTPUTS, "mono", 0.20); } @@ -1179,8 +1179,8 @@ ROM_START( ddragon ) ROM_LOAD( "21j-7", 0x00000, 0x10000, CRC(904de6f8) SHA1(3623e5ea05fd7c455992b7ed87e605b87c3850aa) ) ROM_REGION( 0x0300, "proms", 0 ) - ROM_LOAD( "21j-k-0", 0x0000, 0x0100, CRC(fdb130a9) SHA1(4c4f214229b9fab2b5d69c745ec5428787b89e1f) ) /* unknown */ - ROM_LOAD( "21j-l-0", 0x0100, 0x0200, CRC(46339529) SHA1(64f4c42a826d67b7cbaa8a23a45ebc4eb6248891) ) /* Layer priority */ + ROM_LOAD( "21j-k-0", 0x0000, 0x0100, CRC(fdb130a9) SHA1(4c4f214229b9fab2b5d69c745ec5428787b89e1f) ) /* Layer priority */ + ROM_LOAD( "21j-l-0", 0x0100, 0x0200, CRC(46339529) SHA1(64f4c42a826d67b7cbaa8a23a45ebc4eb6248891) ) /* unknown */ ROM_END ROM_START( ddragonw ) @@ -1703,7 +1703,8 @@ ROM_START( ddragon2 ) ROM_LOAD( "26j7-0.bin", 0x20000, 0x20000, CRC(bc6a48d5) SHA1(04c434f8cd42a8f82a263548183569396f9b684d) ) ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "prom.16", 0x0000, 0x0200, CRC(46339529) SHA1(64f4c42a826d67b7cbaa8a23a45ebc4eb6248891) ) /* sprite timing (same as ddragon) */ + ROM_LOAD( "21j-k-0", 0x0000, 0x0100, CRC(fdb130a9) SHA1(4c4f214229b9fab2b5d69c745ec5428787b89e1f) ) /* Layer priority (same as ddragon) */ + ROM_LOAD( "prom.16", 0x0000, 0x0200, CRC(46339529) SHA1(64f4c42a826d67b7cbaa8a23a45ebc4eb6248891) ) /* sprite timing (same as ddragon) */ ROM_END diff --git a/src/mame/drivers/gunsmoke.cpp b/src/mame/drivers/gunsmoke.cpp index c813db9703a..a4be627ec94 100644 --- a/src/mame/drivers/gunsmoke.cpp +++ b/src/mame/drivers/gunsmoke.cpp @@ -69,12 +69,18 @@ Stephh's notes (based on the games Z80 code and some tests) : ***************************************************************************/ +// Notes by Jose Tejada (jotego) +// CPU speed is 3MHz as per PCB measurement +// Vertical speed is 59.63 Hz +// There is no watchdog +// There is a DMA circuit, same as GnG, Commando and other CAPCOM games of the era +// The DMA copies sprites to a video and halts the CPU for ~131us + #include "emu.h" #include "includes/gunsmoke.h" #include "cpu/z80/z80.h" #include "machine/gen_latch.h" -#include "machine/watchdog.h" #include "sound/2203intf.h" #include "screen.h" #include "speaker.h" @@ -117,7 +123,7 @@ void gunsmoke_state::gunsmoke_map(address_map &map) map(0xc4c9, 0xc4cb).r(FUNC(gunsmoke_state::gunsmoke_protection_r)); map(0xc800, 0xc800).w("soundlatch", FUNC(generic_latch_8_device::write)); map(0xc804, 0xc804).w(FUNC(gunsmoke_state::gunsmoke_c804_w)); // ROM bank switch, screen flip - map(0xc806, 0xc806).w("watchdog", FUNC(watchdog_timer_device::reset_w)); + // 0xc806 DMA trigger (not emulated) map(0xd000, 0xd3ff).ram().w(FUNC(gunsmoke_state::gunsmoke_videoram_w)).share("videoram"); map(0xd400, 0xd7ff).ram().w(FUNC(gunsmoke_state::gunsmoke_colorram_w)).share("colorram"); map(0xd800, 0xd801).ram().share("scrollx"); @@ -304,19 +310,17 @@ void gunsmoke_state::machine_reset() void gunsmoke_state::gunsmoke(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); // 4 MHz + Z80(config, m_maincpu, 3000000); // 3 MHz Verified on PCB by jotego m_maincpu->set_addrmap(AS_PROGRAM, &gunsmoke_state::gunsmoke_map); m_maincpu->set_vblank_int("screen", FUNC(gunsmoke_state::irq0_line_hold)); z80_device &audiocpu(Z80(config, "audiocpu", 3000000)); // 3 MHz audiocpu.set_addrmap(AS_PROGRAM, &gunsmoke_state::sound_map); - audiocpu.set_periodic_int(FUNC(gunsmoke_state::irq0_line_hold), attotime::from_hz(4*60)); - - WATCHDOG_TIMER(config, "watchdog"); + audiocpu.set_periodic_int(FUNC(gunsmoke_state::irq0_line_hold), attotime::from_hz(4*59.63)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60); + screen.set_refresh_hz(59.63); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(32*8, 32*8); screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); @@ -364,6 +368,7 @@ ROM_START( gunsmoke ) ROM_LOAD( "gs12.05c", 0x08000, 0x8000, CRC(d997b78c) SHA1(3b4a9b6f9e57ecfb4ab9734379bd0ee765fd6daa) ) ROM_LOAD( "gs11.04c", 0x10000, 0x8000, CRC(125ba58e) SHA1(cf6931653cebd051564bed8121ab8713a55095c5) ) ROM_LOAD( "gs10.02c", 0x18000, 0x8000, CRC(f469c13c) SHA1(54eda52d6fce58771c0adfe2c88292a41d5a9b99) ) + ROM_LOAD( "gs09.06a", 0x20000, 0x8000, CRC(539f182d) SHA1(4190c0adbecc57b92f4d002e121acb77e8c5d8d8) ) /* 32x32 tiles planes 0-1 */ ROM_LOAD( "gs08.05a", 0x28000, 0x8000, CRC(e87e526d) SHA1(d10068addf30322424a85bbc6382cb762ae3fbe2) ) ROM_LOAD( "gs07.04a", 0x30000, 0x8000, CRC(4382c0d2) SHA1(8615e62bc57b40d082f6ca211d64f22185bed1fd) ) -- cgit v1.2.3