summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-10-03 13:56:18 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-10-03 13:56:49 -0400
commita271303a9fdf7207d5363687a9419e87544ff119 (patch)
treea3898b60dce63a72f574d8b870882bbab04f0597
parent2f42632ae518d26ad62f753816d9ab6445f08cb1 (diff)
Add Z80-derived stub devices for eZ80 and R800 CPUs
-rw-r--r--scripts/src/cpu.lua4
-rw-r--r--src/devices/cpu/z80/ez80.cpp39
-rw-r--r--src/devices/cpu/z80/ez80.h35
-rw-r--r--src/devices/cpu/z80/r800.cpp35
-rw-r--r--src/devices/cpu/z80/r800.h36
-rw-r--r--src/mame/drivers/msx.cpp14
-rw-r--r--src/mame/drivers/ti85.cpp22
-rw-r--r--src/mame/includes/msx.h1
-rw-r--r--src/mame/includes/ti85.h1
9 files changed, 179 insertions, 8 deletions
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index 0252aef5bc6..4ceff62e718 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -2701,8 +2701,12 @@ if (CPUS["Z80"]~=null or CPUS["KC80"]~=null) then
MAME_DIR .. "src/devices/cpu/z80/tmpz84c011.h",
MAME_DIR .. "src/devices/cpu/z80/tmpz84c015.cpp",
MAME_DIR .. "src/devices/cpu/z80/tmpz84c015.h",
+ MAME_DIR .. "src/devices/cpu/z80/ez80.cpp",
+ MAME_DIR .. "src/devices/cpu/z80/ez80.h",
MAME_DIR .. "src/devices/cpu/z80/lz8420m.cpp",
MAME_DIR .. "src/devices/cpu/z80/lz8420m.h",
+ MAME_DIR .. "src/devices/cpu/z80/r800.cpp",
+ MAME_DIR .. "src/devices/cpu/z80/r800.h",
}
end
diff --git a/src/devices/cpu/z80/ez80.cpp b/src/devices/cpu/z80/ez80.cpp
new file mode 100644
index 00000000000..525dc1c3b11
--- /dev/null
+++ b/src/devices/cpu/z80/ez80.cpp
@@ -0,0 +1,39 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Zilog eZ80 CPU
+
+ TODO: all differences from Z80
+
+***************************************************************************/
+
+#include "emu.h"
+#include "ez80.h"
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// device type definition
+DEFINE_DEVICE_TYPE(EZ80, ez80_device, "ez80", "Zilog eZ80")
+
+
+//**************************************************************************
+// DEVICE IMPLEMENTATION
+//**************************************************************************
+
+//-------------------------------------------------
+// ez80_device - constructor
+//-------------------------------------------------
+
+ez80_device::ez80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+ : z80_device(mconfig, type, tag, owner, clock)
+{
+}
+
+ez80_device::ez80_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : ez80_device(mconfig, EZ80, tag, owner, clock)
+{
+}
diff --git a/src/devices/cpu/z80/ez80.h b/src/devices/cpu/z80/ez80.h
new file mode 100644
index 00000000000..2ae563d5b80
--- /dev/null
+++ b/src/devices/cpu/z80/ez80.h
@@ -0,0 +1,35 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Zilog eZ80 CPU
+
+***************************************************************************/
+
+#ifndef MAME_CPU_Z80_EZ80_H
+#define MAME_CPU_Z80_EZ80_H
+
+#pragma once
+
+#include "z80.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class ez80_device : public z80_device
+{
+public:
+ // device type constructor
+ ez80_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // construction/destruction
+ ez80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+};
+
+// device type declaration
+DECLARE_DEVICE_TYPE(EZ80, ez80_device)
+
+#endif // MAME_CPU_Z80_EZ80_H
diff --git a/src/devices/cpu/z80/r800.cpp b/src/devices/cpu/z80/r800.cpp
new file mode 100644
index 00000000000..1748f8eca39
--- /dev/null
+++ b/src/devices/cpu/z80/r800.cpp
@@ -0,0 +1,35 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ ASCII R800 CPU
+
+ TODO: this uses a sped-up Z80 core with added multiply instructions
+ ('mulub', 'muluw').
+
+***************************************************************************/
+
+#include "emu.h"
+#include "r800.h"
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// device type definition
+DEFINE_DEVICE_TYPE(R800, r800_device, "r800", "ASCII R800")
+
+
+//**************************************************************************
+// DEVICE IMPLEMENTATION
+//**************************************************************************
+
+//-------------------------------------------------
+// r800_device - constructor
+//-------------------------------------------------
+
+r800_device::r800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : z80_device(mconfig, R800, tag, owner, clock)
+{
+}
diff --git a/src/devices/cpu/z80/r800.h b/src/devices/cpu/z80/r800.h
new file mode 100644
index 00000000000..bad16f8cfdd
--- /dev/null
+++ b/src/devices/cpu/z80/r800.h
@@ -0,0 +1,36 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ ASCII R800 CPU
+
+***************************************************************************/
+
+#ifndef MAME_CPU_Z80_R800_H
+#define MAME_CPU_Z80_R800_H
+
+#pragma once
+
+#include "z80.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class r800_device : public z80_device
+{
+public:
+ // device type constructor
+ r800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // device_execute_interface overrides
+ virtual u64 execute_clocks_to_cycles(u64 clocks) const noexcept override { return (clocks + 4 - 1) / 4; }
+ virtual u64 execute_cycles_to_clocks(u64 cycles) const noexcept override { return (cycles * 4); }
+};
+
+// device type declaration
+DECLARE_DEVICE_TYPE(R800, r800_device)
+
+#endif // MAME_CPU_Z80_R800_H
diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp
index b614fefdbef..f39c9894487 100644
--- a/src/mame/drivers/msx.cpp
+++ b/src/mame/drivers/msx.cpp
@@ -527,6 +527,7 @@ PCB Layouts missing
#include "emu.h"
+#include "cpu/z80/r800.h"
#include "includes/msx.h"
#include "formats/dsk_dsk.h"
#include "formats/dmk_dsk.h"
@@ -1543,6 +1544,15 @@ void msx2_state::msx2_pal(machine_config &config)
m_v9938->set_screen_pal("screen");
}
+void msx2_state::turbor(machine_config &config)
+{
+ msx2p(config);
+
+ R800(config.replace(), m_maincpu, 28.636363_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &msx2_state::msx_memory_map);
+ m_maincpu->set_addrmap(AS_IO, &msx2_state::msx2p_io_map);
+}
+
/***************************************************************************
@@ -8563,7 +8573,7 @@ ROM_END
void msx2_state::fsa1gt(machine_config &config)
{
- msx2(config);
+ turbor(config);
// AY8910/YM2149?
// FDC: tc8566af, 1 3.5" DSDD drive
// 2 Cartridge slots
@@ -8608,7 +8618,7 @@ ROM_END
void msx2_state::fsa1st(machine_config &config)
{
- msx2(config);
+ turbor(config);
// AY8910/YM2149?
// FDC: tc8566af, 1 3.5" DSDD drive
// 2 Cartridge slots
diff --git a/src/mame/drivers/ti85.cpp b/src/mame/drivers/ti85.cpp
index dd7a9616b29..5cfbebf3c50 100644
--- a/src/mame/drivers/ti85.cpp
+++ b/src/mame/drivers/ti85.cpp
@@ -205,6 +205,7 @@ TI-86 ports:
#include "includes/ti85.h"
#include "cpu/z80/z80.h"
+#include "cpu/z80/ez80.h"
#include "imagedev/snapquik.h"
#include "machine/bankdev.h"
#include "screen.h"
@@ -740,6 +741,15 @@ void ti85_state::ti84pse(machine_config &config)
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84pse )
}
+void ti85_state::ti84pce(machine_config &config)
+{
+ ti84pse(config);
+
+ EZ80(config.replace(), m_maincpu, 25000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti85_state::ti83p_asic_mem);
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti83pse_io);
+}
+
void ti85_state::ti73(machine_config &config)
{
ti83p(config);
@@ -1166,16 +1176,16 @@ COMP( 1999, ti83p, 0, 0, ti83p, ti82, ti85_state, empty_init,
COMP( 20??, ti83pb, ti83p, 0, ti83p, ti82, ti85_state, empty_init, "Texas Instruments", "TI-83 Plus (bootleg)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 2001, ti83pse, 0, 0, ti83pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-83 Plus Silver Edition (Boot Code 1.00)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 20??, ti83pseb, ti83pse, 0, ti83pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-83 Plus Silver Edition (bootleg)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
-COMP( 201?, ti83pcev15, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-83 Premium CE (Boot Code 5.1.5.0014)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
+COMP( 2015, ti83pcev15, ti84pse, 0, ti84pce, ti82, ti85_state, empty_init, "Texas Instruments", "TI-83 Premium CE (Boot Code 5.1.5.0014)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 2004, ti84p, 0, 0, ti84p, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus (Boot Code 1.00)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 200?, ti84pv2, ti84p, 0, ti84p, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus (Boot Code 1.02)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 2011, ti84pv3, ti84p, 0, ti84p, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus (Boot Code 1.03)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 20??, ti84pb, ti84p, 0, ti84p, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus (bootleg)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
-COMP( 20??, ti84pcse, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus C Silver Edition (Boot Code 4.0)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
-COMP( 20??, ti84pcsev2, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus C Silver Edition (Boot Code 4.2)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
-COMP( 2015, ti84pce, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus CE (Boot Code 5.0.0.0089)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
-COMP( 2016, ti84pcev15, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus CE (Boot Code 5.1.5.0014)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
-COMP( 2017, ti84pcev30, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus CE (Boot Code 5.3.0.0037)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
+COMP( 2013, ti84pcse, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus C Silver Edition (Boot Code 4.0)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
+COMP( 201?, ti84pcsev2, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus C Silver Edition (Boot Code 4.2)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
+COMP( 2015, ti84pce, ti84pse, 0, ti84pce, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus CE (Boot Code 5.0.0.0089)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
+COMP( 2016, ti84pcev15, ti84pse, 0, ti84pce, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus CE (Boot Code 5.1.5.0014)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
+COMP( 2017, ti84pcev30, ti84pse, 0, ti84pce, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus CE (Boot Code 5.3.0.0037)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 2004, ti84pse, 0, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus Silver Edition (Boot Code 1.00)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 2011, ti84psev3, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus Silver Edition (Boot Code 1.03)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
COMP( 20??, ti84pseb, ti84pse, 0, ti84pse, ti82, ti85_state, empty_init, "Texas Instruments", "TI-84 Plus Silver Edition (bootleg)", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h
index f381e76982d..2c9a41ad8db 100644
--- a/src/mame/includes/msx.h
+++ b/src/mame/includes/msx.h
@@ -483,6 +483,7 @@ private:
void msx2(machine_config &config);
void msx2p(machine_config &config);
void msx2_pal(machine_config &config);
+ void turbor(machine_config &config);
void msx2_cartlist(machine_config &config);
void msx2_floplist(machine_config &config);
diff --git a/src/mame/includes/ti85.h b/src/mame/includes/ti85.h
index 7c5016dce03..20b9ebee4b8 100644
--- a/src/mame/includes/ti85.h
+++ b/src/mame/includes/ti85.h
@@ -74,6 +74,7 @@ public:
void ti85d(machine_config &config);
void ti83pse(machine_config &config);
void ti84pse(machine_config &config);
+ void ti84pce(machine_config &config);
void ti86(machine_config &config);
void ti81(machine_config &config);
void ti85(machine_config &config);