From bd6e97b8fa09f886e5d8f7d8ad96c55fe3be88fd Mon Sep 17 00:00:00 2001 From: Robbbert Date: Mon, 18 Aug 2014 09:44:53 +0000 Subject: [PATCH] ltd.c : placeholder --- .gitattributes | 1 + src/mame/drivers/ltd.c | 245 ++++++++++++++++++++++++---------------- src/mame/layout/ltd.lay | 154 +++++++++++++++++++++++++ src/mame/mame.mak | 2 + 4 files changed, 306 insertions(+), 96 deletions(-) create mode 100644 src/mame/layout/ltd.lay diff --git a/.gitattributes b/.gitattributes index 5897618b849..d21fed9c519 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6572,6 +6572,7 @@ src/mame/layout/kungfur.lay svneol=native#text/xml src/mame/layout/lagunar.lay svneol=native#text/xml src/mame/layout/lazercmd.lay svneol=native#text/xml src/mame/layout/lbeach.lay svneol=native#text/xml +src/mame/layout/ltd.lay svneol=native#text/plain src/mame/layout/luckgrln.lay svneol=native#text/xml src/mame/layout/lucky74.lay svneol=native#text/xml src/mame/layout/lucky8.lay svneol=native#text/xml diff --git a/src/mame/drivers/ltd.c b/src/mame/drivers/ltd.c index 34e604a0aae..de08ce4ff1d 100644 --- a/src/mame/drivers/ltd.c +++ b/src/mame/drivers/ltd.c @@ -1,36 +1,50 @@ /******************************************************************************* -Pinball -LTD + PINBALL + LTD (Brazil) + + Not much info available for these machines. + Used PinMAME as a reference. + +ToDo: +- Everything -After running for about 2 minutes, it totally freezes. Looks like a core bug. ********************************************************************************/ -#include "emu.h" +#include "machine/genpin.h" #include "cpu/m6800/m6800.h" +#include "ltd.lh" -class ltd_state : public driver_device +class ltd_state : public genpin_class { public: ltd_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + : genpin_class(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_p_ram(*this, "nvram") { } -protected: - - // devices - required_device m_maincpu; - - // driver_device overrides - virtual void machine_reset(); -public: DECLARE_DRIVER_INIT(ltd); + DECLARE_READ8_MEMBER(io_r); + DECLARE_WRITE8_MEMBER(io_w); + TIMER_DEVICE_CALLBACK_MEMBER(timer_r); +private: + UINT8 m_out_offs; + virtual void machine_reset(); + required_device m_maincpu; + required_shared_ptr m_p_ram; }; -static ADDRESS_MAP_START( ltd_map, AS_PROGRAM, 8, ltd_state ) +static ADDRESS_MAP_START( ltd3_map, AS_PROGRAM, 8, ltd_state ) + AM_RANGE(0x0000, 0x007f) AM_RAM AM_SHARE("nvram") // internal to the cpu + AM_RANGE(0x0080, 0x00ff) AM_READ(io_r) + AM_RANGE(0x0800, 0x2fff) AM_WRITE(io_w) + AM_RANGE(0xc000, 0xcfff) AM_ROM AM_MIRROR(0x3000) AM_REGION("roms", 0) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( ltd4_map, AS_PROGRAM, 8, ltd_state ) AM_RANGE(0x0000, 0x01ff) AM_RAM //AM_RANGE(0x0800, 0x0800) AM_WRITE(cycle_reset_w) //AM_RANGE(0x0c00, 0x0c00) AM_WRITE(ay8910_1_reset) @@ -40,10 +54,10 @@ static ADDRESS_MAP_START( ltd_map, AS_PROGRAM, 8, ltd_state ) //AM_RANGE(0x2800, 0x2800) AM_WRITE(auxlamps_w) //AM_RANGE(0x3000, 0x3000) AM_WRITE(ay8910_0_data_w) //AM_RANGE(0x3800, 0x3800) AM_WRITE(ay8910_1_data_w) - AM_RANGE(0xc000, 0xffff) AM_ROM + AM_RANGE(0xc000, 0xdfff) AM_ROM AM_MIRROR(0x2000) AM_REGION("roms", 0) ADDRESS_MAP_END -static ADDRESS_MAP_START( ltd_io, AS_IO, 8, ltd_state ) +static ADDRESS_MAP_START( ltd4_io, AS_IO, 8, ltd_state ) //AM_RANGE(0x0100, 0x0100) AM_READWRITE //AM_RANGE(0x0101, 0x0101) AM_WRITE( ADDRESS_MAP_END @@ -51,111 +65,150 @@ ADDRESS_MAP_END static INPUT_PORTS_START( ltd ) INPUT_PORTS_END +// switches +READ8_MEMBER( ltd_state::io_r ) +{ + return 0; +} + +// Lamps +WRITE8_MEMBER( ltd_state::io_w ) +{ + offset >>= 10; // reduces offsets to 1 per bank +} + void ltd_state::machine_reset() { + m_out_offs = 0; } -DRIVER_INIT_MEMBER(ltd_state,ltd) +DRIVER_INIT_MEMBER( ltd_state, ltd ) { } -static MACHINE_CONFIG_START( ltd, ltd_state ) +TIMER_DEVICE_CALLBACK_MEMBER( ltd_state::timer_r ) +{ + static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0 }; // 7447 + m_out_offs++; + + if (m_out_offs < 0x40) + { + UINT8 display = (m_out_offs >> 3) & 7; + UINT8 digit = m_out_offs & 7; + output_set_digit_value(display * 10 + digit, patterns[m_p_ram[m_out_offs]&15]); + } + else + if (m_out_offs == 0x4a) // outhole + { + if (BIT(m_p_ram[m_out_offs], 0)) + m_samples->start(0, 5); + } + else + if (m_out_offs == 0x4b) // knocker (not strapids) + { + if (BIT(m_p_ram[m_out_offs], 0)) + m_samples->start(0, 6); + } +} + +static MACHINE_CONFIG_START( ltd3, ltd_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M6803, 1000000) - MCFG_CPU_PROGRAM_MAP(ltd_map) - MCFG_CPU_IO_MAP(ltd_io) + MCFG_CPU_ADD("maincpu", M6802, XTAL_3_579545MHz) + MCFG_CPU_PROGRAM_MAP(ltd3_map) + + MCFG_NVRAM_ADD_0FILL("nvram") + + /* Video */ + MCFG_DEFAULT_LAYOUT(layout_ltd) + + /* Sound */ + MCFG_FRAGMENT_ADD( genpin_audio ) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_r", ltd_state, timer_r, attotime::from_hz(500)) MACHINE_CONFIG_END -/*------------------------------------------------------------------- -/ Al Capone -/-------------------------------------------------------------------*/ -ROM_START(alcapone) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("alcapo_l.bin", 0xc000, 0x1000, CRC(c4270ba8) SHA1(f3d80af9900c94df2d43f2755341a346a0b64c87)) - ROM_RELOAD(0xe000, 0x1000) - ROM_LOAD("alcapo_h.bin", 0xd000, 0x1000, CRC(279f766d) SHA1(453c58e44c4ef8f1f9eb752b6163c61ebed70b27)) - ROM_RELOAD(0xf000, 0x1000) -ROM_END +static MACHINE_CONFIG_START( ltd4, ltd_state ) + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", M6803, XTAL_3_579545MHz) + MCFG_CPU_PROGRAM_MAP(ltd4_map) + MCFG_CPU_IO_MAP(ltd4_io) + + /* Video */ + MCFG_DEFAULT_LAYOUT(layout_ltd) + + /* Sound */ + MCFG_FRAGMENT_ADD( genpin_audio ) +MACHINE_CONFIG_END /*------------------------------------------------------------------- / Atlantis /-------------------------------------------------------------------*/ ROM_START(atla_ltd) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("atlantis.bin", 0xc000, 0x0800, CRC(c61be043) SHA1(e6c4463f59a5743fa34aa55beeb6f536ad9f1b56)) - ROM_RELOAD(0xc800, 0x0800) - ROM_RELOAD(0xd000, 0x0800) - ROM_RELOAD(0xd800, 0x0800) - ROM_RELOAD(0xe000, 0x0800) - ROM_RELOAD(0xe800, 0x0800) - ROM_RELOAD(0xf000, 0x0800) - ROM_RELOAD(0xf800, 0x0800) + ROM_REGION(0x1000, "roms", 0) + ROM_LOAD("atlantis.bin", 0x0000, 0x0800, CRC(c61be043) SHA1(e6c4463f59a5743fa34aa55beeb6f536ad9f1b56)) + ROM_RELOAD(0x0800, 0x0800) ROM_END /*------------------------------------------------------------------- / Black Hole /-------------------------------------------------------------------*/ ROM_START(bhol_ltd) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("blackhol.bin", 0xc000, 0x0800, CRC(9f6ae35e) SHA1(c17bf08a41c6cf93550671b0724c58e8ac302c33)) - ROM_RELOAD(0xc800, 0x0800) - ROM_RELOAD(0xd000, 0x0800) - ROM_RELOAD(0xd800, 0x0800) - ROM_RELOAD(0xe000, 0x0800) - ROM_RELOAD(0xe800, 0x0800) - ROM_RELOAD(0xf000, 0x0800) - ROM_RELOAD(0xf800, 0x0800) -ROM_END - -/*------------------------------------------------------------------- -/ Columbia -/-------------------------------------------------------------------*/ -ROM_START(columbia) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("columb-d.bin", 0xc000, 0x1000, NO_DUMP) - ROM_RELOAD(0xe000, 0x1000) - ROM_LOAD("columb-e.bin", 0xd000, 0x1000, CRC(013abca0) SHA1(269376af92368d214c3d09ec6d3eb653841666f3)) - ROM_RELOAD(0xf000, 0x1000) -ROM_END - -/*------------------------------------------------------------------- -/ Cowboy Eight Ball -/-------------------------------------------------------------------*/ -ROM_START(cowboy) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("cowboy_l.bin", 0xc000, 0x1000, CRC(87befe2a) SHA1(93fdf40b10e53d7d95e5dc72923b6be887411fc0)) - ROM_RELOAD(0xe000, 0x1000) - ROM_LOAD("cowboy_h.bin", 0xd000, 0x1000, CRC(105e5d7b) SHA1(75edeab8c8ba19f334479133802acbc25f405763)) - ROM_RELOAD(0xf000, 0x1000) -ROM_END - -/*------------------------------------------------------------------- -/ Mr. & Mrs. Pec-Men -/-------------------------------------------------------------------*/ -ROM_START(pecmen) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("pecmen_l.bin", 0xc000, 0x1000, CRC(f86c724e) SHA1(635ec94a1c6e77800ef9774102cc639be86c4261)) - ROM_RELOAD(0xe000, 0x1000) - ROM_LOAD("pecmen_h.bin", 0xd000, 0x1000, CRC(013abca0) SHA1(269376af92368d214c3d09ec6d3eb653841666f3)) - ROM_RELOAD(0xf000, 0x1000) + ROM_REGION(0x1000, "roms", 0) + ROM_LOAD("blackhol.bin", 0x0000, 0x0800, CRC(9f6ae35e) SHA1(c17bf08a41c6cf93550671b0724c58e8ac302c33)) + ROM_RELOAD(0x0800, 0x0800) ROM_END /*------------------------------------------------------------------- / Zephy /-------------------------------------------------------------------*/ ROM_START(zephy) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("zephy.l2", 0xc000, 0x1000, CRC(8dd11287) SHA1(8133d0c797eb0fdb56d83fc55da91bfc3cddc9e3)) - ROM_RELOAD(0xd000, 0x1000) - ROM_RELOAD(0xe000, 0x1000) - ROM_RELOAD(0xf000, 0x1000) + ROM_REGION(0x1000, "roms", 0) + ROM_LOAD("zephy.l2", 0x0000, 0x1000, CRC(8dd11287) SHA1(8133d0c797eb0fdb56d83fc55da91bfc3cddc9e3)) ROM_END +/*------------------------------------------------------------------- +/ Cowboy Eight Ball +/-------------------------------------------------------------------*/ +ROM_START(cowboy) + ROM_REGION(0x2000, "roms", 0) + ROM_LOAD("cowboy_l.bin", 0x0000, 0x1000, CRC(87befe2a) SHA1(93fdf40b10e53d7d95e5dc72923b6be887411fc0)) + ROM_LOAD("cowboy_h.bin", 0x1000, 0x1000, CRC(105e5d7b) SHA1(75edeab8c8ba19f334479133802acbc25f405763)) +ROM_END -GAME(198?, alcapone, 0, ltd, ltd, ltd_state, ltd, ROT0, "LTD", "Al Capone", GAME_IS_SKELETON_MECHANICAL) -GAME(19??, atla_ltd, 0, ltd, ltd, ltd_state, ltd, ROT0, "LTD", "Atlantis (LTD)", GAME_IS_SKELETON_MECHANICAL) -GAME(19??, bhol_ltd, 0, ltd, ltd, ltd_state, ltd, ROT0, "LTD", "Black Hole (LTD)", GAME_IS_SKELETON_MECHANICAL) -GAME(198?, columbia, 0, ltd, ltd, ltd_state, ltd, ROT0, "LTD", "Columbia", GAME_IS_SKELETON_MECHANICAL) -GAME(198?, cowboy, 0, ltd, ltd, ltd_state, ltd, ROT0, "LTD", "Cowboy Eight Ball", GAME_IS_SKELETON_MECHANICAL) -GAME(198?, pecmen, 0, ltd, ltd, ltd_state, ltd, ROT0, "LTD", "Mr. & Mrs. Pec-Men", GAME_IS_SKELETON_MECHANICAL) -GAME(198?, zephy, 0, ltd, ltd, ltd_state, ltd, ROT0, "LTD", "Zephy", GAME_IS_SKELETON_MECHANICAL) +/*------------------------------------------------------------------- +/ Mr. & Mrs. Pec-Men +/-------------------------------------------------------------------*/ +ROM_START(pecmen) + ROM_REGION(0x2000, "roms", 0) + ROM_LOAD("pecmen_l.bin", 0x0000, 0x1000, CRC(f86c724e) SHA1(635ec94a1c6e77800ef9774102cc639be86c4261)) + ROM_LOAD("pecmen_h.bin", 0x1000, 0x1000, CRC(013abca0) SHA1(269376af92368d214c3d09ec6d3eb653841666f3)) +ROM_END + +/*------------------------------------------------------------------- +/ Al Capone +/-------------------------------------------------------------------*/ +ROM_START(alcapone) + ROM_REGION(0x2000, "roms", 0) + ROM_LOAD("alcapo_l.bin", 0x0000, 0x1000, CRC(c4270ba8) SHA1(f3d80af9900c94df2d43f2755341a346a0b64c87)) + ROM_LOAD("alcapo_h.bin", 0x1000, 0x1000, CRC(279f766d) SHA1(453c58e44c4ef8f1f9eb752b6163c61ebed70b27)) +ROM_END + +/*------------------------------------------------------------------- +/ Columbia +/-------------------------------------------------------------------*/ +ROM_START(columbia) + ROM_REGION(0x2000, "roms", 0) + ROM_LOAD("columb-d.bin", 0x0000, 0x1000, NO_DUMP) + ROM_LOAD("columb-e.bin", 0x1000, 0x1000, CRC(013abca0) SHA1(269376af92368d214c3d09ec6d3eb653841666f3)) +ROM_END + +// system 3 +GAME(1981, atla_ltd, 0, ltd3, ltd, ltd_state, ltd, ROT0, "LTD", "Atlantis (LTD)", GAME_IS_SKELETON_MECHANICAL) +GAME(1981, bhol_ltd, 0, ltd3, ltd, ltd_state, ltd, ROT0, "LTD", "Black Hole (LTD)", GAME_IS_SKELETON_MECHANICAL) +GAME(1981, zephy, 0, ltd3, ltd, ltd_state, ltd, ROT0, "LTD", "Zephy", GAME_IS_SKELETON_MECHANICAL) + +// system 4 +GAME(1981, cowboy, 0, ltd4, ltd, ltd_state, ltd, ROT0, "LTD", "Cowboy Eight Ball", GAME_IS_SKELETON_MECHANICAL) +GAME(1981, pecmen, 0, ltd4, ltd, ltd_state, ltd, ROT0, "LTD", "Mr. & Mrs. Pec-Men", GAME_IS_SKELETON_MECHANICAL) +GAME(1981, alcapone, 0, ltd4, ltd, ltd_state, ltd, ROT0, "LTD", "Al Capone", GAME_IS_SKELETON_MECHANICAL) +GAME(1982, columbia, 0, ltd4, ltd, ltd_state, ltd, ROT0, "LTD", "Columbia", GAME_IS_SKELETON_MECHANICAL) diff --git a/src/mame/layout/ltd.lay b/src/mame/layout/ltd.lay new file mode 100644 index 00000000000..fcf9837c44c --- /dev/null +++ b/src/mame/layout/ltd.lay @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.mak b/src/mame/mame.mak index cbe2ee80f59..83a392e3aa7 100644 --- a/src/mame/mame.mak +++ b/src/mame/mame.mak @@ -2666,6 +2666,8 @@ $(DRIVERS)/kungfur.o: $(LAYOUT)/kungfur.lh $(DRIVERS)/lazercmd.o: $(LAYOUT)/lazercmd.lh \ $(LAYOUT)/medlanes.lh +$(DRIVERS)/ltd.o: $(LAYOUT)/ltd.lh + $(DRIVERS)/luckgrln.o: $(LAYOUT)/luckgrln.lh $(DRIVERS)/lucky74.o: $(LAYOUT)/lucky74.lh