summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author Tom <37988779+TwistedTom@users.noreply.github.com>2019-11-09 21:38:55 +0000
committer ajrhacker <ajrhacker@users.noreply.github.com>2019-11-09 16:38:55 -0500
commit6bb9f522882ae05df9eecd3fdf7f005e23cab059 (patch)
tree854b1e6a502eb511df5b4231808157f0906ec3ac /src/mame
parentd267384837d6bdd12ebff16162750d38803f6287 (diff)
Cps1 bootleg, new sets + fixes (#5887)
* add slampic2, fix slampic scroll priorities * added sf2amf3 * slampic fix priorities (properly), fix player 4 * final slampic fixes * fix sf2amf3 * add sf2amf2/3 extra dipsw settings
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/cps1.cpp67
-rw-r--r--src/mame/drivers/fcrash.cpp559
-rw-r--r--src/mame/includes/cps1.h21
-rw-r--r--src/mame/mame.lst2
-rw-r--r--src/mame/video/cps1.cpp3
5 files changed, 633 insertions, 19 deletions
diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp
index 7a7a7115d31..bef5400e7b4 100644
--- a/src/mame/drivers/cps1.cpp
+++ b/src/mame/drivers/cps1.cpp
@@ -1956,6 +1956,21 @@ static INPUT_PORTS_START( sf2amf )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
+
+/* SWB.6 enables turbo mode, SWB.4 and SWB.5 sets the speed */
+static INPUT_PORTS_START( sf2amfx )
+ PORT_INCLUDE( sf2hack )
+
+ PORT_MODIFY("DSWB")
+ PORT_DIPNAME( 0x18, 0x18, "Game Speed" ) PORT_DIPLOCATION("SW(B):4,5")
+ PORT_DIPSETTING( 0x18, "Normal" )
+ PORT_DIPSETTING( 0x10, "Fast" )
+ PORT_DIPSETTING( 0x08, "Very Fast" )
+ PORT_DIPSETTING( 0x00, "Extremely Fast" )
+ PORT_DIPNAME( 0x20, 0x20, "Turbo Mode Enable" ) PORT_DIPLOCATION("SW(B):6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) // normal speed
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // the speed set by SWB.4 and SWB.5
+INPUT_PORTS_END
static INPUT_PORTS_START( sf2accp2 )
PORT_INCLUDE( sf2 )
@@ -10016,13 +10031,12 @@ ROM_END
ROM_START( sf2amf2 )
ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */
- ROM_LOAD16_BYTE( "m5m27c401.u222", 0x000000, 0x80000, CRC(03991fba) SHA1(6c42bf15248640fdb3e98fb01b0a870649deb410) ) // == 5.amf sf2amf
- ROM_LOAD16_BYTE( "m5m27c401.u196", 0x000001, 0x80000, CRC(39f15a1e) SHA1(901c4fea76bf5bff7330ed07ffde54cdccdaa680) ) // == 4.amf sf2amf
+ ROM_LOAD16_BYTE( "m5m27c401.u222", 0x000000, 0x80000, CRC(03991fba) SHA1(6c42bf15248640fdb3e98fb01b0a870649deb410) ) // == 5.amf sf2amf
+ ROM_LOAD16_BYTE( "m5m27c401.u196", 0x000001, 0x80000, CRC(39f15a1e) SHA1(901c4fea76bf5bff7330ed07ffde54cdccdaa680) ) // == 4.amf sf2amf
ROM_LOAD16_BYTE( "27020.u221", 0x100000, 0x40000, CRC(aa4d55a6) SHA1(8fd1c21816886a7734aae42e9336d5f66ddab7bc) ) // different
ROM_LOAD16_BYTE( "27020.u195", 0x100001, 0x40000, CRC(2bffa6f9) SHA1(eb1222356d89849edb08ea1898399cf90cf127f5) ) // different
-
ROM_REGION( 0x600000, "gfx", 0 )
ROM_LOAD64_WORD( "fun-u70.bin", 0x000004, 0x80000, CRC(a94a8b19) SHA1(49ba9e6032a0b33d7db9fe609710575f2f75e695) ) // different
ROM_CONTINUE( 0x000000, 0x80000)
@@ -10057,6 +10071,50 @@ ROM_START( sf2amf2 )
ROM_LOAD( "fun-u210.bin", 0x00000, 0x40000, CRC(6cfffb11) SHA1(995526183ffd35f92e9096500a3fe6237faaa2dd) )
ROM_END
+/* This set is identical to sf2amf2 except for program roms, the pcb has some kind of mod around the rom area with cut traces
+ and a17 pins of u221 and u195 bent out of their sockets and connected together with a wire.
+ Perhaps it's an "upgraded" sf2amf2 board ? */
+ROM_START( sf2amf3 )
+ ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */
+ ROM_LOAD16_BYTE( "u222.bin", 0x000000, 0x80000, CRC(0d305e8b) SHA1(7094160abbf24c119a575d93e3fe1ab84b537de0) )
+ ROM_LOAD16_BYTE( "u196.bin", 0x000001, 0x80000, CRC(137d8665) SHA1(cf4805a11ab614ce5b7e1302ac14ba50fb01e5f4) )
+ ROM_LOAD16_BYTE( "u221.bin", 0x100000, 0x40000, CRC(0b3fe5dd) SHA1(9b66cb867da61595f53d1c9e6b48c6bb7e06e1e0) )
+ ROM_LOAD16_BYTE( "u195.bin", 0x100001, 0x40000, CRC(dbee7b18) SHA1(e56af12fc9d30e92d37e688ff621ea09abb94b53) )
+
+ ROM_REGION( 0x600000, "gfx", 0 )
+ ROM_LOAD64_WORD( "fun-u70.bin", 0x000004, 0x80000, CRC(a94a8b19) SHA1(49ba9e6032a0b33d7db9fe609710575f2f75e695) )
+ ROM_CONTINUE( 0x000000, 0x80000)
+ ROM_LOAD64_WORD( "fun-u68.bin", 0x000006, 0x80000, CRC(0405f21f) SHA1(dbebd2c2c46d5aae8db905f2eb51abd4a5c4ea97) )
+ ROM_CONTINUE( 0x000002, 0x80000)
+ ROM_LOAD64_WORD( "fun-u69.bin", 0x200004, 0x80000, CRC(05dc2043) SHA1(d16b89a48d2dd7cdfafc79567ce1e230d4bd41c1) )
+ ROM_CONTINUE( 0x200000, 0x80000)
+ ROM_LOAD64_WORD( "fun-u67.bin", 0x200006, 0x80000, CRC(055b64f1) SHA1(3dd68f52b81ed1b300b65c900ef6bfe435d41e4b) )
+ ROM_CONTINUE( 0x200002, 0x80000)
+ ROM_LOAD64_WORD( "fun-u19.bin", 0x400004, 0x80000, CRC(1a518609) SHA1(18ffca70d6cefb399ba6e3008e5c29dc37de52a0) )
+ ROM_CONTINUE( 0x400000, 0x80000)
+ ROM_LOAD64_WORD( "fun-u18.bin", 0x400006, 0x80000, CRC(84f9354f) SHA1(ecc190950b1f45b268da380c17859a8d0715b58f) )
+ ROM_CONTINUE( 0x400002, 0x80000)
+ /* extra gfx layer roms loaded over the former ones to remove the capcom copyright logo */
+ ROM_LOAD64_BYTE( "grp1.u31", 0x400004, 0x10000, CRC(6de44671) SHA1(dc6abba639e0c27033e391c7438d88dc89a93351) )
+ ROM_CONTINUE( 0x400000, 0x10000 )
+ ROM_LOAD64_BYTE( "grp3.u29", 0x400006, 0x10000, CRC(e8f14362) SHA1(a20eb75e322011e2a8d8bf2acebe713bef3d3941) )
+ ROM_CONTINUE( 0x400002, 0x10000 )
+ ROM_LOAD64_BYTE( "grp2.u30", 0x400005, 0x10000, CRC(bf0cd819) SHA1(f04a098fce07949277268327871c5e5520e3bb3c) )
+ ROM_CONTINUE( 0x400001, 0x10000 )
+ ROM_LOAD64_BYTE( "grp4.u28", 0x400007, 0x10000, CRC(76f9f91f) SHA1(58a34062d2c8378558a7f1629140330279af9a43) )
+ ROM_CONTINUE( 0x400003, 0x10000 )
+
+ ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
+ ROM_LOAD( "27512.u191", 0x00000, 0x08000, CRC(a4823a1b) SHA1(7b6bf59dfd578bfbbdb64c27988796783442d659) )
+ ROM_CONTINUE( 0x10000, 0x08000 )
+
+ ROM_REGION( 0x20000, "user1", 0 ) /* unknown (bootleg priority?) */
+ ROM_LOAD( "27512.u133", 0x00000, 0x10000, CRC(13ea1c44) SHA1(5b05fe4c3920e33d94fac5f59e09ff14b3e427fe) )
+
+ ROM_REGION( 0x40000, "oki", 0 ) /* Samples */
+ ROM_LOAD( "fun-u210.bin", 0x00000, 0x40000, CRC(6cfffb11) SHA1(995526183ffd35f92e9096500a3fe6237faaa2dd) )
+ROM_END
+
ROM_START( sf2rules ) //
ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "prh2.u222", 0x000000, 0x80000, CRC(fff85f9b) SHA1(5e5bc7da471fe15011b91f8c27823fbdace3eac1) )
@@ -13486,7 +13544,8 @@ GAME( 1992, sf2acc, sf2ce, cps1_12MHz, sf2, cps_state, init_cps1,
GAME( 1992, sf2acca, sf2ce, cps1_12MHz, sf2, cps_state, init_cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (Accelerator!, bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version
GAME( 1992, sf2accp2, sf2ce, cps1_12MHz, sf2accp2, cps_state, init_cps1, ROT0, "bootleg (Testron)", "Street Fighter II': Champion Edition (Accelerator Pt.II, bootleg)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version
GAME( 1992, sf2amf, sf2ce, cps1_12MHz, sf2amf, cps_state, init_sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (Alpha Magic-F, bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version
-GAME( 1992, sf2amf2, sf2ce, cps1_12MHz, sf2hack, cps_state, init_sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (L735 Test Rom, bootleg)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version
+GAME( 1992, sf2amf2, sf2ce, cps1_12MHz, sf2amfx, cps_state, init_sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (L735 Test Rom, bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version
+GAME( 1992, sf2amf3, sf2ce, cps1_10MHz, sf2amfx, cps_state, init_sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (L735 Test Rom, bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on World version, confirmed 10MHz
GAME( 1992, sf2dkot2, sf2ce, cps1_12MHz, sf2, cps_state, init_cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (Double K.O. Turbo II, bootleg)", MACHINE_SUPPORTS_SAVE ) // 902140 !!! - based on USA version
GAME( 1992, sf2level, sf2ce, sf2m3, sf2level, cps_state, init_cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (bootleg with level selection)", MACHINE_SUPPORTS_SAVE ) // 920322 - based on USA version
GAME( 1992, sf2ceblp, sf2ce, cps1_10MHz, sf2, cps_state, init_sf2ceblp, ROT0, "bootleg", "Street Fighter II': Champion Edition (protected bootleg on non-dash board)", MACHINE_SUPPORTS_SAVE ) // 920313 - based on USA version
diff --git a/src/mame/drivers/fcrash.cpp b/src/mame/drivers/fcrash.cpp
index 8a7e70d334a..cc0d3c184f7 100644
--- a/src/mame/drivers/fcrash.cpp
+++ b/src/mame/drivers/fcrash.cpp
@@ -81,7 +81,9 @@ sf2mdta, sf2ceb: scroll 2X has strange 0x200 writes that cause missing fighters'
sgyxz, wofabl: garbage left behind. A priority problem can be seen in 3rd demo where
the fighters walk through the crowd instead of behind.
-slampic: no sound. A priority problem between sprites and crowd.
+slampic: no sound. Some minor gfx issues (sprites on character select screen)
+
+slampic2: no sound. All gfx issues confirmed present on real board.
*/
@@ -90,6 +92,7 @@ slampic: no sound. A priority problem between sprites and crowd.
#include "cpu/z80/z80.h"
#include "cpu/m68000/m68000.h"
+#include "cpu/pic16c5x/pic16c5x.h"
#include "sound/2203intf.h"
#include "sound/msm5205.h"
#include "sound/ym2151.h"
@@ -197,7 +200,6 @@ WRITE16_MEMBER(cps_state::dinopic_layer_w)
break;
default:
logerror("%s: Unknown layer cmd %X %X\n",machine().describe_context(),offset<<1,data);
-
}
}
@@ -540,6 +542,20 @@ WRITE16_MEMBER(cps_state::slampic_layer_w)
}
}
+WRITE16_MEMBER(cps_state::slampic_layer2_w)
+{
+ COMBINE_DATA(&m_cps_a_regs[offset]);
+
+ if (offset == 0x22 / 2)
+ {
+ // doesn't seem to write anywhere outside mainram?
+ m_cps_b_regs[m_layer_enable_reg / 2] = m_mainram[0x8d72 / 2];
+ m_cps_b_regs[m_layer_mask_reg[1] / 2] = m_mainram[0x8d74 / 2];
+ m_cps_b_regs[m_layer_mask_reg[2] / 2] = m_mainram[0x8d76 / 2];
+ m_cps_b_regs[m_layer_mask_reg[3] / 2] = m_mainram[0x8d78 / 2];
+ }
+}
+
void cps_state::fcrash_update_transmasks()
{
@@ -606,7 +622,7 @@ void cps_state::fcrash_render_layer( screen_device &screen, bitmap_ind16 &bitmap
switch (layer)
{
case 0:
- fcrash_render_sprites(screen, bitmap, cliprect);
+ (this->*bootleg_sprite_renderer)(screen, bitmap, cliprect);
break;
case 1:
case 2:
@@ -914,8 +930,8 @@ void cps_state::slampic_map(address_map &map)
map(0x800000, 0x800007).portr("IN1"); /* Player input ports */
map(0x800018, 0x80001f).r(FUNC(cps_state::cps1_dsw_r)); /* System input ports / Dip Switches */
map(0x800030, 0x800037).w(FUNC(cps_state::cps1_coinctrl_w));
- map(0x800100, 0x80013f).w(FUNC(cps_state::cps1_cps_a_w)).share("cps_a_regs"); /* CPS-A custom */
- map(0x800140, 0x80017f).rw(FUNC(cps_state::cps1_cps_b_r), FUNC(cps_state::cps1_cps_b_w)).share("cps_b_regs");
+ map(0x800100, 0x80013f).ram().w(FUNC(cps_state::slampic_layer2_w)).share("cps_a_regs"); /* CPS-A custom */
+ map(0x800140, 0x80017f).ram().share("cps_b_regs");
map(0x880000, 0x880001).nopw(); //.w(FUNC(cps_state::cps1_soundlatch_w)); /* Sound command */
map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram");
map(0x980000, 0x98000d).w(FUNC(cps_state::slampic_layer_w));
@@ -924,7 +940,7 @@ void cps_state::slampic_map(address_map &map)
map(0xf1c000, 0xf1c001).portr("IN2"); /* Player 3 controls (later games) */
map(0xf1c004, 0xf1c005).w(FUNC(cps_state::cpsq_coinctrl2_w)); /* Coin control2 (later games) */
map(0xf1c006, 0xf1c007).portr("EEPROMIN").portw("EEPROMOUT");
- map(0xf1f000, 0xf1ffff).noprw(); // writes 0 to range, then reads F1F6EC
+ map(0xf1f000, 0xf1ffff).noprw(); // writes 0 to range, then reads F1F6EC, occasionally writes 0d5f->f1f6f0
map(0xff0000, 0xffffff).ram().share("mainram");
}
@@ -1568,6 +1584,31 @@ static INPUT_PORTS_START( wofabl )
PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW(B):8" )
INPUT_PORTS_END
+static INPUT_PORTS_START( slampic )
+ PORT_INCLUDE(slammast)
+
+ PORT_MODIFY("IN2") // players 3 + 4 (player 4 doesn't work in test menu but ok in game)
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN3 )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 )
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN4 )
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START4 )
+
+ PORT_MODIFY("IN3")
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
+INPUT_PORTS_END
+
MACHINE_START_MEMBER(cps_state,fcrash)
{
uint8_t *ROM = memregion("audiocpu")->base();
@@ -3103,8 +3144,6 @@ void cps_state::init_sf2mdt()
init_sf2mdta();
}
-
-
void cps_state::init_sf2mdtb()
{
/* bootleg sprite ram */
@@ -3115,7 +3154,6 @@ void cps_state::init_sf2mdtb()
init_wofabl();
}
-
void cps_state::init_sf2mdta()
{
/* bootleg sprite ram */
@@ -3170,7 +3208,7 @@ MACHINE_START_MEMBER(cps_state, slampic)
m_layer_scroll3x_offset = 0x40;
m_sprite_base = 0x1000;
m_sprite_list_end_marker = 0x8000;
- m_sprite_x_offset = 0;
+ m_sprite_x_offset = 2;
}
void cps_state::slampic(machine_config &config)
@@ -3345,6 +3383,504 @@ ROM_START( varthb )
ROM_LOAD_OPTIONAL( "varth6.bin", 0x00a00, 0x157, NO_DUMP ) // Registered
ROM_END
+// ************************************************************************* SLAMPIC2
+
+/*
+ CPU
+ 1x MC68000P10 main cpu
+
+ GFX
+ 1x Custom QFP 160-pin "PLUS-B A37558.6 9325"
+
+ RAM
+ 2x NEC D431000ACZ-70L main ram 1Mbit (128Kx8) SRAM 70ns
+ 2x SRM20256LM12 gfx? 256Kbit (32Kx8) SRAM 120ns SOP28 (mounted on SOP->DIP adapter pcbs)
+ 6x T6116S45L gfx? 16Kbit (2Kx8) SRAM 45ns
+ 4x T6116S35L gfx? 16Kbit (2Kx8) SRAM 35ns
+
+ ROMS
+ 4x 27C040-15 EPROM main rom 4Mbit (512Kx8)
+ 16x MX27C4000PC-15 OTP gfx 4Mbit (512Kx8)
+ 1x 27C020-15 EPROM sound 2Mbit (256Kx8)
+ 2x MX27C4000PC-15 OTP sound 4Mbit (512Kx8)
+ 1x AM27512DC EPROM ? 512Kbit (64kx8) 1983!
+
+ PLD
+ 1x TPC1020AFN-084C
+ 14x PALCE16V8H-25PC/4
+ 4x PALCE20V8H-25PC/4
+ 1x PALCE22V10H-25PC/4
+
+ SOUND
+ 1x PIC16C57-XT/P sound cpu
+ 1x TD735 sample player (Oki MSM6295 clone)
+ 1x NEC uPC1242H power amp
+ 1x LM324N op amp
+
+ MISC
+ 1x 16MHz xtal
+ 1x 10MHz xtal
+ 1x PST518A reset generator
+ 3x 8 pos dipswitch
+ 2x 10-pin connectors player 3 & 4 inputs
+ No eeprom!
+
+ INPUTS
+ CN3: Player 3
+ CN4: Player 4
+
+ 1 gnd
+ 2 nc
+ 3 right
+ 4 left
+ 5 down
+ 6 up
+ 7 btn 1
+ 8 btn 2
+ 9 coin
+ 10 start
+
+ player 3 btn 3: jamma 25 (non-std, player 1 btn 4/neogeo btn D)
+ player 4 btn 4: jamma ac (non-std, player 2 btn 4/neogeo btn D)
+
+
+ h/w issues compared to original game (slammast)
+ -----------------------------------------------
+ these are present on the real board so are not emulation issues:
+
+ * On the title screen, the blue crystal-like effect behind the main "slammasters" logo is missing.
+ * The bottom and side crowd animations have missing frames.
+ * The foreground ropes of the wrestling ring are glitchy and don't always line up properly with the end sections,
+ the original game draws all 3 ropes on scroll2 instead of with sprites when 4 players are on screen,
+ this bootleg draws the top red rope on scroll2 even with 2 players on screen.
+ * Player 3/4 inputs don't work in test menu (except both btn 3), seems test menu code hasn't been hacked to use the different ports.
+ * Sound is generally very poor quality and the background music consists of short pre-recorded clips which loop continuously.
+ (sound currently unemulated as the PIC is secured against reading)
+ * No eeprom on the board, has dipswitches instead.
+ * Crashes if "memory test" is attempted in test menu.
+ * Flip screen dipswitch does nothing (but change is shown in test menu).
+*/
+
+#define DRAWSPRITE(CODE, COLOR, FLIPX, FLIPY, SX, SY) \
+{ \
+ if (flip_screen()) \
+ m_gfxdecode->gfx(2)->prio_transpen(bitmap, cliprect, CODE, COLOR, !(FLIPX), !(FLIPY), 512-16-(SX), 256-16-(SY), screen.priority(), 2, 15); \
+ else \
+ m_gfxdecode->gfx(2)->prio_transpen(bitmap, cliprect, CODE, COLOR, FLIPX, FLIPY, SX, SY, screen.priority(), 2, 15); \
+}
+
+void cps_state::slampic2_render_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
+{
+ int i, j = 0;
+ int last_sprite_offset = 0;
+ uint16_t tileno, colour, xpos, ypos;
+ uint16_t obj_base = m_cps_a_regs[0];
+ uint16_t *sprite_ram = m_bootleg_sprite_ram.get();
+
+ switch (obj_base)
+ {
+ case 0x9000:
+ sprite_ram += m_sprite_base; // ff2000
+ break;
+ case 0x9040:
+ sprite_ram += m_sprite_base + 0x800; // ff3000
+ break;
+ default:
+ logerror("Unknown sprite table location: %04x\n", obj_base);
+ sprite_ram += m_sprite_base; // ff2000
+ }
+
+ while (last_sprite_offset < m_obj_size / 2)
+ {
+ if (sprite_ram[last_sprite_offset + 3] == m_sprite_list_end_marker)
+ break;
+ last_sprite_offset += 4;
+ }
+
+ for (i = last_sprite_offset; i > 0; i -= 4)
+ {
+ xpos = sprite_ram[j];
+ ypos = sprite_ram[j + 1];
+ tileno = sprite_ram[j + 2];
+ colour = sprite_ram[j + 3];
+
+ if (colour & 0xff00 ) // block sprite
+ {
+ int nx = (colour & 0x0f00) >> 8;
+ int ny = (colour & 0xf000) >> 12;
+ int nxs, nys, sx, sy;
+ nx++;
+ ny++;
+
+ if (colour & 0x40) // y flip
+ {
+ if (colour & 0x20) // x flip
+ {
+ for (nys = 0; nys < ny; nys++)
+ {
+ for (nxs = 0; nxs < nx; nxs++)
+ {
+ sx = (xpos + nxs * 16) & 0x1ff;
+ sy = (ypos + nys * 16) & 0x1ff;
+ DRAWSPRITE((tileno & ~0xf) + ((tileno + (nx - 1) - nxs) & 0xf) + 0x10 * (ny - 1 - nys), (colour & 0x1f), 1, 1, sx, sy);
+ }
+ }
+ }
+ else // no x flip
+ {
+ for (nys = 0; nys < ny; nys++)
+ {
+ for (nxs = 0; nxs < nx; nxs++)
+ {
+ sx = (xpos + nxs * 16) & 0x1ff;
+ sy = (ypos + nys * 16) & 0x1ff;
+ DRAWSPRITE((tileno & ~0xf) + ((tileno + nxs) & 0xf) + 0x10 * (ny - 1 - nys), (colour & 0x1f), 0, 1, sx, sy);
+ }
+ }
+ }
+ }
+ else // no y flip
+ {
+ if (colour & 0x20) // x flip
+ {
+ for (nys = 0; nys < ny; nys++)
+ {
+ for (nxs = 0; nxs<nx; nxs++)
+ {
+ sx = (xpos + nxs * 16) & 0x1ff;
+ sy = (ypos + nys * 16) & 0x1ff;
+ DRAWSPRITE((tileno & ~0xf) + ((tileno + (nx - 1) - nxs) & 0xf) + 0x10 * nys, (colour & 0x1f), 1, 0, sx, sy);
+ }
+ }
+ }
+ else // no x flip
+ {
+ for (nys = 0; nys < ny; nys++)
+ {
+ for (nxs = 0; nxs < nx; nxs++)
+ {
+ sx = (xpos + nxs * 16) & 0x1ff;
+ sy = (ypos + nys * 16) & 0x1ff;
+ DRAWSPRITE((tileno & ~0xf) + ((tileno + nxs) & 0xf) + 0x10 * nys, (colour & 0x1f), 0, 0, sx, sy);
+ }
+ }
+ }
+ }
+ }
+ else
+ DRAWSPRITE(tileno, (colour & 0x1f), (colour & 0x20), (colour & 0x40), (xpos & 0x1ff), (ypos & 0x1ff));
+
+ j += 4;
+ }
+}
+
+void cps_state::slampic2(machine_config &config)
+{
+ M68000(config, m_maincpu, 10000000); // measured
+ m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::slampic2_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
+
+ PIC16C57(config, m_audiocpu, 4000000); // measured
+ //m_audiocpu->set_disable();
+
+ MCFG_MACHINE_START_OVERRIDE(cps_state, slampic2)
+
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(CPS_PIXEL_CLOCK, CPS_HTOTAL, CPS_HBEND, CPS_HBSTART, CPS_VTOTAL, CPS_VBEND, CPS_VBSTART);
+ m_screen->set_screen_update(FUNC(cps_state::screen_update_fcrash));
+ //m_screen->screen_vblank().set(FUNC(cps_state::screen_vblank_cps1));
+ m_screen->set_palette(m_palette);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
+
+ SPEAKER(config, "mono").front_center();
+ //GENERIC_LATCH_8(config, m_soundlatch);
+ //GENERIC_LATCH_8(config, m_soundlatch2);
+ OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_LOW); // measured & pin 7 verified
+ //m_oki->set_addrmap(0, &cps_state::slampic2_oki_map);
+ m_oki->add_route(ALL_OUTPUTS, "mono", 0.80);
+}
+
+void cps_state::slampic2_map(address_map &map)
+{
+ map(0x000000, 0x3fffff).rom();
+ map(0x800000, 0x800001).portr("IN1");
+ map(0x800002, 0x800003).portr("IN2"); // player 3 + 4 inputs
+ map(0x800018, 0x80001f).r(FUNC(cps_state::cps1_dsw_r));
+ map(0x800030, 0x800031).nopw(); // coin ctrl
+ map(0x800100, 0x80013f).ram().r(FUNC(cps_state::slampic2_cps_a_r)).share("cps_a_regs");
+ map(0x800140, 0x80017f).ram().share("cps_b_regs");
+ map(0x800180, 0x800181).w(FUNC(cps_state::slampic2_sound_w)); // sound
+ map(0x800188, 0x800189).w(FUNC(cps_state::slampic2_sound2_w)); // sound
+ map(0x8ffff8, 0x8fffff).nopw(); // ?
+ map(0x900000, 0x92ffff).ram().mirror(0x6c0000).w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram");
+ // 0x930000, 0x933fff spriteram mirror?
+ // 0xf00000, 0xf3ffff workram
+ // 0xfc0000, 0xfeffff gfxram
+ // 0xff0000, 0xff3fff spriteram
+ map(0xff4000, 0xffffff).ram().share("mainram");
+
+ /*
+ slammast slampic2
+ sprite table 1 900000-9007ff ff2000-ff27ff
+ ff2800-ff2fff ?
+ sprite table 2 904000-9047ff ff3000-ff37ff
+ ff3800-ff3fff ?
+
+ gfxram 900000-91bfff 900000-91bfff
+ 91c000-92ffff fdc000-feffff
+
+ test menu reads 3p + 4p controls at original ports f1c000-f1c003
+ start-up check tests f00000-f40000 region
+ start-up check tests 930000-934000 region but ignores any failure found, mirrored with sprite table region?
+ */
+}
+
+void cps_state::init_slampic2()
+{
+ bootleg_sprite_renderer = &cps_state::slampic2_render_sprites;
+
+ m_bootleg_sprite_ram = std::make_unique<uint16_t[]>(0x2000);
+ m_maincpu->space(AS_PROGRAM).install_ram(0x930000, 0x933fff, m_bootleg_sprite_ram.get());
+ m_maincpu->space(AS_PROGRAM).install_ram(0xff0000, 0xff3fff, m_bootleg_sprite_ram.get());
+
+ m_bootleg_work_ram = std::make_unique<uint16_t[]>(0x20000);
+ m_maincpu->space(AS_PROGRAM).install_ram(0xf00000, 0xf3ffff, m_bootleg_work_ram.get());
+
+ init_cps1();
+}
+
+MACHINE_START_MEMBER(cps_state, slampic2)
+{
+ m_layer_enable_reg = 0x16;
+ m_layer_mask_reg[1] = 0x02;
+ m_layer_mask_reg[2] = 0x28;
+ m_layer_mask_reg[3] = 0x2a;
+ m_layer_scroll1x_offset = 12; // y offset 1px too low
+ m_layer_scroll2x_offset = 14; // y offset 1px too low
+ m_layer_scroll3x_offset = 15; // y offset 1px too low
+ m_sprite_base = 0x1000;
+ m_sprite_list_end_marker = 0xff00;
+ m_sprite_x_offset = 0;
+}
+
+READ16_MEMBER(cps_state::slampic2_cps_a_r)
+{
+ // checks bit 0 of 800132
+ // no sound codes are sent unless this returns true, ready signal from the sound PIC?
+ if (offset == 0x32 / 2)
+ return 0xffff;
+ else
+ logerror("Read from cps-a register %02x\n", offset * 2);
+ return 0;
+}
+
+WRITE16_MEMBER(cps_state::slampic2_sound_w)
+{
+ //logerror("Sound command: %04x\n", data);
+}
+
+WRITE16_MEMBER(cps_state::slampic2_sound2_w)
+{
+ //logerror("Sound2 command: %04x\n", data);
+}
+
+static INPUT_PORTS_START( slampic2 )
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
+ //PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
+ PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("DSWA")
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW(A):1,2,3")
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) // A:cccxxx0x C:xx0xxxxx = coinage (freeplay + "2 coins start" must be off)
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
+ PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW(A):4" )
+ PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW(A):5" )
+ PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW(A):6" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW(A):7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, "2 Coins Start" ) // A:000xxx1x C:xx0xxxxx = 2 coins start (other coinage + freeplay must be off)
+ PORT_DIPNAME( 0x80, 0x80, "Chuter" ) PORT_DIPLOCATION("SW(A):8")
+ PORT_DIPSETTING( 0x80, "Single Chuter" )
+ PORT_DIPSETTING( 0x00, "Multi Chuters" )
+
+ PORT_START("DSWB")
+ PORT_DIPNAME( 0x07, 0x04, "Game Difficulty" ) PORT_DIPLOCATION("SW(B):1,2,3")
+ PORT_DIPSETTING( 0x07, "(0) Extra Easy" )
+ PORT_DIPSETTING( 0x06, "(1) Very Easy" )
+ PORT_DIPSETTING( 0x05, "(2) Easy" )
+ PORT_DIPSETTING( 0x04, "(3) Normal" )
+ PORT_DIPSETTING( 0x03, "(4) Hard" )
+ PORT_DIPSETTING( 0x02, "(5) Very Hard" )
+ PORT_DIPSETTING( 0x01, "(6) Extra Hard" )
+ PORT_DIPSETTING( 0x00, "(7) Hardest" )
+ PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW(B):4" )
+ PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW(B):5" )
+ PORT_DIPNAME( 0x20, 0x20, "Join In") PORT_DIPLOCATION("SW(B):6")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0xc0, 0xc0, "Cabinet" ) PORT_DIPLOCATION("SW(B):7,8")
+ PORT_DIPSETTING( 0xc0, "2 Players Cabinet" )
+ //PORT_DIPSETTING( 0x80, "Invalid" ) // only coin 1 works, credits both player 1 and 2
+ PORT_DIPSETTING( 0x40, "4 Players Cabinet" )
+ PORT_DIPSETTING( 0x00, "2x2 Players Cabinet" ) // only coins 1,3 work, 1 credits 1+2, 2 credits 3+4
+
+ PORT_START("DSWC")
+ PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW(C):1" )
+ PORT_DIPNAME( 0x02, 0x02, "Game Mode" ) PORT_DIPLOCATION("SW(C):2")
+ PORT_DIPSETTING( 0x02, "For Business" )
+ PORT_DIPSETTING( 0x00, "For Photographing" ) // doesn't seem to do anything?
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW(C):3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // A:000xxx0x C:xx1xxxxx = freeplay (other coinage + "2 coins start" must be off)
+ PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5") // doesn't work
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW(C):7")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( On ) )
+ PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW(C):8" )
+
+ PORT_START("IN1")
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
+
+ PORT_START("IN2")
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN4 )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START4 )
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 )
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START3 )
+INPUT_PORTS_END
+
+ROM_START( slampic2 )
+ ROM_REGION( CODE_SIZE, "maincpu", 0 )
+ ROM_LOAD16_BYTE( "4.bin", 0x000000, 0x80000, CRC(105cfefd) SHA1(83a34bc83782ae04be1665a91b44625d24f99466) )
+ ROM_LOAD16_BYTE( "2.bin", 0x000001, 0x80000, CRC(6026c95e) SHA1(8503587941ad14a757ad337dc36591fedcddaa41) )
+ ROM_LOAD16_BYTE( "3.bin", 0x100000, 0x80000, CRC(0effa84a) SHA1(03342bd4cb1de8652bab874c11cb1ecb69a339c7) )
+ ROM_LOAD16_BYTE( "1.bin", 0x100001, 0x80000, CRC(8fcb683a) SHA1(4648656bed010a0c27748df4a78c73c5cae07442) )
+
+ ROM_REGION( 0x600000, "gfx", 0 ) // overall just 2 bytes diff vs official set (slammast)
+ ROM_LOAD64_BYTE( "rom7.bin", 0x000000, 0x40000, CRC(b5669ad3) SHA1(ceb3d2a6d6c1443a40d37c8f2ba5f3cf03315908) ) // ~ slampic 9.bin [1/2] 99.914551% [2/2] IDENTICAL
+ ROM_CONTINUE( 0x000004, 0x40000)
+ ROM_LOAD64_BYTE( "rom8.bin", 0x000001, 0x40000, CRC(f07a6085) SHA1(68795a0f5151a45f053059bc2fe4a622d5e10d8a) ) // ~ slampic 8.bin [1/2] 99.999237% [2/2] IDENTICAL 2 bytes diff
+ ROM_CONTINUE( 0x000005, 0x40000)
+ ROM_LOAD64_BYTE( "rom5.bin", 0x000002, 0x40000, CRC(5321f759) SHA1(7538a6587cf1077921b938070185e0a0ce5ca922) ) // = slampic 7.bin
+ ROM_CONTINUE( 0x000006, 0x40000)
+ ROM_LOAD64_BYTE( "rom6.bin", 0x000003, 0x40000, CRC(c8eb5f76) SHA1(a361d2d2dfe71789736666b744ae5f1e4bf7e1b2) ) // = slampic 6.bin
+ ROM_CONTINUE( 0x000007, 0x40000)
+ ROM_LOAD64_BYTE( "rom11.bin", 0x200000, 0x40000, CRC(21652214) SHA1(039335251f6553c4f36e2d33e8b43fb5726e833e) ) // = slampic 17.bin
+ ROM_CONTINUE( 0x200004, 0x40000)
+ ROM_LOAD64_BYTE( "rom12.bin", 0x200001, 0x40000, CRC(d49d2eb0) SHA1(1af01575340730166975be93bae438e2b0492f98) ) // = slampic 16.bin
+ ROM_CONTINUE( 0x200005, 0x40000)
+ ROM_LOAD64_BYTE( "rom9.bin", 0x200002, 0x40000, CRC(0d98bfd6) SHA1(c11fbf555880a933a4cbf6faa517f59f8443304f) ) // = slampic 15.bin
+ ROM_CONTINUE( 0x200006, 0x40000)
+ ROM_LOAD64_BYTE( "rom10.bin", 0x200003, 0x40000, CRC(807284f1) SHA1(c747c3eaade31c2633fb0a0682dbea900bf2b092) ) // = slampic 14.bin
+ ROM_CONTINUE( 0x200007, 0x40000)
+ ROM_LOAD64_BYTE( "rom15.bin", 0x400000, 0x40000, CRC(293579c5) SHA1(9adafe29664b20834365b339f7ae379cdb9ee138) ) // = slampic 13.bin
+ ROM_CONTINUE( 0x400004, 0x40000)
+ ROM_LOAD64_BYTE( "rom16.bin", 0x400001, 0x40000, CRC(c3727ce7) SHA1(c4abc2c59152c59a45f85393e9525505bc2c9e6e) ) // = slampic 12.bin
+ ROM_CONTINUE( 0x400005, 0x40000)
+ ROM_LOAD64_BYTE( "rom13.bin", 0x400002, 0x40000, CRC(2919883b) SHA1(44ad979daae673c77b3157d2b352797d4ad0ec24) ) // = slampic 11.bin
+ ROM_CONTINUE( 0x400006, 0x40000)
+ ROM_LOAD64_BYTE( "rom14.bin", 0x400003, 0x40000, CRC(f538e620) SHA1(354cd0548b067dfc8782bbe13b0a9c2083dbd290) ) // = slampic 10.bin
+ ROM_CONTINUE( 0x400007, 0x40000)
+
+ // this region contains first 0x40000 bytes of 1st 0x200000 region (rom7/8/5/6.bin)
+ // then, last 0x1c0000 bytes of 3rd 0x200000 region (rom15/16/13/14.bin)
+ // game doesn't seem to need it ???
+ // ROM_LOAD64_BYTE( "rom1.bin", 0x600000, 0x40000, CRC(8f2c41a4) SHA1(097edfbe9c14f299727fe53e4b83a674f7501561) ) // ~ 15.bin
+ // ROM_CONTINUE( 0x600004, 0x40000)
+ // ROM_LOAD64_BYTE( "rom2.bin", 0x600001, 0x40000, CRC(65f3dc43) SHA1(01d9ec3ef913ae235bd98ee6921c366f34547d36) ) // ~ 16.bin
+ // ROM_CONTINUE( 0x600005, 0x40000)
+ // ROM_LOAD64_BYTE( "rom3.bin", 0x600002, 0x40000, CRC(3cd830e3) SHA1(ac1f055c9516efd01bc66b18313cb315705bd2b0) ) // ~ 13.bin
+ // ROM_CONTINUE( 0x600006, 0x40000)
+ // ROM_LOAD64_BYTE( "rom4.bin", 0x600003, 0x40000, CRC(9683dd30) SHA1(8b258b386baff5e06a9b7f176c49507f7e531b95) ) // ~ 14.bin
+ // ROM_CONTINUE( 0x600007, 0x40000)
+
+ ROM_REGION( 0x2000, "audiocpu", 0 ) // NO DUMP - protected PIC
+ ROM_LOAD( "pic_u33.bin", 0x0000, 0x1007, BAD_DUMP CRC(6dba4094) SHA1(ca3362de83205fc6563d16a59b8e6e4bb7ebf4a6) )
+
+ ROM_REGION( 0x140000, "oki", 0 )
+ ROM_LOAD( "v1.bin", 0x000000, 0x40000, CRC(8962b469) SHA1(91dc12610a0b780ee2b314cd346182d97279c175) ) // 27c020 w/ sticker "7"
+ ROM_LOAD( "v2.bin", 0x040000, 0x80000, CRC(6687df38) SHA1(d1015ae089fab5c5b4d1ab51b20f3aa6b77ed348) ) // 27c4000
+ ROM_LOAD( "v3.bin", 0x0c0000, 0x80000, CRC(5782baee) SHA1(c01f8cd08d0c7b78c010ce3f1567383b7435de9f) ) // 27c4000
+
+ ROM_REGION( 0x10000, "user1", 0 )
+ ROM_LOAD( "24.bin", 0x00000, 0x10000, CRC(13ea1c44) SHA1(5b05fe4c3920e33d94fac5f59e09ff14b3e427fe) ) // = various sf2 bootlegs (sf2ebbl etc.) "unknown (bootleg priority?)"
+
+ /* pld devices:
+ #1 P7 palce16V8 todo...
+ #2 P1 palce16V8 secured, bruteforce ok
+ #3 P18 palce16V8 todo...
+ #4 P17 palce16V8 todo...
+ #5 P15 palce16V8 todo...
+ #6 P4 palce16V8 todo...
+ #7 P5 palce16V8 todo...
+ #8 P6 palce16V8 todo...
+ #9 P10 palce20V8 todo...
+ #10 P8 palce20V8 secured
+ #11 P14 palce20V8 todo...
+ #12 P9 palce16V8 todo...
+ #13 P11 palce16V8 todo...
+ #14 P16 palce16V8 todo...
+ #15 P2 palce16V8 todo...
+ #16 P21 palce16V8 todo...
+ #17 P3 palce16V8 todo...
+ #18 P12 palce20V8 todo...
+ #19 P13 palce22V10 todo...
+ #20 U14 tpc1020afn-084c unattempted
+ */
+ ROM_REGION( 0x0200, "plds", 0 ) // sound
+ ROM_LOAD( "2_gal16v8.p1", 0x0000, 0x0117, CRC(a944ff96) SHA1(2871a1c70b91fcd8628e63497afa1275f3a27f93) )
+ROM_END
+
// ************************************************************************* DRIVER MACROS
@@ -3379,7 +3915,8 @@ GAME( 1992, sf2b2, sf2, sf2b, sf2mdt, cps_state, init_sf2mdtb,
GAME( 1992, sf2m9, sf2ce, sf2m1, sf2, cps_state, init_sf2m1, ROT0, "bootleg", "Street Fighter II': Champion Edition (M9, bootleg)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 920313 ETC
-GAME( 1993, slampic, slammast, slampic, slammast, cps_state, init_dinopic, ROT0, "bootleg", "Saturday Night Slam Masters (bootleg with PIC16c57)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930713 ETC
+GAME( 1993, slampic, slammast, slampic, slampic, cps_state, init_dinopic, ROT0, "bootleg", "Saturday Night Slam Masters (bootleg with PIC16c57, set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930713 ETC
+GAME( 1993, slampic2, 0, slampic2, slampic2, cps_state, init_slampic2, ROT0, "bootleg", "Saturday Night Slam Masters (bootleg with PIC16c57, set 2)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930713 ETC
GAME( 1999, sgyxz, wof, sgyxz, sgyxz, cps_state, init_cps1, ROT0, "bootleg (All-In Electronic)", "Warriors of Fate ('sgyxz' bootleg)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 921005 - Sangokushi 2
GAME( 1999, wofabl, wof, wofabl, wofabl, cps_state, init_wofabl, ROT0, "bootleg", "Sangokushi II (bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // heavy graphics glitches - 921005 - Sangokushi 2
diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h
index a322d9315bf..85d5b6540f3 100644
--- a/src/mame/includes/cps1.h
+++ b/src/mame/includes/cps1.h
@@ -129,6 +129,7 @@ protected:
, m_soundlatch2(*this, "soundlatch2")
, m_region_stars(*this, "stars")
, m_led_cboard(*this, "led_cboard%u", 0U)
+ , bootleg_sprite_renderer(fcrash_render_sprites)
{ }
public:
@@ -217,6 +218,7 @@ public:
void init_sf2mdtb();
void init_sf2b();
void init_slampic();
+ void init_slampic2();
void init_wofabl();
DECLARE_MACHINE_START(fcrash);
DECLARE_MACHINE_RESET(fcrash);
@@ -228,6 +230,7 @@ public:
DECLARE_MACHINE_START(punipic);
DECLARE_MACHINE_START(sf2mdt);
DECLARE_MACHINE_START(slampic);
+ DECLARE_MACHINE_START(slampic2);
DECLARE_MACHINE_START(sgyxz);
DECLARE_WRITE16_MEMBER(cawingbl_soundlatch_w);
DECLARE_WRITE16_MEMBER(dinopic_layer_w);
@@ -240,6 +243,10 @@ public:
DECLARE_WRITE16_MEMBER(sf2mdta_layer_w);
DECLARE_WRITE16_MEMBER(sf2b_layer_w);
DECLARE_WRITE16_MEMBER(slampic_layer_w);
+ DECLARE_WRITE16_MEMBER(slampic_layer2_w);
+ DECLARE_READ16_MEMBER(slampic2_cps_a_r);
+ DECLARE_WRITE16_MEMBER(slampic2_sound_w);
+ DECLARE_WRITE16_MEMBER(slampic2_sound2_w);
DECLARE_WRITE16_MEMBER(fcrash_soundlatch_w);
DECLARE_WRITE8_MEMBER(fcrash_snd_bankswitch_w);
DECLARE_WRITE8_MEMBER(sf2mdt_snd_bankswitch_w);
@@ -250,6 +257,7 @@ public:
uint32_t screen_update_fcrash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void fcrash_update_transmasks();
void fcrash_render_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void slampic2_render_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void fcrash_render_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int primask);
void fcrash_render_high_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer);
void fcrash_build_palette();
@@ -282,6 +290,7 @@ public:
void punipic(machine_config &config);
void dinopic(machine_config &config);
void slampic(machine_config &config);
+ void slampic2(machine_config &config);
void sf2b(machine_config &config);
void knightsb(machine_config &config);
void fcrash(machine_config &config);
@@ -318,6 +327,7 @@ public:
void sgyxz_sound_map(address_map &map);
void wofabl_map(address_map &map);
void slampic_map(address_map &map);
+ void slampic2_map(address_map &map);
void sound_map(address_map &map);
void sub_map(address_map &map);
void varthb_map(address_map &map);
@@ -334,7 +344,7 @@ protected:
uint16_t * m_scroll3;
uint16_t * m_obj;
uint16_t * m_other;
- std::unique_ptr<uint16_t[]> m_buffered_obj;
+ std::unique_ptr<uint16_t[]> m_buffered_obj;
optional_shared_ptr<uint8_t> m_qsound_sharedram1;
optional_shared_ptr<uint8_t> m_qsound_sharedram2;
std::unique_ptr<uint8_t[]> m_decrypt_kabuki;
@@ -378,12 +388,12 @@ protected:
int m_palette_align;
int m_palette_size;
int m_stars_rom_size;
- uint8_t m_empty_tile[32*32];
+ uint8_t m_empty_tile[32*32];
int m_cps_version;
/* fcrash video config */
- uint8_t m_layer_enable_reg;
- uint8_t m_layer_mask_reg[4];
+ uint8_t m_layer_enable_reg;
+ uint8_t m_layer_mask_reg[4];
int m_layer_scroll1x_offset;
int m_layer_scroll2x_offset;
int m_layer_scroll3x_offset;
@@ -407,6 +417,9 @@ protected:
optional_device<generic_latch_8_device> m_soundlatch2;
optional_memory_region m_region_stars;
output_finder<3> m_led_cboard;
+
+ // fcrash
+ void (cps_state::*bootleg_sprite_renderer)(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
class cps2_state : public cps_state
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 8f1b91daed2..1f80661c66d 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -10558,6 +10558,7 @@ sf2acca // hack
sf2accp2 // hack
sf2amf // bootleg
sf2amf2 // bootleg
+sf2amf3 // bootleg
sf2bhh // hack
sf2ce // 13/05/1992 (c) 1992 (World)
sf2ceblp // hack
@@ -13190,6 +13191,7 @@ sf2mdta // bootleg
sf2mdtb // bootleg
sgyxz // bootleg (All-In Electronics)
slampic // bootleg
+slampic2 // bootleg
varthb // bootleg
wofabl // bootleg
diff --git a/src/mame/video/cps1.cpp b/src/mame/video/cps1.cpp
index 83deee41550..c3c6a8ddf5f 100644
--- a/src/mame/video/cps1.cpp
+++ b/src/mame/video/cps1.cpp
@@ -1406,6 +1406,7 @@ static const struct gfx_range mapper_pokonyan_table[] =
{ 0 }
};
+// a game without an entry here defaults to cps2 mapper (eg. some games in fcrash.cpp)
static const struct CPS1config cps1_config_table[]=
{
/* name CPSB gfx mapper in2 in3 out2 kludge */
@@ -1559,6 +1560,7 @@ static const struct CPS1config cps1_config_table[]=
{"sf2accp2", CPS_B_21_DEF, mapper_S9263B, 0x36 },
{"sf2amf", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, // probably wrong but this set is not completely dumped anyway
{"sf2amf2", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 },
+ {"sf2amf3", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 },
{"sf2dkot2", CPS_B_21_DEF, mapper_S9263B, 0x36 },
{"sf2level", HACK_B_1, mapper_S9263B, 0, 0, 0, 2 },
{"sf2m1", CPS_B_21_DEF, mapper_S9263B, 0x36 },
@@ -1620,6 +1622,7 @@ static const struct CPS1config cps1_config_table[]=
{"slammast", CPS_B_21_QS4, mapper_MB63B },
{"slammastu", CPS_B_21_QS4, mapper_MB63B },
{"slampic", CPS_B_21_QS4, mapper_MB63B },
+ {"slampic2", CPS_B_21_QS4, mapper_sfzch }, // default cps2 mapper breaks scroll layers
{"mbomberj", CPS_B_21_QS4, mapper_MB63B },
{"mbombrd", CPS_B_21_QS5, mapper_MB63B },
{"mbombrdj", CPS_B_21_QS5, mapper_MB63B },