summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author MetalliC <0vetal0@gmail.com>2020-09-22 12:57:52 +0300
committer MetalliC <0vetal0@gmail.com>2020-09-22 12:57:52 +0300
commit581eab1be805129145b4e33297afd288c3c90edd (patch)
treeb14aff12c3286b6672d2d9b30ce2c52e5733cf9a
parentbccf4ac2cac97067972e74d5b681193c7e2ec80b (diff)
quickpick5.cpp checkpoint: rename goemedal to waijockey, add quickpick5 serial IO device, input ports
-rw-r--r--src/mame/drivers/quickpick5.cpp428
-rw-r--r--src/mame/mame.lst2
2 files changed, 297 insertions, 133 deletions
diff --git a/src/mame/drivers/quickpick5.cpp b/src/mame/drivers/quickpick5.cpp
index 5acc06b84e5..81a268007bc 100644
--- a/src/mame/drivers/quickpick5.cpp
+++ b/src/mame/drivers/quickpick5.cpp
@@ -5,7 +5,7 @@
quickpick5.cpp: Konami "Quick Pick 5" medal game
Quick Pick 5
- (c) 199? Konami
+ (c) 1991 Konami
Driver by R. Belmont
@@ -29,6 +29,7 @@
#include "video/konami_helper.h"
#include "machine/k053252.h"
#include "machine/nvram.h"
+#include "machine/ticket.h"
#include "machine/timer.h"
#include "emupal.h"
#include "screen.h"
@@ -47,31 +48,33 @@ public:
m_k053252(*this, "k053252"),
m_gfxdecode(*this, "gfxdecode"),
m_oki(*this, "oki"),
+ m_outport(*this, "OUT"),
+ m_sio_ports(*this, "SIO%u", 1U),
m_ttlrom_offset(0)
{ }
void quickpick5(machine_config &config);
+ void waijockey(machine_config &config);
+ DECLARE_READ_LINE_MEMBER(serial_io_r);
private:
- uint32_t screen_update_quickpick5(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update_quickpick5(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
K05324X_CB_MEMBER(sprite_callback);
TILE_GET_INFO_MEMBER(ttl_get_tile_info);
- void ccu_int_time_w(uint8_t data);
+ void ccu_int_time_w(u8 data);
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
- uint8_t control_r() { return m_control; }
-
WRITE_LINE_MEMBER(vbl_ack_w) { m_maincpu->set_input_line(0, CLEAR_LINE); }
WRITE_LINE_MEMBER(nmi_ack_w) { m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); }
// A0 is inverted to match the Z80's endianness. Typical Konami.
- uint8_t k244_r(offs_t offset) { return m_k053245->k053244_r(offset^1); }
- void k244_w(offs_t offset, uint8_t data) { m_k053245->k053244_w(offset^1, data); }
- uint8_t k245_r(offs_t offset) { return m_k053245->k053245_r(offset^1); }
- void k245_w(offs_t offset, uint8_t data) { m_k053245->k053245_w(offset^1, data); }
+ u8 k244_r(offs_t offset) { return m_k053245->k053244_r(offset^1); }
+ void k244_w(offs_t offset, u8 data) { m_k053245->k053244_w(offset^1, data); }
+ u8 k245_r(offs_t offset) { return m_k053245->k053245_r(offset^1); }
+ void k245_w(offs_t offset, u8 data) { m_k053245->k053245_w(offset^1, data); }
- void control_w(uint8_t data)
+ void control_w(u8 data)
{
membank("bank1")->set_entry(data&0x1);
if (((m_control & 0x60) != 0x60) && ((data & 0x60) == 0x60))
@@ -81,10 +84,15 @@ private:
m_control = data;
}
- uint8_t vram_r(offs_t offset);
- void vram_w(offs_t offset, uint8_t data);
+ u8 vram_r(offs_t offset);
+ void vram_w(offs_t offset, u8 data);
+
+ void serial_io_w(u8 data);
+ void out_w(u8 data);
+ void common_map(address_map &map);
void quickpick5_main(address_map &map);
+ void waijockey_main(address_map &map);
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -97,23 +105,88 @@ private:
required_device<k053252_device> m_k053252;
required_device<gfxdecode_device> m_gfxdecode;
required_device<okim6295_device> m_oki;
+ required_ioport m_outport;
+ optional_ioport_array<3> m_sio_ports;
int m_ttl_gfx_index;
tilemap_t *m_ttl_tilemap;
- uint8_t m_control;
+ u8 m_control;
int m_ttlrom_offset;
- uint8_t m_vram[0x1000];
+ u8 m_vram[0x1000];
bool m_title_hack;
int m_ccu_int_time, m_ccu_int_time_count;
+
+ u16 m_sio_out, m_sio_in0, m_sio_in1;
+ u8 m_sio_prev;
};
-void quickpick5_state::ccu_int_time_w(uint8_t data)
+void quickpick5_state::serial_io_w(u8 data)
+{
+ // bit 7 - coin counter OUT
+ // bit 6 - coin counter IN
+ // bits 0-4 - serial I/O device
+
+ if (BIT(data, 1) && !BIT(m_sio_prev, 1))
+ {
+ switch (data & 0x1c)
+ {
+ case 0x00: // latch m_sio_in1 (lamps) value
+ break;
+ case 0x10:
+ m_sio_out = 0;
+ for (int i = 0; i < 3; i++)
+ if (BIT(m_sio_in0, i))
+ m_sio_out |= m_sio_ports[2 - i]->read();
+
+ m_sio_in1 = (m_sio_in1 << 1) | BIT(data, 0);
+ break;
+ case 0x18:
+ m_sio_out >>= 1;
+ break;
+ case 0x1c:
+ m_sio_in0 = (m_sio_in0 << 1) | BIT(data, 0);
+ break;
+ default:
+ logerror("serial_io: unhandled command %02X\n", data & 0x1f);
+ break;
+ }
+ }
+ m_sio_prev = data;
+}
+
+READ_LINE_MEMBER(quickpick5_state::serial_io_r)
+{
+ return BIT(m_sio_out, 0);
+}
+
+void quickpick5_state::out_w(u8 data)
+{
+ /*
+ quickpick5:
+ bit 7 - patlite?
+ bit 1 - hopper
+ bit 0 - ~coin blocker
+
+ waijokey:
+ bit 6 - ??? (toggle all the time)
+ Bit 3 - coin counter In
+ Bit 2 - lock medal
+ Bit 1 - ???
+ Bit 0 - hopper
+
+ should be split into 2 handlers later
+ */
+ m_outport->write(data);
+}
+
+void quickpick5_state::ccu_int_time_w(u8 data)
{
- logerror("ccu_int_time rewritten with value of %02x\n", data);
+ if (m_ccu_int_time != data)
+ logerror("ccu_int_time rewritten with value of %02x\n", data);
m_ccu_int_time = data;
}
-uint8_t quickpick5_state::vram_r(offs_t offset)
+u8 quickpick5_state::vram_r(offs_t offset)
{
if ((m_control & 0x10) == 0x10)
{
@@ -130,14 +203,14 @@ uint8_t quickpick5_state::vram_r(offs_t offset)
if ((m_control & 0x60) == 0x60)
{
- uint8_t *ROM = memregion("ttl")->base();
+ u8 *ROM = memregion("ttl")->base();
return ROM[m_ttlrom_offset++];
}
return m_vram[offset];
}
-void quickpick5_state::vram_w(offs_t offset, uint8_t data)
+void quickpick5_state::vram_w(offs_t offset, u8 data)
{
if ((m_control & 0x10) == 0x10)
{
@@ -209,7 +282,7 @@ void quickpick5_state::video_start()
TILE_GET_INFO_MEMBER(quickpick5_state::ttl_get_tile_info)
{
- uint8_t *lvram = &m_vram[0];
+ u8 *lvram = &m_vram[0];
int attr, code;
attr = lvram[BYTE_XOR_LE((tile_index<<1)+1)];
@@ -220,7 +293,7 @@ TILE_GET_INFO_MEMBER(quickpick5_state::ttl_get_tile_info)
tileinfo.set(m_ttl_gfx_index, code, attr, 0);
}
-uint32_t quickpick5_state::screen_update_quickpick5(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 quickpick5_state::screen_update_quickpick5(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(0, cliprect);
screen.priority().fill(0, cliprect);
@@ -260,145 +333,228 @@ TIMER_DEVICE_CALLBACK_MEMBER(quickpick5_state::scanline)
// the following code is emulating INT_TIME of the k053252, this code will go away
// when the new konami branch is merged.
m_ccu_int_time_count--;
- if (m_ccu_int_time_count <= 0)
+ if (m_ccu_int_time_count < 0)
{
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
m_ccu_int_time_count = m_ccu_int_time;
}
}
-void quickpick5_state::quickpick5_main(address_map &map)
+void quickpick5_state::common_map(address_map &map)
{
map(0x0000, 0x7fff).rom().region("maincpu", 0);
map(0x8000, 0xbfff).bankr("bank1");
map(0xc000, 0xdbff).ram().share("nvram");
map(0xdc00, 0xdc0f).rw(m_k053252, FUNC(k053252_device::read), FUNC(k053252_device::write));
map(0xdc40, 0xdc4f).rw(FUNC(quickpick5_state::k244_r), FUNC(quickpick5_state::k244_w));
- map(0xdc80, 0xdc80).portr("DSW3");
- map(0xdc81, 0xdc81).portr("DSW4");
- map(0xdcc0, 0xdcc0).portr("DSW1");
- map(0xdcc1, 0xdcc1).portr("DSW2");
+ map(0xdc80, 0xdc80).portr("DSW1");
+ map(0xdc81, 0xdc81).portr("DSW2");
+ map(0xdcc0, 0xdcc0).portr("IN1");
+ map(0xdcc1, 0xdcc1).portr("IN2");
map(0xdd00, 0xdd00).nopw();
- map(0xdd40, 0xdd40).noprw();
- map(0xdd80, 0xdd80).rw(FUNC(quickpick5_state::control_r), FUNC(quickpick5_state::control_w));
- map(0xddc0, 0xddc0).nopw();
- map(0xde00, 0xde00).nopw();
- map(0xde40, 0xde40).w(m_oki, FUNC(okim6295_device::write));
+ map(0xdd40, 0xdd40).portr("IN3");
+ map(0xdd80, 0xdd80).w(FUNC(quickpick5_state::control_w));
+ map(0xde40, 0xde40).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xe000, 0xefff).rw(FUNC(quickpick5_state::vram_r), FUNC(quickpick5_state::vram_w));
map(0xf000, 0xf7ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0xf800, 0xffff).rw(FUNC(quickpick5_state::k245_r), FUNC(quickpick5_state::k245_w));
}
+void quickpick5_state::quickpick5_main(address_map &map)
+{
+ common_map(map);
+ map(0xddc0, 0xddc0).w(FUNC(quickpick5_state::serial_io_w));
+ map(0xde00, 0xde00).w(FUNC(quickpick5_state::out_w));
+}
+
+void quickpick5_state::waijockey_main(address_map &map)
+{
+ common_map(map);
+ map(0xdd41, 0xdd41).nopr(); // DSW3?
+ map(0xddc0, 0xddc0).nopw(); // bit 6 - coin counter OUT
+ map(0xde00, 0xde00).w(FUNC(quickpick5_state::out_w));
+ //map(0xde80, 0xdfff).nopw();
+}
+
static INPUT_PORTS_START( quickpick5 )
+ PORT_START("IN1")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_SERVICE1)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r)
+ PORT_SERVICE_NO_TOGGLE(0x08, IP_ACTIVE_LOW)
+ PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("IN2")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Reset Switch") PORT_TOGGLE
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Global Stats") PORT_TOGGLE
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Last Game Stats") PORT_TOGGLE
+ PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
+
PORT_START("DSW1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
- PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4")
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5")
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6")
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7")
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8")
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIPSW1:1,2,3")
+ PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_7C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW1:4")
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x30, 0x30, "Jack Pot" ) PORT_DIPLOCATION("DIPSW1:5,6")
+ PORT_DIPSETTING( 0x30, "300" )
+ PORT_DIPSETTING( 0x20, "500" )
+ PORT_DIPSETTING( 0x10, "700" )
+ PORT_DIPSETTING( 0x00, "1000" )
+ PORT_DIPNAME( 0xc0, 0xc0, "Max Pay" ) PORT_DIPLOCATION("DIPSW1:7,8")
+ PORT_DIPSETTING( 0xc0, "400" )
+ PORT_DIPSETTING( 0x80, "500" )
+ PORT_DIPSETTING( 0x40, "700" )
+ PORT_DIPSETTING( 0x00, "1000" )
PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x00, "Reset Switch" ) PORT_DIPLOCATION("SW2:1")
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x02, 0x00, "Global Stats" ) PORT_DIPLOCATION("SW2:2")
- PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x04, 0x00, "Last Game Stats" ) PORT_DIPLOCATION("SW2:3")
- PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4")
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5")
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6")
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7")
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8")
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
-
- PORT_START("DSW3")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1")
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:2")
- PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:3")
- PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:4")
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:5")
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:6")
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:7")
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:8")
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
-
- PORT_START("DSW4")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:1")
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:2")
- PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:3")
- PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:4")
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:5")
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:6")
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:7")
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:8")
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x0f, 0x0f, "Max Payout" ) PORT_DIPLOCATION("DIPSW2:1,2,3,4")
+ PORT_DIPSETTING( 0x00, "94%" )
+ PORT_DIPSETTING( 0x01, "92%" )
+ PORT_DIPSETTING( 0x02, "91%" )
+ PORT_DIPSETTING( 0x03, "90%" )
+ PORT_DIPSETTING( 0x04, "89%" )
+ PORT_DIPSETTING( 0x05, "88%" )
+ PORT_DIPSETTING( 0x06, "87%" )
+ PORT_DIPSETTING( 0x07, "86%" )
+ PORT_DIPSETTING( 0x08, "85%" )
+ PORT_DIPSETTING( 0x09, "84%" )
+ PORT_DIPSETTING( 0x0a, "83%" )
+ PORT_DIPSETTING( 0x0b, "82%" )
+ PORT_DIPSETTING( 0x0c, "80%" )
+ PORT_DIPSETTING( 0x0d, "75%" )
+ PORT_DIPSETTING( 0x0e, "70%" )
+ PORT_DIPSETTING( 0x0f, "65%" )
+ PORT_DIPNAME( 0x30, 0x30, "Button Time" ) PORT_DIPLOCATION("DIPSW2:5,6")
+ PORT_DIPSETTING( 0x00, "40 Seconds" )
+ PORT_DIPSETTING( 0x10, "30 Seconds" )
+ PORT_DIPSETTING( 0x20, "20 Seconds" )
+ PORT_DIPSETTING( 0x30, "15 Seconds" )
+ PORT_DIPNAME( 0x40, 0x00, "Backup Memory" ) PORT_DIPLOCATION("DIPSW2:7")
+ PORT_DIPSETTING( 0x00, "Clear" )
+ PORT_DIPSETTING( 0x40, "Keep" )
+ PORT_DIPNAME( 0x80, 0x00, "Attract Sound" ) PORT_DIPLOCATION("DIPSW2:8")
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+
+ PORT_START("IN3")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(quickpick5_state, serial_io_r)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") // guess
+ PORT_BIT(0x7e, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("SIO1")
+ PORT_BIT(0x07ff, IP_ACTIVE_HIGH, IPT_UNKNOWN)
+ // TODO
+
+ PORT_START("SIO2")
+ PORT_BIT(0x07ff, IP_ACTIVE_HIGH, IPT_UNKNOWN)
+ // TODO
+
+ PORT_START("SIO3")
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_START1)
+ PORT_BIT(0x05ff, IP_ACTIVE_HIGH, IPT_UNKNOWN)
+ // TODO
+
+ PORT_START("OUT")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", hopper_device, motor_w)
+INPUT_PORTS_END
+
+// Control panel buttons layout:
+// Payout 1 2 1-2 1-3 1-4
+// 3 4 2-3 2-4 3-4 Start
+static INPUT_PORTS_START( waijockey )
+ PORT_START("IN1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r)
+ PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) // * B16
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_COIN1) PORT_NAME("Medal")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN2) PORT_NAME("100 Yen")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_SERVICE1)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) // * B19
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 1-2") PORT_CODE(KEYCODE_D)
+
+ PORT_START("IN2")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 3-4") PORT_CODE(KEYCODE_B)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 2-4") PORT_CODE(KEYCODE_V)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 2-3") PORT_CODE(KEYCODE_C)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 4") PORT_CODE(KEYCODE_X)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 3") PORT_CODE(KEYCODE_Z)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 1") PORT_CODE(KEYCODE_A)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 2") PORT_CODE(KEYCODE_S)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 1-4") PORT_CODE(KEYCODE_G)
+
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIPSW1:1,2,3,4")
+ PORT_DIPNAME( 0xf0, 0xf0, "Standard of Payout" ) PORT_DIPLOCATION("DIPSW1:5,6,7,8")
+
+ PORT_START("DSW2")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW2:1")
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW2:2")
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW2:3")
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW2:4")
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x10, 0x10, "Game Play Mode" ) PORT_DIPLOCATION("DIPSW2:5") // more like gameplay test mode
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x20, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DIPSW2:6")
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x40, 0x00, "Attract Sound" ) PORT_DIPLOCATION("DIPSW2:7")
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x80, 0x00, "Backup Memory" ) PORT_DIPLOCATION("DIPSW2:8")
+ PORT_DIPSETTING( 0x00, "Clear" )
+ PORT_DIPSETTING( 0x80, "Keep" )
+
+ PORT_START("IN3")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) // * B14
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_START1)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bet 1-3") PORT_CODE(KEYCODE_F)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x60, IP_ACTIVE_LOW, IPT_UNUSED) // battery sensor
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") // guess
+
+ PORT_START("OUT")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", hopper_device, motor_w)
INPUT_PORTS_END
void quickpick5_state::machine_start()
{
membank("bank1")->configure_entries(0, 0x2, memregion("maincpu")->base()+0x8000, 0x4000);
- membank("bank1")->set_entry(0);
+
+ save_item(NAME(m_control));
+ save_item(NAME(m_ccu_int_time));
+ save_item(NAME(m_ccu_int_time_count));
+ save_item(NAME(m_sio_out));
+ save_item(NAME(m_sio_in0));
+ save_item(NAME(m_sio_in1));
+ save_item(NAME(m_sio_prev));
}
void quickpick5_state::machine_reset()
{
+ membank("bank1")->set_entry(0);
+
+ m_control = 0;
+ m_ccu_int_time = 0;
+ m_ccu_int_time_count = 0;
+ m_sio_out = m_sio_in0 = m_sio_in1 = 0;
+ m_sio_prev = 0;
}
void quickpick5_state::quickpick5(machine_config &config)
@@ -407,6 +563,7 @@ void quickpick5_state::quickpick5(machine_config &config)
Z80(config, m_maincpu, XTAL(32'000'000)/4); // z84c0008pec 8mhz part, 32Mhz xtal verified on PCB, divisor unknown
m_maincpu->set_addrmap(AS_PROGRAM, &quickpick5_state::quickpick5_main);
TIMER(config, "scantimer").configure_scanline(FUNC(quickpick5_state::scanline), "screen", 0, 1);
+ HOPPER(config, "hopper", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW);
K053252(config, m_k053252, XTAL(32'000'000)/4); /* K053252, xtal verified, divider not verified */
m_k053252->int1_ack().set(FUNC(quickpick5_state::vbl_ack_w));
@@ -444,6 +601,13 @@ void quickpick5_state::quickpick5(machine_config &config)
m_oki->add_route(1, "mono", 1.0);
}
+void quickpick5_state::waijockey(machine_config &config)
+{
+ quickpick5(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &quickpick5_state::waijockey_main);
+}
+
+
ROM_START( quickp5 )
ROM_REGION( 0x10000, "maincpu", 0 ) /* main program */
ROM_LOAD( "117.10e.bin", 0x000000, 0x010000, CRC(3645e1a5) SHA1(7d0d98772f3732510e7a58f50a622fcec74087c3) )
@@ -467,7 +631,7 @@ ROM_START( quickp5 )
ROM_END
// Konami PWB353330
-ROM_START( goemedal )
+ROM_START( waijockey )
ROM_REGION( 0x10000, "maincpu", 0 ) // main program
ROM_LOAD( "gs-257-a02.7n", 0x000000, 0x010000, CRC(e9a5f416) SHA1(b762b393bbe394339904636ff1d31d8eeb8b8d05) )
@@ -485,5 +649,5 @@ ROM_START( goemedal )
ROM_END
-GAME( 1995, quickp5, 0, quickpick5, quickpick5, quickpick5_state, empty_init, ROT0, "Konami", "Quick Pick 5", MACHINE_NOT_WORKING)
-GAME( 199?, goemedal, 0, quickpick5, quickpick5, quickpick5_state, empty_init, ROT0, "Konami", "Goemon Medal Game", MACHINE_NOT_WORKING)
+GAME( 1991, quickp5, 0, quickpick5, quickpick5, quickpick5_state, empty_init, ROT0, "Konami", "Quick Pick 5", MACHINE_NOT_WORKING)
+GAME( 1993, waijockey, 0, waijockey, waijockey, quickpick5_state, empty_init, ROT0, "Konami", "Wai Wai Jockey", MACHINE_NOT_WORKING)
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index c29f03b063d..9bbf0026d1c 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -19018,8 +19018,8 @@ pwrchanc
ymcapsul
@source:quickpick5.cpp
-goemedal
quickp5
+waijockey
@source:kontest.cpp
kontest // GX800 (c) 198? (Japan)