From 43d062e3127aaec05cfb2eff1b1b28451f5d530a Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 10 Dec 2014 01:19:58 +0100 Subject: (MESS)APF Mathemagician skeleton driver --- src/mess/drivers/apf.c | 4 +- src/mess/drivers/mathmagi.c | 143 +++++++++++++++++++++++++++++++++++++++++++ src/mess/drivers/merlin.c | 10 +-- src/mess/drivers/simon.c | 4 +- src/mess/layout/mathmagi.lay | 80 ++++++++++++++++++++++++ src/mess/mess.lst | 1 + src/mess/mess.mak | 4 +- 7 files changed, 236 insertions(+), 10 deletions(-) create mode 100644 src/mess/drivers/mathmagi.c create mode 100644 src/mess/layout/mathmagi.lay 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 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 -- cgit v1.2.3