From 47900ba40134f8540b8511e3d3d82c1e5af1d4bc Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 12 Apr 2017 15:53:00 -0400 Subject: Add TMP90PH44 device type for Sega 837-13551 I/O Board (nw) --- src/devices/cpu/tlcs90/tlcs90.cpp | 21 +++++++++++++++++---- src/devices/cpu/tlcs90/tlcs90.h | 10 ++++++++++ src/mame/machine/jvs13551.cpp | 13 ++++++++++++- src/mame/machine/jvs13551.h | 1 + 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/devices/cpu/tlcs90/tlcs90.cpp b/src/devices/cpu/tlcs90/tlcs90.cpp index ff394402235..5001e540641 100644 --- a/src/devices/cpu/tlcs90/tlcs90.cpp +++ b/src/devices/cpu/tlcs90/tlcs90.cpp @@ -26,32 +26,39 @@ const device_type TMP90841 = device_creator; const device_type TMP90845 = device_creator; const device_type TMP91640 = device_creator; const device_type TMP91641 = device_creator; +const device_type TMP90PH44 = device_creator; static ADDRESS_MAP_START(tmp90840_mem, AS_PROGRAM, 8, tlcs90_device) AM_RANGE( 0x0000, 0x1fff ) AM_ROM // 8KB ROM (internal) - AM_RANGE( 0xfec0, 0xffc0 ) AM_RAM // 256b RAM (internal) + AM_RANGE( 0xfec0, 0xffbf ) AM_RAM // 256b RAM (internal) AM_RANGE( T90_IOBASE, T90_IOBASE+47 ) AM_READWRITE( t90_internal_registers_r, t90_internal_registers_w ) ADDRESS_MAP_END static ADDRESS_MAP_START(tmp90841_mem, AS_PROGRAM, 8, tlcs90_device) // AM_RANGE( 0x0000, 0x1fff ) AM_ROM // rom-less - AM_RANGE( 0xfec0, 0xffc0 ) AM_RAM // 256b RAM (internal) + AM_RANGE( 0xfec0, 0xffbf ) AM_RAM // 256b RAM (internal) AM_RANGE( T90_IOBASE, T90_IOBASE+47 ) AM_READWRITE( t90_internal_registers_r, t90_internal_registers_w ) ADDRESS_MAP_END static ADDRESS_MAP_START(tmp91640_mem, AS_PROGRAM, 8, tlcs90_device ) AM_RANGE( 0x0000, 0x3fff ) AM_ROM // 16KB ROM (internal) - AM_RANGE( 0xfdc0, 0xffc0 ) AM_RAM // 512b RAM (internal) + AM_RANGE( 0xfdc0, 0xffbf ) AM_RAM // 512b RAM (internal) AM_RANGE( T90_IOBASE, T90_IOBASE+47 ) AM_READWRITE( t90_internal_registers_r, t90_internal_registers_w ) ADDRESS_MAP_END static ADDRESS_MAP_START(tmp91641_mem, AS_PROGRAM, 8, tlcs90_device ) // AM_RANGE( 0x0000, 0x3fff ) AM_ROM // rom-less - AM_RANGE( 0xfdc0, 0xffc0 ) AM_RAM // 512b RAM (internal) + AM_RANGE( 0xfdc0, 0xffbf ) AM_RAM // 512b RAM (internal) AM_RANGE( T90_IOBASE, T90_IOBASE+47 ) AM_READWRITE( t90_internal_registers_r, t90_internal_registers_w ) ADDRESS_MAP_END +static ADDRESS_MAP_START(tmp90ph44_mem, AS_PROGRAM, 8, tlcs90_device ) + AM_RANGE( 0x0000, 0x3fff ) AM_ROM // 16KB ROM (internal) + AM_RANGE( 0xfdc0, 0xffbf ) AM_RAM // 512b RAM (internal) + AM_RANGE( T90_IOBASE, T90_IOBASE+55 ) AM_READWRITE( t90_internal_registers_r, t90_internal_registers_w ) // TODO: has 8 more registers +ADDRESS_MAP_END + tlcs90_device::tlcs90_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source, address_map_constructor program_map) : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) @@ -90,6 +97,12 @@ tmp91641_device::tmp91641_device(const machine_config &mconfig, const char *tag, } +tmp90ph44_device::tmp90ph44_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : tlcs90_device(mconfig, TMP90PH44, "TMP90PH44", tag, owner, clock, "tmp90ph44", __FILE__, ADDRESS_MAP_NAME(tmp90ph44_mem)) +{ +} + + enum { T90_B, T90_C, T90_D, T90_E, T90_H, T90_L, T90_A, T90_BC, T90_DE, T90_HL, T90_XX, T90_IX, T90_IY, T90_SP, diff --git a/src/devices/cpu/tlcs90/tlcs90.h b/src/devices/cpu/tlcs90/tlcs90.h index ba25d0ff927..286ea9ee305 100644 --- a/src/devices/cpu/tlcs90/tlcs90.h +++ b/src/devices/cpu/tlcs90/tlcs90.h @@ -166,6 +166,7 @@ public: tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; + class tmp91640_device : public tlcs90_device { public: @@ -182,10 +183,19 @@ public: }; +class tmp90ph44_device : public tlcs90_device +{ +public: + // construction/destruction + tmp90ph44_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +}; + + extern const device_type TMP90840; extern const device_type TMP90841; extern const device_type TMP90845; extern const device_type TMP91640; extern const device_type TMP91641; +extern const device_type TMP90PH44; #endif /* __TLCS90_H__ */ diff --git a/src/mame/machine/jvs13551.cpp b/src/mame/machine/jvs13551.cpp index 5c9782524d7..b82c85bc0d3 100644 --- a/src/mame/machine/jvs13551.cpp +++ b/src/mame/machine/jvs13551.cpp @@ -3,6 +3,8 @@ #include "emu.h" #include "jvs13551.h" +#include "cpu/tlcs90/tlcs90.h" + const device_type SEGA_837_13551 = device_creator; WRITE_LINE_MEMBER(sega_837_13551::jvs13551_coin_1_w) @@ -23,9 +25,13 @@ static INPUT_PORTS_START(sega_837_13551_coins) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN2) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, sega_837_13551, jvs13551_coin_2_w) INPUT_PORTS_END +MACHINE_CONFIG_FRAGMENT(sega_837_13551) + MCFG_CPU_ADD("iomcu", TMP90PH44, 10000000) // unknown clock +MACHINE_CONFIG_END + ROM_START( jvs13551 ) // TMP90PH44N firmwares - ROM_REGION( 0x8000, "jvs13551", ROMREGION_ERASE ) + ROM_REGION( 0x8000, "iomcu", ROMREGION_ERASE ) // Sega 838-13683-93 ROM_LOAD( "sp5001.bin", 0x0000, 0x8000, CRC(2f17e21a) SHA1(ac227ef3ca52ef17321bd60e435dba147645d8b8)) // Sega 838-13683-93 Rev.B @@ -47,6 +53,11 @@ void sega_837_13551::static_set_port_tag(device_t &device, int port, const char ctrl.port_tag[port] = tag; } +machine_config_constructor sega_837_13551::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME(sega_837_13551); +} + ioport_constructor sega_837_13551::device_input_ports() const { return INPUT_PORTS_NAME(sega_837_13551_coins); diff --git a/src/mame/machine/jvs13551.h b/src/mame/machine/jvs13551.h index 7a55a29f0d3..f3fc6a9647d 100644 --- a/src/mame/machine/jvs13551.h +++ b/src/mame/machine/jvs13551.h @@ -38,6 +38,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; // JVS device overrides -- cgit v1.2.3