summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/gaelco2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/gaelco2.cpp')
-rw-r--r--src/mame/drivers/gaelco2.cpp194
1 files changed, 66 insertions, 128 deletions
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index c88b17d3a62..3ad58c17c29 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -554,59 +554,8 @@ Note 1x 28x2 edge connector
1x trimmer (volume)
1x battery 3V (bt1)
-see
-http://web.archive.org/web/20001206204300/http://luckysunshine.com/products/gameboards/play2000.html
-
*/
-
-READ16_MEMBER(gaelco2_state::play2000_shareram_68k_r)
-{
- int pc = m_maincpu->pc();
- uint16_t ret = m_shareram[offset];
-
- // checks at 0x00814, 0x23504, 0x2340a after writing command?
- if (offset * 2 == 0x4020)
- {
- if (pc == 0x00814) return 0x0900;
- else return 0x0000;
- }
-
- // checks at 0x23310, 0x2334a
- if (offset * 2 == 0x4008)
- {
- return 0x0000;
- }
-
- if (offset * 2 < 0x1000)
- {
- // It seems one of the commands puts a 0x1000 worth of data at the start of shared RAM
- // the game checks various values in it before booting. It's possible the game is primarily
- // using the DS5002FP for the SRAM capabilities rather than protection.
- if (offset * 2 == 0x42c) return 0x0000;
- if (offset * 2 == 0x42e) return 0x00f0;
- if (offset * 2 == 0xc04) return 0x7171;
- // return 0x0000;
- }
-
- logerror("%04x read from shareram %04x %04x %04x\n", pc, offset * 2, mem_mask, ret & mem_mask);
-
- return ret;
-}
-
-WRITE16_MEMBER(gaelco2_state::play2000_shareram_68k_w)
-{
- int pc = m_maincpu->pc();
-
- COMBINE_DATA(&m_shareram[offset]);
-
- if (pc == 0x00552) return; // initial RAM check
- if (pc == 0x232f4) return; // 'updating board'
-
- logerror("%04x write to shareram %04x %04x %04x\n", pc, offset * 2, mem_mask, data & mem_mask);
-}
-
-
void gaelco2_state::play2000_map(address_map &map)
{
map(0x000000, 0x03ffff).rom(); /* ROM */
@@ -621,82 +570,70 @@ void gaelco2_state::play2000_map(address_map &map)
map(0x21800a, 0x218fff).ram(); /* Written to, but unused? */
// AM_RANGE(0x843100, 0x84315e) ?
map(0xfe0000, 0xfe7fff).ram(); /* Work RAM */
- map(0xfe8000, 0xfeffff).rw(FUNC(gaelco2_state::play2000_shareram_68k_r), FUNC(gaelco2_state::play2000_shareram_68k_w)).share("shareram"); /* Work RAM */
+ map(0xfe8000, 0xfeffff).ram().share("shareram"); /* Work RAM */
}
static INPUT_PORTS_START( play2000 )
PORT_START("IN0")
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) // cycles through games in attract?
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) // shows odds if coins are present?
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 )
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 )
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON6 )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON7 )
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin1
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) // NoteA
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // cycles through games in attract?
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // shows odds if coins are present?
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD3 )
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_POKER_HOLD4 )
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_POKER_HOLD5 )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
- PORT_DIPNAME( 0x0001, 0x0001, "IN1" )
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN3 ) // NoteB
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN4 ) // NoteC
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN5 ) // NoteD
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Incassa") PORT_CODE(KEYCODE_H) // what standard button would this be?
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // "Play"
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 )
PORT_SERVICE_NO_TOGGLE( 0x0040, IP_ACTIVE_LOW )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Collect") PORT_CODE(KEYCODE_G) // what standard button would this be?
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
+
+void gaelco2_state::init_play2000_70i()
+{
+ // HACK
+ // the game will randomly hang on scene transitions waiting for the sound trigger / length to be clear
+ // this might be related to the problems with Touch and Go not playing all sound effects too.
+ // for now patch it
+ uint16_t *rom = (uint16_t *)memregion("maincpu")->base();
+ rom[0x23c4e/2] = 0x4e71;
+
+ m_global_spritexoff = 1; // aligns flashing sprites with backgrounds
+}
+
+void gaelco2_state::init_play2000_40i()
+{
+ // see init_play2000
+ uint16_t *rom = (uint16_t *)memregion("maincpu")->base();
+ rom[0x232ae/2] = 0x4e71;
+
+ m_global_spritexoff = 1; // aligns flashing sprites with backgrounds
+}
+
ROM_START( play2000 )
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "tms27c010a.2", 0x000000, 0x020000, CRC(598102f9) SHA1(66fb6d321c886099b99d048d1f9f13cf016b9c43) )
ROM_LOAD16_BYTE( "tms27c010a.1", 0x000001, 0x020000, CRC(e2b5d79a) SHA1(f004352ddb9bc92aab126627689b45b2ef8583b1) )
- ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */
- ROM_LOAD( "ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
+ ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code - had 7.0 sticker on too */
+ // This has only been dumped from a single MCU, so there is potential for bad bits as there is risk in the dumping process. The majority of the ROM is data and thus difficult to verify.
+ // The game still seems to get 'stuck' on some win conditions in attract (but doesn't hang, you can still coin up) it warrants investigation to see if this is MCU related and if anything
+ // odd happens during normal gameplay. It could just be poor design.
+ ROM_LOAD( "ds5002fp_70i.mcu", 0x00000, 0x8000, BAD_DUMP CRC(b51ad3da) SHA1(4a730238b4b875c74dd2e4df6e7880d03659b7d5) )
ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 )
- //DS5002FP_SET_MON( x )
- //DS5002FP_SET_RPCTL( x )
- //DS5002FP_SET_CRCR( x )
+ DS5002FP_SET_MON( 0x79 )
+ DS5002FP_SET_RPCTL( 0x00 )
+ DS5002FP_SET_CRCR( 0x80 )
ROM_REGION( 0x0a00000, "gfx1", 0 ) /* GFX + Sound */
ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) /* GFX + Sound*/
@@ -710,18 +647,19 @@ ROM_START( play2000 )
ROM_END
-ROM_START( play2000a ) /* there are version 4.0 and version 1.0 strings in this, go with the higher one */
+ROM_START( play2000_40i ) /* there are version 4.0 and version 1.0 strings in this, go with the higher one */
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "2.u39_v4", 0x000000, 0x020000, CRC(fff16141) SHA1(8493c3e58a231c03b152b336f43422a9a2d2618c) )
ROM_LOAD16_BYTE( "1.u40_v4", 0x000001, 0x020000, CRC(39f9d58e) SHA1(1cbdae2adc570f2a2e10a707075312ef717e2643) )
ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */
- ROM_LOAD( "ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
+ // this is the same dump as from the play7000 MCU but with valid default data for this set
+ ROM_LOAD( "ds5002fp_40i.mcu", 0x00000, 0x8000, BAD_DUMP CRC(7c45cdf2) SHA1(64aee4d77e0715342634e6eadb83dae4a2db9dfd) )
ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 )
- //DS5002FP_SET_MON( x )
- //DS5002FP_SET_RPCTL( x )
- //DS5002FP_SET_CRCR( x )
+ DS5002FP_SET_MON( 0x79 )
+ DS5002FP_SET_RPCTL( 0x00 )
+ DS5002FP_SET_CRCR( 0x80 )
ROM_REGION( 0x0a00000, "gfx1", 0 ) /* GFX + Sound */
ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) /* GFX + Sound*/
@@ -769,19 +707,20 @@ REF: 990315
| |------------| |
-----------------------------------------------------------------------------|
*/
-ROM_START( play2000b )
+ROM_START( play2000_50i )
/*at least 1.u40 is bad, on every 0x40 bytes the first four are always 0xff.*/
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "2.u39", 0x000000, 0x020000, BAD_DUMP CRC(9939299e) SHA1(55303a2adf199f4b5a60f57be7480b0e119f8624) )
ROM_LOAD16_BYTE( "1.u40", 0x000001, 0x020000, BAD_DUMP CRC(311c2f94) SHA1(963d6b5f479598145146fcb8b7c6ce77fbc92b07) )
ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */
- ROM_LOAD( "ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
+ // can't create an initialized default for this one as the main program is bad
+ ROM_LOAD( "ds5002fp_50i.mcu", 0x00000, 0x8000, NO_DUMP )
ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 )
- //DS5002FP_SET_MON( x )
- //DS5002FP_SET_RPCTL( x )
- //DS5002FP_SET_CRCR( x )
+ DS5002FP_SET_MON( 0x79 )
+ DS5002FP_SET_RPCTL( 0x00 )
+ DS5002FP_SET_CRCR( 0x80 )
ROM_REGION( 0x0a00000, "gfx1", 0 ) /* GFX + Sound */
ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) /* GFX + Sound*/
@@ -801,8 +740,7 @@ void gaelco2_state::play2000(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::play2000_map);
m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold));
- // MCFG_DEVICE_ADD("gaelco_ds5002fp", GAELCO_DS5002FP, XTAL(11'059'200)) /* 11.0592MHz */
- // MCFG_DEVICE_ADDRESS_MAP(0, mcu_hostmem_map)
+ GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(32'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); /* 16 MHz */
/* video hardware */
BUFFERED_SPRITERAM16(config, m_spriteram);
@@ -825,9 +763,9 @@ void gaelco2_state::play2000(machine_config &config)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco")); /* unused? ROMs contain no sound data */
+ gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco"));
gaelco.set_snd_data_tag("gfx1");
- gaelco.set_bank_offsets(1 * 0x0080000, 1 * 0x0080000, 1 * 0x0080000, 1 * 0x0080000); // ?
+ gaelco.set_bank_offsets(0 * 0x080000, 0 * 0x080000, 0 * 0x080000, 0 * 0x080000);
gaelco.add_route(0, "lspeaker", 1.0);
gaelco.add_route(1, "rspeaker", 1.0);
}
@@ -2404,9 +2342,9 @@ GAME( 1998, bang, 0, bang, bang, bang_state, i
GAME( 1998, bangj, bang, bang, bang, bang_state, init_bang, ROT0, "Gaelco", "Gun Gabacho (Japan)", 0 )
// 2-in-1 gambling game, appears to be cloned Gaelco hardware complete with DS5002FP, or possibly manufactured by Gaelco for Nova Desitec but without any Gaelco branding.
-GAME( 1999, play2000, 0, play2000, play2000, gaelco2_state, empty_init, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v7.0i) (Italy)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
-GAME( 1999, play2000a, play2000, play2000, play2000, gaelco2_state, empty_init, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v4.0i) (Italy)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
-GAME( 1999, play2000b, play2000, play2000, play2000, gaelco2_state, empty_init, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v5.0i) (Italy)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // bad dump
+GAME( 1999, play2000, 0, play2000, play2000, gaelco2_state, init_play2000_70i,ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v7.0i) (Italy)", 0 )
+GAME( 1999, play2000_50i,play2000, play2000, play2000, gaelco2_state, empty_init, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v5.0i) (Italy)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // bad dump
+GAME( 1999, play2000_40i,play2000, play2000, play2000, gaelco2_state, init_play2000_40i,ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v4.0i) (Italy)", 0 )
// Gym exercise bike
GAME( 1997, saltcrdi, 0, saltcrdi, saltcrdi, gaelco2_state, empty_init, ROT0, "Salter Fitness / Gaelco", "Pro Tele Cardioline (Salter Fitness Bike V.1.0, Checksum 02AB)", MACHINE_NOT_WORKING ) // there are other machines in the Cardioline series, without TV displays