summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2014-10-04 21:14:24 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2014-10-04 21:14:24 +0000
commit529b34e9b284d0ce12a17d5757da1a946f2c264d (patch)
tree6879efff01acb6e2b5735f8be245e39d1d1fa05f
parent1be70dca6ee2a1a8679ec4411fb51579e04549e1 (diff)
New games added or promoted from NOT_WORKING status
--------------------------------------------------- Vegas 1 (Ver 2.3 dual coin pulse, shorter) [any] Vegas 1 (Ver 2.1 dual coin pulse, longer) [any] Vegas 1 (Ver 1.33 single coin pulse) [any] This is a coin pusher machine from Spain. Your guess on how to work it is as good as mine ;-)
-rw-r--r--.gitattributes2
-rw-r--r--src/mame/drivers/mgavegas.c661
-rw-r--r--src/mame/layout/mgavegas.lay247
-rw-r--r--src/mame/mame.lst5
-rw-r--r--src/mame/mame.mak3
5 files changed, 918 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index c89d0512557..593a8fc3297 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -5212,6 +5212,7 @@ src/mame/drivers/mexico86.c svneol=native#text/plain
src/mame/drivers/meyc8080.c svneol=native#text/plain
src/mame/drivers/meyc8088.c svneol=native#text/plain
src/mame/drivers/mgames.c svneol=native#text/xml
+src/mame/drivers/mgavegas.c svneol=native#text/plain
src/mame/drivers/mgolf.c svneol=native#text/plain
src/mame/drivers/mhavoc.c svneol=native#text/plain
src/mame/drivers/micro3d.c svneol=native#text/plain
@@ -6688,6 +6689,7 @@ src/mame/layout/mdrawpkr.lay svneol=native#text/xml
src/mame/layout/medlanes.lay svneol=native#text/xml
src/mame/layout/meybjack.lay svneol=native#text/xml
src/mame/layout/mgames.lay svneol=native#text/xml
+src/mame/layout/mgavegas.lay svneol=native#text/plain
src/mame/layout/micropin.lay svneol=native#text/plain
src/mame/layout/mil4000.lay svneol=native#text/xml
src/mame/layout/minferno.lay svneol=native#text/xml
diff --git a/src/mame/drivers/mgavegas.c b/src/mame/drivers/mgavegas.c
new file mode 100644
index 00000000000..586af331bf6
--- /dev/null
+++ b/src/mame/drivers/mgavegas.c
@@ -0,0 +1,661 @@
+/***********************************************************************************
+
+ mgavegas.c
+
+ Coin pusher
+
+ TODO
+ -better analog audio out/mixer
+ -some output (mostly not used)
+
+Ver. 1.33 have no speech and no change funcion implemented in software
+Ver. 2.1 and 2.3 have change function working and speech
+Ver. 2.2 should exist
+
+************************************************************************************/
+
+#include "emu.h"
+
+#include "cpu/z80/z80.h"
+#include "sound/ay8910.h"
+#include "sound/msm5205.h"
+#include "machine/nvram.h"
+#include "machine/ticket.h"
+#include "sound/flt_rc.h"
+#include "mgavegas.lh"
+
+/****************************
+* LOG defines *
+****************************/
+
+#define LOG_AY8910 0
+#define LOG_MSM5205 0
+#define LOG_CSO1 0
+#define LOG_CSO2 0
+
+
+/****************************
+* Clock defines *
+****************************/
+#define MAIN_XTAL XTAL_8MHz
+#define CPU_CLK MAIN_XTAL/2
+#define AY_CLK CPU_CLK/2
+#define MSM_CLK 384000
+
+
+class mgavegas_state : public driver_device
+{
+public:
+ mgavegas_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_ay(*this, "aysnd"),
+ m_msm(*this, "5205"),
+ m_ticket(*this, "hopper"),
+ m_filter1(*this, "filter1"),
+ m_filter2(*this, "filter2")
+
+
+ { }
+ UINT8 m_int;
+
+ //OUT1
+ UINT8 m_ckmod;
+ UINT8 m_dmod;
+ UINT8 m_emod;
+ UINT8 m_inh;
+ UINT8 m_hop;
+ UINT8 m_seg;
+ UINT8 m_printer;
+ UINT8 m_auxp;
+
+ //helper...
+ UINT8 m_old_ckmod;
+ UINT8 m_old_emod;
+
+ //OUT2
+ UINT8 m_bobina_ctrl;
+ UINT8 m_timbre;
+ UINT8 m_coil_1;
+ UINT8 m_coil_2;
+ UINT8 m_coil_3;
+ UINT8 m_cont_ent;
+ UINT8 m_cont_sal;
+ UINT8 m_cont_caj;
+
+ //lamps out
+ UINT64 m_custom_data;
+ UINT8 m_auxs;
+ UINT8 m_anal;
+ UINT8 m_anacl;
+ UINT8 m_anacr;
+ UINT8 m_anar;
+ UINT8 m_pl;
+ UINT8 m_pc;
+ UINT8 m_pr;
+ UINT8 m_luz_250_rul;
+ UINT8 m_luz_100_rul;
+ UINT8 m_luz_50_rlul;
+ UINT8 m_luz_25_lrul;
+ UINT8 m_luz_25_rrul;
+ UINT8 m_fl;
+ UINT8 m_fc;
+ UINT8 m_fr;
+ UINT8 m_insert_coin;
+ UINT8 m_no_cambio;
+ UINT8 m_fuse;
+ UINT8 m_falta;
+ UINT8 m_anag;
+ UINT8 m_cl;
+ UINT8 m_cc;
+ UINT8 m_cr;
+ UINT8 m_premio_s;
+ UINT8 m_100;
+ UINT8 m_200;
+ UINT8 m_300;
+ UINT8 m_500;
+ UINT8 m_ml;
+ UINT8 m_mc;
+ UINT8 m_mr;
+
+ DECLARE_READ8_MEMBER(start_read);
+
+ DECLARE_WRITE8_MEMBER(w_a0);
+ DECLARE_READ8_MEMBER(r_a0);
+ DECLARE_WRITE8_MEMBER(cso1_w);
+ DECLARE_WRITE8_MEMBER(cso2_w);
+ DECLARE_WRITE8_MEMBER(csoki_w);
+ DECLARE_READ8_MEMBER(csoki_r);
+
+ DECLARE_READ8_MEMBER(ay8910_a_r);
+ DECLARE_READ8_MEMBER(ay8910_b_r);
+
+ DECLARE_DRIVER_INIT(mgavegas);
+ DECLARE_DRIVER_INIT(mgavegas21);
+ DECLARE_DRIVER_INIT(mgavegas133);
+
+ TIMER_DEVICE_CALLBACK_MEMBER(int_0);
+
+
+protected:
+
+ // devices
+ required_device<cpu_device> m_maincpu;
+ required_device<ay8910_device> m_ay;
+ required_device<msm5205_device> m_msm;
+ required_device<ticket_dispenser_device> m_ticket;
+ required_device<filter_rc_device> m_filter1;
+ required_device<filter_rc_device> m_filter2;
+
+ // driver_device overrides
+ virtual void machine_reset();
+ void update_custom();
+ void update_lamp();
+
+
+private:
+};
+
+
+void mgavegas_state::update_lamp(){
+
+ //output_set_value("AUXS", m_auxs); //unused
+ output_set_value("MGA4", m_anal&0x01);
+ output_set_value("MGA3", m_anacl&0x01);
+ output_set_value("MGA2", m_anacr&0x01);
+ output_set_value("MGA", m_anar&0x01);
+ output_set_value("PL", m_pl&0x01);
+ output_set_value("PC", m_pc&0x01);
+ output_set_value("PR", m_pr&0x01);
+ output_set_value("250", m_luz_250_rul&0x01);
+ output_set_value("1002", m_luz_100_rul&0x01);
+ output_set_value("50", m_luz_50_rlul&0x01);
+ output_set_value("252", m_luz_25_lrul&0x01);
+ output_set_value("25", m_luz_25_rrul&0x01);
+ output_set_value("FL", m_fl&0x01);
+ output_set_value("FC", m_fc&0x01);
+ output_set_value("FR", m_fr&0x01);
+ output_set_value("INSERTCOIN", m_insert_coin&0x01);
+ output_set_value("NOCAMBIO", m_no_cambio&0x01);
+ output_set_value("FUSE", m_fuse&0x01);
+ output_set_value("FALTA", m_falta&0x01);
+ //output_set_value("ANAG", m_anag&0x01); //unused
+ output_set_value("CL", m_cl&0x01);
+ output_set_value("CC", m_cc&0x01);
+ output_set_value("CR", m_cr&0x01);
+ output_set_value("PREMIOS", m_premio_s&0x01);
+ output_set_value("100", m_100&0x01);
+ output_set_value("200", m_200&0x01);
+ output_set_value("300", m_300&0x01);
+ output_set_value("500", m_500&0x01);
+ output_set_value("ML", m_ml&0x01);
+ output_set_value("MC", m_mc&0x01);
+ output_set_value("MR", m_mr&0x01);
+/*
+ m_inh=BIT(data, 3);
+ m_printer=BIT(data, 6); //not_used
+ m_auxp=BIT(data, 7); //not_used
+
+ m_bobina_ctrl=BIT(data, 0);
+ m_timbre=BIT(data, 1);
+ m_coil_1=BIT(data, 2);
+ m_coil_2=BIT(data, 3);
+ m_coil_3=BIT(data, 4);
+ m_cont_ent=BIT(data, 5);
+ m_cont_sal=BIT(data, 6);
+ m_cont_caj=BIT(data, 7);
+*/
+}
+
+
+void mgavegas_state::update_custom(){
+UINT64 tmp;
+
+ if( (m_ckmod==1) & (m_old_ckmod==0) ){
+ //vadid clock, sample the data
+ m_custom_data=(m_custom_data<<1)|(m_dmod&0x01);
+ }
+
+ if( (m_emod==0) & (m_old_emod==1) ){
+ //valid emod, check for valid data and updatae custom status this is how the hw works
+ if( (BIT(m_custom_data, 32)==0) && (BIT(m_custom_data, 33)==0) && (BIT(m_custom_data, 34)==0) && (BIT(m_custom_data, 35)==0) ){
+ tmp=~m_custom_data;
+ m_auxs= tmp&0x00000001;
+// m_anal= (tmp&0x00000002)>>1; //schematics error!!!
+// m_anacl= (tmp&0x00000004)>>2; //schematics error!!!
+ m_luz_50_rlul= (tmp&0x00000002)>>1;
+ m_luz_25_lrul= (tmp&0x00000004)>>2;
+ m_anacr= (tmp&0x00000008)>>3;
+ m_anar= (tmp&0x00000010)>>4;
+ m_pl= (tmp&0x00000020)>>5;
+ m_pc= (tmp&0x00000040)>>6;
+ m_pr= (tmp&0x00000080)>>7;
+ m_luz_250_rul= (tmp&0x00000100)>>8;
+ m_luz_100_rul= (tmp&0x00000200)>>9;
+// m_luz_50_rlul= (tmp&0x00000400)>>10; //schematics error!!!
+// m_luz_25_lrul= (tmp&0x00000800)>>11; //schematics error!!!
+ m_anacl= (tmp&0x00000400)>>10;
+ m_anal= (tmp&0x00000800)>>11;
+ m_luz_25_rrul= (tmp&0x00001000)>>12;
+ m_fl= (tmp&0x00002000)>>13;
+ m_fc= (tmp&0x00004000)>>14;
+ m_fr= (tmp&0x00008000)>>15;
+ m_insert_coin= (tmp&0x00010000)>>16;
+ m_no_cambio= (tmp&0x00020000)>>17;
+ m_fuse= (tmp&0x00040000)>>18;
+ m_falta= (tmp&0x00080000)>>19;
+ m_anag= (tmp&0x00100000)>>20;
+ m_cl= (tmp&0x00200000)>>21;
+ m_cc= (tmp&0x00400000)>>22;
+ m_cr= (tmp&0x00800000)>>23;
+ m_premio_s= (tmp&0x01000000)>>24;
+ m_100= (tmp&0x02000000)>>25;
+ m_200= (tmp&0x04000000)>>26;
+ m_300= (tmp&0x08000000)>>27;
+ m_500= (tmp&0x10000000)>>28;
+ m_ml= (tmp&0x20000000)>>29;
+ m_mc= (tmp&0x40000000)>>30;
+ m_mr= (tmp&0x80000000)>>31;
+
+ update_lamp();
+ }
+ }
+
+ m_old_ckmod=m_ckmod;
+ m_old_emod=m_emod;
+}
+
+
+READ8_MEMBER( mgavegas_state::start_read )
+{
+// in HW it look for /IOREQ going down to clear the IRQ line
+ if (m_int){
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
+ m_int=0;
+ }
+ return 0xed;
+}
+
+
+
+/****************************
+* Read/Write Handlers *
+****************************/
+READ8_MEMBER(mgavegas_state::r_a0)
+{
+UINT8 ret=0;
+
+
+ switch (offset&0x03)
+ {
+ case 1: //bdir=0 BC1=1
+ ret=m_ay->data_r(space,0);
+ break;
+ default:
+ if (LOG_AY8910)
+ logerror("AY 3-8910 area unknow read!!!\n");
+ break;
+ }
+
+ if (LOG_AY8910)
+ logerror("read from %04X return %02X\n",offset+0xa000,ret);
+ return ret;
+}
+
+WRITE8_MEMBER(mgavegas_state::w_a0)
+{
+
+ if (LOG_AY8910)
+ logerror("write to %04X data = %02X \n",offset+0xa000,data);
+
+ switch (offset&0x03)
+ {
+ case 0: //bdir=1 bc1=1
+ m_ay->address_w(space,0,data );
+ break;
+ case 2: //bdir=1 bc1=0
+ m_ay->data_w(space,0,data );
+ break;
+/*
+ case 1: //bdir=0 bc1=1
+ break;
+ case 3: //bdir=0 bc1=0
+ break;
+*/
+ default:
+ if (LOG_AY8910)
+ logerror("AY 3-8910 area unknow write!!!\n");
+ break;
+ }
+}
+
+
+
+
+
+READ8_MEMBER(mgavegas_state::csoki_r)
+{
+UINT8 ret=0;
+
+ if (LOG_MSM5205)
+ logerror("read from %04X return %02X\n",offset+0xc800,ret);
+ return ret;
+}
+
+WRITE8_MEMBER(mgavegas_state::csoki_w)
+{
+
+ if (LOG_MSM5205)
+ logerror("MSM5205 write to %04X data = %02X \n",offset+0xc800,data);
+ m_msm->reset_w(data&0x10>>4);
+ m_msm->data_w(data&0x0f);
+}
+
+
+WRITE8_MEMBER(mgavegas_state::cso1_w)
+{
+ int hopper_data = 0x00;
+ if (LOG_CSO1)
+ logerror("write to CSO1 data = %02X\n",data);
+
+ m_ckmod=BIT(data, 0);
+ m_dmod=BIT(data, 1);
+ m_emod=BIT(data, 2);
+ m_inh=BIT(data, 3);
+ m_hop=BIT(data, 4);
+ m_seg=BIT(data, 5);
+ m_printer=BIT(data, 6); //not_used
+ m_auxp=BIT(data, 7); //not_used
+
+ update_custom();
+
+ hopper_data=(m_hop&0x01)<<7;
+ m_ticket->write(machine().driver_data()->generic_space(), 0, hopper_data);
+}
+
+WRITE8_MEMBER(mgavegas_state::cso2_w)
+{
+ if (LOG_CSO2)
+ logerror("write to CSO2 data = %02X\n",data);
+
+ m_bobina_ctrl=BIT(data, 0);
+ m_timbre=BIT(data, 1);
+ m_coil_1=BIT(data, 2);
+ m_coil_2=BIT(data, 3);
+ m_coil_3=BIT(data, 4);
+ m_cont_ent=BIT(data, 5);
+ m_cont_sal=BIT(data, 6);
+ m_cont_caj=BIT(data, 7);
+
+ update_lamp();
+}
+
+
+READ8_MEMBER(mgavegas_state::ay8910_a_r)
+{
+ UINT8 ret=0xff;
+
+ ret=ioport("INA")->read();
+
+ if (LOG_AY8910)
+ logerror("read from port A return %02X\n",ret);
+
+ return ret;
+}
+
+READ8_MEMBER(mgavegas_state::ay8910_b_r)
+{
+ UINT8 ret=0xff;
+
+ ret=ioport("DSW1")->read();
+
+ if (LOG_AY8910)
+ logerror("read from port B return %02X\n",ret);
+
+ return ret;
+}
+
+/*************************
+* Memory Map Information *
+*************************/
+
+static ADDRESS_MAP_START( mgavegas_map, AS_PROGRAM, 8, mgavegas_state )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0x8000, 0x9fff) AM_RAM AM_SHARE("nvram")
+ AM_RANGE(0xa000, 0xa003) AM_READWRITE(r_a0,w_a0) // AY-3-8910
+ AM_RANGE(0xc000, 0xc001) AM_WRITE(cso1_w) // /CSout1
+ AM_RANGE(0xc400, 0xc401) AM_WRITE(cso2_w) // /CSout2
+ AM_RANGE(0xc800, 0xc801) AM_READWRITE(csoki_r,csoki_w) // /CSoki
+ //AM_RANGE(0xcc00, 0xcc01) AM_READWRITE(cso3_r,cso3_w) // /CSout3 unused
+ //AM_RANGE(0xe000, 0xe003) AM_READWRITE(r_e0,w_e0) // /CSaux unused
+ADDRESS_MAP_END
+
+
+
+/*************************
+* Input Ports *
+*************************/
+
+
+static INPUT_PORTS_START( mgavegas )
+
+ PORT_START("INA")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) //200ptas in for change with 8 25 ptas coins
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) //25 ptas in to play
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) //100ptas in for change with 4 25 ptas coins
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW,IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Y) PORT_NAME("25 ptas level") //"hack" hopper always full
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("Door")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("Channel")
+
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x07, 0x02, "Percentage" )
+ PORT_DIPSETTING( 0x00, "70%" )
+ PORT_DIPSETTING( 0x01, "70%" )
+ PORT_DIPSETTING( 0x02, "72%" )
+ PORT_DIPSETTING( 0x03, "74%" )
+ PORT_DIPSETTING( 0x04, "76%" )
+ PORT_DIPSETTING( 0x05, "78%" )
+ PORT_DIPSETTING( 0x06, "80%" )
+ PORT_DIPSETTING( 0x07, "82%" )
+
+ PORT_DIPNAME( 0x08, 0x08, "Sound" )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_DIPNAME( 0x10, 0x10, "Speech" )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_DIPNAME( 0x60, 0x00, "Jackpot" )
+ PORT_DIPSETTING( 0x40, "Jackpot 1%" )
+ PORT_DIPSETTING( 0x60, "Jackpot 2,5%" )
+ PORT_DIPSETTING( 0x00, "Jackpot 5%" )
+ //PORT_DIPSETTING( 0x20, DEF_STR( On ) ) //unlisted
+
+ PORT_DIPNAME( 0x80, 0x80, "Reset" )
+ PORT_DIPSETTING( 0x80, "Normal Gameplay" )
+ PORT_DIPSETTING( 0x00, "Reset" )
+
+INPUT_PORTS_END
+
+/******************************
+* machine reset *
+******************************/
+
+void mgavegas_state::machine_reset()
+{
+
+ m_int=1;
+ m_custom_data=0xffffffffffffffff;
+
+ m_old_ckmod=1;
+ m_old_emod=0;
+
+ m_ckmod=0;
+ m_dmod=0;
+ m_emod=0;
+ m_inh=0;
+ m_hop=0;
+ m_seg=0;
+ m_printer=0;
+ m_auxp=0;
+
+
+ m_bobina_ctrl=0;
+ m_timbre=0;
+ m_coil_1=0;
+ m_coil_2=0;
+ m_coil_3=0;
+ m_cont_ent=0;
+ m_cont_sal=0;
+ m_cont_caj=0;
+
+ m_auxs=0;
+ m_anal=0;
+ m_anacl=0;
+ m_anacr=0;
+ m_anar=0;
+ m_pl=0;
+ m_pc=0;
+ m_pr=0;
+ m_luz_250_rul=0;
+ m_luz_100_rul=0;
+ m_luz_50_rlul=0;
+ m_luz_25_lrul=0;
+ m_luz_25_rrul=0;
+ m_fl=0;
+ m_fc=0;
+ m_fr=0;
+ m_insert_coin=0;
+ m_no_cambio=0;
+ m_fuse=0;
+ m_falta=0;
+ m_anag=0;
+ m_cl=0;
+ m_cc=0;
+ m_cr=0;
+ m_premio_s=0;
+ m_100=0;
+ m_200=0;
+ m_300=0;
+ m_500=0;
+ m_ml=0;
+ m_mc=0;
+ m_mr=0;
+
+ m_filter1->filter_rc_set_RC(FLT_RC_LOWPASS, 1000, 0, 0, CAP_N(1) ); /* RC out of MSM5205 R=1K C=1nF */
+ m_filter2->filter_rc_set_RC(FLT_RC_HIGHPASS, 3846, 0, 0, CAP_N(100 )); /*ALP3B active-hybrid filter fc=2.6Khz 2poles???*/
+}
+
+
+
+/******************************
+* machine init *
+******************************/
+
+DRIVER_INIT_MEMBER(mgavegas_state,mgavegas21)
+{
+ //hack to clear the irq on reti instruction
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0x00ea, 0x00ea, read8_delegate(FUNC(mgavegas_state::start_read), this));
+}
+
+DRIVER_INIT_MEMBER(mgavegas_state,mgavegas)
+{
+ //hack to clear the irq on reti instruction
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0x00e2, 0x00e2, read8_delegate(FUNC(mgavegas_state::start_read), this));
+}
+
+
+TIMER_DEVICE_CALLBACK_MEMBER( mgavegas_state::int_0 )
+{
+ if(m_int==0){
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
+ }
+}
+
+DRIVER_INIT_MEMBER(mgavegas_state,mgavegas133)
+{
+ //hack to clear the irq on reti instruction
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0x00dd, 0x00dd, read8_delegate(FUNC(mgavegas_state::start_read), this));
+}
+
+/*************************
+* Machine Drivers *
+*************************/
+
+
+static MACHINE_CONFIG_START( mgavegas, mgavegas_state )
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", Z80, CPU_CLK)
+ MCFG_CPU_PROGRAM_MAP(mgavegas_map)
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("int_0", mgavegas_state, int_0, attotime::from_hz(6000)) //6KHz from MSM5205 /VCK
+
+ MCFG_NVRAM_ADD_1FILL("nvram")
+
+ MCFG_TICKET_DISPENSER_ADD("hopper",attotime::from_msec(200),TICKET_MOTOR_ACTIVE_HIGH,TICKET_STATUS_ACTIVE_LOW);
+
+ /* sound hardware */
+
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("aysnd", AY8910, AY_CLK)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.3)
+ MCFG_AY8910_PORT_A_READ_CB(READ8(mgavegas_state, ay8910_a_r))
+ MCFG_AY8910_PORT_B_READ_CB(READ8(mgavegas_state, ay8910_b_r))
+
+ MCFG_SOUND_ADD("5205", MSM5205, MSM_CLK)
+ MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S64_4B)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 2.0)
+
+
+ MCFG_FILTER_RC_ADD("filter1", 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter2",2.0)
+ MCFG_FILTER_RC_ADD("filter2", 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
+
+
+ /* Video */
+ MCFG_DEFAULT_LAYOUT(layout_mgavegas)
+
+MACHINE_CONFIG_END
+
+
+/*************************
+* Rom Load *
+*************************/
+
+
+ROM_START(mgavegas)
+ ROM_REGION(0x8000, "maincpu", 0)
+ ROM_LOAD("vegas1-k2.3.bin", 0x0000, 0x8000, CRC(418b1d04) SHA1(27669a85ed52d5dab25d6ebea6ef3d9b01a4795d) )
+
+ ROM_REGION( 0x2000, "nvram", 0 )
+ ROM_LOAD( "mgavegas23.nv", 0x0000, 0x2000, CRC(d0a175b0) SHA1(7698135dbc020f459fdaa660bf488595b67b77d0) ) //default setting
+ROM_END
+
+ROM_START(mgavegas21)
+ ROM_REGION(0x8000, "maincpu", 0)
+ ROM_LOAD("vegas1-2.1.bin", 0x0000, 0x8000, CRC(a7e988a4) SHA1(32fa1684c79f4a132553fa41006f243d4b51cef6) )
+
+ ROM_REGION( 0x2000, "nvram", 0 )
+ ROM_LOAD( "mgavegas21.nv", 0x0000, 0x2000, CRC(a4471550) SHA1(b8527e9158b5563460febd1009b44c8d74dbae4e) ) //default setting
+ROM_END
+
+ROM_START(mgavegas133)
+ ROM_REGION(0x8000, "maincpu", 0)
+ ROM_LOAD("vegas1-1.33.bin", 0x0000, 0x8000, CRC(1eea7f0f) SHA1(6fb54b8e2ab19e5378a95192e5007175ad76bc7a) )
+
+ ROM_REGION( 0x2000, "nvram", 0 )
+ ROM_LOAD( "mgavegas133.nv", 0x0000, 0x2000, CRC(20fe4db7) SHA1(887b69468ac7e6490827a06cd1f0ff15228a9c73) ) //default setting
+ROM_END
+
+
+/*************************
+* Game Drivers *
+*************************/
+/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS*/
+GAME( 1985, mgavegas, 0, mgavegas, mgavegas, mgavegas_state, mgavegas, ROT0, "MGA", "Vegas 1 (Ver 2.3 dual coin pulse, shorter)", GAME_MECHANICAL )
+GAME( 1985, mgavegas21, mgavegas, mgavegas, mgavegas, mgavegas_state, mgavegas21, ROT0, "MGA", "Vegas 1 (Ver 2.1 dual coin pulse, longer)", GAME_MECHANICAL )
+GAME( 1985, mgavegas133, mgavegas, mgavegas, mgavegas, mgavegas_state, mgavegas133,ROT0, "MGA", "Vegas 1 (Ver 1.33 single coin pulse)", GAME_MECHANICAL )
diff --git a/src/mame/layout/mgavegas.lay b/src/mame/layout/mgavegas.lay
new file mode 100644
index 00000000000..0d7493c9e58
--- /dev/null
+++ b/src/mame/layout/mgavegas.lay
@@ -0,0 +1,247 @@
+<!-- fireball.lay -->
+
+<!-- 2014-01-15: Initial version. -->
+
+<mamelayout version="2">
+
+ <element name="red_led">
+ <rect>
+ <color red="1.0" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+
+ <element name="background">
+ <rect>
+ <bounds left="0" top="0" right="1" bottom="1" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+
+ <element name="P0"><text string="MR"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P1"><text string="MC"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P2"><text string="ML"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+
+ <element name="P3"><text string="CR"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P4"><text string="CC"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P5"><text string="CL"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+
+ <element name="P6"><text string="FR"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P7"><text string="FC"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P8"><text string="FL"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+
+ <element name="P9"><text string="PR"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P10"><text string="PC"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P11"><text string="PL"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+
+ <element name="P12"><text string="500"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P13"><text string="300"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P14"><text string="200"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P15"><text string="100"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+
+ <element name="P16"><text string="INSERT COIN"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P17"><text string="NO CAMBIO"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P18"><text string="FUSE"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P19"><text string="FALTA"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+
+ <element name="P20"><text string="MGA"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P21"><text string="50"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P22"><text string="MGA"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P23"><text string="25"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P24"><text string="250"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P25"><text string="MGA"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P26"><text string="100"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P27"><text string="MGA"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+ <element name="P28"><text string="25"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+
+ <element name="P29"><text string="Premio Sorpresa"><color red="1.0" green="1.0" blue="1.0" /></text></element>
+
+
+ <view name="Default Layout">
+
+ <!-- Background -->
+ <backdrop element="background">
+ <bounds left="0" top="0" right="480" bottom="500" />
+ </backdrop>
+
+ <!-- LEDs -->
+
+ <bezel name="ML" element="red_led">
+ <bounds x="280" y="50" width="5" height="5" />
+ </bezel>
+ <bezel name="MC" element="red_led">
+ <bounds x="320" y="50" width="5" height="5" />
+ </bezel>
+ <bezel name="MR" element="red_led">
+ <bounds x="360" y="50" width="5" height="5" />
+ </bezel>
+
+ <bezel name="CL" element="red_led">
+ <bounds x="280" y="100" width="5" height="5" />
+ </bezel>
+ <bezel name="CC" element="red_led">
+ <bounds x="320" y="100" width="5" height="5" />
+ </bezel>
+ <bezel name="CR" element="red_led">
+ <bounds x="360" y="100" width="5" height="5" />
+ </bezel>
+
+ <bezel name="FL" element="red_led">
+ <bounds x="280" y="150" width="5" height="5" />
+ </bezel>
+ <bezel name="FC" element="red_led">
+ <bounds x="320" y="150" width="5" height="5" />
+ </bezel>
+ <bezel name="FR" element="red_led">
+ <bounds x="360" y="150" width="5" height="5" />
+ </bezel>
+
+ <bezel name="PL" element="red_led">
+ <bounds x="280" y="200" width="5" height="5" />
+ </bezel>
+ <bezel name="PC" element="red_led">
+ <bounds x="320" y="200" width="5" height="5" />
+ </bezel>
+ <bezel name="PR" element="red_led">
+ <bounds x="360" y="200" width="5" height="5" />
+ </bezel>
+
+ <bezel name="500" element="red_led">
+ <bounds x="410" y="50" width="5" height="5" />
+ </bezel>
+ <bezel name="300" element="red_led">
+ <bounds x="410" y="100" width="5" height="5" />
+ </bezel>
+ <bezel name="200" element="red_led">
+ <bounds x="410" y="150" width="5" height="5" />
+ </bezel>
+ <bezel name="100" element="red_led">
+ <bounds x="410" y="200" width="5" height="5" />
+ </bezel>
+
+ <bezel name="INSERTCOIN" element="red_led">
+ <bounds x="270" y="250" width="5" height="5" />
+ </bezel>
+ <bezel name="NOCAMBIO" element="red_led">
+ <bounds x="310" y="250" width="5" height="5" />
+ </bezel>
+ <bezel name="FUSE" element="red_led">
+ <bounds x="350" y="250" width="5" height="5" />
+ </bezel>
+ <bezel name="FALTA" element="red_led">
+ <bounds x="400" y="250" width="5" height="5" />
+ </bezel>
+
+ <bezel name="MGA4" element="red_led">
+ <bounds x="35" y="350" width="30" height="30" />
+ </bezel>
+ <bezel name="50" element="red_led">
+ <bounds x="80" y="350" width="30" height="30" />
+ </bezel>
+ <bezel name="MGA3" element="red_led">
+ <bounds x="125" y="350" width="30" height="30" />
+ </bezel>
+ <bezel name="252" element="red_led">
+ <bounds x="170" y="350" width="30" height="30" />
+ </bezel>
+ <bezel name="250" element="red_led">
+ <bounds x="215" y="350" width="30" height="30" />
+ </bezel>
+ <bezel name="MGA2" element="red_led">
+ <bounds x="260" y="350" width="30" height="30" />
+ </bezel>
+ <bezel name="1002" element="red_led">
+ <bounds x="305" y="350" width="30" height="30" />
+ </bezel>
+ <bezel name="MGA" element="red_led">
+ <bounds x="350" y="350" width="30" height="30" />
+ </bezel>
+ <bezel name="25" element="red_led">
+ <bounds x="395" y="350" width="30" height="30" />
+ </bezel>
+
+
+ <bezel name="MGA4" element="red_led">
+ <bounds x="40" y="50" width="5" height="5" />
+ </bezel>
+ <bezel name="50" element="red_led">
+ <bounds x="60" y="100" width="5" height="5" />
+ </bezel>
+ <bezel name="MGA3" element="red_led">
+ <bounds x="80" y="150" width="5" height="5" />
+ </bezel>
+ <bezel name="252" element="red_led">
+ <bounds x="100" y="200" width="5" height="5" />
+ </bezel>
+ <bezel name="250" element="red_led">
+ <bounds x="120" y="250" width="5" height="5" />
+ </bezel>
+ <bezel name="MGA2" element="red_led">
+ <bounds x="140" y="200" width="5" height="5" />
+ </bezel>
+ <bezel name="1002" element="red_led">
+ <bounds x="160" y="150" width="5" height="5" />
+ </bezel>
+ <bezel name="MGA" element="red_led">
+ <bounds x="180" y="100" width="5" height="5" />
+ </bezel>
+ <bezel name="25" element="red_led">
+ <bounds x="200" y="50" width="5" height="5" />
+ </bezel>
+
+ <bezel name="PREMIOS" element="red_led">
+ <bounds x="220" y="150" width="10" height="10" />
+ </bezel>
+
+
+
+ <bezel element="P0"><bounds left="350" right="370" top="20" bottom="40" /></bezel>
+ <bezel element="P1"><bounds left="310" right="330" top="20" bottom="40" /></bezel>
+ <bezel element="P2"><bounds left="270" right="290" top="20" bottom="40" /></bezel>
+
+ <bezel element="P3"><bounds left="350" right="370" top="70" bottom="90" /></bezel>
+ <bezel element="P4"><bounds left="310" right="330" top="70" bottom="90" /></bezel>
+ <bezel element="P5"><bounds left="270" right="290" top="70" bottom="90" /></bezel>
+
+ <bezel element="P6"><bounds left="350" right="370" top="120" bottom="140" /></bezel>
+ <bezel element="P7"><bounds left="310" right="330" top="120" bottom="140" /></bezel>
+ <bezel element="P8"><bounds left="270" right="290" top="120" bottom="140" /></bezel>
+
+ <bezel element="P9"><bounds left="350" right="370" top="170" bottom="190" /></bezel>
+ <bezel element="P10"><bounds left="310" right="330" top="170" bottom="190" /></bezel>
+ <bezel element="P11"><bounds left="270" right="290" top="170" bottom="190" /></bezel>
+
+ <bezel element="P12"><bounds left="400" right="420" top="20" bottom="40" /></bezel>
+ <bezel element="P13"><bounds left="400" right="420" top="70" bottom="90" /></bezel>
+ <bezel element="P14"><bounds left="400" right="420" top="120" bottom="140" /></bezel>
+ <bezel element="P15"><bounds left="400" right="420" top="170" bottom="190" /></bezel>
+
+ <bezel element="P16"><bounds left="270" right="290" top="220" bottom="240" /></bezel>
+ <bezel element="P17"><bounds left="310" right="330" top="220" bottom="240" /></bezel>
+ <bezel element="P18"><bounds left="350" right="370" top="220" bottom="240" /></bezel>
+ <bezel element="P19"><bounds left="400" right="420" top="220" bottom="240" /></bezel>
+
+ <bezel element="P20"><bounds left="35" right="55" top="320" bottom="340" /></bezel>
+ <bezel element="P21"><bounds left="80" right="100" top="320" bottom="340" /></bezel>
+ <bezel element="P22"><bounds left="125" right="145" top="320" bottom="340" /></bezel>
+ <bezel element="P23"><bounds left="170" right="190" top="320" bottom="340" /></bezel>
+ <bezel element="P24"><bounds left="215" right="235" top="320" bottom="340" /></bezel>
+ <bezel element="P25"><bounds left="260" right="280" top="320" bottom="340" /></bezel>
+ <bezel element="P26"><bounds left="305" right="325" top="320" bottom="340" /></bezel>
+ <bezel element="P27"><bounds left="350" right="370" top="320" bottom="340" /></bezel>
+ <bezel element="P28"><bounds left="395" right="415" top="320" bottom="340" /></bezel>
+
+
+ <bezel element="P20"><bounds left="40" right="60" top="35" bottom="45" /></bezel>
+ <bezel element="P21"><bounds left="60" right="80" top="85" bottom="95" /></bezel>
+ <bezel element="P22"><bounds left="80" right="100" top="135" bottom="145" /></bezel>
+ <bezel element="P23"><bounds left="100" right="120" top="185" bottom="195" /></bezel>
+ <bezel element="P24"><bounds left="120" right="140" top="235" bottom="245" /></bezel>
+ <bezel element="P25"><bounds left="140" right="160" top="185" bottom="195" /></bezel>
+ <bezel element="P26"><bounds left="160" right="180" top="135" bottom="145" /></bezel>
+ <bezel element="P27"><bounds left="180" right="200" top="85" bottom="95" /></bezel>
+ <bezel element="P28"><bounds left="200" right="220" top="35" bottom="45" /></bezel>
+
+ <bezel element="P29"><bounds left="190" right="260" top="130" bottom="150" /></bezel>
+
+ </view>
+</mamelayout>
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 4823177f296..12cdd9af5b7 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -31763,5 +31763,10 @@ gluck2 // 1992 Yung Yu / CYE
// Valco fireball
fireball
+//M.G.A.
+mgavegas
+mgavegas21
+mgavegas133
+
amusco // 1987, Amusco.
cocoloco // 198?, Petaco S.A.
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index dd33e9b3225..a5f4222d5b5 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -2350,6 +2350,7 @@ $(MAMEOBJ)/misc.a: \
$(DRIVERS)/malzak.o $(VIDEO)/malzak.o \
$(DRIVERS)/manohman.o \
$(DRIVERS)/mcatadv.o $(VIDEO)/mcatadv.o \
+ $(DRIVERS)/mgavegas.o \
$(DRIVERS)/meyc8080.o \
$(DRIVERS)/meyc8088.o \
$(DRIVERS)/micro3d.o $(MACHINE)/micro3d.o $(VIDEO)/micro3d.o $(AUDIO)/micro3d.o \
@@ -2714,6 +2715,8 @@ $(DRIVERS)/mcr3.o: $(LAYOUT)/spyhunt.lh \
$(DRIVERS)/mgames.o: $(LAYOUT)/mgames.lh
+$(DRIVERS)/mgavegas.o: $(LAYOUT)/mgavegas.lh
+
$(DRIVERS)/mpu3.o: $(LAYOUT)/mpu3.lh
$(DRIVERS)/mpu4mod2sw.o: $(LAYOUT)/connect4.lh \