summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2019-02-07 07:49:39 +0900
committer ajrhacker <ajrhacker@users.noreply.github.com>2019-02-06 17:49:39 -0500
commit3d4efd89b5ba8065eb194a04713ed012f4e86f79 (patch)
tree6b8e5ad6932afcc2552fa93807267ed3eb4f2ac2
parent4931a9b5abdc70c28916098814a58cbad9d68d1a (diff)
tms34010.cpp : Internalize io register, Add notes, Remove register_po… (#4602)
* tms34010.cpp : Internalize io register, Add notes, Remove register_postload * tms34010.cpp : Add notes, nw * tms34010.cpp : Fix spacing * Fix harddriv.cpp regressions, nw tms34010.cpp : Remove unnecessary arguments in handlers
-rw-r--r--src/devices/cpu/tms34010/tms34010.cpp91
-rw-r--r--src/devices/cpu/tms34010/tms34010.h26
-rw-r--r--src/mame/drivers/artmagic.cpp2
-rw-r--r--src/mame/drivers/btoads.cpp1
-rw-r--r--src/mame/drivers/coolpool.cpp3
-rw-r--r--src/mame/drivers/exterm.cpp6
-rw-r--r--src/mame/drivers/harddriv.cpp5
-rw-r--r--src/mame/drivers/jpmimpct.cpp1
-rw-r--r--src/mame/drivers/lethalj.cpp1
-rw-r--r--src/mame/drivers/metalmx.cpp1
-rw-r--r--src/mame/drivers/micro3d.cpp1
-rw-r--r--src/mame/drivers/midtunit.cpp1
-rw-r--r--src/mame/drivers/midwunit.cpp1
-rw-r--r--src/mame/drivers/midxunit.cpp1
-rw-r--r--src/mame/drivers/midyunit.cpp1
-rw-r--r--src/mame/drivers/skeetsht.cpp1
-rw-r--r--src/mame/drivers/skimaxx.cpp1
-rw-r--r--src/mame/drivers/tickee.cpp4
-rw-r--r--src/mame/drivers/xtheball.cpp1
-rw-r--r--src/mame/includes/harddriv.h2
-rw-r--r--src/mame/machine/harddriv.cpp14
-rw-r--r--src/mame/machine/inder_vid.cpp1
22 files changed, 97 insertions, 69 deletions
diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp
index 3851b16dd37..79e9cf42fb6 100644
--- a/src/devices/cpu/tms34010/tms34010.cpp
+++ b/src/devices/cpu/tms34010/tms34010.cpp
@@ -7,6 +7,9 @@
Copyright Alex Pasadyn/Zsolt Vasvari
Parts based on code by Aaron Giles
+ TMS34020 TODO:
+ - Big endian mode isn't implemented
+
***************************************************************************/
#include "emu.h"
@@ -26,36 +29,80 @@
#define LOGCONTROLREGS(...) LOGMASKED(LOG_CONTROL_REGS, __VA_ARGS__)
#define LOGGRAPHICSOPS(...) LOGMASKED(LOG_GRAPHICS_OPS, __VA_ARGS__)
+void tms34010_device::internal_regs_map(address_map &map)
+{
+ //map(0x00000000, 0xbfffffff); General use
+ map(0xc0000000, 0xc00001ff).rw(FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w)); // IO registers
+ //map(0xc0000200, 0xc0001fff).noprw(); Reserved (for IO registers?)
+ //map(0xc0002000, 0xffffdfff); General use
+ //map(0xffffe000, 0xfffffbff).noprw(); Reserved (for interrupt vectors, maybe)
+ //map(0xfffffc00, 0xffffffff); Interrupt Vectors
+}
+
+void tms34020_device::internal_regs_map(address_map &map)
+{
+ //map(0x00000000, 0x000fffff); General use and extended trap vectors
+ //map(0x00100000, 0xbfffffff); General use
+ map(0xc0000000, 0xc00003ff).rw(FUNC(tms34020_device::io_register_r), FUNC(tms34020_device::io_register_w)); // IO registers
+ //map(0xc0000400, 0xc0001fff).noprw(); Reserved for IO registers
+ //map(0xc0002000, 0xffefffff); General use
+ //map(0xfff00000, 0xffffdfff); General use and extended trap vectors
+ //map(0xffffe000, 0xfffffbbf).noprw(); Reserved for interrupt vectors and extended trap vectors
+ //map(0xfffffbc0, 0xffffffff); Interrupt vectors and trap vectors
+}
-DEFINE_DEVICE_TYPE(TMS34010, tms34010_device, "tms34010", "TMS34010")
-DEFINE_DEVICE_TYPE(TMS34020, tms34020_device, "tms34020", "TMS34020")
+DEFINE_DEVICE_TYPE(TMS34010, tms34010_device, "tms34010", "Texas Instruments TMS34010")
+DEFINE_DEVICE_TYPE(TMS34020, tms34020_device, "tms34020", "Texas Instruments TMS34020")
/***************************************************************************
GLOBAL VARIABLES
***************************************************************************/
-tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_regs_map)
: cpu_device(mconfig, type, tag, owner, clock)
, device_video_interface(mconfig, *this)
- , m_program_config("program", ENDIANNESS_LITTLE, 16, 32, 3), m_pc(0), m_ppc(0), m_st(0), m_pixel_write(nullptr), m_pixel_read(nullptr), m_raster_op(nullptr), m_pixel_op(nullptr), m_pixel_op_timing(0), m_convsp(0), m_convdp(0), m_convmp(0), m_gfxcycles(0), m_pixelshift(0), m_is_34020(0), m_reset_deferred(false)
- , m_halt_on_reset(false), m_hblank_stable(0), m_external_host_access(0), m_executing(0), m_program(nullptr), m_cache(nullptr)
+ , m_program_config("program", ENDIANNESS_LITTLE, 16, 32, 3, internal_regs_map)
+ , m_pc(0)
+ , m_ppc(0)
+ , m_st(0)
+ , m_pixel_write(nullptr)
+ , m_pixel_read(nullptr)
+ , m_raster_op(nullptr)
+ , m_pixel_op(nullptr)
+ , m_pixel_op_timing(0)
+ , m_convsp(0)
+ , m_convdp(0)
+ , m_convmp(0)
+ , m_gfxcycles(0)
+ , m_pixelshift(0)
+ , m_is_34020(0)
+ , m_reset_deferred(false)
+ , m_halt_on_reset(false)
+ , m_hblank_stable(0)
+ , m_external_host_access(0)
+ , m_executing(0)
+ , m_program(nullptr)
+ , m_cache(nullptr)
, m_pixclock(0)
- , m_pixperclock(0), m_scantimer(nullptr), m_icount(0)
+ , m_pixperclock(0)
+ , m_scantimer(nullptr)
+ , m_icount(0)
, m_output_int_cb(*this)
+ , m_ioreg_pre_write_cb(*this)
{
}
tms34010_device::tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : tms340x0_device(mconfig, TMS34010, tag, owner, clock)
+ : tms340x0_device(mconfig, TMS34010, tag, owner, clock, address_map_constructor(FUNC(tms34010_device::internal_regs_map), this))
{
m_is_34020 = 0;
}
tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : tms340x0_device(mconfig, TMS34020, tag, owner, clock)
+ : tms340x0_device(mconfig, TMS34020, tag, owner, clock, address_map_constructor(FUNC(tms34020_device::internal_regs_map), this))
{
m_is_34020 = 1;
}
@@ -582,6 +629,7 @@ void tms340x0_device::device_start()
m_scanline_ind16_cb.bind_relative_to(*owner());
m_scanline_rgb32_cb.bind_relative_to(*owner());
m_output_int_cb.resolve();
+ m_ioreg_pre_write_cb.resolve();
m_to_shiftreg_cb.bind_relative_to(*owner());
m_from_shiftreg_cb.bind_relative_to(*owner());
@@ -625,7 +673,6 @@ void tms340x0_device::device_start()
save_item(NAME(m_pixelshift));
save_item(NAME(m_gfxcycles));
save_pointer(NAME(&m_regs[0].reg), ARRAY_LENGTH(m_regs));
- machine().save().register_postload(save_prepost_delegate(FUNC(tms340x0_device::tms34010_state_postload), this));
set_icountptr(m_icount);
}
@@ -661,7 +708,7 @@ void tms340x0_device::device_reset()
if (m_reset_deferred)
{
- io_register_w(*m_program, REG_HSTCTLH, 0x8000, 0xffff);
+ io_register_w(REG_HSTCTLH, 0x8000, 0xffff);
}
}
@@ -1089,8 +1136,11 @@ static const char *const ioreg_name[] =
"HCOUNT", "VCOUNT", "DPYADR", "REFCNT"
};
-WRITE16_MEMBER( tms34010_device::io_register_w )
+void tms34010_device::io_register_w(offs_t offset, u16 data, u16 mem_mask)
{
+ if (!m_ioreg_pre_write_cb.isnull())
+ m_ioreg_pre_write_cb(offset, data, mem_mask);
+
int oldreg, newreg;
/* Set register */
@@ -1237,8 +1287,11 @@ static const char *const ioreg020_name[] =
"IHOST3L", "IHOST3H", "IHOST4L", "IHOST4H"
};
-WRITE16_MEMBER( tms34020_device::io_register_w )
+void tms34020_device::io_register_w(offs_t offset, u16 data, u16 mem_mask)
{
+ if (!m_ioreg_pre_write_cb.isnull())
+ m_ioreg_pre_write_cb(offset, data, mem_mask);
+
int oldreg, newreg;
/* Set register */
@@ -1398,7 +1451,7 @@ WRITE16_MEMBER( tms34020_device::io_register_w )
I/O REGISTER READS
***************************************************************************/
-READ16_MEMBER( tms34010_device::io_register_r )
+u16 tms34010_device::io_register_r(offs_t offset)
{
int result, total;
@@ -1439,7 +1492,7 @@ READ16_MEMBER( tms34010_device::io_register_r )
}
-READ16_MEMBER( tms34020_device::io_register_r )
+u16 tms34020_device::io_register_r(offs_t offset)
{
int result, total;
@@ -1479,7 +1532,7 @@ READ16_MEMBER( tms34020_device::io_register_r )
SAVE STATE
***************************************************************************/
-void tms340x0_device::tms34010_state_postload()
+void tms340x0_device::device_post_load()
{
set_raster_op();
set_pixel_function();
@@ -1490,7 +1543,7 @@ void tms340x0_device::tms34010_state_postload()
HOST INTERFACE WRITES
***************************************************************************/
-WRITE16_MEMBER( tms340x0_device::host_w )
+void tms340x0_device::host_w(offs_t offset, u16 data, u16 mem_mask)
{
int reg = offset;
unsigned int addr;
@@ -1527,8 +1580,8 @@ WRITE16_MEMBER( tms340x0_device::host_w )
case TMS34010_HOST_CONTROL:
{
m_external_host_access = true;
- if (mem_mask&0xff00) io_register_w(*m_program, REG_HSTCTLH, data & 0xff00, 0xff00);
- if (mem_mask&0x00ff) io_register_w(*m_program, REG_HSTCTLL, data & 0x00ff, 0x00ff);
+ if (mem_mask&0xff00) io_register_w(REG_HSTCTLH, data & 0xff00, 0xff00);
+ if (mem_mask&0x00ff) io_register_w(REG_HSTCTLL, data & 0x00ff, 0x00ff);
m_external_host_access = false;
break;
}
@@ -1546,7 +1599,7 @@ WRITE16_MEMBER( tms340x0_device::host_w )
HOST INTERFACE READS
***************************************************************************/
-READ16_MEMBER( tms340x0_device::host_r )
+u16 tms340x0_device::host_r(offs_t offset)
{
int reg = offset;
unsigned int addr;
diff --git a/src/devices/cpu/tms34010/tms34010.h b/src/devices/cpu/tms34010/tms34010.h
index 299282fe743..313f94d3503 100644
--- a/src/devices/cpu/tms34010/tms34010.h
+++ b/src/devices/cpu/tms34010/tms34010.h
@@ -135,6 +135,7 @@ public:
void set_pixels_per_clock(int pixperclock) { m_pixperclock = pixperclock; }
auto output_int() { return m_output_int_cb.bind(); }
+ auto ioreg_pre_write() { return m_ioreg_pre_write_cb.bind(); }
// Setters for ind16 scanline callback
template <class FunctionClass>
@@ -205,16 +206,15 @@ public:
}
void get_display_params(display_params *params);
- void tms34010_state_postload();
uint32_t tms340x0_ind16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t tms340x0_rgb32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- virtual DECLARE_WRITE16_MEMBER(io_register_w) = 0;
- virtual DECLARE_READ16_MEMBER(io_register_r) = 0;
+ virtual void io_register_w(offs_t offset, u16 data, u16 mem_mask = ~u16(0)) = 0;
+ virtual u16 io_register_r(offs_t offset) = 0;
- DECLARE_WRITE16_MEMBER(host_w);
- DECLARE_READ16_MEMBER(host_r);
+ void host_w(offs_t offset, u16 data, u16 mem_mask = ~u16(0));
+ u16 host_r(offs_t offset);
TIMER_CALLBACK_MEMBER(internal_interrupt_callback);
TIMER_CALLBACK_MEMBER(scanline_callback);
@@ -292,11 +292,12 @@ protected:
};
// construction/destruction
- tms340x0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ tms340x0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_regs_map = address_map_constructor());
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+ virtual void device_post_load() override;
// device_execute_interface overrides
virtual uint32_t execute_min_cycles() const override { return 1; }
@@ -367,6 +368,7 @@ protected:
scanline_ind16_cb_delegate m_scanline_ind16_cb;
scanline_rgb32_cb_delegate m_scanline_rgb32_cb;
devcb_write_line m_output_int_cb; /* output interrupt callback */
+ devcb_write16 m_ioreg_pre_write_cb;
shiftreg_in_cb_delegate m_to_shiftreg_cb; /* shift register write */
shiftreg_out_cb_delegate m_from_shiftreg_cb; /* shift register read */
@@ -1050,13 +1052,14 @@ public:
tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
/* Reads & writes to the 34010 I/O registers; place at 0xc0000000 */
- virtual DECLARE_WRITE16_MEMBER( io_register_w ) override;
- virtual DECLARE_READ16_MEMBER( io_register_r ) override;
+ virtual void io_register_w(offs_t offset, u16 data, u16 mem_mask = ~u16(0)) override;
+ virtual u16 io_register_r(offs_t offset) override;
protected:
virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override { return (clocks + 8 - 1) / 8; }
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 8); }
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+ void internal_regs_map(address_map &map);
};
DECLARE_DEVICE_TYPE(TMS34010, tms34010_device)
@@ -1066,14 +1069,15 @@ class tms34020_device : public tms340x0_device
public:
tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- /* Reads & writes to the 34010 I/O registers; place at 0xc0000000 */
- virtual DECLARE_WRITE16_MEMBER( io_register_w ) override;
- virtual DECLARE_READ16_MEMBER( io_register_r ) override;
+ /* Reads & writes to the 34020 I/O registers; place at 0xc0000000 */
+ virtual void io_register_w(offs_t offset, u16 data, u16 mem_mask = ~u16(0)) override;
+ virtual u16 io_register_r(offs_t offset) override;
protected:
virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override { return (clocks + 4 - 1) / 4; }
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 4); }
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+ void internal_regs_map(address_map &map);
};
DECLARE_DEVICE_TYPE(TMS34020, tms34020_device)
diff --git a/src/mame/drivers/artmagic.cpp b/src/mame/drivers/artmagic.cpp
index 646062c6818..74405910caa 100644
--- a/src/mame/drivers/artmagic.cpp
+++ b/src/mame/drivers/artmagic.cpp
@@ -473,7 +473,6 @@ void artmagic_state::tms_map(address_map &map)
map(0x00400000, 0x005fffff).ram().share("vram1");
map(0x00800000, 0x0080007f).rw(FUNC(artmagic_state::blitter_r), FUNC(artmagic_state::blitter_w));
map(0x00c00000, 0x00c000ff).rw(m_tlc34076, FUNC(tlc34076_device::read), FUNC(tlc34076_device::write)).umask16(0x00ff);
- map(0xc0000000, 0xc00001ff).rw(m_tms, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xffe00000, 0xffffffff).ram();
}
@@ -484,7 +483,6 @@ void artmagic_state::stonebal_tms_map(address_map &map)
map(0x00400000, 0x005fffff).ram().share("vram1");
map(0x00800000, 0x0080007f).rw(FUNC(artmagic_state::blitter_r), FUNC(artmagic_state::blitter_w));
map(0x00c00000, 0x00c000ff).rw(m_tlc34076, FUNC(tlc34076_device::read), FUNC(tlc34076_device::write)).umask16(0x00ff);
- map(0xc0000000, 0xc00001ff).rw(m_tms, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xffc00000, 0xffffffff).ram();
}
diff --git a/src/mame/drivers/btoads.cpp b/src/mame/drivers/btoads.cpp
index 6f5f9e6a492..e58548400f1 100644
--- a/src/mame/drivers/btoads.cpp
+++ b/src/mame/drivers/btoads.cpp
@@ -191,7 +191,6 @@ void btoads_state::main_map(address_map &map)
map(0xa8800000, 0xa8ffffff).nopw();
map(0xb0000000, 0xb03fffff).rw(FUNC(btoads_state::vram_bg0_r), FUNC(btoads_state::vram_bg0_w)).share("vram_bg0");
map(0xb4000000, 0xb43fffff).rw(FUNC(btoads_state::vram_bg1_r), FUNC(btoads_state::vram_bg1_w)).share("vram_bg1");
- map(0xc0000000, 0xc00003ff).rw(m_maincpu, FUNC(tms34020_device::io_register_r), FUNC(tms34020_device::io_register_w));
map(0xfc000000, 0xffffffff).rom().region("user1", 0);
}
diff --git a/src/mame/drivers/coolpool.cpp b/src/mame/drivers/coolpool.cpp
index af17acdb246..7e14d030afb 100644
--- a/src/mame/drivers/coolpool.cpp
+++ b/src/mame/drivers/coolpool.cpp
@@ -528,7 +528,6 @@ void coolpool_state::amerdart_map(address_map &map)
map(0x04000000, 0x0400000f).w(FUNC(coolpool_state::amerdart_misc_w));
map(0x05000000, 0x0500000f).r(m_dsp2main, FUNC(generic_latch_16_device::read)).w(m_main2dsp, FUNC(generic_latch_16_device::write));
map(0x06000000, 0x06007fff).ram().w(FUNC(coolpool_state::nvram_thrash_data_w)).share("nvram");
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xffb00000, 0xffffffff).rom().region("maincpu", 0);
}
@@ -541,7 +540,6 @@ void coolpool_state::coolpool_map(address_map &map)
map(0x03000000, 0x0300000f).w(FUNC(coolpool_state::coolpool_misc_w));
map(0x03000000, 0x03ffffff).rom().region("gfx1", 0);
map(0x06000000, 0x06007fff).ram().w(FUNC(coolpool_state::nvram_thrash_data_w)).share("nvram");
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xffe00000, 0xffffffff).rom().region("maincpu", 0);
}
@@ -553,7 +551,6 @@ void coolpool_state::nballsht_map(address_map &map)
map(0x03000000, 0x0300000f).w(FUNC(coolpool_state::coolpool_misc_w));
map(0x04000000, 0x040000ff).rw(m_tlc34076, FUNC(tlc34076_device::read), FUNC(tlc34076_device::write)).umask16(0x00ff); // IMSG176P-40
map(0x06000000, 0x0601ffff).mirror(0x00020000).ram().w(FUNC(coolpool_state::nvram_thrash_data_w)).share("nvram");
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xff000000, 0xff7fffff).rom().region("gfx1", 0);
map(0xffc00000, 0xffffffff).rom().region("maincpu", 0);
}
diff --git a/src/mame/drivers/exterm.cpp b/src/mame/drivers/exterm.cpp
index 9bea7aa21d6..fd3d05790eb 100644
--- a/src/mame/drivers/exterm.cpp
+++ b/src/mame/drivers/exterm.cpp
@@ -92,13 +92,13 @@ void exterm_state::machine_start()
WRITE16_MEMBER(exterm_state::host_data_w)
{
- m_slave->host_w(space,offset / 0x0010000, data, 0xffff);
+ m_slave->host_w(offset / 0x0010000, data);
}
READ16_MEMBER(exterm_state::host_data_r)
{
- return m_slave->host_r(space,offset / 0x0010000, 0xffff);
+ return m_slave->host_r(offset / 0x0010000);
}
@@ -253,7 +253,6 @@ void exterm_state::master_map(address_map &map)
map(0x01800000, 0x01807fff).mirror(0xfc7f8000).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0x02800000, 0x02807fff).mirror(0xfc7f8000).ram().share("nvram");
map(0x03000000, 0x03ffffff).mirror(0xfc000000).rom().region("maincpu", 0);
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
}
@@ -261,7 +260,6 @@ void exterm_state::slave_map(address_map &map)
{
map(0x00000000, 0x000fffff).mirror(0xfbf00000).ram().share("slave_videoram");
map(0x04000000, 0x047fffff).mirror(0xfb800000).ram();
- map(0xc0000000, 0xc00001ff).rw(m_slave, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
}
diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp
index 1af64a14b10..5437a445f29 100644
--- a/src/mame/drivers/harddriv.cpp
+++ b/src/mame/drivers/harddriv.cpp
@@ -565,7 +565,6 @@ void harddriv_state::driver_gsp_map(address_map &map)
map.unmap_value_high();
map(0x00000000, 0x0000200f).noprw(); /* hit during self-test */
map(0x02000000, 0x0207ffff).rw(FUNC(harddriv_state::hdgsp_vram_2bpp_r), FUNC(harddriv_state::hdgsp_vram_1bpp_w));
- map(0xc0000000, 0xc00001ff).rw("gsp", FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xf4000000, 0xf40000ff).rw(FUNC(harddriv_state::hdgsp_control_lo_r), FUNC(harddriv_state::hdgsp_control_lo_w)).share("gsp_control_lo");
map(0xf4800000, 0xf48000ff).rw(FUNC(harddriv_state::hdgsp_control_hi_r), FUNC(harddriv_state::hdgsp_control_hi_w)).share("gsp_control_hi");
map(0xf5000000, 0xf5000fff).rw(FUNC(harddriv_state::hdgsp_paletteram_lo_r), FUNC(harddriv_state::hdgsp_paletteram_lo_w)).share("gsp_palram_lo");
@@ -579,7 +578,6 @@ void harddriv_state::driver_msp_map(address_map &map)
map.unmap_value_high();
map(0x00000000, 0x000fffff).ram().share("msp_ram");
map(0x00700000, 0x007fffff).ram().share("msp_ram");
- map(0xc0000000, 0xc00001ff).rw("msp", FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xfff00000, 0xffffffff).ram().share("msp_ram");
}
@@ -616,7 +614,6 @@ void harddriv_state::multisync_gsp_map(address_map &map)
map.unmap_value_high();
map(0x00000000, 0x0000200f).noprw(); /* hit during self-test */
map(0x02000000, 0x020fffff).rw(FUNC(harddriv_state::hdgsp_vram_2bpp_r), FUNC(harddriv_state::hdgsp_vram_2bpp_w));
- map(0xc0000000, 0xc00001ff).r("gsp", FUNC(tms34010_device::io_register_r)).w(FUNC(harddriv_state::hdgsp_io_w));
map(0xf4000000, 0xf40000ff).rw(FUNC(harddriv_state::hdgsp_control_lo_r), FUNC(harddriv_state::hdgsp_control_lo_w)).share("gsp_control_lo");
map(0xf4800000, 0xf48000ff).rw(FUNC(harddriv_state::hdgsp_control_hi_r), FUNC(harddriv_state::hdgsp_control_hi_w)).share("gsp_control_hi");
map(0xf5000000, 0xf5000fff).rw(FUNC(harddriv_state::hdgsp_paletteram_lo_r), FUNC(harddriv_state::hdgsp_paletteram_lo_w)).share("gsp_palram_lo");
@@ -658,7 +655,6 @@ void harddriv_state::multisync2_gsp_map(address_map &map)
map.unmap_value_high();
map(0x00000000, 0x0000200f).noprw(); /* hit during self-test */
map(0x02000000, 0x020fffff).rw(FUNC(harddriv_state::hdgsp_vram_2bpp_r), FUNC(harddriv_state::hdgsp_vram_2bpp_w));
- map(0xc0000000, 0xc00001ff).r("gsp", FUNC(tms34010_device::io_register_r)).w(FUNC(harddriv_state::hdgsp_io_w));
map(0xf4000000, 0xf40000ff).rw(FUNC(harddriv_state::hdgsp_control_lo_r), FUNC(harddriv_state::hdgsp_control_lo_w)).share("gsp_control_lo");
map(0xf4800000, 0xf48000ff).rw(FUNC(harddriv_state::hdgsp_control_hi_r), FUNC(harddriv_state::hdgsp_control_hi_w)).share("gsp_control_hi");
map(0xf5000000, 0xf5000fff).rw(FUNC(harddriv_state::hdgsp_paletteram_lo_r), FUNC(harddriv_state::hdgsp_paletteram_lo_w)).share("gsp_palram_lo");
@@ -1540,6 +1536,7 @@ void harddriv_state::multisync_nomsp(machine_config &config)
m_gsp->set_addrmap(AS_PROGRAM, &harddriv_state::multisync_gsp_map);
m_gsp->set_pixel_clock(6000000);
m_gsp->set_pixels_per_clock(2);
+ m_gsp->ioreg_pre_write().set(FUNC(harddriv_state::hdgsp_io_w));
m_gsp->set_scanline_ind16_callback(FUNC(harddriv_state::scanline_multisync));
/* video hardware */
diff --git a/src/mame/drivers/jpmimpct.cpp b/src/mame/drivers/jpmimpct.cpp
index 042e98974da..c09569d27cc 100644
--- a/src/mame/drivers/jpmimpct.cpp
+++ b/src/mame/drivers/jpmimpct.cpp
@@ -662,7 +662,6 @@ void jpmimpct_state::tms_program_map(address_map &map)
// AM_RANGE(0x01000000, 0x0100003f) AM_MIRROR(0xf87fffc0) AM_READWRITE(jpmimpct_bt477_r, jpmimpct_bt477_w)
map(0x01000000, 0x017fffff).mirror(0xf8000000).mask(0x1f).rw(FUNC(jpmimpct_state::jpmimpct_bt477_r), FUNC(jpmimpct_state::jpmimpct_bt477_w));
map(0x07800000, 0x07bfffff).mirror(0xf8400000).ram();
- map(0xc0000000, 0xc00001ff).rw(m_dsp, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
}
diff --git a/src/mame/drivers/lethalj.cpp b/src/mame/drivers/lethalj.cpp
index ea921617b48..74eb7de823e 100644
--- a/src/mame/drivers/lethalj.cpp
+++ b/src/mame/drivers/lethalj.cpp
@@ -223,7 +223,6 @@ void lethalj_state::lethalj_map(address_map &map)
map(0x04500010, 0x0450001f).portr("IN0");
map(0x04600000, 0x0460000f).portr("IN1");
map(0x04700000, 0x0470007f).w(FUNC(lethalj_state::blitter_w));
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xc0000240, 0xc000025f).nopw(); /* seems to be a bug in their code, one of many. */
map(0xff800000, 0xffffffff).rom().region("maincpu", 0);
}
diff --git a/src/mame/drivers/metalmx.cpp b/src/mame/drivers/metalmx.cpp
index 2270377cd69..b64a45ec2ad 100644
--- a/src/mame/drivers/metalmx.cpp
+++ b/src/mame/drivers/metalmx.cpp
@@ -527,7 +527,6 @@ void metalmx_state::gsp_map(address_map &map)
{
map(0x88800000, 0x8880000f).ram(); /* ? */
map(0x88c00000, 0x88c0000f).ram(); /* ? */
- map(0xc0000000, 0xc00003ff).rw(m_gsp, FUNC(tms34020_device::io_register_r), FUNC(tms34020_device::io_register_w));
map(0xff000000, 0xff7fffff).ram().share("gsp_dram");
map(0xff800000, 0xffffffff).ram().share("gsp_vram");
}
diff --git a/src/mame/drivers/micro3d.cpp b/src/mame/drivers/micro3d.cpp
index fbe1376fa22..c5f37d66058 100644
--- a/src/mame/drivers/micro3d.cpp
+++ b/src/mame/drivers/micro3d.cpp
@@ -240,7 +240,6 @@ void micro3d_state::vgbmem(address_map &map)
map(0x02e00000, 0x02e0003f).w(FUNC(micro3d_state::vgb_uart_w)).umask16(0x00ff);
map(0x03800000, 0x03dfffff).rom().region("tms_gfx", 0);
map(0x03e00000, 0x03ffffff).rom().region("tms34010", 0);
- map(0xc0000000, 0xc00001ff).rw(m_vgb, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xffe00000, 0xffffffff).rom().region("tms34010", 0);
}
diff --git a/src/mame/drivers/midtunit.cpp b/src/mame/drivers/midtunit.cpp
index 7bfafb19de8..4d37fffd7ec 100644
--- a/src/mame/drivers/midtunit.cpp
+++ b/src/mame/drivers/midtunit.cpp
@@ -65,7 +65,6 @@ void midtunit_state::main_map(address_map &map)
map(0x01f00000, 0x01f0001f).w(m_video, FUNC(midtunit_video_device::midtunit_control_w));
map(0x02000000, 0x07ffffff).r(m_video, FUNC(midtunit_video_device::midtunit_gfxrom_r)).share("gfxrom");
map(0x1f800000, 0x1fffffff).rom().region("maincpu", 0); /* mirror used by MK */
- map(0xc0000000, 0xc00001ff).rw("maincpu", FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xff800000, 0xffffffff).rom().region("maincpu", 0);
}
diff --git a/src/mame/drivers/midwunit.cpp b/src/mame/drivers/midwunit.cpp
index 0925f6c168a..1f7cbed2a9b 100644
--- a/src/mame/drivers/midwunit.cpp
+++ b/src/mame/drivers/midwunit.cpp
@@ -126,7 +126,6 @@ void midwunit_state::main_map(address_map &map)
map(0x01a00000, 0x01a000ff).mirror(0x00080000).rw(m_video, FUNC(midwunit_video_device::midtunit_dma_r), FUNC(midwunit_video_device::midtunit_dma_w));
map(0x01b00000, 0x01b0001f).rw(m_video, FUNC(midwunit_video_device::midwunit_control_r), FUNC(midwunit_video_device::midwunit_control_w));
map(0x02000000, 0x06ffffff).r(m_video, FUNC(midwunit_video_device::midwunit_gfxrom_r));
- map(0xc0000000, 0xc00001ff).rw("maincpu", FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xff800000, 0xffffffff).rom().region("maincpu", 0);
}
diff --git a/src/mame/drivers/midxunit.cpp b/src/mame/drivers/midxunit.cpp
index 700457a87c7..34d4dc0f281 100644
--- a/src/mame/drivers/midxunit.cpp
+++ b/src/mame/drivers/midxunit.cpp
@@ -122,7 +122,6 @@ void midxunit_state::main_map(address_map &map)
map(0x80c00000, 0x80c000ff).rw(FUNC(midxunit_state::midxunit_uart_r), FUNC(midxunit_state::midxunit_uart_w));
map(0xa0440000, 0xa047ffff).rw(FUNC(midxunit_state::midxunit_cmos_r), FUNC(midxunit_state::midxunit_cmos_w)).share("nvram");
map(0xa0800000, 0xa08fffff).rw(m_video, FUNC(midxunit_video_device::midxunit_paletteram_r), FUNC(midxunit_video_device::midxunit_paletteram_w)).share("palette");
- map(0xc0000000, 0xc00003ff).rw("maincpu", FUNC(tms34020_device::io_register_r), FUNC(tms34020_device::io_register_w));
map(0xc0800000, 0xc08000ff).mirror(0x00400000).rw(m_video, FUNC(midxunit_video_device::midtunit_dma_r), FUNC(midxunit_video_device::midtunit_dma_w));
map(0xf8000000, 0xfeffffff).r(m_video, FUNC(midxunit_video_device::midwunit_gfxrom_r));
map(0xff000000, 0xffffffff).rom().region("maincpu", 0);
diff --git a/src/mame/drivers/midyunit.cpp b/src/mame/drivers/midyunit.cpp
index fd2d540724c..55b749e2e34 100644
--- a/src/mame/drivers/midyunit.cpp
+++ b/src/mame/drivers/midyunit.cpp
@@ -190,7 +190,6 @@ void midyunit_state::main_map(address_map &map)
map(0x01e00000, 0x01e0001f).w(FUNC(midyunit_state::midyunit_sound_w));
map(0x01f00000, 0x01f0001f).w(FUNC(midyunit_state::midyunit_control_w));
map(0x02000000, 0x05ffffff).r(FUNC(midyunit_state::midyunit_gfxrom_r)).share("gfx_rom");
- map(0xc0000000, 0xc00001ff).rw("maincpu", FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xff800000, 0xffffffff).rom().region("user1", 0);
}
diff --git a/src/mame/drivers/skeetsht.cpp b/src/mame/drivers/skeetsht.cpp
index 07b1bb3b0d0..b05f6e54d1c 100644
--- a/src/mame/drivers/skeetsht.cpp
+++ b/src/mame/drivers/skeetsht.cpp
@@ -214,7 +214,6 @@ void skeetsht_state::tms_program_map(address_map &map)
{
map(0x00000000, 0x003fffff).ram().share("tms_vram");
map(0x00440000, 0x004fffff).rw(FUNC(skeetsht_state::ramdac_r), FUNC(skeetsht_state::ramdac_w));
- map(0xc0000000, 0xc00001ff).rw(m_tms, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xff800000, 0xffbfffff).rom().mirror(0x00400000).region("tms", 0);
}
diff --git a/src/mame/drivers/skimaxx.cpp b/src/mame/drivers/skimaxx.cpp
index 5beefdc72d3..42f0dba9a9b 100644
--- a/src/mame/drivers/skimaxx.cpp
+++ b/src/mame/drivers/skimaxx.cpp
@@ -380,7 +380,6 @@ void skimaxx_state::tms_program_map(address_map &map)
map(0x02000000, 0x0200000f).ram();
map(0x02100000, 0x0210000f).ram();
map(0x04000000, 0x047fffff).rom().region("tmsgfx", 0);
- map(0xc0000000, 0xc00001ff).rw(m_tms, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xff800000, 0xffffffff).rom().region("tms", 0);
}
diff --git a/src/mame/drivers/tickee.cpp b/src/mame/drivers/tickee.cpp
index 433b3287496..255f7274053 100644
--- a/src/mame/drivers/tickee.cpp
+++ b/src/mame/drivers/tickee.cpp
@@ -454,7 +454,6 @@ void tickee_state::tickee_map(address_map &map)
map(0x04200100, 0x0420011f).w("ym2", FUNC(ay8910_device::address_data_w)).umask16(0x00ff);
map(0x04400000, 0x0440007f).w(FUNC(tickee_state::tickee_control_w)).share("control");
map(0x04400040, 0x0440004f).portr("IN2");
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xc0000240, 0xc000025f).nopw(); /* seems to be a bug in their code */
map(0xff000000, 0xffffffff).rom().region("user1", 0);
}
@@ -472,7 +471,6 @@ void tickee_state::ghoshunt_map(address_map &map)
map(0x04300100, 0x0430010f).r("ym2", FUNC(ay8910_device::data_r)).umask16(0x00ff);
map(0x04300100, 0x0430011f).w("ym2", FUNC(ay8910_device::address_data_w)).umask16(0x00ff);
map(0x04500000, 0x0450007f).w(FUNC(tickee_state::tickee_control_w)).share("control");
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xc0000240, 0xc000025f).nopw(); /* seems to be a bug in their code */
map(0xff000000, 0xffffffff).rom().region("user1", 0);
}
@@ -489,7 +487,6 @@ void tickee_state::mouseatk_map(address_map &map)
map(0x04200100, 0x0420010f).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)).umask16(0x00ff);
map(0x04400000, 0x0440007f).w(FUNC(tickee_state::tickee_control_w)).share("control");
map(0x04400040, 0x0440004f).portr("IN2"); // ?
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xc0000240, 0xc000025f).nopw(); /* seems to be a bug in their code */
map(0xff000000, 0xffffffff).rom().region("user1", 0);
}
@@ -500,7 +497,6 @@ void tickee_state::rapidfir_map(address_map &map)
{
map(0x00000000, 0x007fffff).ram().share("vram");
map(0x02000000, 0x027fffff).rw(FUNC(tickee_state::rapidfir_transparent_r), FUNC(tickee_state::rapidfir_transparent_w));
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xfc000000, 0xfc00000f).r(FUNC(tickee_state::rapidfir_gun1_r));
map(0xfc000100, 0xfc00010f).r(FUNC(tickee_state::rapidfir_gun2_r));
map(0xfc000400, 0xfc00040f).r(FUNC(tickee_state::ffff_r));
diff --git a/src/mame/drivers/xtheball.cpp b/src/mame/drivers/xtheball.cpp
index f4b33174a6d..f32cd5b36e9 100644
--- a/src/mame/drivers/xtheball.cpp
+++ b/src/mame/drivers/xtheball.cpp
@@ -208,7 +208,6 @@ void xtheball_state::main_map(address_map &map)
map(0x03040180, 0x0304018f).r(FUNC(xtheball_state::analogy_watchdog_r)).nopw();
map(0x03060000, 0x0306000f).w("dac", FUNC(dac_byte_interface::data_w)).umask16(0xff00);
map(0x04000000, 0x057fffff).rom().region("user2", 0);
- map(0xc0000000, 0xc00001ff).rw(m_maincpu, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
map(0xfff80000, 0xffffffff).rom().region("user1", 0);
}
diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h
index aab3b1897b6..1952d022f5b 100644
--- a/src/mame/includes/harddriv.h
+++ b/src/mame/includes/harddriv.h
@@ -134,7 +134,7 @@ protected:
DECLARE_READ16_MEMBER( hd68k_zram_r );
DECLARE_WRITE16_MEMBER( hd68k_zram_w );
- DECLARE_WRITE16_MEMBER( hdgsp_io_w );
+ void hdgsp_io_w(offs_t offset, u16 data, u16 mem_mask = ~u16(0));
DECLARE_WRITE16_MEMBER( hdgsp_protection_w );
diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp
index f41f81b0c63..12732e7191a 100644
--- a/src/mame/machine/harddriv.cpp
+++ b/src/mame/machine/harddriv.cpp
@@ -144,7 +144,7 @@ READ16_MEMBER( harddriv_state::hd68k_gsp_io_r )
uint16_t result;
offset = (offset / 2) ^ 1;
m_hd34010_host_access = true;
- result = m_gsp->host_r(space, offset, 0xffff);
+ result = m_gsp->host_r(offset);
m_hd34010_host_access = false;
return result;
}
@@ -154,7 +154,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_gsp_io_w )
{
offset = (offset / 2) ^ 1;
m_hd34010_host_access = true;
- m_gsp->host_w(space, offset, data, 0xffff);
+ m_gsp->host_w(offset, data);
m_hd34010_host_access = false;
}
@@ -171,7 +171,7 @@ READ16_MEMBER( harddriv_state::hd68k_msp_io_r )
uint16_t result;
offset = (offset / 2) ^ 1;
m_hd34010_host_access = true;
- result = m_msp.found() ? m_msp->host_r(space, offset, 0xffff) : 0xffff;
+ result = m_msp.found() ? m_msp->host_r(offset) : 0xffff;
m_hd34010_host_access = false;
return result;
}
@@ -183,7 +183,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_msp_io_w )
if (m_msp.found())
{
m_hd34010_host_access = true;
- m_msp->host_w(space, offset, data, 0xffff);
+ m_msp->host_w(offset, data);
m_hd34010_host_access = false;
}
}
@@ -503,7 +503,7 @@ WRITE_LINE_MEMBER(harddriv_state::harddriv_duart_irq_handler)
*
*************************************/
-WRITE16_MEMBER( harddriv_state::hdgsp_io_w )
+void harddriv_state::hdgsp_io_w(offs_t offset, u16 data, u16 mem_mask)
{
/* detect an enabling of the shift register and force yielding */
if (offset == REG_DPYCTL)
@@ -520,10 +520,8 @@ WRITE16_MEMBER( harddriv_state::hdgsp_io_w )
screen_device &scr = m_gsp->screen();
/* detect changes to HEBLNK and HSBLNK and force an update before they change */
- if ((offset == REG_HEBLNK || offset == REG_HSBLNK) && data != m_gsp->io_register_r(space, offset, 0xffff))
+ if ((offset == REG_HEBLNK || offset == REG_HSBLNK) && data != m_gsp->io_register_r(offset))
scr.update_partial(scr.vpos() - 1);
-
- m_gsp->io_register_w(space, offset, data, mem_mask);
}
diff --git a/src/mame/machine/inder_vid.cpp b/src/mame/machine/inder_vid.cpp
index 35c30b9d698..761227478f2 100644
--- a/src/mame/machine/inder_vid.cpp
+++ b/src/mame/machine/inder_vid.cpp
@@ -31,7 +31,6 @@ void inder_vid_device::megaphx_tms_map(address_map &map)
map(0x04000030, 0x0400003f).w("ramdac", FUNC(ramdac_device::index_r_w)).umask16(0x00ff);
map(0x04000090, 0x0400009f).nopw();
map(0x7fc00000, 0x7fffffff).ram().mirror(0x80000000);
- map(0xc0000000, 0xc00001ff).rw(m_tms, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w));
}