mirror of
https://github.com/holub/mame
synced 2025-04-29 11:30:28 +03:00
hook up payout buttons and a hopper to Mahjong Senpu, promote to working.
there does seem to be another payout mode that isn't hooked up, and our current hopper is always a 'ticket dispenser' which might not be accurate, but you can press the payout button and it will count down the coins, so I think that's good enough for now. the dipswitches still need translating properly.
This commit is contained in:
parent
38d6d6ace4
commit
161f0f9b60
@ -46,6 +46,7 @@
|
|||||||
#include "cpu/e132xs/e132xs.h"
|
#include "cpu/e132xs/e132xs.h"
|
||||||
#include "sound/okim6295.h"
|
#include "sound/okim6295.h"
|
||||||
#include "machine/nvram.h"
|
#include "machine/nvram.h"
|
||||||
|
#include "machine/ticket.h"
|
||||||
|
|
||||||
class mjsenpu_state : public driver_device
|
class mjsenpu_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -54,6 +55,7 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_oki(*this, "oki"),
|
m_oki(*this, "oki"),
|
||||||
|
m_hopper(*this, "hopper"),
|
||||||
m_mainram(*this, "mainram"),
|
m_mainram(*this, "mainram"),
|
||||||
// m_vram(*this, "vram"),
|
// m_vram(*this, "vram"),
|
||||||
m_palette(*this, "palette")
|
m_palette(*this, "palette")
|
||||||
@ -63,6 +65,7 @@ public:
|
|||||||
/* devices */
|
/* devices */
|
||||||
required_device<e132xt_device> m_maincpu;
|
required_device<e132xt_device> m_maincpu;
|
||||||
required_device<okim6295_device> m_oki;
|
required_device<okim6295_device> m_oki;
|
||||||
|
required_device<ticket_dispenser_device> m_hopper;
|
||||||
|
|
||||||
required_shared_ptr<UINT32> m_mainram;
|
required_shared_ptr<UINT32> m_mainram;
|
||||||
// required_shared_ptr<UINT32> m_vram;
|
// required_shared_ptr<UINT32> m_vram;
|
||||||
@ -142,8 +145,7 @@ WRITE32_MEMBER(mjsenpu_state::vram_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(mjsenpu_state::control_w)
|
WRITE8_MEMBER(mjsenpu_state::control_w)
|
||||||
{
|
{
|
||||||
m_control = data;
|
// bit 0x80 is always set? (sometimes disabled during screen transitions briefly, could be display enable?)
|
||||||
// bit 0x80 is always set?
|
|
||||||
|
|
||||||
// bit 0x40 not used?
|
// bit 0x40 not used?
|
||||||
// bit 0x20 not used?
|
// bit 0x20 not used?
|
||||||
@ -151,10 +153,16 @@ WRITE8_MEMBER(mjsenpu_state::control_w)
|
|||||||
// bit 0x10 is the M6295 bank, samples <26 are the same in both banks and so bank switch isn't written for them, not even in sound test.
|
// bit 0x10 is the M6295 bank, samples <26 are the same in both banks and so bank switch isn't written for them, not even in sound test.
|
||||||
m_oki->set_rom_bank((data&0x10)>>4);
|
m_oki->set_rom_bank((data&0x10)>>4);
|
||||||
|
|
||||||
// bits 0x08 and 0x04 seem to be hopper/ticket related? different ones get used depending on the dips
|
// bits 0x08 is used in the alt payout / hopper mode (see dipswitches)
|
||||||
|
|
||||||
|
// 0x04 seem to be hopper/ticket related? different ones get used depending on the dips
|
||||||
|
m_hopper->write(space, 0, data & 0x04);
|
||||||
|
|
||||||
// bit 0x02 could be coin counter?
|
// bit 0x02 could be coin counter?
|
||||||
|
machine().bookkeeping().coin_counter_w(0, data & 0x02 );
|
||||||
|
|
||||||
// bit 0x01 alternates frequently, using as video buffer, but that's a complete guess
|
// bit 0x01 alternates frequently, using as video buffer, but that's a complete guess
|
||||||
|
m_control = data;
|
||||||
|
|
||||||
// if (data &~0x9e)
|
// if (data &~0x9e)
|
||||||
// printf("control_w %02x\n", data);
|
// printf("control_w %02x\n", data);
|
||||||
@ -286,26 +294,21 @@ static INPUT_PORTS_START( mjsenpu )
|
|||||||
PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||||
|
|
||||||
PORT_START("IN1")
|
PORT_START("IN1")
|
||||||
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 ) // or maybe service?
|
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 ) // or maybe service?
|
||||||
PORT_DIPNAME( 0x00000002, 0x00000002, "IN1" )
|
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
|
||||||
PORT_DIPSETTING( 0x00000002, DEF_STR( Off ) )
|
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) // might be coin out
|
||||||
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
|
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Bookkeeping")
|
||||||
PORT_DIPNAME( 0x00000004, 0x00000004, DEF_STR( Unknown ) )
|
PORT_SERVICE_NO_TOGGLE( 0x00000010, IP_ACTIVE_LOW )
|
||||||
PORT_DIPSETTING( 0x00000004, DEF_STR( Off ) )
|
PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Clear") // clears stats in bookkeeping
|
||||||
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
|
|
||||||
PORT_DIPNAME( 0x00000008, 0x00000008, DEF_STR( Unknown ) )
|
|
||||||
PORT_DIPSETTING( 0x00000008, DEF_STR( Off ) )
|
|
||||||
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
|
|
||||||
PORT_SERVICE_NO_TOGGLE( 0x00000010, IP_ACTIVE_LOW )
|
|
||||||
PORT_DIPNAME( 0x00000020, 0x00000020, DEF_STR( Unknown ) )
|
|
||||||
PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) )
|
|
||||||
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
|
|
||||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW3", 0x08,EQUALS,0x00)
|
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW3", 0x08,EQUALS,0x00)
|
||||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08)
|
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08)
|
||||||
PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
|
PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) ) // unused??
|
||||||
PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
|
PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
|
||||||
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
|
||||||
PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PORT_START("DSW1")
|
PORT_START("DSW1")
|
||||||
PORT_DIPNAME( 0x00000003, 0x00000003, DEF_STR( Coin_A ) )
|
PORT_DIPNAME( 0x00000003, 0x00000003, DEF_STR( Coin_A ) )
|
||||||
@ -313,7 +316,7 @@ static INPUT_PORTS_START( mjsenpu )
|
|||||||
PORT_DIPSETTING( 0x00000003, DEF_STR( 1C_1C ) )
|
PORT_DIPSETTING( 0x00000003, DEF_STR( 1C_1C ) )
|
||||||
PORT_DIPSETTING( 0x00000002, DEF_STR( 1C_2C ) )
|
PORT_DIPSETTING( 0x00000002, DEF_STR( 1C_2C ) )
|
||||||
PORT_DIPSETTING( 0x00000001, DEF_STR( 1C_3C ) )
|
PORT_DIPSETTING( 0x00000001, DEF_STR( 1C_3C ) )
|
||||||
PORT_DIPNAME( 0x0000000c, 0x0000000c, "Value 1" )
|
PORT_DIPNAME( 0x0000000c, 0x0000000c, "Note Value" ) // used if DSW3 bit 0x02 is changed
|
||||||
PORT_DIPSETTING( 0x00000000, "100" )
|
PORT_DIPSETTING( 0x00000000, "100" )
|
||||||
PORT_DIPSETTING( 0x00000004, "50" )
|
PORT_DIPSETTING( 0x00000004, "50" )
|
||||||
PORT_DIPSETTING( 0x00000008, "10" )
|
PORT_DIPSETTING( 0x00000008, "10" )
|
||||||
@ -360,12 +363,12 @@ static INPUT_PORTS_START( mjsenpu )
|
|||||||
PORT_DIPNAME( 0x00000001, 0x00000001, "Value 4" )
|
PORT_DIPNAME( 0x00000001, 0x00000001, "Value 4" )
|
||||||
PORT_DIPSETTING( 0x00000001, "100" )
|
PORT_DIPSETTING( 0x00000001, "100" )
|
||||||
PORT_DIPSETTING( 0x00000000, "500" )
|
PORT_DIPSETTING( 0x00000000, "500" )
|
||||||
PORT_DIPNAME( 0x00000002, 0x00000002, "Symbol 2" )
|
PORT_DIPNAME( 0x00000002, 0x00000002, "Coin Type?" ) // uses different coinage
|
||||||
PORT_DIPSETTING( 0x00000002, "0" )
|
PORT_DIPSETTING( 0x00000002, "Coins?" )
|
||||||
PORT_DIPSETTING( 0x00000000, "1" )
|
PORT_DIPSETTING( 0x00000000, "Notes?" )
|
||||||
PORT_DIPNAME( 0x00000004, 0x00000004, "Symbol 3" )
|
PORT_DIPNAME( 0x00000004, 0x00000004, "Hopper Type?" )
|
||||||
PORT_DIPSETTING( 0x00000004, "0" )
|
PORT_DIPSETTING( 0x00000004, "Normal?" ) // pressing Pay Out button activates hopper on bit 0x04 and pays out
|
||||||
PORT_DIPSETTING( 0x00000000, "1" )
|
PORT_DIPSETTING( 0x00000000, "Other?" ) // pressing Pay Out activates something on bit 0x08, prints KEY OUT and quickly resets the game
|
||||||
PORT_DIPNAME( 0x00000008, 0x00000008, "Control Type" )
|
PORT_DIPNAME( 0x00000008, 0x00000008, "Control Type" )
|
||||||
PORT_DIPSETTING( 0x00000008, "Mahjong Panel" )
|
PORT_DIPSETTING( 0x00000008, "Mahjong Panel" )
|
||||||
PORT_DIPSETTING( 0x00000000, "Joystick" )
|
PORT_DIPSETTING( 0x00000000, "Joystick" )
|
||||||
@ -459,6 +462,9 @@ static MACHINE_CONFIG_START( mjsenpu, mjsenpu_state )
|
|||||||
|
|
||||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||||
|
|
||||||
|
// more likely coins out?
|
||||||
|
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(50), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH)
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_SCREEN_ADD("screen", RASTER)
|
MCFG_SCREEN_ADD("screen", RASTER)
|
||||||
MCFG_SCREEN_REFRESH_RATE(60)
|
MCFG_SCREEN_REFRESH_RATE(60)
|
||||||
@ -526,6 +532,4 @@ DRIVER_INIT_MEMBER(mjsenpu_state,mjsenpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GAME( 2002, mjsenpu, 0, mjsenpu, mjsenpu, mjsenpu_state, mjsenpu, ROT0, "Oriental Soft", "Mahjong Senpu", 0 )
|
||||||
|
|
||||||
GAME( 2002, mjsenpu, 0, mjsenpu, mjsenpu, mjsenpu_state, mjsenpu, ROT0, "Oriental Soft", "Mahjong Senpu", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
|
|
||||||
|
Loading…
Reference in New Issue
Block a user