summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/nsm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/nsm.cpp')
-rw-r--r--src/mame/drivers/nsm.cpp182
1 files changed, 0 insertions, 182 deletions
diff --git a/src/mame/drivers/nsm.cpp b/src/mame/drivers/nsm.cpp
deleted file mode 100644
index 50782e39887..00000000000
--- a/src/mame/drivers/nsm.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Robbbert
-/********************************************************************************
-
- PINBALL
- NSM (Lowen) : Hot Fire Birds
-
- Schematic and PinMAME used as references
-
- Everything in this machine is controlled by a serial bus based on the
- processor's CRU pins (serial i/o).
-
-ToDo:
-- Inputs (i have no idea how CRU inputs work)
-- Mechanical sounds
-- Further testing, etc
-
-*********************************************************************************/
-
-#include "emu.h"
-#include "machine/genpin.h"
-
-#include "cpu/tms9900/tms9995.h"
-#include "sound/ay8910.h"
-#include "speaker.h"
-
-#include "nsm.lh"
-
-
-class nsm_state : public driver_device
-{
-public:
- nsm_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag)
- , m_maincpu(*this, "maincpu")
- , m_digits(*this, "digit%u", 0U)
- { }
-
- void nsm(machine_config &config);
-
-private:
-
- uint8_t ff_r();
- void cru_w(offs_t offset, uint8_t data);
- void oe_w(uint8_t data);
- void nsm_io_map(address_map &map);
- void nsm_map(address_map &map);
-
- uint8_t m_cru_data[9];
- uint8_t m_cru_count;
- virtual void machine_reset() override;
- virtual void machine_start() override { m_digits.resolve(); }
- required_device<tms9995_device> m_maincpu;
- output_finder<60> m_digits;
-};
-
-void nsm_state::nsm_map(address_map &map)
-{
- map(0x0000, 0x7fff).rom();
- map(0xe000, 0xefff).ram();
- map(0xffec, 0xffed).w("ay1", FUNC(ay8910_device::address_data_w));
- map(0xffee, 0xffef).w("ay2", FUNC(ay8910_device::address_data_w));
-}
-
-void nsm_state::nsm_io_map(address_map &map)
-{
- // 00-71 selected by IC600 (74LS151)
- map(0x0000, 0x001f).r(FUNC(nsm_state::ff_r)); // 5v supply
- map(0x0100, 0x011f).nopr(); // antenna
- map(0x0200, 0x021f).nopr(); // reset circuit
- map(0x0300, 0x031f).r(FUNC(nsm_state::ff_r)); // service plug
- map(0x0400, 0x041f).r(FUNC(nsm_state::ff_r)); // service plug
- map(0x0500, 0x051f).r(FUNC(nsm_state::ff_r)); // test of internal battery
- map(0x0600, 0x061f).r(FUNC(nsm_state::ff_r)); // sum of analog outputs of ay2
- //map(0x0700, 0x071f).nopr(); // serial data in
- map(0x1ee0, 0x1efb).nopw();
- map(0xfe40, 0xffff).nopr();
- map(0xff60, 0xff7f).w(FUNC(nsm_state::cru_w));
- map(0xffa0, 0xffa3).w(FUNC(nsm_state::oe_w));
-}
-
-static INPUT_PORTS_START( nsm )
-INPUT_PORTS_END
-
-uint8_t nsm_state::ff_r() { return 1; }
-
-void nsm_state::oe_w(uint8_t data)
-{
- m_cru_count = 9;
-}
-
-void nsm_state::cru_w(offs_t offset, uint8_t data)
-{
- offset &= 7;
- if (!offset)
- {
- m_cru_count--;
- m_cru_data[m_cru_count] = 0;
- }
- m_cru_data[m_cru_count] |= (data << offset);
-
- uint8_t i,j;
- int segments;
- if (!m_cru_count && (offset == 7))
- {
- m_cru_count = 9;
- //for (i = 0; i < 9; i++) printf("%02X ",m_cru_data[i]);printf("\n");
- for (i = 0; i < 8; i++)
- {
- if (BIT(m_cru_data[0], i))
- {
- for (j = 0; j < 5; j++)
- {
- segments = m_cru_data[8-j]^0xff;
- m_digits[j * 10 + i] = bitswap<16>(segments, 8, 8, 8, 8, 8, 8, 0, 0, 1, 1, 2, 3, 4, 5, 6, 7);
- }
- }
- }
- }
-}
-
-void nsm_state::machine_reset()
-{
- // Disable auto wait state generation by raising the READY line on reset
- m_maincpu->ready_line(ASSERT_LINE);
- m_maincpu->reset_line(ASSERT_LINE);
-}
-
-void nsm_state::nsm(machine_config &config)
-{
- // CPU TMS9995, standard variant; no line connection
- TMS9995(config, m_maincpu, 11052000);
- m_maincpu->set_addrmap(AS_PROGRAM, &nsm_state::nsm_map);
- m_maincpu->set_addrmap(AS_IO, &nsm_state::nsm_io_map);
-
- /* Video */
- config.set_default_layout(layout_nsm);
-
- /* Sound */
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
- AY8912(config, "ay1", 11052000/8).add_route(ALL_OUTPUTS, "lspeaker", 0.75);
- AY8912(config, "ay2", 11052000/8).add_route(ALL_OUTPUTS, "rspeaker", 0.75);
-}
-
-/*-------------------------------------------------------------------
-/ Cosmic Flash (1985)
-/-------------------------------------------------------------------*/
-ROM_START(cosflnsm)
- ROM_REGION(0x10000, "maincpu", 0)
- ROM_LOAD("ic602.bin", 0x0000, 0x2000, CRC(1ce79cd7) SHA1(d5caf6d4323cc43a9c4379b51630190bf5799202))
- ROM_LOAD("ic603.bin", 0x2000, 0x2000, CRC(538de9f8) SHA1(c64942ffa600a2a7a37b986e1a346d351d0b65eb))
- ROM_LOAD("ic604.bin", 0x4000, 0x2000, CRC(4b52e5d7) SHA1(1547bb7a06ff0bdf55c635b2f4e57b7d93a191ee))
-ROM_END
-
-/*-------------------------------------------------------------------
-/ Hot Fire Birds (1985)
-/-------------------------------------------------------------------*/
-ROM_START(firebird)
- ROM_REGION(0x10000, "maincpu", 0)
- ROM_LOAD("nsmf02.764", 0x0000, 0x2000, CRC(236b5780) SHA1(19ef6e1fc900e5d94f615a4316f0383ed5ee939c))
- ROM_LOAD("nsmf03.764", 0x2000, 0x2000, CRC(d88c6ef5) SHA1(00edeefaab7e1141741aa132e6f7e56a911573be))
- ROM_LOAD("nsmf04.764", 0x4000, 0x2000, CRC(38a8add4) SHA1(74f781edc31aad07411feacad53c5f6cc73d09f4))
-ROM_END
-
-/*-------------------------------------------------------------------
-/ Tag-Team Pinball (1986)
-/-------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------
-/ The Games (1985)
-/-------------------------------------------------------------------*/
-ROM_START(gamesnsm)
- ROM_REGION(0x10000, "maincpu", 0)
- ROM_LOAD("151595-602.bin", 0x0000, 0x2000, CRC(18f3e309) SHA1(f587d40ddf128f4e040e660c054e98cbebad99c7))
- ROM_LOAD("151596-603.bin", 0x2000, 0x2000, CRC(fdf1b48b) SHA1(fd63ef5e49aa4b84b10972e118bd54219d680d36))
- ROM_LOAD("151597-604.bin", 0x4000, 0x2000, CRC(5c8a3547) SHA1(843a56012227a61ff068bc1e14baf090d4a95fe1))
-ROM_END
-
-GAME(1985, cosflnsm, 0, nsm, nsm, nsm_state, empty_init, ROT0, "NSM", "Cosmic Flash (NSM)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL)
-GAME(1985, firebird, 0, nsm, nsm, nsm_state, empty_init, ROT0, "NSM", "Hot Fire Birds", MACHINE_NOT_WORKING | MACHINE_MECHANICAL)
-GAME(1985, gamesnsm, 0, nsm, nsm, nsm_state, empty_init, ROT0, "NSM", "The Games (NSM)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL)