summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-02-14 02:46:32 +0100
committer couriersud <couriersud@arcor.de>2015-02-14 02:46:32 +0100
commit6392c0bfe8d8efed4d7fa3ed2478d861618b01eb (patch)
treef1491e831394794fafa2670021f6dbef5804a0e1
parent2cbcf1c4ef41a0a83cd44867ad6183f381f9e328 (diff)
parent8a09d79c8baa767c1f2bb1b71c85d019e5b8c20f (diff)
Merge branch 'master' of https://github.com/mamedev/mame.git
-rw-r--r--src/mame/drivers/galpanic.c6
-rw-r--r--src/mess/drivers/edracula.c108
-rw-r--r--src/mess/drivers/tb303.c76
-rw-r--r--src/mess/layout/tb303.lay20
-rw-r--r--src/mess/mess.lst1
-rw-r--r--src/mess/mess.mak2
6 files changed, 209 insertions, 4 deletions
diff --git a/src/mame/drivers/galpanic.c b/src/mame/drivers/galpanic.c
index 1744ea982ad..42380b594f6 100644
--- a/src/mame/drivers/galpanic.c
+++ b/src/mame/drivers/galpanic.c
@@ -315,7 +315,7 @@ static ADDRESS_MAP_START( zipzap_map, AS_PROGRAM, 16, galpanic_state )
AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram")
AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram")
AM_RANGE(0x580000, 0x583fff) AM_RAM_WRITE(galpanic_bgvideoram_mirror_w)
- AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */
+ AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */
AM_RANGE(0x680000, 0x68001f) AM_RAM
AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0x701000, 0x71ffff) AM_RAM
@@ -336,7 +336,7 @@ static ADDRESS_MAP_START( supmodel_map, AS_PROGRAM, 16, galpanic_state )
AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram")
AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram")
// AM_RANGE(0x580000, 0x583fff) AM_RAM_WRITE(galpanic_bgvideoram_mirror_w) // can't be right, causes half the display to vanish at times!
- AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */
+ AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */
AM_RANGE(0x680000, 0x68001f) AM_RAM
AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0x780000, 0x78001f) AM_RAM
@@ -359,7 +359,7 @@ static ADDRESS_MAP_START( smissw_map, AS_PROGRAM, 16, galpanic_state )
AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram")
AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram")
AM_RANGE(0x580000, 0x583fff) AM_RAM //_WRITE(galpanic_bgvideoram_mirror_w) // can't be right, causes half the display to vanish at times!
- AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */
+ AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */
AM_RANGE(0x680000, 0x68001f) AM_RAM
AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0x780000, 0x78001f) AM_RAM
diff --git a/src/mess/drivers/edracula.c b/src/mess/drivers/edracula.c
index 189b031ec36..86efd16904a 100644
--- a/src/mess/drivers/edracula.c
+++ b/src/mess/drivers/edracula.c
@@ -5,7 +5,13 @@
Epoch Dracula (manufactured in Japan)
* NEC uCOM-43 MCU, labeled D553C 206
* cyan/red/green VFD display NEC FIP8BM20T
+
+ known releases:
+ - Japan: Dracula House, yellow case
+ - USA: Dracula, red case
+ - Other: Dracula, yellow case, published by Hales
+ NOTE!: MESS external artwork is required to be able to play
***************************************************************************/
@@ -27,13 +33,95 @@ public:
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
+
+ UINT32 m_plate;
+ UINT16 m_grid;
+
+ DECLARE_WRITE8_MEMBER(grid_w);
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE8_MEMBER(port_i_w);
+
+ UINT32 m_vfd_state[0x10];
+ void update_vfd();
virtual void machine_start();
};
+/***************************************************************************
+
+ Display
+
+***************************************************************************/
+
+void edracula_state::update_vfd()
+{
+ for (int i = 0; i < 8; i++)
+ if (m_grid & (1 << i) && m_vfd_state[i] != m_plate)
+ {
+ // on difference, send to output
+ for (int j = 0; j < 18; j++)
+ output_set_lamp_value(i*100 + j, m_plate >> j & 1);
+
+ m_vfd_state[i] = m_plate;
+ }
+}
+
+
+
+/***************************************************************************
+
+ I/O
+
+***************************************************************************/
+
+WRITE8_MEMBER(edracula_state::grid_w)
+{
+ // port C/D: vfd matrix grid
+ int shift = (offset - NEC_UCOM4_PORTC) * 4;
+ m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
+
+ update_vfd();
+}
+
+WRITE8_MEMBER(edracula_state::plate_w)
+{
+ // port E/F/G/H/I01: vfd matrix plate
+ int shift = (offset - NEC_UCOM4_PORTE) * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+
+ update_vfd();
+}
+
+WRITE8_MEMBER(edracula_state::port_i_w)
+{
+ plate_w(space, offset, data & 3);
+
+ // I2: speaker out
+ m_speaker->level_w(data >> 2 & 1);
+}
+
+
+
+/***************************************************************************
+
+ Inputs
+
+***************************************************************************/
+
static INPUT_PORTS_START( edracula )
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SELECT )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
INPUT_PORTS_END
@@ -46,6 +134,15 @@ INPUT_PORTS_END
void edracula_state::machine_start()
{
+ // zerofill
+ memset(m_vfd_state, 0, sizeof(m_vfd_state));
+ m_plate = 0;
+ m_grid = 0;
+
+ // register for savestates
+ save_item(NAME(m_vfd_state));
+ save_item(NAME(m_plate));
+ save_item(NAME(m_grid));
}
@@ -53,6 +150,15 @@ static MACHINE_CONFIG_START( edracula, edracula_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
+ MCFG_UCOM4_READ_A_CB(IOPORT("IN0"))
+ MCFG_UCOM4_READ_B_CB(IOPORT("IN1"))
+ MCFG_UCOM4_WRITE_C_CB(WRITE8(edracula_state, grid_w))
+ MCFG_UCOM4_WRITE_D_CB(WRITE8(edracula_state, grid_w))
+ MCFG_UCOM4_WRITE_E_CB(WRITE8(edracula_state, plate_w))
+ MCFG_UCOM4_WRITE_F_CB(WRITE8(edracula_state, plate_w))
+ MCFG_UCOM4_WRITE_G_CB(WRITE8(edracula_state, plate_w))
+ MCFG_UCOM4_WRITE_H_CB(WRITE8(edracula_state, plate_w))
+ MCFG_UCOM4_WRITE_I_CB(WRITE8(edracula_state, port_i_w))
MCFG_DEFAULT_LAYOUT(layout_edracula)
@@ -78,4 +184,4 @@ ROM_START( edracula )
ROM_END
-CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
+CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula", GAME_SUPPORTS_SAVE )
diff --git a/src/mess/drivers/tb303.c b/src/mess/drivers/tb303.c
new file mode 100644
index 00000000000..e2ac2b1b86e
--- /dev/null
+++ b/src/mess/drivers/tb303.c
@@ -0,0 +1,76 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/***************************************************************************
+
+ Roland TB-303
+ * NEC uCOM-43 MCU, labeled D650C 133
+
+ x
+
+***************************************************************************/
+
+#include "emu.h"
+#include "cpu/ucom4/ucom4.h"
+#include "sound/speaker.h"
+
+#include "tb303.lh"
+
+
+class tb303_state : public driver_device
+{
+public:
+ tb303_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;
+
+ virtual void machine_start();
+};
+
+
+static INPUT_PORTS_START( tb303 )
+INPUT_PORTS_END
+
+
+
+/***************************************************************************
+
+ Machine Config
+
+***************************************************************************/
+
+void tb303_state::machine_start()
+{
+}
+
+
+static MACHINE_CONFIG_START( tb303, tb303_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", NEC_D650, 454545) // LC circuit, 2.2us pulse
+
+ MCFG_DEFAULT_LAYOUT(layout_tb303)
+
+ /* no video! */
+
+ /* sound hardware */
+ // discrete...
+MACHINE_CONFIG_END
+
+
+
+/***************************************************************************
+
+ Game driver(s)
+
+***************************************************************************/
+
+ROM_START( tb303 )
+ ROM_REGION( 0x0800, "maincpu", 0 )
+ ROM_LOAD( "d650c-133.ic8", 0x0000, 0x0800, CRC(dd2f26ae) SHA1(7f5e37f38d970219dc9e5d49a20dc5335a5c0b30) )
+ROM_END
+
+
+CONS( 1982, tb303, 0, 0, tb303, tb303, driver_device, 0, "Roland", "TB-303", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
diff --git a/src/mess/layout/tb303.lay b/src/mess/layout/tb303.lay
new file mode 100644
index 00000000000..a202f557704
--- /dev/null
+++ b/src/mess/layout/tb303.lay
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="led" defstate="0">
+ <disk state="0"><color red="0.15" green="0.03" blue="0.03" /></disk>
+ <disk state="1"><color red="1.0" green="0.3" blue="0.3" /></disk>
+ </element>
+
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="0" right="100" top="0" bottom="100" />
+
+
+ </view>
+</mamelayout>
diff --git a/src/mess/mess.lst b/src/mess/mess.lst
index a24d3dee6b8..1e5bf798292 100644
--- a/src/mess/mess.lst
+++ b/src/mess/mess.lst
@@ -362,6 +362,7 @@ mu100r // 1997 MU-100 Rackable version
fb01 // 1986 FB-01
// Roland
+tb303
mt32
cm32l
d110
diff --git a/src/mess/mess.mak b/src/mess/mess.mak
index 0c25d473382..275f19e0871 100644
--- a/src/mess/mess.mak
+++ b/src/mess/mess.mak
@@ -1563,6 +1563,7 @@ $(MESSOBJ)/roland.a: \
$(MESS_DRIVERS)/rmt32.o \
$(MESS_DRIVERS)/rd110.o \
$(MESS_DRIVERS)/rsc55.o \
+ $(MESS_DRIVERS)/tb303.o \
$(MESSOBJ)/rockwell.a: \
$(MESS_DRIVERS)/aim65.o $(MESS_MACHINE)/aim65.o \
@@ -2202,6 +2203,7 @@ $(MESS_DRIVERS)/svmu.o: $(MESS_LAYOUT)/svmu.lh
$(MESS_DRIVERS)/sym1.o: $(MESS_LAYOUT)/sym1.lh
$(MESS_DRIVERS)/tandy12.o: $(MESS_LAYOUT)/tandy12.lh
$(MESS_DRIVERS)/tavernie.o: $(MESS_LAYOUT)/tavernie.lh
+$(MESS_DRIVERS)/tb303.o: $(MESS_LAYOUT)/tb303.lh
$(MESS_DRIVERS)/tec1.o: $(MESS_LAYOUT)/tec1.lh
$(MESS_DRIVERS)/tecnbras.o: $(MESS_LAYOUT)/tecnbras.lh
$(MESS_DRIVERS)/ti74.o: $(MESS_LAYOUT)/ti74.lh \