From 378cca039a8d046f7795eac53bb281486c666d88 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Mon, 30 Nov 2015 11:11:46 +1100 Subject: [PATCH 1/5] New working Street Fighter II' bootleg clone transferred from HBMAME [Robbbert, Dumping Union] sf2h14+sf2ceb1 -> sf2m10 --- src/mame/arcade.lst | 1 + src/mame/drivers/cps1.cpp | 104 ++++++++++++++++++++++++++++++++++++++ src/mame/video/cps1.cpp | 1 + 3 files changed, 106 insertions(+) diff --git a/src/mame/arcade.lst b/src/mame/arcade.lst index 348c1cd7a50..f99055ace8d 100644 --- a/src/mame/arcade.lst +++ b/src/mame/arcade.lst @@ -3263,6 +3263,7 @@ sf2m6 // hack sf2m7 // hack sf2m8 // bootleg sf2m9 // bootleg +sf2m10 // bootleg sf2yyc // hack sf2koryu // hack sf2dongb // hack diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp index 9875716458f..05de876561f 100644 --- a/src/mame/drivers/cps1.cpp +++ b/src/mame/drivers/cps1.cpp @@ -642,6 +642,25 @@ static ADDRESS_MAP_START( sf2m3_map, AS_PROGRAM, 16, cps_state ) AM_RANGE(0xff0000, 0xffffff) AM_RAM ADDRESS_MAP_END +static ADDRESS_MAP_START( sf2m10_map, AS_PROGRAM, 16, cps_state ) + AM_RANGE(0x000000, 0x3fffff) AM_ROM + AM_RANGE(0x800000, 0x800007) AM_READ_PORT("IN1") + AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_hack_dsw_r) + AM_RANGE(0x800020, 0x800021) AM_READNOP + AM_RANGE(0x800030, 0x800037) AM_WRITE(cps1_coinctrl_w) + AM_RANGE(0x800100, 0x80013f) AM_WRITE(cps1_cps_a_w) AM_SHARE("cps_a_regs") + AM_RANGE(0x800140, 0x80017f) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) AM_SHARE("cps_b_regs") + AM_RANGE(0x800180, 0x800187) AM_WRITE(cps1_soundlatch_w) + AM_RANGE(0x800188, 0x80018f) AM_WRITE(cps1_soundlatch2_w) + AM_RANGE(0x8001a2, 0x8001b3) AM_WRITE(cps1_cps_a_w) // make 8001b2 point at 800110 + AM_RANGE(0x8001fe, 0x8001ff) AM_WRITENOP // writes FFFF here a lot + AM_RANGE(0x900000, 0x92ffff) AM_RAM_WRITE(cps1_gfxram_w) AM_SHARE("gfxram") + AM_RANGE(0xe00000, 0xefffff) AM_RAM // it writes to the whole range at start + AM_RANGE(0xf1c000, 0xf1c001) AM_READ(cps1_in2_r) + AM_RANGE(0xfeff00, 0xfeffff) AM_RAM // fix stack crash at start + AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("mainram") +ADDRESS_MAP_END + /*********************************************************** INPUT PORTS, DIPs ***********************************************************/ @@ -3273,6 +3292,11 @@ static MACHINE_CONFIG_DERIVED( sf2m3, cps1_12MHz) MCFG_CPU_PROGRAM_MAP(sf2m3_map) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( sf2m10, cps1_12MHz) + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(sf2m10_map) +MACHINE_CONFIG_END + /*************************************************************************** @@ -9331,6 +9355,85 @@ ROM_START( sf2m8 ) ROM_LOAD( "b-16.6", 0x00000, 0x40000, CRC(6cfffb11) SHA1(995526183ffd35f92e9096500a3fe6237faaa2dd) ) ROM_END +/* SF2M10 + From HBMAME (SF2H14 + SF2CEB1) + Same as sf2ebbl2, except it has program roms unique to sf2h14. + The Player Select screen is corrupt, but that's what happens + when you mix Champion Edition program with World Warrior gfx. + +** PCB DETAILS *** +Street Fighter II Champion Edition (bootleg) + +PCB Layout +---------- + +|-----------------------------------------------------| +|LM324 ROM1 3.579545MHz ROM10 ROM12| +|LM324 ROM2 16MHz 2018 ROM9 ROM11| +| M6295 12MHz 2018 SE235 SE005| +| 2018 | +|YM2151 2018 2018 ROM8 | +| ROM3 SE194 SE064| +|J Z80 SF004 SF001| +|A 2018 2018 | +|M 6116 6116 2018 2018 | +|M | +|A |--| | +| |6 | 62256 | +|DSWA(8)|8 |62256 62256 62256 | +| |0 |ROM4 ROM6 | +|DSWB(8)|0 |ROM5 ROM7 | +| |0 | | +|DSWC(8)|--| | +|-----------------------------------------------------| +Notes: + 68000 - Clock 12MHz + Z80 - Clock 3.579545MHz + M6295 - Clock 1.000MHz [16/16]. Pin 7 HIGH + YM2151 - Clock 3.579545MHz + 62256 - 32k x8 SRAM + 2018 - 2k x8 SRAM + 6116 - 2k x8 SRAM +*/ + +ROM_START( sf2m10 ) + ROM_REGION( CODE_SIZE, "maincpu", 0 ) + ROM_LOAD16_BYTE( "sf2h14.7", 0x000000, 0x80000, CRC(74803532) SHA1(c1f774bbc4c7b18fcac15417711a86eb852b9957) ) + ROM_LOAD16_BYTE( "sf2h14.5", 0x000001, 0x80000, CRC(66c91972) SHA1(219aecad1feb60bb758190ea82223171075c858e) ) + ROM_LOAD16_BYTE( "yyc-4.1", 0x100000, 0x20000, CRC(1073b7b6) SHA1(81ca1eab65ceac69520584bb23a684ccb9d92f89) ) + ROM_LOAD16_BYTE( "yyc-5.3", 0x100001, 0x20000, CRC(924c6ce2) SHA1(676a912652bd75da5087f0c7eae047b7681a993c) ) + + ROM_REGION( 0x600000, "gfx", 0 ) + ROMX_LOAD( "a-se235.bin", 0x000000, 0x80000, CRC(a258de13) SHA1(2e477948c4c8a2fb7cfdc4a739766bc4a4e01c49) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROM_CONTINUE( 0x000004, 0x80000) + ROMX_LOAD( "c-se005.bin", 0x000002, 0x80000, CRC(c781bf87) SHA1(034baa9807c2ce8dc800200963a38cd9262b21fb) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROM_CONTINUE( 0x000006, 0x80000) + ROMX_LOAD( "b-se194.bin", 0x200000, 0x80000, CRC(5726cab8) SHA1(0b2243a9a7184d53d42ddab7a8c51b63001c2f56) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROM_CONTINUE( 0x200004, 0x80000) + ROMX_LOAD( "d-se064.bin", 0x200002, 0x80000, CRC(4dd24197) SHA1(548beaa0a6f1c3c88f4fc83169d1a3c86e0755d4) , ROM_GROUPWORD | ROM_SKIP(6) ) //sf2-8m.6c 99.999809% + ROM_CONTINUE( 0x200006, 0x80000) + ROMX_LOAD( "e-sf004.bin", 0x400000, 0x80000, CRC(187667cc) SHA1(fae65bf23f49a32903fda8080659ccf8d42b911f) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROM_CONTINUE( 0x400004, 0x80000) + ROMX_LOAD( "f-sf001.bin", 0x400002, 0x80000, CRC(5b585071) SHA1(ad3371b1ba0441c67d9fcbb23b09464710e4e28a) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROM_CONTINUE( 0x400006, 0x80000) + + ROMX_LOAD( "27c1024.10", 0x400000, 0x20000, CRC(84427d1b) SHA1(f988a2b53c8cc46eeb8032084f24966a539b3734) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "27c1024.12", 0x400002, 0x20000, CRC(55bc790c) SHA1(a1114b89f6fa4487210477676984c77ad94b5ef8) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "27c1024.9", 0x400004, 0x20000, CRC(f8725add) SHA1(fa3fcf6637ee4dd7667bd89766074b3c6ba4f166) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "27c1024.11", 0x400006, 0x20000, CRC(c2a5373e) SHA1(602b32e5ecc7007efe9ad30751040ee52b81f59a) , ROM_GROUPWORD | ROM_SKIP(6) ) + + ROM_REGION( 0x18000, "audiocpu", 0 ) + ROM_LOAD( "27c512.3", 0x00000, 0x08000, CRC(a4823a1b) SHA1(7b6bf59dfd578bfbbdb64c27988796783442d659) ) + ROM_CONTINUE( 0x10000, 0x08000 ) + + ROM_REGION( 0x20000, "user1", 0 ) + ROM_LOAD( "27c512.8", 0x00000, 0x10000, CRC(13ea1c44) SHA1(5b05fe4c3920e33d94fac5f59e09ff14b3e427fe) ) + + ROM_REGION( 0x40000, "oki", 0 ) + ROM_LOAD( "27c010.2", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) + ROM_LOAD( "27c010.1", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) +ROM_END + ROM_START( sf2yyc ) ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_BYTE( "b12.rom", 0x000000, 0x80000, CRC(8f742fd5) SHA1(a78a00e686856481011d8b5f5e60ed18197a5225) ) @@ -11957,6 +12060,7 @@ GAME( 1992, sf2m5, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, GAME( 1992, sf2m6, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (M6, bootleg)", MACHINE_SUPPORTS_SAVE ) // 811102 !!! - based on World version GAME( 1992, sf2m7, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (M7, bootleg)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version GAME( 1992, sf2m8, sf2ce, sf2m3, sf2, cps_state, sf2m8, ROT0, "bootleg", "Street Fighter II': Champion Edition (M8, bootleg)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on USA version +GAME( 1992, sf2m10, sf2ce, sf2m10, sf2, cps_state, cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (M10, bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1992, sf2yyc, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (YYC, bootleg)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version GAME( 1992, sf2koryu, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (Xiang Long, Chinese bootleg)", MACHINE_SUPPORTS_SAVE ) // 811102 !!! - based on World version GAME( 1992, sf2dongb, sf2ce, cps1_12MHz, sf2, cps_state, sf2dongb, ROT0, "bootleg", "Street Fighter II': Champion Edition (Dongfang Bubai protection, bootleg)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version diff --git a/src/mame/video/cps1.cpp b/src/mame/video/cps1.cpp index 5cdce079979..a2940aa43cc 100644 --- a/src/mame/video/cps1.cpp +++ b/src/mame/video/cps1.cpp @@ -1531,6 +1531,7 @@ static const struct CPS1config cps1_config_table[]= {"sf2m7", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, {"sf2m8", HACK_B_1, mapper_S9263B, 0, 0, 0, 2 }, {"sf2m9", CPS_B_21_DEF, mapper_S9263B, 0x36 }, + {"sf2m10", HACK_B_1, mapper_S9263B, 0x36, 0, 0, 1 }, {"sf2dongb", CPS_B_21_DEF, mapper_S9263B, 0x36 }, {"sf2yyc", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, {"sf2koryu", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, From 3f6ce8f36ec2a5f6b4a8a8b29cbfd15b4c5763f1 Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 30 Nov 2015 01:28:22 +0100 Subject: [PATCH 2/5] rungun.cpp: Fixed Run N Gun single/dual monitor logic setup. [Angelo Salese] (Note: graphics are currently broken if attempting to run the game with dual screen setup). --- src/mame/drivers/rungun.cpp | 19 +++++++++++++++---- src/mame/includes/rungun.h | 6 +++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/mame/drivers/rungun.cpp b/src/mame/drivers/rungun.cpp index b210a5ebc1d..389528d0412 100644 --- a/src/mame/drivers/rungun.cpp +++ b/src/mame/drivers/rungun.cpp @@ -80,10 +80,14 @@ READ16_MEMBER(rungun_state::rng_sysregs_r) /* bit0-7: coin mechs and services bit8 : freeze - bit9 : joysticks layout(auto detect???) + bit9 : screen output select */ - return ioport("SYSTEM")->read(); - + { + UINT8 field_bit = machine().first_screen()->frame_number() & 1; + if(m_single_screen_mode == true) + field_bit = 1; + return (ioport("SYSTEM")->read() & 0xfdff) | (field_bit << 9); + } case 0x06/2: if (ACCESSING_BITS_0_7) { @@ -110,14 +114,17 @@ WRITE16_MEMBER(rungun_state::rng_sysregs_w) bit4 : coin counter #2 (when coin slot "common" is selected) bit7 : set before massive memory writes (video chip select?) bit10 : IRQ5 ACK + bit12 : if set, forces screen output to 1 monitor. bit14 : (0) sprite on top of PSAC2 layer (1) other way around (title screen) */ if (ACCESSING_BITS_0_7) { + membank("spriteram_bank")->set_entry((data & 0x80) >> 7); ioport("EEPROMOUT")->write(data, 0xff); } if (ACCESSING_BITS_8_15) { + m_single_screen_mode = (data & 0x1000) == 0x1000; m_video_priority_mode = (data & 0x4000) == 0x4000; if (!(data & 0x400)) // actually a 0 -> 1 transition m_maincpu->set_input_line(M68K_IRQ_5, CLEAR_LINE); @@ -195,7 +202,7 @@ static ADDRESS_MAP_START( rungun_map, AS_PROGRAM, 16, rungun_state ) AM_RANGE(0x5c0000, 0x5c000f) AM_DEVREAD("k055673", k055673_device, k055673_rom_word_r) // 246A ROM readback window AM_RANGE(0x5c0010, 0x5c001f) AM_DEVWRITE("k055673", k055673_device, k055673_reg_word_w) AM_RANGE(0x600000, 0x600fff) AM_DEVREADWRITE("k055673", k055673_device, k053247_word_r, k053247_word_w) // OBJ RAM - AM_RANGE(0x601000, 0x601fff) AM_RAM // communication? second monitor buffer? + AM_RANGE(0x601000, 0x601fff) AM_RAMBANK("spriteram_bank") // OBJ RAM, actually used as work RAM banked buffer AM_RANGE(0x640000, 0x640007) AM_DEVWRITE("k055673", k055673_device, k053246_word_w) // '246A registers AM_RANGE(0x680000, 0x68001f) AM_DEVWRITE("k053936", k053936_device, ctrl_w) // '936 registers AM_RANGE(0x6c0000, 0x6cffff) AM_RAM_WRITE(rng_936_videoram_w) AM_SHARE("936_videoram") // PSAC2 ('936) RAM (34v + 35v) @@ -346,6 +353,10 @@ void rungun_state::machine_start() m_roz_rom = memregion("gfx1")->base(); membank("bank2")->configure_entries(0, 8, &ROM[0x10000], 0x4000); + m_banked_ram = auto_alloc_array_clear(machine(), UINT16, 0x2000); + membank("spriteram_bank")->configure_entries(0,2,&m_banked_ram[0],0x1000); + + save_item(NAME(m_sound_ctrl)); save_item(NAME(m_sound_status)); save_item(NAME(m_sound_nmi_clk)); diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index 8b677a06885..784f8e446cd 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -60,7 +60,11 @@ public: UINT8 m_sound_nmi_clk; bool m_video_priority_mode; - + UINT16 *m_banked_ram; + bool m_single_screen_mode; + DECLARE_READ16_MEMBER(test_r); + DECLARE_WRITE16_MEMBER(test_w); + DECLARE_READ16_MEMBER(rng_sysregs_r); DECLARE_WRITE16_MEMBER(rng_sysregs_w); DECLARE_WRITE16_MEMBER(sound_cmd1_w); From c5b4c0d981abd454a82f19d19b3cfbde4984e915 Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 30 Nov 2015 01:35:16 +0100 Subject: [PATCH 3/5] Forgot to remove this, nw --- src/mame/includes/rungun.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index 784f8e446cd..b2435dbe84e 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -62,8 +62,6 @@ public: bool m_video_priority_mode; UINT16 *m_banked_ram; bool m_single_screen_mode; - DECLARE_READ16_MEMBER(test_r); - DECLARE_WRITE16_MEMBER(test_w); DECLARE_READ16_MEMBER(rng_sysregs_r); DECLARE_WRITE16_MEMBER(rng_sysregs_w); From 67c0cd4f7c882399b6732c1ca471da01c99b66ac Mon Sep 17 00:00:00 2001 From: Robbbert Date: Mon, 30 Nov 2015 11:56:04 +1100 Subject: [PATCH 4/5] sf2m10: Modified previous commit on advise from team, use gfx roms that work. Also, dumping credits actually belong to Guru, not DU. --- src/mame/drivers/cps1.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp index 05de876561f..a47323fad2f 100644 --- a/src/mame/drivers/cps1.cpp +++ b/src/mame/drivers/cps1.cpp @@ -9356,10 +9356,11 @@ ROM_START( sf2m8 ) ROM_END /* SF2M10 - From HBMAME (SF2H14 + SF2CEB1) + From HBMAME (SF2H14) Same as sf2ebbl2, except it has program roms unique to sf2h14. - The Player Select screen is corrupt, but that's what happens - when you mix Champion Edition program with World Warrior gfx. + + Using sf2ce gfx roms to get clean gfx (the board was a bodgy + half-done conversion attempt). ** PCB DETAILS *** Street Fighter II Champion Edition (bootleg) @@ -9404,19 +9405,20 @@ ROM_START( sf2m10 ) ROM_LOAD16_BYTE( "yyc-5.3", 0x100001, 0x20000, CRC(924c6ce2) SHA1(676a912652bd75da5087f0c7eae047b7681a993c) ) ROM_REGION( 0x600000, "gfx", 0 ) - ROMX_LOAD( "a-se235.bin", 0x000000, 0x80000, CRC(a258de13) SHA1(2e477948c4c8a2fb7cfdc4a739766bc4a4e01c49) , ROM_GROUPWORD | ROM_SKIP(6) ) - ROM_CONTINUE( 0x000004, 0x80000) - ROMX_LOAD( "c-se005.bin", 0x000002, 0x80000, CRC(c781bf87) SHA1(034baa9807c2ce8dc800200963a38cd9262b21fb) , ROM_GROUPWORD | ROM_SKIP(6) ) - ROM_CONTINUE( 0x000006, 0x80000) - ROMX_LOAD( "b-se194.bin", 0x200000, 0x80000, CRC(5726cab8) SHA1(0b2243a9a7184d53d42ddab7a8c51b63001c2f56) , ROM_GROUPWORD | ROM_SKIP(6) ) - ROM_CONTINUE( 0x200004, 0x80000) - ROMX_LOAD( "d-se064.bin", 0x200002, 0x80000, CRC(4dd24197) SHA1(548beaa0a6f1c3c88f4fc83169d1a3c86e0755d4) , ROM_GROUPWORD | ROM_SKIP(6) ) //sf2-8m.6c 99.999809% - ROM_CONTINUE( 0x200006, 0x80000) - ROMX_LOAD( "e-sf004.bin", 0x400000, 0x80000, CRC(187667cc) SHA1(fae65bf23f49a32903fda8080659ccf8d42b911f) , ROM_GROUPWORD | ROM_SKIP(6) ) - ROM_CONTINUE( 0x400004, 0x80000) - ROMX_LOAD( "f-sf001.bin", 0x400002, 0x80000, CRC(5b585071) SHA1(ad3371b1ba0441c67d9fcbb23b09464710e4e28a) , ROM_GROUPWORD | ROM_SKIP(6) ) - ROM_CONTINUE( 0x400006, 0x80000) - + // using the proper roms for this program + ROMX_LOAD( "s92-1m.3a", 0x000000, 0x80000, CRC(03b0d852) SHA1(f370f25c96ad2b94f8c53d6b7139100285a25bef) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-3m.5a", 0x000002, 0x80000, CRC(840289ec) SHA1(2fb42a242f60ba7e74009b5a90eb26e035ba1e82) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-2m.4a", 0x000004, 0x80000, CRC(cdb5f027) SHA1(4c7d944fef200fdfcaf57758b901b5511188ed2e) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-4m.6a", 0x000006, 0x80000, CRC(e2799472) SHA1(27d3796429338d82a8de246a0ea06dd487a87768) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-5m.7a", 0x200000, 0x80000, CRC(ba8a2761) SHA1(4b696d66c51611e43522bed752654314e76d33b6) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-7m.9a", 0x200002, 0x80000, CRC(e584bfb5) SHA1(ebdf1f5e2638eed3a65dda82b1ed9151a355f4c9) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-6m.8a", 0x200004, 0x80000, CRC(21e3f87d) SHA1(4a4961bb68c3a1ce15f9d393d9c03ecb2466cc29) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-8m.10a", 0x200006, 0x80000, CRC(befc47df) SHA1(520390420da3a0271ba90b0a933e65143265e5cf) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-10m.3c", 0x400000, 0x80000, CRC(960687d5) SHA1(2868c31121b1c7564e9767b9a19cdbf655c7ed1d) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-12m.5c", 0x400002, 0x80000, CRC(978ecd18) SHA1(648a59706b93c84b4206a968ecbdc3e834c476f6) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-11m.4c", 0x400004, 0x80000, CRC(d6ec9a0a) SHA1(ed6143f8737013b6ef1684e37c05e037e7a80dae) , ROM_GROUPWORD | ROM_SKIP(6) ) + ROMX_LOAD( "s92-13m.6c", 0x400006, 0x80000, CRC(ed2c67f6) SHA1(0083c0ffaf6fe7659ff0cf822be4346cd6e61329) , ROM_GROUPWORD | ROM_SKIP(6) ) + // and overwrite some gfx with supplied extra roms ROMX_LOAD( "27c1024.10", 0x400000, 0x20000, CRC(84427d1b) SHA1(f988a2b53c8cc46eeb8032084f24966a539b3734) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "27c1024.12", 0x400002, 0x20000, CRC(55bc790c) SHA1(a1114b89f6fa4487210477676984c77ad94b5ef8) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "27c1024.9", 0x400004, 0x20000, CRC(f8725add) SHA1(fa3fcf6637ee4dd7667bd89766074b3c6ba4f166) , ROM_GROUPWORD | ROM_SKIP(6) ) From 25bfcfd03aa660d40dd9c13fdc8b42683b0ae284 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Mon, 30 Nov 2015 01:13:36 +0000 Subject: [PATCH 5/5] demultiplex the video output to 2 screens to simulate the konami demux board on rungunu (only this set for now, as it's a dedicated 2 twin only set with no single screen option) unfortunately the sprites and tilemaps seem to end up on switched screens, which is .. confusing --- src/mame/drivers/rungun.cpp | 27 +++++++++++++++++++++++++-- src/mame/includes/rungun.h | 11 ++++++++++- src/mame/video/rungun.cpp | 30 ++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/rungun.cpp b/src/mame/drivers/rungun.cpp index 389528d0412..8fe3b2c3638 100644 --- a/src/mame/drivers/rungun.cpp +++ b/src/mame/drivers/rungun.cpp @@ -413,9 +413,11 @@ static MACHINE_CONFIG_START( rng, rungun_state ) MCFG_K055673_CONFIG("gfx2", 1, K055673_LAYOUT_RNG, -8, 15) MCFG_K055673_GFXDECODE("gfxdecode") MCFG_K055673_PALETTE("palette") + MCFG_K055673_SET_SCREEN("screen") MCFG_DEVICE_ADD("k053252", K053252, 16000000/2) MCFG_K053252_OFFSETS(9*8, 24) + MCFG_VIDEO_SET_SCREEN("screen") /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -432,6 +434,24 @@ static MACHINE_CONFIG_START( rng, rungun_state ) MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) MACHINE_CONFIG_END +// for dual-screen output Run and Gun requires the video de-multiplexer board connected to the Jamma output, this gives you 2 Jamma connectors, one for each screen. +// this means when operated as a single dedicated cabinet the game runs at 60fps, and has smoother animations than when operated as a twin setup where each +// screen only gets an update every other frame. +static MACHINE_CONFIG_DERIVED( rng_dual, rng ) + + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_UPDATE_DRIVER(rungun_state, screen_update_rng_dual_left) + + MCFG_SCREEN_ADD("screen2", RASTER) + MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MCFG_SCREEN_SIZE(64*8, 32*8) + MCFG_SCREEN_VISIBLE_AREA(88, 88+384-1, 24, 24+224-1) + MCFG_SCREEN_UPDATE_DRIVER(rungun_state, screen_update_rng_dual_right) + MCFG_SCREEN_PALETTE("palette") +MACHINE_CONFIG_END + // Older non-US 53936/A13 roms were all returning bad from the mask ROM check. Using the US ROM on non-US reports good therefore I guess that data matches for that // across all sets. @@ -689,9 +709,12 @@ ROM_START( slmdunkj ) ROM_END +// these sets operate as single screen / dual screen depending on if you have the video de-multiplexer plugged in, and the dipswitch set to 1 or 2 monitors GAME( 1993, rungun, 0, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1993, runguna, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.4)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1993, rungunb, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver EAA 1993 9.10, prototype?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1993, rungunu, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // runs twice as fast as it should, broken inputs! -GAME( 1993, rungunua, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // runs twice as fast as it should, broken inputs! broken attract! +GAME( 1993, rungunua, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) GAME( 1993, slmdunkj, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Slam Dunk (ver JAA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) + +// this set has no dipswitches to select single screen mode (they're not even displayed in test menu) it's twin cabinet ONLY +GAME( 1993, rungunu, rungun, rng_dual, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12, dedicated twin cabinet)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index b2435dbe84e..41bdc4baca7 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -26,7 +26,9 @@ public: m_sysreg(*this, "sysreg"), m_936_videoram(*this, "936_videoram"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_screen(*this, "screen") + { } /* devices */ required_device m_maincpu; @@ -43,6 +45,7 @@ public: required_device m_gfxdecode; required_device m_palette; + required_device m_screen; /* video-related */ tilemap_t *m_ttl_tilemap; @@ -84,6 +87,12 @@ public: virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_rng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update_rng_dual_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + UINT32 screen_update_rng_dual_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + bitmap_ind16 m_rng_dual_demultiplex_left_temp; + bitmap_ind16 m_rng_dual_demultiplex_right_temp; + INTERRUPT_GEN_MEMBER(rng_interrupt); INTERRUPT_GEN_MEMBER(audio_interrupt); }; diff --git a/src/mame/video/rungun.cpp b/src/mame/video/rungun.cpp index 2762c1406e3..77c5782f811 100644 --- a/src/mame/video/rungun.cpp +++ b/src/mame/video/rungun.cpp @@ -96,6 +96,9 @@ void rungun_state::video_start() m_ttl_tilemap->set_transparent_pen(0); m_sprite_colorbase = 0x20; + + m_screen->register_screen_bitmap(m_rng_dual_demultiplex_left_temp); + m_screen->register_screen_bitmap(m_rng_dual_demultiplex_right_temp); } UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -118,3 +121,30 @@ UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitm m_ttl_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; } + + +// the 60hz signal gets split between 2 screens +UINT32 rungun_state::screen_update_rng_dual_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + UINT32 ret = 0; + + if (machine().first_screen()->frame_number() & 1) + { + ret = screen_update_rng(screen, m_rng_dual_demultiplex_left_temp, cliprect); + } + else + { + // render every other frame to a temp bitmap + ret = screen_update_rng(screen, m_rng_dual_demultiplex_right_temp, cliprect); + } + + copybitmap( bitmap, m_rng_dual_demultiplex_left_temp, 0, 0, 0, 0, cliprect); + + return ret; +} + +UINT32 rungun_state::screen_update_rng_dual_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + copybitmap( bitmap, m_rng_dual_demultiplex_right_temp, 0, 0, 0, 0, cliprect); + return 0; +} \ No newline at end of file