summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2014-12-10 01:19:58 +0100
committer hap <happppp@users.noreply.github.com>2014-12-10 01:19:58 +0100
commit43d062e3127aaec05cfb2eff1b1b28451f5d530a (patch)
tree3d394190dff01548da9a7f1c2fbe1b889f3b1c8d
parent8d658122c76ab25367f40e2c804749b809d20c8d (diff)
(MESS)APF Mathemagician skeleton driver
-rw-r--r--src/mess/drivers/apf.c4
-rw-r--r--src/mess/drivers/mathmagi.c143
-rw-r--r--src/mess/drivers/merlin.c10
-rw-r--r--src/mess/drivers/simon.c4
-rw-r--r--src/mess/layout/mathmagi.lay80
-rw-r--r--src/mess/mess.lst1
-rw-r--r--src/mess/mess.mak4
7 files changed, 236 insertions, 10 deletions
diff --git a/src/mess/drivers/apf.c b/src/mess/drivers/apf.c
index 11cf134a2b7..38a4d6dfa6c 100644
--- a/src/mess/drivers/apf.c
+++ b/src/mess/drivers/apf.c
@@ -613,5 +613,5 @@ ROM_END
***************************************************************************/
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
-COMP(1979, apfimag, apfm1000, 0, apfimag, apfimag, driver_device, 0, "APF Electronics Inc", "APF Imagination Machine" , 0 )
-CONS(1978, apfm1000, 0, 0, apfm1000, apfm1000, driver_device, 0, "APF Electronics Inc", "APF M-1000" , 0 )
+COMP( 1979, apfimag, apfm1000, 0, apfimag, apfimag, driver_device, 0, "APF Electronics Inc.", "APF Imagination Machine", 0 )
+CONS( 1978, apfm1000, 0, 0, apfm1000, apfm1000, driver_device, 0, "APF Electronics Inc.", "APF M-1000", 0 )
diff --git a/src/mess/drivers/mathmagi.c b/src/mess/drivers/mathmagi.c
new file mode 100644
index 00000000000..7636cd1651b
--- /dev/null
+++ b/src/mess/drivers/mathmagi.c
@@ -0,0 +1,143 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/***************************************************************************
+
+ APF Mathemagician
+ * TMS1100 MP1030
+
+***************************************************************************/
+
+#include "emu.h"
+#include "cpu/tms0980/tms0980.h"
+
+#include "mathmagi.lh"
+
+// master clock is a single stage RC oscillator: R=68K, C=82pf,
+// according to the TMS 1000 series data manual this is around 200kHz
+#define MASTER_CLOCK (200000)
+
+
+class mathmagi_state : public driver_device
+{
+public:
+ mathmagi_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu")
+ { }
+
+ required_device<cpu_device> m_maincpu;
+
+ UINT16 m_o;
+ UINT16 m_r;
+
+ DECLARE_READ8_MEMBER(read_k);
+ DECLARE_WRITE16_MEMBER(write_o);
+ DECLARE_WRITE16_MEMBER(write_r);
+
+ virtual void machine_start();
+};
+
+
+/***************************************************************************
+
+ I/O
+
+***************************************************************************/
+
+READ8_MEMBER(mathmagi_state::read_k)
+{
+ return 0;
+}
+
+WRITE16_MEMBER(mathmagi_state::write_o)
+{
+}
+
+WRITE16_MEMBER(mathmagi_state::write_r)
+{
+}
+
+
+
+/***************************************************************************
+
+ Inputs
+
+***************************************************************************/
+
+/* physical button layout and labels is like this:
+
+ ON ONE [SEL] [NXT] [?] [/]
+ | | [7] [8] [9] [x]
+ OFF TWO [4] [5] [6] [-]
+ PLAYERS [1] [2] [3] [+]
+ [0] [_] [r] [=]
+*/
+
+static INPUT_PORTS_START( mathmagi )
+INPUT_PORTS_END
+
+
+
+/***************************************************************************
+
+ Machine Config
+
+***************************************************************************/
+
+void mathmagi_state::machine_start()
+{
+ m_o = 0;
+ m_r = 0;
+
+ save_item(NAME(m_o));
+ save_item(NAME(m_r));
+}
+
+
+static const UINT16 mathmagi_output_pla[0x20] =
+{
+ /* O output PLA configuration currently unknown */
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
+};
+
+
+static MACHINE_CONFIG_START( mathmagi, mathmagi_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
+ MCFG_TMS1XXX_OUTPUT_PLA(mathmagi_output_pla)
+ MCFG_TMS1XXX_READ_K_CB(READ8(mathmagi_state, read_k))
+ MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mathmagi_state, write_o))
+ MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mathmagi_state, write_r))
+
+ MCFG_DEFAULT_LAYOUT(layout_mathmagi)
+
+ /* no video! */
+
+ /* no sound! */
+MACHINE_CONFIG_END
+
+
+
+/***************************************************************************
+
+ Game driver(s)
+
+***************************************************************************/
+
+ROM_START( mathmagi )
+ ROM_REGION( 0x800, "maincpu", 0 )
+ ROM_LOAD( "mp1030", 0x0000, 0x800, CRC(a81d7ccb) SHA1(4756ce42f1ea28ce5fe6498312f8306f10370969) )
+
+ ROM_REGION( 867, "maincpu:mpla", 0 )
+ ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified
+ ROM_REGION( 365, "maincpu:opla", 0 )
+ ROM_LOAD( "tms1100_mathmagi_opla.pla", 0, 365, NO_DUMP )
+ROM_END
+
+
+COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW | GAME_NOT_WORKING )
diff --git a/src/mess/drivers/merlin.c b/src/mess/drivers/merlin.c
index 258e84ea29d..1c40a13f932 100644
--- a/src/mess/drivers/merlin.c
+++ b/src/mess/drivers/merlin.c
@@ -38,7 +38,7 @@
// master clock is a single stage RC oscillator: R=33K, C=100pf,
// according to the TMS 1000 series data manual this is around 350kHz
-#define MERLIN_RC_CLOCK (350000)
+#define MASTER_CLOCK (350000)
class merlin_state : public driver_device
@@ -177,11 +177,11 @@ static const INT16 speaker_levels[] = { 0, 32767, 0, 32767 }; // unknown too, du
static MACHINE_CONFIG_START( merlin, merlin_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, MERLIN_RC_CLOCK)
+ MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
MCFG_TMS1XXX_OUTPUT_PLA(merlin_output_pla)
- MCFG_TMS1XXX_READ_K_CB(READ8( merlin_state, read_k))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16( merlin_state, write_o))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16( merlin_state, write_r))
+ MCFG_TMS1XXX_READ_K_CB(READ8(merlin_state, read_k))
+ MCFG_TMS1XXX_WRITE_O_CB(WRITE16(merlin_state, write_o))
+ MCFG_TMS1XXX_WRITE_R_CB(WRITE16(merlin_state, write_r))
MCFG_DEFAULT_LAYOUT(layout_merlin)
diff --git a/src/mess/drivers/simon.c b/src/mess/drivers/simon.c
index 7453fe7d006..0f4bf637c25 100644
--- a/src/mess/drivers/simon.c
+++ b/src/mess/drivers/simon.c
@@ -25,7 +25,7 @@
// master clock is a single stage RC oscillator: R=33K, C=100pf,
// according to the TMS 1000 series data manual this is around 350kHz
-#define SIMON_RC_CLOCK (350000)
+#define MASTER_CLOCK (350000)
class simon_state : public driver_device
@@ -151,7 +151,7 @@ void simon_state::machine_start()
static MACHINE_CONFIG_START( simon, simon_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1000, SIMON_RC_CLOCK)
+ MCFG_CPU_ADD("maincpu", TMS1000, MASTER_CLOCK)
MCFG_TMS1XXX_READ_K_CB(READ8(simon_state, read_k))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(simon_state, write_o))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(simon_state, write_r))
diff --git a/src/mess/layout/mathmagi.lay b/src/mess/layout/mathmagi.lay
new file mode 100644
index 00000000000..d1a6771600f
--- /dev/null
+++ b/src/mess/layout/mathmagi.lay
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- note: the PLUS sign is supposed to be lop sided like that -->
+
+<!-- define elements -->
+
+ <element name="digit" defstate="0">
+ <led7seg><color red="1.0" green="0.3" blue="0.2" /></led7seg>
+ </element>
+
+ <element name="lamp_dot" defstate="0">
+ <disk state="1"><color red="1.0" green="0.3" blue="0.2" /></disk>
+ <disk state="0"><color red="0.125490" green="0.035294" blue="0.0235294" /></disk>
+ </element>
+ <element name="lamp_dash" defstate="0">
+ <rect state="1"><color red="1.0" green="0.3" blue="0.2" /></rect>
+ <rect state="0"><color red="0.125490" green="0.035294" blue="0.0235294" /></rect>
+ </element>
+ <element name="lamp_slash" defstate="0">
+ <text string="/" state="1"><color red="1.0" green="0.3" blue="0.2" /></text>
+ <text string="/" state="0"><color red="0.125490" green="0.035294" blue="0.0235294" /></text>
+ </element>
+ <element name="lamp_backslash" defstate="0">
+ <text string="\" state="1"><color red="1.0" green="0.3" blue="0.2" /></text>
+ <text string="\" state="0"><color red="0.125490" green="0.035294" blue="0.0235294" /></text>
+ </element>
+
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="0" right="100" top="0" bottom="15" />
+
+ <bezel name="digit0" element="digit">
+ <bounds x="0" y="0" width="10" height="15" />
+ </bezel>
+ <bezel name="digit1" element="digit">
+ <bounds x="10" y="0" width="10" height="15" />
+ </bezel>
+
+ <bezel name="digit2" element="digit">
+ <bounds x="30" y="0" width="10" height="15" />
+ </bezel>
+ <bezel name="digit3" element="digit">
+ <bounds x="40" y="0" width="10" height="15" />
+ </bezel>
+
+ <bezel name="digit4" element="digit">
+ <bounds x="60" y="0" width="10" height="15" />
+ </bezel>
+ <bezel name="digit5" element="digit">
+ <bounds x="70" y="0" width="10" height="15" />
+ </bezel>
+ <bezel name="digit6" element="digit">
+ <bounds x="80" y="0" width="10" height="15" />
+ </bezel>
+ <bezel name="digit7" element="digit">
+ <bounds x="90" y="0" width="10" height="15" />
+ </bezel>
+
+<!-- math symbols custom digit -->
+
+ <bezel name="lamp65" element="lamp_dash"><bounds x="21.5" y="7.25" width="7" height="0.5" /></bezel>
+
+ <bezel name="lamp61" element="lamp_slash"><bounds x="24" y="-0.5" width="5" height="7.5" /></bezel>
+ <bezel name="lamp64" element="lamp_slash"><bounds x="21" y="7" width="5" height="7.5" /></bezel>
+
+ <bezel name="lamp66" element="lamp_backslash"><bounds x="21" y="-0.5" width="5" height="7.5" /></bezel>
+ <bezel name="lamp62" element="lamp_backslash"><bounds x="24" y="7" width="5" height="7.5" /></bezel>
+
+ <bezel name="lamp60" element="lamp_dot"><bounds x="24.25" y="2.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="lamp63" element="lamp_dot"><bounds x="24.25" y="11.75" width="1.5" height="1.5" /></bezel>
+
+<!-- equals sign custom digit -->
+
+
+ </view>
+</mamelayout>
diff --git a/src/mess/mess.lst b/src/mess/mess.lst
index 8850556d714..283d98a0a11 100644
--- a/src/mess/mess.lst
+++ b/src/mess/mess.lst
@@ -1153,6 +1153,7 @@ m5p
// APF Electronics Inc.
apfm1000
apfimag
+mathmagi
// Tatung
einstein
diff --git a/src/mess/mess.mak b/src/mess/mess.mak
index 32a4526e145..b9a20ffe228 100644
--- a/src/mess/mess.mak
+++ b/src/mess/mess.mak
@@ -993,6 +993,7 @@ $(MESSOBJ)/amstrad.a: \
$(MESSOBJ)/apf.a: \
$(MESS_DRIVERS)/apf.o \
+ $(MESS_DRIVERS)/mathmagi.o \
$(MESSOBJ)/apollo.a: \
$(MESS_DRIVERS)/apollo.o $(MESS_MACHINE)/apollo.o $(MESS_MACHINE)/apollo_dbg.o $(MESS_MACHINE)/apollo_kbd.o $(MESS_VIDEO)/apollo.o \
@@ -1000,7 +1001,7 @@ $(MESSOBJ)/apollo.a: \
$(MESSOBJ)/apple.a: \
$(MESS_DRIVERS)/apple1.o $(MESS_MACHINE)/apple1.o $(MESS_VIDEO)/apple1.o \
$(MESS_DRIVERS)/apple2.o $(MESS_DRIVERS)/apple2e.o $(MESS_MACHINE)/apple2.o $(MESS_VIDEO)/apple2.o \
- $(MESS_DRIVERS)/tk2000.o \
+ $(MESS_DRIVERS)/tk2000.o \
$(MESS_DRIVERS)/apple2gs.o $(MESS_MACHINE)/apple2gs.o $(MESS_VIDEO)/apple2gs.o \
$(MESS_DRIVERS)/apple3.o $(MESS_MACHINE)/apple3.o $(MESS_VIDEO)/apple3.o \
$(MESS_DRIVERS)/lisa.o $(MESS_MACHINE)/lisa.o \
@@ -2114,6 +2115,7 @@ $(MESS_DRIVERS)/lc80.o: $(MESS_LAYOUT)/lc80.lh
$(MESS_DRIVERS)/llc.o: $(MESS_LAYOUT)/llc1.lh
$(MESS_DRIVERS)/lynx.o: $(MESS_LAYOUT)/lynx.lh
$(MESS_DRIVERS)/mac.o: $(MESS_LAYOUT)/mac.lh
+$(MESS_DRIVERS)/mathmagi.o: $(MESS_LAYOUT)/mathmagi.lh
$(MESS_MACHINE)/megacd.o: $(MESS_LAYOUT)/megacd.lh
$(MESS_DRIVERS)/mekd2.o: $(MESS_LAYOUT)/mekd2.lh
$(MESS_DRIVERS)/mephisto.o: $(MESS_LAYOUT)/mephisto.lh