From 34e05cf13a820eef619e40ca50e5eec1b43b71fe Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 8 Feb 2015 20:37:27 +0100 Subject: [PATCH] added tomy alienchase skeleton driver --- src/emu/cpu/amis2000/amis2000.c | 6 +- src/emu/cpu/ucom4/ucom4.c | 1 + src/mess/drivers/alnchase.c | 82 ++++++++++++++ src/mess/drivers/tmtennis.c | 2 +- src/mess/drivers/wildfire.c | 14 +-- src/mess/layout/alnchase.lay | 32 ++++++ src/mess/layout/wildfire.lay | 189 ++++++++++++++++++-------------- src/mess/mess.lst | 1 + src/mess/mess.mak | 2 + 9 files changed, 236 insertions(+), 93 deletions(-) create mode 100644 src/mess/drivers/alnchase.c create mode 100644 src/mess/layout/alnchase.lay diff --git a/src/emu/cpu/amis2000/amis2000.c b/src/emu/cpu/amis2000/amis2000.c index a49d86e5489..ab35f44edc7 100644 --- a/src/emu/cpu/amis2000/amis2000.c +++ b/src/emu/cpu/amis2000/amis2000.c @@ -4,7 +4,11 @@ American Microsystems, Inc.(AMI) S2000-family 4-bit MCU cores, introduced late 1970s Overall functionality is similar to (and probably derived from) NEC uCOM-4. - + + References: + - AMI MOS Products Catalog Winter 1979 + - AMI S2000 Programming Manual (rev. 2) + TODO: - unemulated opcodes (need more testing material) - support external program map diff --git a/src/emu/cpu/ucom4/ucom4.c b/src/emu/cpu/ucom4/ucom4.c index 4cec33617a6..4e0475092b7 100644 --- a/src/emu/cpu/ucom4/ucom4.c +++ b/src/emu/cpu/ucom4/ucom4.c @@ -11,6 +11,7 @@ TODO: - what happens with uCOM-43 opcodes on an uCOM-44/45 MCU? + - what's the data after the ROM data for? (eg. 2000-2047, official ROM size is 2000) */ diff --git a/src/mess/drivers/alnchase.c b/src/mess/drivers/alnchase.c new file mode 100644 index 00000000000..c09b567691b --- /dev/null +++ b/src/mess/drivers/alnchase.c @@ -0,0 +1,82 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/*************************************************************************** + + Tomy Alien Chase (manufactured in Japan) + * boards are labeled TN-16 + * NEC uCOM-43 MCU, labeled D553C 258 + * red/green VFD display with color overlay, 2-sided (opposing player sees a mirrored image) + + +***************************************************************************/ + +#include "emu.h" +#include "cpu/ucom4/ucom4.h" +#include "sound/speaker.h" + +#include "alnchase.lh" // this is a test layout, external artwork is necessary + + +class alnchase_state : public driver_device +{ +public: + alnchase_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_speaker(*this, "speaker") + { } + + required_device m_maincpu; + required_device m_speaker; + + virtual void machine_start(); +}; + + + +static INPUT_PORTS_START( alnchase ) +INPUT_PORTS_END + + + +/*************************************************************************** + + Machine Config + +***************************************************************************/ + +void alnchase_state::machine_start() +{ +} + + +static MACHINE_CONFIG_START( alnchase, alnchase_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz) + + MCFG_DEFAULT_LAYOUT(layout_alnchase) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + +ROM_START( alnchase ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "d553c-258", 0x0000, 0x0800, CRC(c5284ff5) SHA1(6a20aaacc9748f0e0335958f3cea482e36153704) ) +ROM_END + + +CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) diff --git a/src/mess/drivers/tmtennis.c b/src/mess/drivers/tmtennis.c index 735d513e380..faab1eb8665 100644 --- a/src/mess/drivers/tmtennis.c +++ b/src/mess/drivers/tmtennis.c @@ -14,7 +14,7 @@ #include "cpu/ucom4/ucom4.h" #include "sound/speaker.h" -#include "tmtennis.lh" +#include "tmtennis.lh" // this is a test layout, external artwork is necessary // master clock is from an LC circuit oscillating by default at 360kHz, // the difficulty switch puts a capacitor across it to slow it down to 260kHz diff --git a/src/mess/drivers/wildfire.c b/src/mess/drivers/wildfire.c index c54ad7e6dcf..9881cd28985 100644 --- a/src/mess/drivers/wildfire.c +++ b/src/mess/drivers/wildfire.c @@ -12,7 +12,7 @@ #include "cpu/amis2000/amis2000.h" #include "sound/speaker.h" -#include "wildfire.lh" +#include "wildfire.lh" // this is a test layout, external artwork is necessary // master clock is a single stage RC oscillator: R=?K, C=?pf, // S2150 default frequency is 850kHz @@ -44,7 +44,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(leds_decay_tick); void leds_update(); - bool index_is_7segled(int i); + bool index_is_7segled(int index); virtual void machine_start(); }; @@ -63,10 +63,10 @@ public: // decay time, in steps of 10ms #define LEDS_DECAY_TIME 4 -bool wildfire_state::index_is_7segled(int i) +inline bool wildfire_state::index_is_7segled(int index) { // first 3 A are 7segleds - return (i < 3); + return (index < 3); } void wildfire_state::leds_update() @@ -77,8 +77,6 @@ void wildfire_state::leds_update() { // update current state m_leds_state[i] = (~m_a >> i & 1) ? m_d : 0; - if (index_is_7segled(i)) - m_leds_state[i] = BITSWAP8(m_leds_state[i],7,0,1,2,3,4,5,6); active_state[i] = 0; @@ -101,7 +99,7 @@ void wildfire_state::leds_update() if (m_leds_cache[i] != active_state[i]) { if (index_is_7segled(i)) - output_set_digit_value(i, active_state[i] & 0x7f); + output_set_digit_value(i, BITSWAP8(active_state[i],7,0,1,2,3,4,5,6) & 0x7f); for (int j = 0; j < 8; j++) output_set_lamp_value(i*10 + j, active_state[i] >> j & 1); @@ -226,4 +224,4 @@ ROM_START( wildfire ) ROM_END -CONS( 1979, wildfire, 0, 0, wildfire, wildfire, driver_device, 0, "Parker Brothers", "Wildfire (prototype)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +CONS( 1979, wildfire, 0, 0, wildfire, wildfire, driver_device, 0, "Parker Brothers", "Wildfire (prototype)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mess/layout/alnchase.lay b/src/mess/layout/alnchase.lay new file mode 100644 index 00000000000..59ddac58d3e --- /dev/null +++ b/src/mess/layout/alnchase.lay @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mess/layout/wildfire.lay b/src/mess/layout/wildfire.lay index 05d3795516e..8ad3454ce01 100644 --- a/src/mess/layout/wildfire.lay +++ b/src/mess/layout/wildfire.lay @@ -26,99 +26,122 @@ - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mess/mess.lst b/src/mess/mess.lst index 8bc6a22f593..887668c85da 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -2610,3 +2610,4 @@ unk3403 elecdet wildfire tmtennis +alnchase diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 20f76a52dca..500658a1c8e 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -1788,6 +1788,7 @@ $(MESSOBJ)/tiki.a: \ $(MESS_DRIVERS)/tiki100.o \ $(MESSOBJ)/tomy.a: \ + $(MESS_DRIVERS)/alnchase.o \ $(MESS_DRIVERS)/tmtennis.o \ $(MESS_DRIVERS)/tutor.o \ @@ -2095,6 +2096,7 @@ $(MESS_DRIVERS)/acrnsys1.o: $(MESS_LAYOUT)/acrnsys1.lh $(MESS_DRIVERS)/aim65.o: $(MESS_LAYOUT)/aim65.lh $(MESS_DRIVERS)/aim65_40.o: $(MESS_LAYOUT)/aim65_40.lh $(MESS_DRIVERS)/alesis.o: $(MESS_LAYOUT)/sr16.lh +$(MESS_DRIVERS)/alnchase.o: $(MESS_LAYOUT)/alnchase.lh $(MESS_DRIVERS)/amaztron.o: $(MESS_LAYOUT)/amaztron.lh $(MESS_DRIVERS)/amico2k.o: $(MESS_LAYOUT)/amico2k.lh $(MESS_DRIVERS)/amiga.o: $(MESS_LAYOUT)/amiga.lh