summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2021-01-28 14:43:32 +0100
committer Dirk Best <mail@dirk-best.de>2021-01-29 01:48:04 +0100
commita1d81a25d58995df952a5f7b5d17e87503d20a89 (patch)
tree16c61f4f8b200a40481a9d33fa5d7f0644a83d04
parentf6b89fdf38b0dcbbadc4d8842d6670bfa7bfe8dc (diff)
luckgrln: Minor corrections
- Add dip switch locations - Change service switch type to not toggle on 7smash - Add screen raw parameters - Add anonymous namespace
-rw-r--r--src/mame/drivers/luckgrln.cpp109
1 files changed, 59 insertions, 50 deletions
diff --git a/src/mame/drivers/luckgrln.cpp b/src/mame/drivers/luckgrln.cpp
index 5bce0b7dc62..91ebc1363c9 100644
--- a/src/mame/drivers/luckgrln.cpp
+++ b/src/mame/drivers/luckgrln.cpp
@@ -87,6 +87,10 @@
#include "luckgrln.lh"
#include "7smash.lh"
+
+namespace {
+
+
class luckgrln_state : public driver_device
{
public:
@@ -97,6 +101,7 @@ public:
m_reel_scroll(*this, "reel_scroll.%u", 0U),
m_luck_vram(*this, "luck_vram.%u", 0U),
m_maincpu(*this, "maincpu"),
+ m_screen(*this, "screen"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_palette_ram(*this, "palette", 0x1000, ENDIANNESS_LITTLE),
@@ -118,6 +123,7 @@ private:
required_shared_ptr_array<uint8_t, 3> m_luck_vram;
required_device<hd647180x_device> m_maincpu;
+ required_device<screen_device> m_screen;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
memory_share_creator<uint8_t> m_palette_ram;
@@ -563,59 +569,59 @@ static INPUT_PORTS_START( luckgrln )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Books SW")
PORT_START("DSW1") //DIP SW 1
- PORT_DIPNAME( 0x01, 0x01, "Auto Hold" )
+ PORT_DIPNAME( 0x01, 0x01, "Auto Hold" ) PORT_DIPLOCATION("DSW1:1")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x02, 0x02, "Game Type" )
+ PORT_DIPNAME( 0x02, 0x02, "Game Type" ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, "Hold Game" )
PORT_DIPSETTING( 0x00, "Discard Game" )
- PORT_DIPNAME( 0x04, 0x04, "Adult Content" )
+ PORT_DIPNAME( 0x04, 0x04, "Adult Content" ) PORT_DIPLOCATION("DSW1:3")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x04, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x08, 0x08, "DSW1-08" )
+ PORT_DIPNAME( 0x08, 0x08, "DSW1-08" ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "Minimal Winning Hand" )
+ PORT_DIPNAME( 0x10, 0x10, "Minimal Winning Hand" ) PORT_DIPLOCATION("DSW1:5")
PORT_DIPSETTING( 0x10, "Jacks or Better" )
PORT_DIPSETTING( 0x00, "2 Pairs" )
- PORT_DIPNAME( 0x20, 0x20, "Minimum Bet" )
+ PORT_DIPNAME( 0x20, 0x20, "Minimum Bet" ) PORT_DIPLOCATION("DSW1:6")
PORT_DIPSETTING( 0x20, "1" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x40, 0x40, "DSW1-40 (Do Not Use)" )
+ PORT_DIPNAME( 0x40, 0x40, "DSW1-40 (Do Not Use)" ) PORT_DIPLOCATION("DSW1:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DSW1-80 (Do Not Use)" )
+ PORT_DIPNAME( 0x80, 0x80, "DSW1-80 (Do Not Use)" ) PORT_DIPLOCATION("DSW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW2") //DIP SW 2
- PORT_DIPNAME( 0x01, 0x01, "DSW2-01 (Do Not Use)" )
+ PORT_DIPNAME( 0x01, 0x01, "DSW2-01 (Do Not Use)" ) PORT_DIPLOCATION("DSW2:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DSW2-02 (Do Not Use)" )
+ PORT_DIPNAME( 0x02, 0x02, "DSW2-02 (Do Not Use)" ) PORT_DIPLOCATION("DSW2:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DSW2-04 (Do Not Use)" )
+ PORT_DIPNAME( 0x04, 0x04, "DSW2-04 (Do Not Use)" ) PORT_DIPLOCATION("DSW2:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DSW2-08 (Do Not Use)" )
+ PORT_DIPNAME( 0x08, 0x08, "DSW2-08 (Do Not Use)" ) PORT_DIPLOCATION("DSW2:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DSW2-10" )
+ PORT_DIPNAME( 0x10, 0x10, "DSW2-10" ) PORT_DIPLOCATION("DSW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DSW2-20" )
+ PORT_DIPNAME( 0x20, 0x20, "DSW2-20" ) PORT_DIPLOCATION("DSW2:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DSW2-40" )
+ PORT_DIPNAME( 0x40, 0x40, "DSW2-40" ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DSW2-80" )
+ PORT_DIPNAME( 0x80, 0x80, "DSW2-80" ) PORT_DIPLOCATION("DSW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW3")
- PORT_DIPNAME( 0x07, 0x04, "Key In" )
+ PORT_DIPNAME( 0x07, 0x04, "Key In" ) PORT_DIPLOCATION("DSW3:1,2,3")
PORT_DIPSETTING( 0x07, "1 Pulse/5 Credits" )
PORT_DIPSETTING( 0x06, "1 Pulse/10 Credits" )
PORT_DIPSETTING( 0x05, "1 Pulse/50 Credits" )
@@ -624,7 +630,7 @@ static INPUT_PORTS_START( luckgrln )
PORT_DIPSETTING( 0x02, "1 Pulse/300 Credits" )
PORT_DIPSETTING( 0x01, "1 Pulse/500 Credits" )
PORT_DIPSETTING( 0x00, "1 Pulse/1000 Credits" )
- PORT_DIPNAME( 0x38, 0x10, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x38, 0x10, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW3:4,5,6")
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 1C_4C ) )
@@ -633,15 +639,15 @@ static INPUT_PORTS_START( luckgrln )
PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" )
PORT_DIPSETTING( 0x08, "1 Coin/25 Credits" )
PORT_DIPSETTING( 0x00, "1 Coin/50 Credits" )
- PORT_DIPNAME( 0x40, 0x40, "DSW3-40" )
+ PORT_DIPNAME( 0x40, 0x40, "DSW3-40" ) PORT_DIPLOCATION("DSW3:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DSW3-80" )
+ PORT_DIPNAME( 0x80, 0x80, "DSW3-80" ) PORT_DIPLOCATION("DSW3:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW4")
- PORT_DIPNAME( 0x0f, 0x04, "Coin C" )
+ PORT_DIPNAME( 0x0f, 0x04, "Coin C" ) PORT_DIPLOCATION("DSW4:1,2,3,4")
PORT_DIPSETTING( 0x0f, "10 Coins/1 Credit" )
PORT_DIPSETTING( 0x0e, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x0d, "5 Coins/2 Credits" )
@@ -658,7 +664,7 @@ static INPUT_PORTS_START( luckgrln )
PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" )
PORT_DIPSETTING( 0x01, "1 Coin/50 Credits" )
PORT_DIPSETTING( 0x00, "1 Coin/100 Credits" )
- PORT_DIPNAME( 0x70, 0x10, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x70, 0x10, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW4:5,6,7")
PORT_DIPSETTING( 0x70, "10 Coins/1 Credit" )
PORT_DIPSETTING( 0x60, DEF_STR( 9C_1C ) )
PORT_DIPSETTING( 0x50, DEF_STR( 6C_1C ) )
@@ -667,32 +673,32 @@ static INPUT_PORTS_START( luckgrln )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, "1 Coin/200 Credits" )
- PORT_DIPNAME( 0x80, 0x80, "DSW4-80" )
+ PORT_DIPNAME( 0x80, 0x80, "DSW4-80" ) PORT_DIPLOCATION("DSW4:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW5") //DIP SW 5
- PORT_DIPNAME( 0x01, 0x01, "DSW5-01 (Do Not Use)" )
+ PORT_DIPNAME( 0x01, 0x01, "DSW5-01 (Do Not Use)" ) PORT_DIPLOCATION("DSW5:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DSW5-02 (Do Not Use)" )
+ PORT_DIPNAME( 0x02, 0x02, "DSW5-02 (Do Not Use)" ) PORT_DIPLOCATION("DSW5:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DSW5-04" )
+ PORT_DIPNAME( 0x04, 0x04, "DSW5-04" ) PORT_DIPLOCATION("DSW5:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x18, 0x18, "Double-Up" )
+ PORT_DIPNAME( 0x18, 0x18, "Double-Up" ) PORT_DIPLOCATION("DSW5:4,5")
PORT_DIPSETTING( 0x18, "Double-Up (Normal)" )
PORT_DIPSETTING( 0x08, "Double-Up Poker" )
PORT_DIPSETTING( 0x10, "Double-Up Bingo" )
PORT_DIPSETTING( 0x00, "No Double-Up" )
- PORT_DIPNAME( 0x20, 0x20, "DSW5-20" )
+ PORT_DIPNAME( 0x20, 0x20, "DSW5-20" ) PORT_DIPLOCATION("DSW5:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DSW5-40" )
+ PORT_DIPNAME( 0x40, 0x40, "DSW5-40" ) PORT_DIPLOCATION("DSW5:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DSW5-80" )
+ PORT_DIPNAME( 0x80, 0x80, "DSW5-80" ) PORT_DIPLOCATION("DSW5:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
@@ -700,18 +706,18 @@ INPUT_PORTS_END
static INPUT_PORTS_START( _7smash )
PORT_START("DSW1")
- PORT_DIPNAME( 0x01, 0x01, "Reel Speed" )
+ PORT_DIPNAME( 0x01, 0x01, "Reel Speed" ) PORT_DIPLOCATION("DSW1:1")
PORT_DIPSETTING( 0x01, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
- PORT_DIPNAME( 0x02, 0x02, "Renchan Pattern" )
+ PORT_DIPNAME( 0x02, 0x02, "Renchan Pattern" ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
- PORT_DIPNAME( 0x0c, 0x0c, "Key In Value" )
+ PORT_DIPNAME( 0x0c, 0x0c, "Key In Value" ) PORT_DIPLOCATION("DSW1:3,4")
PORT_DIPSETTING( 0x00, "200" )
PORT_DIPSETTING( 0x04, "100" )
PORT_DIPSETTING( 0x08, "50" )
PORT_DIPSETTING( 0x0c, "10" )
- PORT_DIPNAME( 0x70, 0x60, "Percentage" )
+ PORT_DIPNAME( 0x70, 0x60, "Percentage" ) PORT_DIPLOCATION("DSW1:5,6,7")
PORT_DIPSETTING( 0x00, "-- (Invalid 1)" )
PORT_DIPSETTING( 0x10, "-- (Invalid 2)" )
PORT_DIPSETTING( 0x20, "-- (Invalid 3)" )
@@ -720,45 +726,45 @@ static INPUT_PORTS_START( _7smash )
PORT_DIPSETTING( 0x50, "90%" )
PORT_DIPSETTING( 0x60, "95%" )
PORT_DIPSETTING( 0x70, "105%" )
- PORT_DIPNAME( 0x80, 0x80, "Reset Mode" )
+ PORT_DIPNAME( 0x80, 0x80, "Reset Mode" ) PORT_DIPLOCATION("DSW1:8")
PORT_DIPSETTING( 0x80, "Auto" )
PORT_DIPSETTING( 0x00, "Manual" )
PORT_START("DSW2")
- PORT_DIPNAME( 0x03, 0x03, "Payout Mode" )
+ PORT_DIPNAME( 0x03, 0x03, "Payout Mode" ) PORT_DIPLOCATION("DSW2:1,2")
PORT_DIPSETTING( 0x00, "0" )
PORT_DIPSETTING( 0x01, "1" )
PORT_DIPSETTING( 0x02, "2" )
PORT_DIPSETTING( 0x03, "3" )
- PORT_DIPNAME( 0x04, 0x04, "Coin Sw Active" )
+ PORT_DIPNAME( 0x04, 0x04, "Coin Sw Active" ) PORT_DIPLOCATION("DSW2:3")
PORT_DIPSETTING( 0x04, DEF_STR( Low ) )
PORT_DIPSETTING( 0x00, DEF_STR( High ) )
- PORT_DIPNAME( 0x18, 0x00, "Hopper Limit" )
+ PORT_DIPNAME( 0x18, 0x00, "Hopper Limit" ) PORT_DIPLOCATION("DSW2:4,5")
PORT_DIPSETTING( 0x00, "Unlimited" )
PORT_DIPSETTING( 0x08, "1000" )
PORT_DIPSETTING( 0x10, "500" )
PORT_DIPSETTING( 0x18, "300" )
- PORT_DIPNAME( 0x60, 0x60, "Panel Type" )
+ PORT_DIPNAME( 0x60, 0x60, "Panel Type" ) PORT_DIPLOCATION("DSW2:6,7")
PORT_DIPSETTING( 0x00, "D" )
PORT_DIPSETTING( 0x20, "C" )
PORT_DIPSETTING( 0x40, "B" )
PORT_DIPSETTING( 0x60, "A" ) // inputs and layout are for this Panel Type only, ToDo: expand with conditional inputs
- PORT_DIPNAME( 0x80, 0x80, "Alt. Test" )
+ PORT_DIPNAME( 0x80, 0x80, "Alt. Test" ) PORT_DIPLOCATION("DSW2:8") // not shown on test screen
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW3")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW3:1,2")
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW3:3,4")
PORT_DIPSETTING( 0x0c, "10 Coins/1 Credit" )
PORT_DIPSETTING( 0x08, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPNAME( 0xf0, 0x00, "Coin C" )
+ PORT_DIPNAME( 0xf0, 0x00, "Coin C" ) PORT_DIPLOCATION("DSW3:5,6,7,8")
PORT_DIPSETTING( 0x00, "1 Coin/200 Credits" )
PORT_DIPSETTING( 0x10, "1 Coin/100 Credits" )
PORT_DIPSETTING( 0x20, "1 Coin/50 Credits" )
@@ -807,7 +813,7 @@ static INPUT_PORTS_START( _7smash )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) //PORT_NAME("Hopper Coin Empty SW")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
- PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
+ PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
INPUT_PORTS_END
@@ -860,12 +866,9 @@ void luckgrln_state::luckgrln(machine_config &config)
MSM6242(config, "rtc", 0);
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- screen.set_size(512, 256);
- screen.set_visarea(0, 512-1, 0, 256-1);
- screen.set_screen_update(FUNC(luckgrln_state::screen_update));
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(12_MHz_XTAL, 752, 0, 512, 274, 0, 256);
+ m_screen->set_screen_update(FUNC(luckgrln_state::screen_update));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_luckgrln);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048);
@@ -880,6 +883,9 @@ void luckgrln_state::_7smash(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &luckgrln_state::_7smash_io);
m_maincpu->in_pg_callback().set(FUNC(luckgrln_state::test_r));
+ // slightly different timings
+ m_screen->set_raw(12_MHz_XTAL, 768, 0, 512, 260, 0, 256);
+
config.device_remove("rtc");
}
@@ -953,6 +959,9 @@ ROM_START( 7smash )
ROM_END
+} // anonymous namespace
+
+
/*********************************************
* Game Drivers *
**********************************************/