summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2017-07-05 16:48:33 -0400
committer GitHub <noreply@github.com>2017-07-05 16:48:33 -0400
commit04b445c4241bcf33c1978f2c299a7e5d1e1ace80 (patch)
treefff464143f2ca27bae14278f73c118dc5d9f54d8
parentd7e82333e8147e7920724db0f030480a975d9e9f (diff)
parent15d26f8c0384b008ae66063e02c8c56450a3d882 (diff)
Merge pull request #2440 from DavidHaywood/040717
misc cchip prep + notes
-rw-r--r--scripts/src/cpu.lua2
-rw-r--r--scripts/target/mame/arcade.lua2
-rw-r--r--src/devices/cpu/upd7810/upd7810.cpp53
-rw-r--r--src/devices/cpu/upd7810/upd7810.h8
-rw-r--r--src/devices/cpu/upd7810/upd7811.cpp35
-rw-r--r--src/devices/cpu/upd7810/upd7811.h20
-rw-r--r--src/mame/drivers/asuka.cpp26
-rw-r--r--src/mame/drivers/opwolf.cpp23
-rw-r--r--src/mame/drivers/rbisland.cpp18
-rw-r--r--src/mame/drivers/taito_f2.cpp42
-rw-r--r--src/mame/drivers/taito_x.cpp14
-rw-r--r--src/mame/drivers/volfied.cpp20
-rw-r--r--src/mame/includes/asuka.h3
-rw-r--r--src/mame/includes/opwolf.h3
-rw-r--r--src/mame/includes/rbisland.h3
-rw-r--r--src/mame/includes/taito_f2.h7
-rw-r--r--src/mame/includes/taito_x.h7
-rw-r--r--src/mame/includes/volfied.h3
-rw-r--r--src/mame/machine/cchip_dev.cpp195
-rw-r--r--src/mame/machine/cchip_dev.h43
20 files changed, 453 insertions, 74 deletions
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index 468c2da140b..d74a7100140 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -1629,6 +1629,8 @@ if (CPUS["UPD7810"]~=null) then
MAME_DIR .. "src/devices/cpu/upd7810/upd7810_opcodes.cpp",
MAME_DIR .. "src/devices/cpu/upd7810/upd7810_table.cpp",
MAME_DIR .. "src/devices/cpu/upd7810/upd7810_macros.h",
+ MAME_DIR .. "src/devices/cpu/upd7810/upd7811.cpp",
+ MAME_DIR .. "src/devices/cpu/upd7810/upd7811.h",
}
end
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index f0d33963f02..152f3b1e123 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -3782,6 +3782,8 @@ files {
MAME_DIR .. "src/mame/includes/taito_x.h",
MAME_DIR .. "src/mame/machine/cchip.cpp",
MAME_DIR .. "src/mame/machine/cchip.h",
+ MAME_DIR .. "src/mame/machine/cchip_dev.cpp",
+ MAME_DIR .. "src/mame/machine/cchip_dev.h",
MAME_DIR .. "src/mame/drivers/taito_z.cpp",
MAME_DIR .. "src/mame/includes/taito_z.h",
MAME_DIR .. "src/mame/video/taito_z.cpp",
diff --git a/src/devices/cpu/upd7810/upd7810.cpp b/src/devices/cpu/upd7810/upd7810.cpp
index c2136cf9bd4..4247de124b3 100644
--- a/src/devices/cpu/upd7810/upd7810.cpp
+++ b/src/devices/cpu/upd7810/upd7810.cpp
@@ -383,7 +383,11 @@ DEFINE_DEVICE_TYPE(UPD78C05, upd78c05_device, "upd78c05", "uPD78C05")
DEFINE_DEVICE_TYPE(UPD78C06, upd78c06_device, "upd78c06", "uPD78C06")
-upd7810_device::upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+static ADDRESS_MAP_START( upd_internal_map, AS_PROGRAM, 8, upd7810_device )
+ AM_RANGE(0xff00, 0xffff) AM_RAM
+ADDRESS_MAP_END
+
+upd7810_device::upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map)
: cpu_device(mconfig, type, tag, owner, clock)
, m_to_func(*this)
, m_co0_func(*this)
@@ -409,12 +413,11 @@ upd7810_device::upd7810_device(const machine_config &mconfig, device_type type,
, m_pd_out_cb(*this)
, m_pf_out_cb(*this)
, m_pt_in_cb(*this)
- , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0)
+ , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, internal_map)
{
}
-upd7810_device::upd7810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : upd7810_device(mconfig, UPD7810, tag, owner, clock)
+void upd7810_device::configure_ops()
{
m_opXX = s_opXX_7810;
m_op48 = s_op48;
@@ -426,8 +429,12 @@ upd7810_device::upd7810_device(const machine_config &mconfig, const char *tag, d
m_op74 = s_op74;
}
-upd7807_device::upd7807_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : upd7810_device(mconfig, UPD7807, tag, owner, clock)
+upd7810_device::upd7810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : upd7810_device(mconfig, UPD7810, tag, owner, clock, ADDRESS_MAP_NAME(upd_internal_map))
+{
+}
+
+void upd7807_device::configure_ops()
{
m_opXX = s_opXX_7807;
m_op48 = s_op48;
@@ -439,8 +446,13 @@ upd7807_device::upd7807_device(const machine_config &mconfig, const char *tag, d
m_op74 = s_op74;
}
-upd7801_device::upd7801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : upd7810_device(mconfig, UPD7801, tag, owner, clock)
+
+upd7807_device::upd7807_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : upd7810_device(mconfig, UPD7807, tag, owner, clock, ADDRESS_MAP_NAME(upd_internal_map))
+{
+}
+
+void upd7801_device::configure_ops()
{
m_op48 = s_op48_7801;
m_op4C = s_op4C_7801;
@@ -452,8 +464,12 @@ upd7801_device::upd7801_device(const machine_config &mconfig, const char *tag, d
m_opXX = s_opXX_7801;
}
-upd78c05_device::upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : upd78c05_device(mconfig, UPD78C05, tag, owner, clock)
+upd7801_device::upd7801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : upd7810_device(mconfig, UPD7801, tag, owner, clock, ADDRESS_MAP_NAME(upd_internal_map))
+{
+}
+
+void upd78c05_device::configure_ops()
{
m_op48 = s_op48_78c05;
m_op4C = s_op4C_78c05;
@@ -465,13 +481,17 @@ upd78c05_device::upd78c05_device(const machine_config &mconfig, const char *tag,
m_opXX = s_opXX_78c05;
}
+upd78c05_device::upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : upd78c05_device(mconfig, UPD78C05, tag, owner, clock)
+{
+}
+
upd78c05_device::upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
- : upd7810_device(mconfig, type, tag, owner, clock)
+ : upd7810_device(mconfig, type, tag, owner, clock, ADDRESS_MAP_NAME(upd_internal_map))
{
}
-upd78c06_device::upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : upd78c05_device(mconfig, UPD78C06, tag, owner, clock)
+void upd78c06_device::configure_ops()
{
m_op48 = s_op48_78c06;
m_op4C = s_op4C_78c06;
@@ -483,6 +503,11 @@ upd78c06_device::upd78c06_device(const machine_config &mconfig, const char *tag,
m_opXX = s_opXX_78c06;
}
+upd78c06_device::upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : upd78c05_device(mconfig, UPD78C06, tag, owner, clock)
+{
+}
+
std::vector<std::pair<int, const address_space_config *>> upd7810_device::memory_space_config() const
{
return std::vector<std::pair<int, const address_space_config *>> {
@@ -1572,6 +1597,8 @@ void upd7810_device::base_device_start()
m_pt_in_cb.resolve_safe(0); // TODO: uPD7807 only
+ configure_ops();
+
save_item(NAME(m_ppc.w.l));
save_item(NAME(m_pc.w.l));
save_item(NAME(m_sp.w.l));
diff --git a/src/devices/cpu/upd7810/upd7810.h b/src/devices/cpu/upd7810/upd7810.h
index 0db2c77313b..2d3563ccc84 100644
--- a/src/devices/cpu/upd7810/upd7810.h
+++ b/src/devices/cpu/upd7810/upd7810.h
@@ -207,7 +207,7 @@ protected:
INTSB = 0x0010
};
- upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map);
// device-level overrides
virtual void device_start() override;
@@ -277,6 +277,8 @@ protected:
uint8_t mask_l0_l1;
};
+ virtual void configure_ops();
+
static const struct opcode_s s_op48[256];
static const struct opcode_s s_op4C[256];
static const struct opcode_s s_op4D[256];
@@ -1442,6 +1444,7 @@ public:
protected:
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual void configure_ops() override;
};
@@ -1457,6 +1460,7 @@ protected:
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
virtual void handle_timers(int cycles) override;
virtual void upd7810_take_irq() override;
+ virtual void configure_ops() override;
};
@@ -1475,6 +1479,7 @@ protected:
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 4); }
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
virtual void handle_timers(int cycles) override;
+ virtual void configure_ops() override;
};
@@ -1483,6 +1488,7 @@ class upd78c06_device : public upd78c05_device
public:
// construction/destruction
upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ virtual void configure_ops() override;
};
diff --git a/src/devices/cpu/upd7810/upd7811.cpp b/src/devices/cpu/upd7810/upd7811.cpp
new file mode 100644
index 00000000000..13c10c68baf
--- /dev/null
+++ b/src/devices/cpu/upd7810/upd7811.cpp
@@ -0,0 +1,35 @@
+// license:BSD-3-Clause
+// copyright-holders:Juergen Buchmueller
+
+/*
+
+ uPD7811 - variant of uPD7810 with internal ROM
+
+*/
+
+#include "upd7811.h"
+
+/*
+ the MODE pins can cause this to work with external ROM instead
+ todo: document MODE pins
+
+ M0 M1
+
+ 0 0 -
+ 0 1 -
+ 1 0 -
+ 1 1 -
+
+*/
+
+static ADDRESS_MAP_START( upd_internal_4096_rom_map, AS_PROGRAM, 8, upd7810_device )
+ AM_RANGE(0x0000, 0x0fff) AM_ROM
+ AM_RANGE(0xff00, 0xffff) AM_RAM
+ADDRESS_MAP_END
+
+DEFINE_DEVICE_TYPE(UPD7811, upd7811_device, "upd78c11", "uPD78C11")
+
+upd7811_device::upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : upd7810_device(mconfig, UPD7811, tag, owner, clock, ADDRESS_MAP_NAME(upd_internal_4096_rom_map))
+{
+} \ No newline at end of file
diff --git a/src/devices/cpu/upd7810/upd7811.h b/src/devices/cpu/upd7810/upd7811.h
new file mode 100644
index 00000000000..14847250952
--- /dev/null
+++ b/src/devices/cpu/upd7810/upd7811.h
@@ -0,0 +1,20 @@
+// license:BSD-3-Clause
+// copyright-holders:Juergen Buchmueller
+
+#ifndef MAME_CPU_UPD7811
+#define MAME_CPU_UPD7811
+
+#pragma once
+
+#include "upd7810.h"
+
+DECLARE_DEVICE_TYPE(UPD7811, upd7811_device)
+
+class upd7811_device : public upd7810_device
+{
+public:
+ // construction/destruction
+ upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+};
+
+#endif
diff --git a/src/mame/drivers/asuka.cpp b/src/mame/drivers/asuka.cpp
index 7d0bf06e262..7b07b01ea9e 100644
--- a/src/mame/drivers/asuka.cpp
+++ b/src/mame/drivers/asuka.cpp
@@ -835,6 +835,7 @@ static MACHINE_CONFIG_START( bonzeadv )
MCFG_CPU_ADD("audiocpu", Z80,4000000) /* sound CPU, also required for test mode */
MCFG_CPU_PROGRAM_MAP(bonzeadv_z80_map)
+ MCFG_TAITO_CCHIP_DEV_ADD("cchip", XTAL_12MHz/2) /* ? MHz */
MCFG_QUANTUM_TIME(attotime::from_hz(600))
@@ -1231,6 +1232,9 @@ ROM_START( bonzeadv )
/* 0x040000 - 0x7ffff is intentionally empty */
ROM_LOAD16_WORD_SWAP( "b41-01.15", 0x80000, 0x80000, CRC(5d072fa4) SHA1(6ffe1b8531381eb6dd3f1fec18c91294a6aca9f6) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b41-05.43", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b41-03.1", 0x00000, 0x80000, CRC(736d35d0) SHA1(7d41a7d71e117714bbd2cdda2953589cda6e763a) ) /* SCR tiles (8 x 8) */
@@ -1240,8 +1244,6 @@ ROM_START( bonzeadv )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) /* banked */
- /* CPU3 - CCHIP aka TC0030CMD marked b41-05.43 */
-
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b41-04.48", 0x00000, 0x80000, CRC(c668638f) SHA1(07238a6cb4d93ffaf6351657163b5d80f0dbf688) )
ROM_END
@@ -1255,6 +1257,9 @@ ROM_START( bonzeadvo )
/* 0x040000 - 0x7ffff is intentionally empty */
ROM_LOAD16_WORD_SWAP( "b41-01.15", 0x80000, 0x80000, CRC(5d072fa4) SHA1(6ffe1b8531381eb6dd3f1fec18c91294a6aca9f6) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b41-05.43", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b41-03.1", 0x00000, 0x80000, CRC(736d35d0) SHA1(7d41a7d71e117714bbd2cdda2953589cda6e763a) ) /* SCR tiles (8 x 8) */
@@ -1264,8 +1269,6 @@ ROM_START( bonzeadvo )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) /* banked */
- /* CPU3 - CCHIP aka TC0030CMD marked b41-05.43 */
-
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b41-04.48", 0x00000, 0x80000, CRC(c668638f) SHA1(07238a6cb4d93ffaf6351657163b5d80f0dbf688) )
ROM_END
@@ -1279,6 +1282,9 @@ ROM_START( bonzeadvu )
/* 0x040000 - 0x7ffff is intentionally empty */
ROM_LOAD16_WORD_SWAP( "b41-01.15", 0x80000, 0x80000, CRC(5d072fa4) SHA1(6ffe1b8531381eb6dd3f1fec18c91294a6aca9f6) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b41-05.43", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b41-03.1", 0x00000, 0x80000, CRC(736d35d0) SHA1(7d41a7d71e117714bbd2cdda2953589cda6e763a) ) /* SCR tiles (8 x 8) */
@@ -1288,8 +1294,6 @@ ROM_START( bonzeadvu )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) /* banked */
- /* CPU3 - CCHIP aka TC0030CMD marked b41-05.43 */
-
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b41-04.48", 0x00000, 0x80000, CRC(c668638f) SHA1(07238a6cb4d93ffaf6351657163b5d80f0dbf688) )
ROM_END
@@ -1303,6 +1307,9 @@ ROM_START( jigkmgri )
/* 0x040000 - 0x7ffff is intentionally empty */
ROM_LOAD16_WORD_SWAP( "b41-01.15", 0x80000, 0x80000, CRC(5d072fa4) SHA1(6ffe1b8531381eb6dd3f1fec18c91294a6aca9f6) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b41-05.43", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b41-03.1", 0x00000, 0x80000, CRC(736d35d0) SHA1(7d41a7d71e117714bbd2cdda2953589cda6e763a) ) /* Tiles (8 x 8) */
@@ -1312,8 +1319,6 @@ ROM_START( jigkmgri )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) /* banked */
- /* CPU3 - CCHIP aka TC0030CMD marked b41-05.43 */
-
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b41-04.48", 0x00000, 0x80000, CRC(c668638f) SHA1(07238a6cb4d93ffaf6351657163b5d80f0dbf688) )
ROM_END
@@ -1330,6 +1335,9 @@ ROM_START( bonzeadvp ) /* Labels consists of hand written checksum values of the
ROM_LOAD16_BYTE( "a418.ic23", 0xc0001, 0x20000, CRC(51b02be6) SHA1(20e3423aea359f3ca92dd24f4f87351d93c279b6) ) // ^
ROM_LOAD16_BYTE( "0e7e.ic28", 0xc0000, 0x20000, CRC(dc1f9fd0) SHA1(88addfa2c3bb854efd88a3556d23a7607b6ec848) ) // ^
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b41-05.43", 0x0000, 0x2000, NO_DUMP ) /* is the C-Chip the same as the final? */
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD16_BYTE( "abbe.ic9", 0x00000, 0x20000, CRC(50e6581c) SHA1(230724d65c9b1ea5d72117dca077464dd599ad68) ) // first 2 == first half b41-03.1 but split
ROM_LOAD16_BYTE( "0ac8.ic15", 0x00001, 0x20000, CRC(29002fc4) SHA1(5ddbefc0d173865802362990e99a3b542c096412) ) // ^
@@ -1345,8 +1353,6 @@ ROM_START( bonzeadvp ) /* Labels consists of hand written checksum values of the
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) // missing from dump /* banked */
- /* is the C-Chip the same as the final? */
-
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "6089.ic17", 0x00000, 0x20000, CRC(b092783c) SHA1(e13f765e2884b6194926bf982595de18376ffef9) ) // these 4 == b41-04.48 but split
ROM_LOAD( "2e1f.ic14", 0x20000, 0x20000, CRC(df1f87c0) SHA1(ad3df38c22f1bb7bdc449922bd3c2a5c78aa87f8) ) // ^
diff --git a/src/mame/drivers/opwolf.cpp b/src/mame/drivers/opwolf.cpp
index 324d39629b5..88d236c925a 100644
--- a/src/mame/drivers/opwolf.cpp
+++ b/src/mame/drivers/opwolf.cpp
@@ -784,6 +784,8 @@ static MACHINE_CONFIG_START( opwolf )
MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK ) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(opwolf_sound_z80_map)
+ MCFG_TAITO_CCHIP_DEV_ADD("cchip", XTAL_12MHz / 2) /* ? MHz */
+
MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_RESET_OVERRIDE(opwolf_state,opwolf)
@@ -841,6 +843,8 @@ static MACHINE_CONFIG_DERIVED( opwolfp, opwolf )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu") /* 8 MHz */
MCFG_CPU_PROGRAM_MAP(opwolfp_map)
+
+ MCFG_DEVICE_REMOVE("cchip")
MACHINE_CONFIG_END
@@ -924,6 +928,9 @@ ROM_START( opwolf )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b20-07.10", 0x00000, 0x10000, CRC(45c7ace3) SHA1(06f7393f6b973b7735c27e8380cb4148650cfc16) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b20-18", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b20-13.13", 0x00000, 0x80000, CRC(f6acdab1) SHA1(716b94ab3fa330ecf22df576f6a9f47a49c7554a) ) /* SCR tiles (8 x 8) */
@@ -949,6 +956,9 @@ ROM_START( opwolfa )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b20-07.10", 0x00000, 0x10000, CRC(45c7ace3) SHA1(06f7393f6b973b7735c27e8380cb4148650cfc16) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b20-18", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b20-13.13", 0x00000, 0x80000, CRC(f6acdab1) SHA1(716b94ab3fa330ecf22df576f6a9f47a49c7554a) ) /* SCR tiles (8 x 8) */
@@ -964,11 +974,14 @@ ROM_START( opwolfj )
ROM_LOAD16_BYTE( "b20-05-02.40", 0x00000, 0x10000, CRC(3ffbfe3a) SHA1(e41257e6af18bab4e36267a0c25a6aaa742972d2) )
ROM_LOAD16_BYTE( "b20-03-02.30", 0x00001, 0x10000, CRC(fdabd8a5) SHA1(866ec6168489024b8d157f2d5b1553d7f6e3d9b7) )
ROM_LOAD16_BYTE( "b20-04.39", 0x20000, 0x10000, CRC(216b4838) SHA1(2851cae00bb3e32e20f35fdab8ed6f149e658363) )
- ROM_LOAD16_BYTE( "b20-18.29", 0x20001, 0x10000, CRC(fd202470) SHA1(3108c14953d2f50d861946e9f646813b7050b58a) )
+ ROM_LOAD16_BYTE( "b20-18.29", 0x20001, 0x10000, CRC(fd202470) SHA1(3108c14953d2f50d861946e9f646813b7050b58a) ) // is this correct? clashes with c-chip part number
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b20-07.10", 0x00000, 0x10000, CRC(45c7ace3) SHA1(06f7393f6b973b7735c27e8380cb4148650cfc16) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b20-18", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b20-13.13", 0x00000, 0x80000, CRC(f6acdab1) SHA1(716b94ab3fa330ecf22df576f6a9f47a49c7554a) ) /* SCR tiles (8 x 8) */
@@ -984,11 +997,14 @@ ROM_START( opwolfjsc )
ROM_LOAD16_BYTE( "b20_27.ic40.27512", 0x000000, 0x010000, CRC(6bd02046) SHA1(3d3047b7665635e890337f1f46351427e307bfe7) )
ROM_LOAD16_BYTE( "b20_26.ic30.27512", 0x000001, 0x010000, CRC(644dd415) SHA1(0cdc1152cb16fb872387f8cab3d9ee4b6286b965) )
ROM_LOAD16_BYTE( "b20-04.39", 0x20000, 0x10000, CRC(216b4838) SHA1(2851cae00bb3e32e20f35fdab8ed6f149e658363) )
- ROM_LOAD16_BYTE( "b20-18.29", 0x20001, 0x10000, CRC(fd202470) SHA1(3108c14953d2f50d861946e9f646813b7050b58a) )
+ ROM_LOAD16_BYTE( "b20-18.29", 0x20001, 0x10000, CRC(fd202470) SHA1(3108c14953d2f50d861946e9f646813b7050b58a) ) // is this correct? clashes with c-chip part number
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b20-07.10", 0x00000, 0x10000, CRC(45c7ace3) SHA1(06f7393f6b973b7735c27e8380cb4148650cfc16) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b20-18", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b20-13.13", 0x00000, 0x80000, CRC(f6acdab1) SHA1(716b94ab3fa330ecf22df576f6a9f47a49c7554a) ) /* SCR tiles (8 x 8) */
@@ -1009,6 +1025,9 @@ ROM_START( opwolfu ) /* Taito TC0030 C-Chip labeled B20-18 (yes, it has a specif
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
ROM_LOAD( "b20-07.10", 0x00000, 0x10000, CRC(45c7ace3) SHA1(06f7393f6b973b7735c27e8380cb4148650cfc16) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b20-18", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b20-13.13", 0x00000, 0x80000, CRC(f6acdab1) SHA1(716b94ab3fa330ecf22df576f6a9f47a49c7554a) ) /* SCR tiles (8 x 8) */
diff --git a/src/mame/drivers/rbisland.cpp b/src/mame/drivers/rbisland.cpp
index 30ee09abb39..36ed71f7c04 100644
--- a/src/mame/drivers/rbisland.cpp
+++ b/src/mame/drivers/rbisland.cpp
@@ -637,6 +637,8 @@ static MACHINE_CONFIG_START( rbisland )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(rbisland_sound_map)
+ MCFG_TAITO_CCHIP_DEV_ADD("cchip", XTAL_12MHz/2) /* ? MHz */
+
MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
@@ -686,7 +688,7 @@ static MACHINE_CONFIG_START( jumping )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(jumping_sound_map)
-
+
MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough unless otherwise */
@@ -724,7 +726,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( jumpingi, jumping )
MCFG_CPU_REPLACE("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(jumping_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", rbisland_state, irq4_line_hold)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", rbisland_state, irq4_line_hold)
MACHINE_CONFIG_END
/***************************************************************************
@@ -740,8 +742,8 @@ ROM_START( rbisland )
ROM_LOAD16_BYTE( "b22-03.23", 0x40000, 0x20000, CRC(3ebb0fb8) SHA1(1b41b305623d121255eb70cb992e4d9da13abd82) )
ROM_LOAD16_BYTE( "b22-04.24", 0x40001, 0x20000, CRC(91625e7f) SHA1(765afd973d9b82bb496b04beca284bf2769d6e6f) )
- ROM_REGION( 0x10000, "cchip", 0 )
- ROM_LOAD( "cchip_b22-15.53", 0x00000, 0x10000, NO_DUMP )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b22-15.53", 0x0000, 0x2000, NO_DUMP )
ROM_REGION( 0x1c000, "audiocpu", 0 )
ROM_LOAD( "b22-14.43", 0x00000, 0x4000, CRC(113c1a5b) SHA1(effa2adf54a6be78b2d4baf3a47529342fb0d895) )
@@ -765,8 +767,8 @@ ROM_START( rbislando )
ROM_LOAD16_BYTE( "b22-03.23", 0x40000, 0x20000, CRC(3ebb0fb8) SHA1(1b41b305623d121255eb70cb992e4d9da13abd82) )
ROM_LOAD16_BYTE( "b22-04.24", 0x40001, 0x20000, CRC(91625e7f) SHA1(765afd973d9b82bb496b04beca284bf2769d6e6f) )
- ROM_REGION( 0x10000, "cchip", 0 )
- ROM_LOAD( "cchip_b22-15.53", 0x00000, 0x10000, NO_DUMP )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b22-15.53", 0x0000, 0x2000, NO_DUMP )
ROM_REGION( 0x1c000, "audiocpu", 0 )
ROM_LOAD( "b22-14.43", 0x00000, 0x4000, CRC(113c1a5b) SHA1(effa2adf54a6be78b2d4baf3a47529342fb0d895) )
@@ -790,8 +792,8 @@ ROM_START( rbislande )
ROM_LOAD16_BYTE( "b22-03.23", 0x40000, 0x20000, CRC(3ebb0fb8) SHA1(1b41b305623d121255eb70cb992e4d9da13abd82) )
ROM_LOAD16_BYTE( "b22-04.24", 0x40001, 0x20000, CRC(91625e7f) SHA1(765afd973d9b82bb496b04beca284bf2769d6e6f) )
- ROM_REGION( 0x10000, "cchip", 0 )
- ROM_LOAD( "cchip_b39-05.53", 0x00000, 0x10000, NO_DUMP )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_b39-05.53", 0x0000, 0x2000, NO_DUMP )
ROM_REGION( 0x1c000, "audiocpu", 0 )
ROM_LOAD( "b22-14.43", 0x00000, 0x4000, CRC(113c1a5b) SHA1(effa2adf54a6be78b2d4baf3a47529342fb0d895) )
diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp
index 3f8d2d063ad..ea62666ec36 100644
--- a/src/mame/drivers/taito_f2.cpp
+++ b/src/mame/drivers/taito_f2.cpp
@@ -614,34 +614,6 @@ WRITE16_MEMBER(taitof2_state::driveout_sound_command_w)
}
}
-/***************************************************************************
-
- Mega Blast cchip emulation
-
- C-Chip simply used as RAM, the game doesn't even bother to change banks.
- It does read the chip id though. The dump is confirmed to be from an
- original board.
-
-***************************************************************************/
-
-WRITE16_MEMBER(taitof2_state::cchip2_word_w)
-{
- logerror("cchip2_w pc: %06x offset %04x: %02x\n", space.device().safe_pc(), offset, data);
-
- COMBINE_DATA(&m_cchip2_ram[offset]);
-}
-
-READ16_MEMBER(taitof2_state::cchip2_word_r)
-{
- /* C-Chip ID */
- if (offset == 0x401)
- return 0x01;
-
- logerror("cchip2_r offset: %04x\n", offset);
-
- return m_cchip2_ram[offset];
-}
-
/***********************************************************
MEMORY STRUCTURES
@@ -681,7 +653,8 @@ static ADDRESS_MAP_START( megab_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x100001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, master_port_w, 0xff00)
AM_RANGE(0x100002, 0x100003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, master_comm_r, master_comm_w, 0xff00)
AM_RANGE(0x120000, 0x12000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
- AM_RANGE(0x180000, 0x180fff) AM_READWRITE(cchip2_word_r, cchip2_word_w) AM_SHARE("cchip2_ram")
+ AM_RANGE(0x180000, 0x1807ff) AM_DEVREADWRITE8("cchip", taito_cchip_device, mem_r, mem_w, 0x00ff)
+ AM_RANGE(0x180800, 0x180fff) AM_DEVREADWRITE8("cchip", taito_cchip_device, asic_r, asic_w, 0x00ff)
AM_RANGE(0x200000, 0x20ffff) AM_RAM
AM_RANGE(0x300000, 0x301fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0x400000, 0x40001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff) /* ?? */
@@ -2958,6 +2931,8 @@ static MACHINE_CONFIG_DERIVED( megab, taito_f2_tc0220ioc )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(megab_map)
+ MCFG_TAITO_CCHIP_DEV_ADD("cchip", XTAL_12MHz/2) /* ? MHz */
+
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(taitof2_state,taitof2_megab)
MCFG_SCREEN_MODIFY("screen")
@@ -3986,6 +3961,9 @@ ROM_START( megablst )
ROM_LOAD16_BYTE( "c11-06.54", 0x40000, 0x20000, CRC(7c249894) SHA1(88dff86b446bcbc4e8ab14cfc3c57b40d25cfa97) )
ROM_LOAD16_BYTE( "c11-11.38", 0x40001, 0x20000, CRC(263ecbf9) SHA1(b49c59058d6d11ea0d9f9b041789e381e5742905) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c11", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x080000, "gfx1", 0 ) /* SCR */
ROM_LOAD( "c11-05.58", 0x00000, 0x80000, CRC(733e6d8e) SHA1(47f3360f7c41b7e4a42e8198fc1bcce4e819181f) )
@@ -4019,6 +3997,9 @@ ROM_START( megablstu )
ROM_LOAD16_BYTE( "c11-06.54", 0x40000, 0x20000, CRC(7c249894) SHA1(88dff86b446bcbc4e8ab14cfc3c57b40d25cfa97) )
ROM_LOAD16_BYTE( "c11-10.38", 0x40001, 0x20000, CRC(bf379a43) SHA1(2a0294e55c2ce514caa2885b728e6387311ed482) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c11", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x080000, "gfx1", 0 ) /* SCR */
ROM_LOAD( "c11-05.58", 0x00000, 0x80000, CRC(733e6d8e) SHA1(47f3360f7c41b7e4a42e8198fc1bcce4e819181f) )
@@ -4044,6 +4025,9 @@ ROM_START( megablstj )
ROM_LOAD16_BYTE( "c11-06.54", 0x40000, 0x20000, CRC(7c249894) SHA1(88dff86b446bcbc4e8ab14cfc3c57b40d25cfa97) ) // c11-06.16
ROM_LOAD16_BYTE( "c11-09.38", 0x40001, 0x20000, CRC(c830aad5) SHA1(967ad3e052572300f5f49375e5f8348f2d595680) ) // c11-09.18
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c11", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0x080000, "gfx1", 0 ) /* SCR */
ROM_LOAD( "c11-05.58", 0x00000, 0x80000, CRC(733e6d8e) SHA1(47f3360f7c41b7e4a42e8198fc1bcce4e819181f) )
diff --git a/src/mame/drivers/taito_x.cpp b/src/mame/drivers/taito_x.cpp
index 6f930806874..b0c968a35f4 100644
--- a/src/mame/drivers/taito_x.cpp
+++ b/src/mame/drivers/taito_x.cpp
@@ -803,6 +803,8 @@ static MACHINE_CONFIG_START( superman )
MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(sound_map)
+ MCFG_TAITO_CCHIP_DEV_ADD("cchip", XTAL_12MHz/2) /* ? MHz */
+
MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
MCFG_MACHINE_START_OVERRIDE(taitox_state,superman)
@@ -1051,8 +1053,8 @@ ROM_START( superman )
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b61-01.e18", 0x00000, 0x80000, CRC(3cf99786) SHA1(f6febf9bda87ca04f0a5890d0e8001c26dfa6c81) )
- ROM_REGION( 0x10000, "cchip", 0 ) /* 64k for TC0030CMD (C-Chip protection, uPD78C11 with embedded 4K maskrom, 8k eprom, 8k RAM) */
- ROM_LOAD( "b61_11.m11", 0x00000, 0x10000, NO_DUMP )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "b61_11.m11", 0x0000, 0x2000, NO_DUMP )
ROM_END
ROM_START( supermanu ) /* No US copyright notice or FBI logo - Just a coinage difference, see notes above */
@@ -1074,8 +1076,8 @@ ROM_START( supermanu ) /* No US copyright notice or FBI logo - Just a coinage di
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b61-01.e18", 0x00000, 0x80000, CRC(3cf99786) SHA1(f6febf9bda87ca04f0a5890d0e8001c26dfa6c81) )
- ROM_REGION( 0x10000, "cchip", 0 ) /* 64k for TC0030CMD (C-Chip protection, Z80 with embedded 64K rom + 64K RAM) */
- ROM_LOAD( "b61_11.m11", 0x00000, 0x10000, NO_DUMP )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "b61_11.m11", 0x0000, 0x2000, NO_DUMP )
ROM_END
ROM_START( supermanj ) /* Shows a Japan copyright notice */
@@ -1097,8 +1099,8 @@ ROM_START( supermanj ) /* Shows a Japan copyright notice */
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b61-01.e18", 0x00000, 0x80000, CRC(3cf99786) SHA1(f6febf9bda87ca04f0a5890d0e8001c26dfa6c81) )
- ROM_REGION( 0x10000, "cchip", 0 ) /* 64k for TC0030CMD (C-Chip protection, Z80 with embedded 64K rom + 64K RAM) */
- ROM_LOAD( "b61_11.m11", 0x00000, 0x10000, NO_DUMP )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "b61_11.m11", 0x0000, 0x2000, NO_DUMP )
ROM_END
/*
diff --git a/src/mame/drivers/volfied.cpp b/src/mame/drivers/volfied.cpp
index 7827b211ac7..52cd47ee1c0 100644
--- a/src/mame/drivers/volfied.cpp
+++ b/src/mame/drivers/volfied.cpp
@@ -229,6 +229,8 @@ static MACHINE_CONFIG_START( volfied )
MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) /* 4MHz sound CPU, required to run the game */
MCFG_CPU_PROGRAM_MAP(z80_map)
+ MCFG_TAITO_CCHIP_DEV_ADD("cchip", XTAL_12MHz/2) /* ? MHz */
+
MCFG_QUANTUM_TIME(attotime::from_hz(1200))
@@ -282,6 +284,9 @@ ROM_START( volfied )
ROM_LOAD16_BYTE( "c04-19.6", 0xc0000, 0x20000, CRC(231493ae) SHA1(2658e6556fd0e75ddd0f0b8628cfa5237c187a06) )
ROM_LOAD16_BYTE( "c04-21.8", 0xc0001, 0x20000, CRC(8598d38e) SHA1(4ec1b819586b50e2f6aff2aaa5e3b06704b9bec2) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c04-23", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0xc0000, "gfx1", 0 ) /* sprites 16x16 */
ROM_LOAD16_BYTE( "c04-16.2", 0x00000, 0x20000, CRC(8c2476ef) SHA1(972ddc8e47a669f1aeca67d02b4a0bed867ddb7d) )
ROM_LOAD16_BYTE( "c04-18.4", 0x00001, 0x20000, CRC(7665212c) SHA1(b816ac2a95ee273aaf90991f53766d7f0d5d9238) )
@@ -311,6 +316,9 @@ ROM_START( volfiedo )
ROM_LOAD16_BYTE( "c04-19.6", 0xc0000, 0x20000, CRC(231493ae) SHA1(2658e6556fd0e75ddd0f0b8628cfa5237c187a06) )
ROM_LOAD16_BYTE( "c04-21.8", 0xc0001, 0x20000, CRC(8598d38e) SHA1(4ec1b819586b50e2f6aff2aaa5e3b06704b9bec2) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c04-23", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0xc0000, "gfx1", 0 ) /* sprites 16x16 */
ROM_LOAD16_BYTE( "c04-16.2", 0x00000, 0x20000, CRC(8c2476ef) SHA1(972ddc8e47a669f1aeca67d02b4a0bed867ddb7d) )
ROM_LOAD16_BYTE( "c04-18.4", 0x00001, 0x20000, CRC(7665212c) SHA1(b816ac2a95ee273aaf90991f53766d7f0d5d9238) )
@@ -340,6 +348,9 @@ ROM_START( volfiedu )
ROM_LOAD16_BYTE( "c04-19.6", 0xc0000, 0x20000, CRC(231493ae) SHA1(2658e6556fd0e75ddd0f0b8628cfa5237c187a06) )
ROM_LOAD16_BYTE( "c04-21.8", 0xc0001, 0x20000, CRC(8598d38e) SHA1(4ec1b819586b50e2f6aff2aaa5e3b06704b9bec2) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c04-23", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0xc0000, "gfx1", 0 ) /* sprites 16x16 */
ROM_LOAD16_BYTE( "c04-16.2", 0x00000, 0x20000, CRC(8c2476ef) SHA1(972ddc8e47a669f1aeca67d02b4a0bed867ddb7d) )
ROM_LOAD16_BYTE( "c04-18.4", 0x00001, 0x20000, CRC(7665212c) SHA1(b816ac2a95ee273aaf90991f53766d7f0d5d9238) )
@@ -369,6 +380,9 @@ ROM_START( volfieduo )
ROM_LOAD16_BYTE( "c04-19.6", 0xc0000, 0x20000, CRC(231493ae) SHA1(2658e6556fd0e75ddd0f0b8628cfa5237c187a06) )
ROM_LOAD16_BYTE( "c04-21.8", 0xc0001, 0x20000, CRC(8598d38e) SHA1(4ec1b819586b50e2f6aff2aaa5e3b06704b9bec2) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c04-23", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0xc0000, "gfx1", 0 ) /* sprites 16x16 */
ROM_LOAD16_BYTE( "c04-16.2", 0x00000, 0x20000, CRC(8c2476ef) SHA1(972ddc8e47a669f1aeca67d02b4a0bed867ddb7d) )
ROM_LOAD16_BYTE( "c04-18.4", 0x00001, 0x20000, CRC(7665212c) SHA1(b816ac2a95ee273aaf90991f53766d7f0d5d9238) )
@@ -398,6 +412,9 @@ ROM_START( volfiedj )
ROM_LOAD16_BYTE( "c04-19.6", 0xc0000, 0x20000, CRC(231493ae) SHA1(2658e6556fd0e75ddd0f0b8628cfa5237c187a06) )
ROM_LOAD16_BYTE( "c04-21.8", 0xc0001, 0x20000, CRC(8598d38e) SHA1(4ec1b819586b50e2f6aff2aaa5e3b06704b9bec2) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c04-23", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0xc0000, "gfx1", 0 ) /* sprites 16x16 */
ROM_LOAD16_BYTE( "c04-16.2", 0x00000, 0x20000, CRC(8c2476ef) SHA1(972ddc8e47a669f1aeca67d02b4a0bed867ddb7d) )
ROM_LOAD16_BYTE( "c04-18.4", 0x00001, 0x20000, CRC(7665212c) SHA1(b816ac2a95ee273aaf90991f53766d7f0d5d9238) )
@@ -427,6 +444,9 @@ ROM_START( volfiedjo )
ROM_LOAD16_BYTE( "c04-19.6", 0xc0000, 0x20000, CRC(231493ae) SHA1(2658e6556fd0e75ddd0f0b8628cfa5237c187a06) )
ROM_LOAD16_BYTE( "c04-21.8", 0xc0001, 0x20000, CRC(8598d38e) SHA1(4ec1b819586b50e2f6aff2aaa5e3b06704b9bec2) )
+ ROM_REGION( 0x2000, "cchip:cchip_eprom", 0 )
+ ROM_LOAD( "cchip_c04-23", 0x0000, 0x2000, NO_DUMP )
+
ROM_REGION( 0xc0000, "gfx1", 0 ) /* sprites 16x16 */
ROM_LOAD16_BYTE( "c04-16.2", 0x00000, 0x20000, CRC(8c2476ef) SHA1(972ddc8e47a669f1aeca67d02b4a0bed867ddb7d) )
ROM_LOAD16_BYTE( "c04-18.4", 0x00001, 0x20000, CRC(7665212c) SHA1(b816ac2a95ee273aaf90991f53766d7f0d5d9238) )
diff --git a/src/mame/includes/asuka.h b/src/mame/includes/asuka.h
index 20e400d158c..95789112d73 100644
--- a/src/mame/includes/asuka.h
+++ b/src/mame/includes/asuka.h
@@ -12,6 +12,7 @@
#include "video/pc090oj.h"
#include "video/tc0100scn.h"
#include "video/tc0110pcr.h"
+#include "machine/cchip_dev.h"
class asuka_state : public driver_device
{
@@ -26,6 +27,7 @@ public:
m_cadash_shared_ram(*this, "sharedram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
+ m_cchip(*this, "cchip"),
m_msm(*this, "msm"),
m_adpcm_select(*this, "adpcm_select"),
m_sound_data(*this, "ymsnd"),
@@ -57,6 +59,7 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
+ optional_device<taito_cchip_device> m_cchip;
optional_device<msm5205_device> m_msm;
optional_device<ls157_device> m_adpcm_select;
optional_region_ptr<u8> m_sound_data;
diff --git a/src/mame/includes/opwolf.h b/src/mame/includes/opwolf.h
index 93043860950..81dce51159c 100644
--- a/src/mame/includes/opwolf.h
+++ b/src/mame/includes/opwolf.h
@@ -8,6 +8,7 @@
#include "sound/msm5205.h"
#include "video/pc080sn.h"
#include "video/pc090oj.h"
+#include "machine/cchip_dev.h"
class opwolf_state : public driver_device
{
@@ -23,6 +24,7 @@ public:
m_cchip_ram(*this, "cchip_ram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
+ m_cchip(*this, "cchip"),
m_pc080sn(*this, "pc080sn"),
m_pc090oj(*this, "pc090oj"),
m_msm1(*this, "msm1"),
@@ -78,6 +80,7 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
+ optional_device<taito_cchip_device> m_cchip;
required_device<pc080sn_device> m_pc080sn;
required_device<pc090oj_device> m_pc090oj;
required_device<msm5205_device> m_msm1;
diff --git a/src/mame/includes/rbisland.h b/src/mame/includes/rbisland.h
index ca521e489e2..cbbb445416a 100644
--- a/src/mame/includes/rbisland.h
+++ b/src/mame/includes/rbisland.h
@@ -8,6 +8,7 @@
#include "video/pc080sn.h"
#include "video/pc090oj.h"
+#include "machine/cchip_dev.h"
class rbisland_state : public driver_device
{
@@ -17,6 +18,7 @@ public:
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
+ m_cchip(*this, "cchip"),
m_pc080sn(*this, "pc080sn"),
m_pc090oj(*this, "pc090oj"),
m_gfxdecode(*this, "gfxdecode"),
@@ -41,6 +43,7 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
+ optional_device<taito_cchip_device> m_cchip;
required_device<pc080sn_device> m_pc080sn;
optional_device<pc090oj_device> m_pc090oj;
required_device<gfxdecode_device> m_gfxdecode;
diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h
index 28d1854faa6..d2c8e9c8a12 100644
--- a/src/mame/includes/taito_f2.h
+++ b/src/mame/includes/taito_f2.h
@@ -7,6 +7,7 @@
#include "video/tc0280grd.h"
#include "video/tc0360pri.h"
#include "video/tc0480scp.h"
+#include "machine/cchip_dev.h"
struct f2_tempsprite
{
@@ -29,9 +30,9 @@ public:
: driver_device(mconfig, type, tag),
m_sprite_extension(*this, "sprite_ext"),
m_spriteram(*this, "spriteram"),
- m_cchip2_ram(*this, "cchip2_ram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
+ m_cchip(*this, "cchip"),
m_oki(*this, "oki"),
m_tc0100scn(*this, "tc0100scn"),
m_tc0100scn_1(*this, "tc0100scn_1"),
@@ -52,7 +53,6 @@ public:
required_shared_ptr<uint16_t> m_spriteram;
std::unique_ptr<uint16_t[]> m_spriteram_buffered;
std::unique_ptr<uint16_t[]> m_spriteram_delayed;
- optional_shared_ptr<uint16_t> m_cchip2_ram; // for megablst only
/* video-related */
std::unique_ptr<struct f2_tempsprite[]> m_spritelist;
@@ -99,6 +99,7 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
+ optional_device<taito_cchip_device> m_cchip;
optional_device<okim6295_device> m_oki;
optional_device<tc0100scn_device> m_tc0100scn;
optional_device<tc0100scn_device> m_tc0100scn_1;
@@ -124,8 +125,6 @@ public:
DECLARE_READ8_MEMBER(driveout_sound_command_r);
DECLARE_WRITE8_MEMBER(oki_bank_w);
DECLARE_WRITE16_MEMBER(driveout_sound_command_w);
- DECLARE_WRITE16_MEMBER(cchip2_word_w);
- DECLARE_READ16_MEMBER(cchip2_word_r);
DECLARE_WRITE16_MEMBER(taitof2_sprite_extension_w);
DECLARE_WRITE16_MEMBER(taitof2_spritebank_w);
DECLARE_WRITE16_MEMBER(koshien_spritebank_w);
diff --git a/src/mame/includes/taito_x.h b/src/mame/includes/taito_x.h
index 9c9453d1f63..698ca058986 100644
--- a/src/mame/includes/taito_x.h
+++ b/src/mame/includes/taito_x.h
@@ -2,12 +2,17 @@
// copyright-holders:Howie Cohen, Yochizo
// thanks-to:Richard Bush
#include "includes/seta.h"
+#include "machine/cchip_dev.h"
class taitox_state : public seta_state
{
public:
taitox_state(const machine_config &mconfig, device_type type, const char *tag)
- : seta_state(mconfig, type, tag) { }
+ : seta_state(mconfig, type, tag),
+ m_cchip(*this, "cchip")
+ { }
+
+ optional_device<taito_cchip_device> m_cchip;
DECLARE_READ16_MEMBER(superman_dsw_input_r);
DECLARE_READ16_MEMBER(daisenpu_input_r);
diff --git a/src/mame/includes/volfied.h b/src/mame/includes/volfied.h
index 651e6ef3c9e..49d33df6e63 100644
--- a/src/mame/includes/volfied.h
+++ b/src/mame/includes/volfied.h
@@ -7,6 +7,7 @@
*************************************************************************/
#include "video/pc090oj.h"
+#include "machine/cchip_dev.h"
#include "screen.h"
class volfied_state : public driver_device
@@ -21,6 +22,7 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
+ m_cchip(*this, "cchip"),
m_pc090oj(*this, "pc090oj"),
m_screen(*this, "screen") { }
@@ -42,6 +44,7 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
+ required_device<taito_cchip_device> m_cchip;
required_device<pc090oj_device> m_pc090oj;
required_device<screen_device> m_screen;
diff --git a/src/mame/machine/cchip_dev.cpp b/src/mame/machine/cchip_dev.cpp
new file mode 100644
index 00000000000..27737ca0f65
--- /dev/null
+++ b/src/mame/machine/cchip_dev.cpp
@@ -0,0 +1,195 @@
+// license:BSD-3-Clause
+// copyright-holders:Jonathan Gevaryahu, David Haywood
+
+/*
+
+TC0030CMD "C-chip" pinout: (from operation wolf schematics)
+http://www.arcade-museum.com/manuals-videogames/O/Operation%20Wolf%20Schematics.pdf
+http://www.jammarcade.net/partial-rainbow-islands-schematic/
+
+Chip contains 4 dies:
+(starting from pin 1 edge going toward pin 32 edge)
+1 - uPD78C11 MCU w/ 4kx8 mask rom (assumed to be the same between games)
+2 - uPD27C64 8kx8 EPROM (assumed to be different between games)
+3 - uPD4464 8kx8 SRAM
+4 - ASIC of some sort
+
+
+ +---------\_/---------+
+ VCC -- - | 1 64 | - -- VCC
+ PA0 <> m | 2 63 | m <- AN7 (tied to GND externally)
+ PA1 <> m | 3 62 | m <- AN6
+ PA2 <> m | 4 61 | m <- AN5
+ PA3 <> m | 5 60 | m <- AN4
+ PA4 <> m | 6 59 | m <- AN3
+ PA5 <> m | 7 58 | m <- AN2 (tied to VCC externally)
+ PA6 <> m | 8 T 57 | m <- AN1
+ PA7 <> m | 9 | 56 | m <- AN0
+ PB0 <> m | 10 C ---| 55 | m <- MODE1 (MODE0 and AVSS are internally tied to GND) **
+ PB1 <> m | 11 | 54 | m <- /INT1
+ PB2 <> m | 12 0 --\ 53 | m <- /NMI, used on rainbow islands
+ PB3 <> m | 13 | > 52 | m <> PC7
+ PB4 <> m | 14 0 --/ 51 | m <> PC6
+ PB5 <> m | 15 50 | m <> PC5
+ PB6 <> m | 16 3 ---- 49 | m <> PC4
+ PB7 <> m | 17 48 | m <> PC3
+ PC0 <> m | 18 0 | 47 | m <> PC2
+ (tied to VCC) VPP -> e | 19 ---| 46 | m <> PC1
+ CLK -> a | 20 C | 45 | a <- A10
+ *ASIC_MODESEL ?> a | 21 /--\ 44 | a <- A9
+ /RESET -> a | 22 M | | 43 | a <- A8
+ D0 <> a | 23 \--/ 42 | a <- A7
+ D1 <> a | 24 D 41 | a <- A6
+ D2 <> a | 25 40 | a <- A5
+ D3 <> a | 26 39 | a <- A4
+ D4 <> a | 27 38 | a <- A3
+ D5 <> a | 28 37 | a <- A2
+ D6 <> a | 29 36 | a <- A1
+ D7 <> a | 30 35 | a <- A0
+ /CS -> a | 31 34 | a -> DTACK out to 68k (/CDTA)
+ GND -- - | 32 33 | a <- R/W
+ +---------------------+
+a = to asic
+e = to eprom
+m = to mcu
+- = power pins, common
+
+CLK is supplied with a 12MHZ oscillator on operation wolf
+
+*Pin 21 goes to the ASIC and may be a mode pin. (try holding it to gnd?) Normally tied to 5v thru a 1k resistor.
+
+** MODE1 is normally tied high externally via a 330ohm resistor, but can be in either state.
+ MODE0 on the c-chip is internally tied low.
+
+(move below MODE notes to upd7811.cpp?)
+
+The four Mode0/Mode1 combinations are:
+ LOW/LOW 78c11 mem map is 4k external rom (i.e. the eprom inside the c-chip) from 0x0000-0x0FFF;
+ the low 4 bits of port F are used, to provide the high 4 address bits.
+ speculation: likely the eprom can be banked so the low or high half is visible here,
+ or possibly one fixed window and 3 variable windows, managed by the asic?
+ LOW/HIGH 78c11 mem map boots to internal rom (mask rom inside the 78c11 inside the c-chip) from
+ 0x0000-0x0fff but the memory map is under full mcu control and can select any of the
+ four modes (internal only, 4k external, 16k external, 64k external)
+The following two modes are unusable on the c-chip:
+ HIGH/LOW 78c11 mem map is 16k external rom from 0x0000-0x3FFF;
+ the low 6 bits of port F are used, to provide the high 6 address bits.
+ HIGH/HIGH 78c11 mem map is 64k external rom from 0x0000-0xFFFF;
+ all 8 bits of port F are used to provide the high 8 address bits.
+VPP is only used for programming the 27c64, do not tie it to 18v or you will probably overwrite the 27c64 with garbage.
+
+(see http://www.cpcwiki.eu/index.php/UPD7810/uPD7811 )
+
+
+C-chip EXTERNAL memory map (it acts as a device mapped to ram; dtack is asserted on /cs for a 68k):
+0x000-0x3FF = RW ram window, a 1k window into the 8k byte sram inside the c-chip; the 'bank' visible is selected by 0x600 below
+0x400 = unknown, no idea if /DTACK is asserted for R or W here
+0x401 = RW 'test command/status register', writing a 0x02 here starts test mode, will return 0x01 set if ok/ready for command and 0x04 set if error; this register is very likely handled by the internal rom in the upd78c11 itself rather than the eprom, and probably tests the sram and the 78c11 internal ram, among other things.
+Current guess: 0x401 is actually attached to the high 2 bits of the PF register; bit 0 is pf6 out, bit 1 is pf6 in (attached to pf6 thru a resistor?), bit 2 is pf7 out, bit 3 is pf7 in (attached to pf7 through a resistor). The 78c11 (I'm guessing) reads pf6 and pf7 once per int; if pf6-in is set it reruns the startup selftest, clears pf6-out, then re-sets it. if there is an error, it also sets pf7.
+Alternate guess: pf4 selects between rom and ram but pf5,6,7 are all mapped to 0x401. a memory mapped register in upd78c11 space selects low vs high half of rom/ram access
+0x402-0x5ff = unknown (may be mirror of 0x400 and 0x401?) no idea if /DTACK is asserted for R or W here
+0x600 = ?W ram window bank select, selects one of 8 1k banks to be accessible at 0x000-0x3ff , only low 3 bits are valid on this register. not sure if readable.
+0x601-0x7ff = unknown, no idea if /DTACK is asserted for R or W here
+
+This chip *ALWAYS* has a bypass capacitor (ceramic, 104, 0.10 uF) soldered on top of the chip between pins 1 and 32 OR between 64 and 32.
+
+*/
+
+#include "emu.h"
+#include "machine/cchip_dev.h"
+
+// uncomment to run code from cchip mask rom
+//#define CCHIP_TEST
+
+DEFINE_DEVICE_TYPE(TAITO_CCHIP_DEV, taito_cchip_device, "cchip", "Taito TC0030CMD (C-Chip)")
+
+taito_cchip_device::taito_cchip_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, TAITO_CCHIP_DEV, tag, owner, clock),
+ m_upd7811(*this, "upd7811"),
+ m_upd4464_bank(*this, "upd4464_bank"),
+ m_upd4464(*this, "upd4464")
+{
+}
+
+ROM_START( taito_cchip )
+ ROM_REGION( 0x1000, "upd7811", 0 )
+#ifdef CCHIP_TEST
+ ROM_LOAD( "cchip_upd78c11.rom", 0x0000, 0x1000, CRC(11111111) SHA1(1111111111111111111111111111111111111111) )
+#else
+ ROM_LOAD( "cchip_upd78c11.rom", 0x0000, 0x1000, NO_DUMP )
+#endif
+ROM_END
+
+
+static ADDRESS_MAP_START( cchip_ram_bank, AS_PROGRAM, 8, taito_cchip_device )
+ AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("upd4464") // upd4464
+ADDRESS_MAP_END
+
+READ8_MEMBER(taito_cchip_device::asic_r)
+{
+ logerror("%s: asic_r %04x\n", machine().describe_context(), offset);
+
+ if (offset == 0x001) // megablst
+ return 0x01;
+
+ return 0x00;
+}
+
+WRITE8_MEMBER(taito_cchip_device::asic_w)
+{
+ logerror("%s: asic_w %04x %02x\n", machine().describe_context(), offset, data);
+ if (offset == 0x200)
+ {
+ logerror("cchip set bank to %02x\n", data & 0x7);
+ m_upd4464_bank->set_bank(data & 0x7);
+ }
+}
+
+READ8_MEMBER(taito_cchip_device::mem_r)
+{
+ offset &= 0x3ff;
+ return m_upd4464_bank->read8(space,offset);
+}
+
+WRITE8_MEMBER(taito_cchip_device::mem_w)
+{
+ offset &= 0x3ff;
+ return m_upd4464_bank->write8(space,offset,data);
+}
+
+static ADDRESS_MAP_START( cchip_map, AS_PROGRAM, 8, taito_cchip_device )
+ //AM_RANGE(0x0000, 0x0fff) AM_ROM // internal ROM of uPD7811
+ AM_RANGE(0x1000, 0x13ff) AM_DEVICE("upd4464_bank", address_map_bank_device, amap8)
+ AM_RANGE(0x1400, 0x17ff) AM_READWRITE(asic_r, asic_w)
+ AM_RANGE(0x2000, 0x3fff) AM_ROM AM_REGION("cchip_eprom", 0) // might not map here
+ADDRESS_MAP_END
+
+MACHINE_CONFIG_MEMBER( taito_cchip_device::device_add_mconfig )
+ MCFG_CPU_ADD("upd7811", UPD7811, DERIVED_CLOCK(1,1))
+ MCFG_CPU_PROGRAM_MAP(cchip_map)
+#ifndef CCHIP_TEST
+ MCFG_DEVICE_DISABLE()
+#endif
+
+ MCFG_DEVICE_ADD("upd4464_bank", ADDRESS_MAP_BANK, 0)
+ MCFG_DEVICE_PROGRAM_MAP(cchip_ram_bank)
+ MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
+ MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
+ MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(13)
+ MCFG_ADDRESS_MAP_BANK_STRIDE(0x400)
+MACHINE_CONFIG_END
+
+
+void taito_cchip_device::device_start()
+{
+ m_upd4464_bank->set_bank(0);
+}
+
+void taito_cchip_device::device_reset()
+{
+}
+
+const tiny_rom_entry *taito_cchip_device::device_rom_region() const
+{
+ return ROM_NAME(taito_cchip);
+}
diff --git a/src/mame/machine/cchip_dev.h b/src/mame/machine/cchip_dev.h
new file mode 100644
index 00000000000..dd1f9a8655d
--- /dev/null
+++ b/src/mame/machine/cchip_dev.h
@@ -0,0 +1,43 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood, Jonathan Gevaryahu
+
+#ifndef MAME_MACHINE_CCHIP_DEV
+#define MAME_MACHINE_CCHIP_DEV
+
+#pragma once
+
+#include "cpu/upd7810/upd7811.h"
+#include "machine/bankdev.h"
+
+DECLARE_DEVICE_TYPE(TAITO_CCHIP_DEV, taito_cchip_device)
+
+#define MCFG_TAITO_CCHIP_DEV_ADD(_tag, _clock) \
+ MCFG_DEVICE_ADD(_tag, TAITO_CCHIP_DEV, _clock)
+
+
+class taito_cchip_device : public device_t
+{
+public:
+ // construction/destruction
+ taito_cchip_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ required_device<cpu_device> m_upd7811;
+ required_device<address_map_bank_device> m_upd4464_bank;
+ required_shared_ptr<uint8_t> m_upd4464;
+
+ // can this be accessed externally?
+ DECLARE_READ8_MEMBER(asic_r);
+ DECLARE_WRITE8_MEMBER(asic_w);
+ DECLARE_READ8_MEMBER(mem_r);
+ DECLARE_WRITE8_MEMBER(mem_w);
+
+protected:
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual void device_start() override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_reset() override;
+
+private:
+};
+
+#endif // MAME_MACHINE_CCHIP_DEV