From 1e1f628755fd5f0194164618728d37b42569a285 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Tue, 7 Oct 2014 22:09:07 +0000 Subject: [PATCH] gts80.c : placeholder --- .gitattributes | 1 + src/mame/drivers/gts80.c | 68 +++++++++++++++--- src/mame/layout/gts80.lay | 140 ++++++++++++++++++++++++++++++++++++++ src/mame/mame.mak | 2 + 4 files changed, 201 insertions(+), 10 deletions(-) create mode 100644 src/mame/layout/gts80.lay diff --git a/.gitattributes b/.gitattributes index 753283463bc..168bc3d734e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6660,6 +6660,7 @@ src/mame/layout/gp_1.lay svneol=native#text/xml src/mame/layout/gp_2.lay svneol=native#text/xml src/mame/layout/grchamp.lay svneol=native#text/xml src/mame/layout/gridiron.lay svneol=native#text/xml +src/mame/layout/gts80.lay svneol=native#text/plain src/mame/layout/gunchamp.lay svneol=native#text/xml src/mame/layout/gunchamps.lay svneol=native#text/xml src/mame/layout/gunfight.lay svneol=native#text/xml diff --git a/src/mame/drivers/gts80.c b/src/mame/drivers/gts80.c index 9d4daa5b0a8..03716845d70 100644 --- a/src/mame/drivers/gts80.c +++ b/src/mame/drivers/gts80.c @@ -11,19 +11,27 @@ ToDO: ************************************************************************************************************/ -#include "emu.h" +#include "machine/genpin.h" #include "cpu/m6502/m6502.h" #include "machine/6532riot.h" +#include "gts80.lh" -class gts80_state : public driver_device +class gts80_state : public genpin_class { public: gts80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) + : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") { } DECLARE_DRIVER_INIT(gts80); + DECLARE_READ8_MEMBER(port1a_r); + DECLARE_READ8_MEMBER(port2a_r); + DECLARE_WRITE8_MEMBER(port1b_w); + DECLARE_WRITE8_MEMBER(port2a_w); + DECLARE_WRITE8_MEMBER(port2b_w); + DECLARE_WRITE8_MEMBER(port3a_w); + DECLARE_WRITE8_MEMBER(port3b_w); private: virtual void machine_reset(); required_device m_maincpu; @@ -45,6 +53,38 @@ ADDRESS_MAP_END static INPUT_PORTS_START( gts80 ) INPUT_PORTS_END +READ8_MEMBER( gts80_state::port1a_r ) +{ + return 0xff; +} + +READ8_MEMBER( gts80_state::port2a_r ) +{ + return 0xff; +} + +WRITE8_MEMBER( gts80_state::port1b_w ) +{ +} + +WRITE8_MEMBER( gts80_state::port2a_w ) +{ +//printf("A:%X ",data); +} + +WRITE8_MEMBER( gts80_state::port2b_w ) +{ +//printf("B:%X ",data); +} + +WRITE8_MEMBER( gts80_state::port3a_w ) +{ +} + +WRITE8_MEMBER( gts80_state::port3b_w ) +{ +} + void gts80_state::machine_reset() { } @@ -58,25 +98,33 @@ static MACHINE_CONFIG_START( gts80_s, gts80_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 850000) // xtal frequency not shown MCFG_CPU_PROGRAM_MAP(gts80_map) + + /* Video */ + MCFG_DEFAULT_LAYOUT(layout_gts80) + + /* Devices */ MCFG_DEVICE_ADD("riot1", RIOT6532, 850000) - //MCFG_RIOT6532_IN_PA_CB(READ8(gts80_state, port1a_r)) + MCFG_RIOT6532_IN_PA_CB(READ8(gts80_state, port1a_r)) // sw_r //MCFG_RIOT6532_OUT_PA_CB(WRITE8(gts80_state, port1a_w)) //MCFG_RIOT6532_IN_PB_CB(READ8(gts80_state, port1b_r)) - //MCFG_RIOT6532_OUT_PB_CB(WRITE8(gts80_state, port1b_w)) + MCFG_RIOT6532_OUT_PB_CB(WRITE8(gts80_state, port1b_w)) // sw_w MCFG_RIOT6532_IRQ_CB(INPUTLINE("maincpu", M6502_IRQ_LINE)) MCFG_DEVICE_ADD("riot2", RIOT6532, 850000) - //MCFG_RIOT6532_IN_PA_CB(READ8(gts80_state, port2a_r)) - //MCFG_RIOT6532_OUT_PA_CB(WRITE8(gts80_state, port2a_w)) + MCFG_RIOT6532_IN_PA_CB(READ8(gts80_state, port2a_r)) // pa7 - slam tilt + MCFG_RIOT6532_OUT_PA_CB(WRITE8(gts80_state, port2a_w)) // digit select //MCFG_RIOT6532_IN_PB_CB(READ8(gts80_state, port2b_r)) - //MCFG_RIOT6532_OUT_PB_CB(WRITE8(gts80_state, port2b_w)) + MCFG_RIOT6532_OUT_PB_CB(WRITE8(gts80_state, port2b_w)) // seg MCFG_RIOT6532_IRQ_CB(INPUTLINE("maincpu", M6502_IRQ_LINE)) MCFG_DEVICE_ADD("riot3", RIOT6532, 850000) //MCFG_RIOT6532_IN_PA_CB(READ8(gts80_state, port3a_r)) - //MCFG_RIOT6532_OUT_PA_CB(WRITE8(gts80_state, port3a_w)) + MCFG_RIOT6532_OUT_PA_CB(WRITE8(gts80_state, port3a_w)) // sol, snd //MCFG_RIOT6532_IN_PB_CB(READ8(gts80_state, port3b_r)) - //MCFG_RIOT6532_OUT_PB_CB(WRITE8(gts80_state, port3b_w)) + MCFG_RIOT6532_OUT_PB_CB(WRITE8(gts80_state, port3b_w)) // lamps MCFG_RIOT6532_IRQ_CB(INPUTLINE("maincpu", M6502_IRQ_LINE)) + /* Sound */ + MCFG_FRAGMENT_ADD( genpin_audio ) + /* related to src/mame/audio/gottlieb.c */ // MCFG_IMPORT_FROM(gts80s_s) MACHINE_CONFIG_END diff --git a/src/mame/layout/gts80.lay b/src/mame/layout/gts80.lay new file mode 100644 index 00000000000..129ca042d2c --- /dev/null +++ b/src/mame/layout/gts80.lay @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.mak b/src/mame/mame.mak index 329de7496aa..fcd77000974 100644 --- a/src/mame/mame.mak +++ b/src/mame/mame.mak @@ -2647,6 +2647,8 @@ $(DRIVERS)/goldnpkr.o: $(LAYOUT)/goldnpkr.lh \ $(LAYOUT)/pmpoker.lh \ $(LAYOUT)/upndown.lh +$(DRIVERS)/gts80.o: $(LAYOUT)/gts80.lh + $(DRIVERS)/lbeach.o: $(LAYOUT)/lbeach.lh $(DRIVERS)/goldstar.o: $(LAYOUT)/goldstar.lh \