From 8740d148c169dccb3a284917f17670bae4877fe1 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Thu, 1 Nov 2018 11:45:20 +0700 Subject: [PATCH] v53: final tidy (nw) * changed copyright holder due to near-complete replacement * name changed to v5x which better reflects actual use * minor comment cleanup --- scripts/src/cpu.lua | 6 ++-- src/devices/cpu/nec/{v53.cpp => v5x.cpp} | 42 +++++------------------- src/devices/cpu/nec/{v53.h => v5x.h} | 8 ++--- src/mame/drivers/mpc3000.cpp | 2 +- src/mame/includes/hng64.h | 2 +- src/mame/includes/mips.h | 2 +- 6 files changed, 18 insertions(+), 44 deletions(-) rename src/devices/cpu/nec/{v53.cpp => v5x.cpp} (93%) rename src/devices/cpu/nec/{v53.h => v5x.h} (97%) diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua index 846e1bad71c..b4b06d5330f 100644 --- a/scripts/src/cpu.lua +++ b/scripts/src/cpu.lua @@ -1746,7 +1746,7 @@ end -- NEC V-series Intel-compatible --@src/devices/cpu/nec/nec.h,CPUS["NEC"] = true --@src/devices/cpu/nec/v25.h,CPUS["NEC"] = true ---@src/devices/cpu/nec/v53.h,CPUS["NEC"] = true +--@src/devices/cpu/nec/v5x.h,CPUS["NEC"] = true --@src/devices/cpu/v30mz/v30mz.h,CPUS["V30MZ"] = true -------------------------------------------------- @@ -1766,8 +1766,8 @@ if (CPUS["NEC"]~=null) then MAME_DIR .. "src/devices/cpu/nec/v25.cpp", MAME_DIR .. "src/devices/cpu/nec/v25.h", MAME_DIR .. "src/devices/cpu/nec/v25sfr.cpp", - MAME_DIR .. "src/devices/cpu/nec/v53.cpp", - MAME_DIR .. "src/devices/cpu/nec/v53.h", + MAME_DIR .. "src/devices/cpu/nec/v5x.cpp", + MAME_DIR .. "src/devices/cpu/nec/v5x.h", } end diff --git a/src/devices/cpu/nec/v53.cpp b/src/devices/cpu/nec/v5x.cpp similarity index 93% rename from src/devices/cpu/nec/v53.cpp rename to src/devices/cpu/nec/v5x.cpp index 1d20dd544e7..c071aa958b1 100644 --- a/src/devices/cpu/nec/v53.cpp +++ b/src/devices/cpu/nec/v5x.cpp @@ -1,14 +1,14 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Patrick Mackinlay /* * NEC V5x devices consist of a V3x CPU core plus integrated peripherals. The * CPU cores within each device are as follows: * - * Device CPU - * V50/µPD70216 V30/µPD70116 - * V53/µPD70236 V33/µPD70136 - * V53A/µPD70236A V33A//µPD70136A + * Device CPU + * V50 (µPD70216) V30 (µPD70116) + * V53 (µPD70236) V33 (µPD70136) + * V53A (µPD70236A) V33A (µPD70136A) * * The peripherals are nearly identical between all three devices: * @@ -27,7 +27,7 @@ * */ #include "emu.h" -#include "v53.h" +#include "v5x.h" #include "necpriv.h" @@ -112,32 +112,6 @@ WRITE8_MEMBER(v50_device::OPCN_w) install_peripheral_io(); } -/* -m_WCY0 = 0x07; -m_WCY1 = 0x77; -m_WCY2 = 0x77; -m_WCY3 = 0x77; -m_WCY4 = 0x77; -m_WMB0 = 0x77; -m_WMB1 = 0x77; -m_WAC = 0x00; -m_TCKS = 0x00; -m_RFC = 0x80; -m_SBCR = 0x00; -m_BRC = 0x00; -// SCU -m_SMD = 0x4b; -m_SCM = 0x00; -m_SIMK = 0x03; -m_SST = 0x04; -// DMA -m_DCH = 0x01; -m_DMD = 0x00; -m_DCC = 0x0000; -m_DST = 0x00; -m_DMK = 0x0f; -*/ - void v5x_base_device::device_reset() { v33_base_device::device_reset(); @@ -202,7 +176,7 @@ void v5x_base_device::device_post_load() void v53_device::install_peripheral_io() { // unmap everything in I/O space up to the fixed position registers (we avoid overwriting them, it isn't a valid config) - space(AS_IO).unmap_readwrite(0x1000, 0xfeff); // todo, we need to have a way to NOT unmap things defined in the drivers, but instead have this act as an overlay mapping / unampping only!! + space(AS_IO).unmap_readwrite(0x1000, 0xfeff); // IOAG determines if the handlers used 8-bit or 16-bit access // the hng64.c games first set everything up in 8-bit mode, then @@ -283,7 +257,7 @@ WRITE_LINE_MEMBER(v53_device::hack_w) void v50_device::install_peripheral_io() { // unmap everything in I/O space up to the fixed position registers (we avoid overwriting them, it isn't a valid config) - space(AS_IO).unmap_readwrite(0x1000, 0xfeff); // todo, we need to have a way to NOT unmap things defined in the drivers, but instead have this act as an overlay mapping / unampping only!! + space(AS_IO).unmap_readwrite(0x1000, 0xfeff); if (m_OPSEL & OPSEL_DS) { diff --git a/src/devices/cpu/nec/v53.h b/src/devices/cpu/nec/v5x.h similarity index 97% rename from src/devices/cpu/nec/v53.h rename to src/devices/cpu/nec/v5x.h index 47ed9a70c5b..25fe7b123b9 100644 --- a/src/devices/cpu/nec/v53.h +++ b/src/devices/cpu/nec/v5x.h @@ -1,8 +1,8 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Patrick Mackinlay -#ifndef MAME_CPU_NEC_V53_H -#define MAME_CPU_NEC_V53_H +#ifndef MAME_CPU_NEC_V5X_H +#define MAME_CPU_NEC_V5X_H #pragma once @@ -170,4 +170,4 @@ DECLARE_DEVICE_TYPE(V50, v50_device) DECLARE_DEVICE_TYPE(V53, v53_device) DECLARE_DEVICE_TYPE(V53A, v53a_device) -#endif // MAME_CPU_NEC_V53_H +#endif // MAME_CPU_NEC_V5X_H diff --git a/src/mame/drivers/mpc3000.cpp b/src/mame/drivers/mpc3000.cpp index 0d9704e04d3..32522bfce2d 100644 --- a/src/mame/drivers/mpc3000.cpp +++ b/src/mame/drivers/mpc3000.cpp @@ -61,7 +61,7 @@ MPCs on other hardware: ***************************************************************************/ #include "emu.h" -#include "cpu/nec/v53.h" +#include "cpu/nec/v5x.h" #include "sound/l7a1045_l6028_dsp_a.h" #include "video/hd61830.h" #include "bus/midi/midi.h" diff --git a/src/mame/includes/hng64.h b/src/mame/includes/hng64.h index c4d6965f2f3..94a40f97eff 100644 --- a/src/mame/includes/hng64.h +++ b/src/mame/includes/hng64.h @@ -4,7 +4,7 @@ #include "machine/msm6242.h" #include "machine/timer.h" #include "cpu/mips/mips3.h" -#include "cpu/nec/v53.h" +#include "cpu/nec/v5x.h" #include "sound/l7a1045_l6028_dsp_a.h" #include "video/poly.h" #include "cpu/tlcs870/tlcs870.h" diff --git a/src/mame/includes/mips.h b/src/mame/includes/mips.h index 0fb9ee547ee..8fc51841f48 100644 --- a/src/mame/includes/mips.h +++ b/src/mame/includes/mips.h @@ -8,7 +8,7 @@ // processors and memory #include "cpu/mips/r3000.h" -#include "cpu/nec/v53.h" +#include "cpu/nec/v5x.h" #include "machine/ram.h" // i/o devices