summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ti99/peb
diff options
context:
space:
mode:
author andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
committer andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
commitb380514764cf857469bae61c11143a19f79a74c5 (patch)
tree63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/bus/ti99/peb
parentc24473ddff715ecec2e258a6eb38960cf8c8e98e (diff)
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/bus/ti99/peb')
-rw-r--r--src/devices/bus/ti99/peb/bwg.cpp12
-rw-r--r--src/devices/bus/ti99/peb/bwg.h4
-rw-r--r--src/devices/bus/ti99/peb/evpc.cpp11
-rw-r--r--src/devices/bus/ti99/peb/evpc.h4
-rw-r--r--src/devices/bus/ti99/peb/hfdc.cpp22
-rw-r--r--src/devices/bus/ti99/peb/hfdc.h10
-rw-r--r--src/devices/bus/ti99/peb/horizon.cpp4
-rw-r--r--src/devices/bus/ti99/peb/horizon.h4
-rw-r--r--src/devices/bus/ti99/peb/hsgpl.cpp44
-rw-r--r--src/devices/bus/ti99/peb/hsgpl.h14
-rw-r--r--src/devices/bus/ti99/peb/memex.cpp7
-rw-r--r--src/devices/bus/ti99/peb/memex.h4
-rw-r--r--src/devices/bus/ti99/peb/myarcmem.cpp4
-rw-r--r--src/devices/bus/ti99/peb/myarcmem.h4
-rw-r--r--src/devices/bus/ti99/peb/pcode.cpp8
-rw-r--r--src/devices/bus/ti99/peb/pcode.h6
-rw-r--r--src/devices/bus/ti99/peb/peribox.cpp28
-rw-r--r--src/devices/bus/ti99/peb/peribox.h12
-rw-r--r--src/devices/bus/ti99/peb/samsmem.cpp4
-rw-r--r--src/devices/bus/ti99/peb/samsmem.h4
-rw-r--r--src/devices/bus/ti99/peb/spchsyn.cpp13
-rw-r--r--src/devices/bus/ti99/peb/spchsyn.h5
-rw-r--r--src/devices/bus/ti99/peb/ti_32kmem.cpp7
-rw-r--r--src/devices/bus/ti99/peb/ti_32kmem.h4
-rw-r--r--src/devices/bus/ti99/peb/ti_fdc.cpp8
-rw-r--r--src/devices/bus/ti99/peb/ti_fdc.h4
-rw-r--r--src/devices/bus/ti99/peb/ti_rs232.cpp27
-rw-r--r--src/devices/bus/ti99/peb/ti_rs232.h12
-rw-r--r--src/devices/bus/ti99/peb/tn_ide.cpp26
-rw-r--r--src/devices/bus/ti99/peb/tn_ide.h4
-rw-r--r--src/devices/bus/ti99/peb/tn_usbsm.cpp18
-rw-r--r--src/devices/bus/ti99/peb/tn_usbsm.h4
32 files changed, 172 insertions, 170 deletions
diff --git a/src/devices/bus/ti99/peb/bwg.cpp b/src/devices/bus/ti99/peb/bwg.cpp
index f2a23fea518..c7aa2c903b7 100644
--- a/src/devices/bus/ti99/peb/bwg.cpp
+++ b/src/devices/bus/ti99/peb/bwg.cpp
@@ -228,7 +228,7 @@ READ8Z_MEMBER(snug_bwg_device::readz)
if (m_RTCsel)
{
// .... ..11 111x xxx0
- *value = m_clock->read((m_address & 0x001e) >> 1);
+ *value = m_clock->read(space, (m_address & 0x001e) >> 1);
LOGMASKED(LOG_RW, "read RTC: %04x -> %02x\n", m_address & 0xffff, *value);
}
else
@@ -275,7 +275,7 @@ READ8Z_MEMBER(snug_bwg_device::readz)
5c00 - 5fdf: RAM
5fe0 - 5fff: Clock (even addr)
*/
-void snug_bwg_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(snug_bwg_device::write)
{
if (machine().side_effects_disabled())
{
@@ -293,7 +293,7 @@ void snug_bwg_device::write(offs_t offset, uint8_t data)
{
// .... ..11 111x xxx0
LOGMASKED(LOG_RW, "write RTC: %04x <- %02x\n", m_address & 0xffff, data);
- m_clock->write((m_address & 0x001e) >> 1, data);
+ m_clock->write(space, (m_address & 0x001e) >> 1, data);
}
else
{
@@ -338,7 +338,7 @@ READ8Z_MEMBER(snug_bwg_device::crureadz)
if ((offset & 0xff00)==m_cru_base)
{
- if ((offset & 0x00f0)==0)
+ if ((offset & 0x00ff)==0)
{
// Check what drives are not connected
reply = ((m_floppy[0] != nullptr)? 0 : 0x02) // DSK1
@@ -355,7 +355,7 @@ READ8Z_MEMBER(snug_bwg_device::crureadz)
reply |= (m_dip34 << 6);
// Invert all
- *value = ~BIT(reply, (offset >> 1) & 7);
+ *value = ~reply;
}
else
*value = 0;
@@ -363,7 +363,7 @@ READ8Z_MEMBER(snug_bwg_device::crureadz)
}
}
-void snug_bwg_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(snug_bwg_device::cruwrite)
{
// int drive, drivebit;
diff --git a/src/devices/bus/ti99/peb/bwg.h b/src/devices/bus/ti99/peb/bwg.h
index 2a53f45c75b..a25d844a563 100644
--- a/src/devices/bus/ti99/peb/bwg.h
+++ b/src/devices/bus/ti99/peb/bwg.h
@@ -30,11 +30,11 @@ public:
snug_bwg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
protected:
void device_start() override;
diff --git a/src/devices/bus/ti99/peb/evpc.cpp b/src/devices/bus/ti99/peb/evpc.cpp
index 6b17d75ef74..fc5591112d5 100644
--- a/src/devices/bus/ti99/peb/evpc.cpp
+++ b/src/devices/bus/ti99/peb/evpc.cpp
@@ -213,7 +213,7 @@ READ8Z_MEMBER(snug_enhanced_video_device::readz)
if (m_video_accessed)
{
- *value = m_video->read(m_address>>1);
+ *value = m_video->read(space, m_address>>1);
}
}
@@ -223,7 +223,7 @@ READ8Z_MEMBER(snug_enhanced_video_device::readz)
0x5f00 - 0x5fef NOVRAM
0x5ff0 - 0x5fff Palette (5ff8, 5ffa, 5ffc, 5ffe)
*/
-void snug_enhanced_video_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(snug_enhanced_video_device::write)
{
if (m_selected && m_inDsrArea)
{
@@ -296,7 +296,7 @@ void snug_enhanced_video_device::write(offs_t offset, uint8_t data)
if (m_video_accessed)
{
- m_video->write(m_address>>1, data);
+ m_video->write(space, m_address>>1, data);
}
if (m_sound_accessed)
@@ -323,9 +323,8 @@ READ8Z_MEMBER(snug_enhanced_video_device::crureadz)
{
if ((offset & 0x00f0)==0) // offset 0 delivers bits 0-7 (address 00-0f)
{
- uint8_t p = ~(ioport("EVPC-SW1")->read() | (ioport("EVPC-SW3")->read()<<2)
+ *value = ~(ioport("EVPC-SW1")->read() | (ioport("EVPC-SW3")->read()<<2)
| (ioport("EVPC-SW4")->read()<<3) | (ioport("EVPC-SW8")->read()<<7));
- *value = BIT(p, (offset >> 1) & 7);
}
}
}
@@ -341,7 +340,7 @@ READ8Z_MEMBER(snug_enhanced_video_device::crureadz)
Bit 6: -
Bit 7: -
*/
-void snug_enhanced_video_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(snug_enhanced_video_device::cruwrite)
{
if ((offset & 0xff00)==EVPC_CRU_BASE)
{
diff --git a/src/devices/bus/ti99/peb/evpc.h b/src/devices/bus/ti99/peb/evpc.h
index 2e89c2fa405..a52e73b963c 100644
--- a/src/devices/bus/ti99/peb/evpc.h
+++ b/src/devices/bus/ti99/peb/evpc.h
@@ -32,11 +32,11 @@ class snug_enhanced_video_device : public device_t, public device_ti99_peribox_c
public:
snug_enhanced_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
TIMER_DEVICE_CALLBACK_MEMBER( hblank_interrupt );
diff --git a/src/devices/bus/ti99/peb/hfdc.cpp b/src/devices/bus/ti99/peb/hfdc.cpp
index 6a9a89726b2..97ac8d403ab 100644
--- a/src/devices/bus/ti99/peb/hfdc.cpp
+++ b/src/devices/bus/ti99/peb/hfdc.cpp
@@ -223,14 +223,14 @@ READ8Z_MEMBER(myarc_hfdc_device::readz)
if (m_HDCsel)
{
- *value = m_hdc9234->read((m_address>>2)&1);
+ *value = m_hdc9234->read(space, (m_address>>2)&1, 0xff);
LOGMASKED(LOG_COMP, "%04x[HDC] -> %02x\n", m_address & 0xffff, *value);
return;
}
if (m_RTCsel)
{
- *value = m_clock->read((m_address & 0x001e) >> 1);
+ *value = m_clock->read(space, (m_address & 0x001e) >> 1);
LOGMASKED(LOG_COMP, "%04x[CLK] -> %02x\n", m_address & 0xffff, *value);
return;
}
@@ -278,7 +278,7 @@ READ8Z_MEMBER(myarc_hfdc_device::readz)
0x5800 - 0x5bff static RAM page any of 32 pages
0x5c00 - 0x5fff static RAM page any of 32 pages
*/
-void myarc_hfdc_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER( myarc_hfdc_device::write )
{
if (machine().side_effects_disabled())
{
@@ -297,14 +297,14 @@ void myarc_hfdc_device::write(offs_t offset, uint8_t data)
if (m_HDCsel)
{
LOGMASKED(LOG_COMP, "%04x[HDC] <- %02x\n", m_address & 0xffff, data);
- m_hdc9234->write((m_address>>2)&1, data);
+ m_hdc9234->write(space, (m_address>>2)&1, data, 0xff);
return;
}
if (m_RTCsel)
{
LOGMASKED(LOG_COMP, "%04x[CLK] <- %02x\n", m_address & 0xffff, data);
- m_clock->write((m_address & 0x001e) >> 1, data);
+ m_clock->write(space, (m_address & 0x001e) >> 1, data);
return;
}
@@ -376,7 +376,7 @@ READ8Z_MEMBER(myarc_hfdc_device::crureadz)
uint8_t reply;
if ((offset & 0xff00)==m_cru_base)
{
- if ((offset & 0x00f0)==0) // CRU bits 0-7
+ if ((offset & 0x00ff)==0) // CRU bits 0-7
{
if (m_see_switches)
{
@@ -390,7 +390,7 @@ READ8Z_MEMBER(myarc_hfdc_device::crureadz)
if (!m_motor_running) reply |= 0x04;
if (m_wait_for_hd1) reply |= 0x08;
}
- *value = BIT(reply, (offset >> 1) & 7);
+ *value = reply;
}
else // CRU bits 8+
{
@@ -425,7 +425,7 @@ READ8Z_MEMBER(myarc_hfdc_device::crureadz)
HFDC manual p. 43
*/
-void myarc_hfdc_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(myarc_hfdc_device::cruwrite)
{
if ((offset & 0xff00)==m_cru_base)
{
@@ -627,7 +627,7 @@ void myarc_hfdc_device::signal_drive_status()
(1,0) = OUTPUT1
(1,1) = OUTPUT2
*/
-void myarc_hfdc_device::auxbus_out(offs_t offset, uint8_t data)
+WRITE8_MEMBER( myarc_hfdc_device::auxbus_out )
{
int index;
switch (offset)
@@ -848,7 +848,7 @@ WRITE_LINE_MEMBER( myarc_hfdc_device::dip_w )
/*
Read a byte from the onboard SRAM. This is called from the HDC9234.
*/
-uint8_t myarc_hfdc_device::read_buffer()
+READ8_MEMBER( myarc_hfdc_device::read_buffer )
{
LOGMASKED(LOG_DMA, "Read access to onboard SRAM at %04x\n", m_dma_address);
if (m_dma_address > 0x8000) LOGMASKED(LOG_WARN, "Read access beyond RAM size: %06x\n", m_dma_address);
@@ -860,7 +860,7 @@ uint8_t myarc_hfdc_device::read_buffer()
/*
Write a byte to the onboard SRAM. This is called from the HDC9234.
*/
-void myarc_hfdc_device::write_buffer(uint8_t data)
+WRITE8_MEMBER( myarc_hfdc_device::write_buffer )
{
LOGMASKED(LOG_DMA, "Write access to onboard SRAM at %04x: %02x\n", m_dma_address, data);
if (m_dma_address > 0x8000) LOGMASKED(LOG_WARN, "Write access beyond RAM size: %06x\n", m_dma_address);
diff --git a/src/devices/bus/ti99/peb/hfdc.h b/src/devices/bus/ti99/peb/hfdc.h
index 88648105eb5..1ac9ec925bd 100644
--- a/src/devices/bus/ti99/peb/hfdc.h
+++ b/src/devices/bus/ti99/peb/hfdc.h
@@ -38,10 +38,10 @@ public:
myarc_hfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
protected:
void device_config_complete() override;
@@ -58,9 +58,9 @@ private:
DECLARE_WRITE_LINE_MEMBER( dmarq_w );
DECLARE_WRITE_LINE_MEMBER( intrq_w );
DECLARE_WRITE_LINE_MEMBER( dip_w );
- void auxbus_out(offs_t offset, uint8_t data);
- uint8_t read_buffer();
- void write_buffer(uint8_t data);
+ DECLARE_WRITE8_MEMBER( auxbus_out );
+ DECLARE_READ8_MEMBER( read_buffer );
+ DECLARE_WRITE8_MEMBER( write_buffer );
DECLARE_FLOPPY_FORMATS( floppy_formats );
diff --git a/src/devices/bus/ti99/peb/horizon.cpp b/src/devices/bus/ti99/peb/horizon.cpp
index fdf4b5f97c1..da5135f70bf 100644
--- a/src/devices/bus/ti99/peb/horizon.cpp
+++ b/src/devices/bus/ti99/peb/horizon.cpp
@@ -219,7 +219,7 @@ READ8Z_MEMBER(horizon_ramdisk_device::readz)
}
}
-void horizon_ramdisk_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(horizon_ramdisk_device::write)
{
// 32K expansion
// According to the manual, "this memory is not affected by the HIDE switch"
@@ -303,7 +303,7 @@ void horizon_ramdisk_device::setbit(int& page, int pattern, bool set)
}
}
-void horizon_ramdisk_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(horizon_ramdisk_device::cruwrite)
{
int size = ioport("HORIZONSIZE")->read();
int split_bit = size + 10;
diff --git a/src/devices/bus/ti99/peb/horizon.h b/src/devices/bus/ti99/peb/horizon.h
index f72e9f109fc..76895f0c586 100644
--- a/src/devices/bus/ti99/peb/horizon.h
+++ b/src/devices/bus/ti99/peb/horizon.h
@@ -26,10 +26,10 @@ class horizon_ramdisk_device : public device_t, public device_ti99_peribox_card_
public:
horizon_ramdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
DECLARE_INPUT_CHANGED_MEMBER( hs_changed );
diff --git a/src/devices/bus/ti99/peb/hsgpl.cpp b/src/devices/bus/ti99/peb/hsgpl.cpp
index 11f40c4d1c8..f9f631726e2 100644
--- a/src/devices/bus/ti99/peb/hsgpl.cpp
+++ b/src/devices/bus/ti99/peb/hsgpl.cpp
@@ -191,7 +191,7 @@ READ8Z_MEMBER(snug_high_speed_gpl_device::crureadz)
/*
Write hsgpl CRU interface
*/
-void snug_high_speed_gpl_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(snug_high_speed_gpl_device::cruwrite)
{
// SuperCart handling - see gromport.c
if (m_supercart_enabled && ((offset & 0xfff0)==SUPERCART_BASE))
@@ -272,46 +272,46 @@ READ8Z_MEMBER(snug_high_speed_gpl_device::readz)
{
if ((offset & 0x7e000)==0x74000)
{
- dsrspace_readz(offset & 0xffff, value);
+ dsrspace_readz(space, offset & 0xffff, value, mem_mask);
}
if ((offset & 0x7e000)==0x76000)
{
- cartspace_readz(offset & 0xffff, value);
+ cartspace_readz(space, offset & 0xffff, value, mem_mask);
}
// 1001 1wbb bbbb bba0
if ((offset & 0x7fc01)==0x79800)
{
- grom_readz(offset & 0xffff, value);
+ grom_readz(space, offset & 0xffff, value, mem_mask);
}
}
/*
Memory write
*/
-void snug_high_speed_gpl_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(snug_high_speed_gpl_device::write)
{
if ((offset & 0x7e000)==0x76000)
{
- cartspace_write(offset & 0xffff, data);
+ cartspace_write(space, offset & 0xffff, data, mem_mask);
}
// 1001 1wbb bbbb bba0
if ((offset & 0x7fc01)==0x79c00)
{
- grom_write(offset & 0xffff, data);
+ grom_write(space, offset & 0xffff, data, mem_mask);
}
}
/*
Specific read access: dsrspace
*/
-void snug_high_speed_gpl_device::dsrspace_readz(offs_t offset, uint8_t* value)
+void snug_high_speed_gpl_device::dsrspace_readz(address_space& space, offs_t offset, uint8_t* value, uint8_t mem_mask)
{
if (m_dsr_enabled)
{
- *value = m_dsr_eeprom->read((offset & 0x1fff) | (m_dsr_page<<13));
+ *value = m_dsr_eeprom->read(space, (offset & 0x1fff) | (m_dsr_page<<13), mem_mask);
LOGMASKED(LOG_READ, "read dsr %04x[%02x] -> %02x\n", offset, m_dsr_page, *value);
}
}
@@ -319,7 +319,7 @@ void snug_high_speed_gpl_device::dsrspace_readz(offs_t offset, uint8_t* value)
/*
Specific read access: cartspace
*/
-void snug_high_speed_gpl_device::cartspace_readz(offs_t offset, uint8_t* value)
+void snug_high_speed_gpl_device::cartspace_readz(address_space& space, offs_t offset, uint8_t* value, uint8_t mem_mask)
{
if (!m_card_enabled || m_flash_mode)
{
@@ -329,7 +329,7 @@ void snug_high_speed_gpl_device::cartspace_readz(offs_t offset, uint8_t* value)
if (m_module_bank < 16)
{
- *value = m_rom6_eeprom->read((offset & 0x1fff) | (m_current_bank<<13) | (m_current_grom_port<<15));
+ *value = m_rom6_eeprom->read(space, (offset & 0x1fff) | (m_current_bank<<13) | (m_current_grom_port<<15), mem_mask);
LOGMASKED(LOG_READ, "cartridge space read %04x -> %02x\n", offset, *value);
}
else
@@ -351,7 +351,7 @@ void snug_high_speed_gpl_device::cartspace_readz(offs_t offset, uint8_t* value)
it here - which is indeed closer to reality, since the real HSGPL also
emulates GROM instead of using proper ones.
*/
-void snug_high_speed_gpl_device::grom_readz(offs_t offset, uint8_t* value)
+void snug_high_speed_gpl_device::grom_readz(address_space& space, offs_t offset, uint8_t* value, uint8_t mem_mask)
{
if (machine().side_effects_disabled()) return;
@@ -397,7 +397,7 @@ void snug_high_speed_gpl_device::grom_readz(offs_t offset, uint8_t* value)
{
if (!m_flash_mode)
{
- *value = m_grom_a_eeprom->read(m_grom_address | (port<<16));
+ *value = m_grom_a_eeprom->read(space, m_grom_address | (port<<16), mem_mask);
m_module_bank = port;
if (bNew) LOGMASKED(LOG_PORT, "GROM read access at %04x - switch to bank %d\n", offset & 0xffff, m_module_bank);
}
@@ -406,7 +406,7 @@ void snug_high_speed_gpl_device::grom_readz(offs_t offset, uint8_t* value)
{
if (port < 16)
{
- *value = m_grom_b_eeprom->read(m_grom_address | ((port-8)<<16));
+ *value = m_grom_b_eeprom->read(space, m_grom_address | ((port-8)<<16), mem_mask);
m_module_bank = port;
if (bNew) LOGMASKED(LOG_PORT, "GROM read access at %04x - switch to bank %d\n", offset & 0xffff, m_module_bank);
}
@@ -416,7 +416,7 @@ void snug_high_speed_gpl_device::grom_readz(offs_t offset, uint8_t* value)
{
// 9840-985c
// DSR banks 0-63 (8 KiB per bank, 8 banks per port)
- *value = m_dsr_eeprom->read(m_grom_address | ((port-16)<<16));
+ *value = m_dsr_eeprom->read(space, m_grom_address | ((port-16)<<16), mem_mask);
// Don't change the module port
if (bNew) LOGMASKED(LOG_DSR, "read access to DSR bank %d-%d (%04x)\n", (port-16)<<3, ((port-16)<<3)+7, offset);
}
@@ -427,7 +427,7 @@ void snug_high_speed_gpl_device::grom_readz(offs_t offset, uint8_t* value)
// 9860-987c (ports 24-31)
// Each ROM6 is available as 4 (sub)banks (switchable via 6000, 6002, 6004, 6006)
// Accordingly, each port has two complete sets
- *value = m_rom6_eeprom->read(m_grom_address | ((port-24)<<16));
+ *value = m_rom6_eeprom->read(space, m_grom_address | ((port-24)<<16), mem_mask);
if (bNew) LOGMASKED(LOG_PORT, "ROM6 read access for module bank %d-%d (%04x)\n", (port-24)<<1, ((port-24)<<1)+1, offset & 0xffff);
}
else
@@ -469,7 +469,7 @@ void snug_high_speed_gpl_device::grom_readz(offs_t offset, uint8_t* value)
/*
Specific write access: cartspace
*/
-void snug_high_speed_gpl_device::cartspace_write(offs_t offset, uint8_t data)
+void snug_high_speed_gpl_device::cartspace_write(address_space& space, offs_t offset, uint8_t data, uint8_t mem_mask)
{
if (!m_card_enabled || m_flash_mode)
{
@@ -537,7 +537,7 @@ void snug_high_speed_gpl_device::cartspace_write(offs_t offset, uint8_t data)
/*
Specific write access: grom_write
*/
-void snug_high_speed_gpl_device::grom_write(offs_t offset, uint8_t data)
+void snug_high_speed_gpl_device::grom_write(address_space& space, offs_t offset, uint8_t data, uint8_t mem_mask)
{
if (machine().side_effects_disabled()) return;
@@ -583,7 +583,7 @@ void snug_high_speed_gpl_device::grom_write(offs_t offset, uint8_t data)
{
if (port < 8)
{
- m_grom_a_eeprom->write(m_grom_address | (port<<16), data);
+ m_grom_a_eeprom->write(space, m_grom_address | (port<<16), data, mem_mask);
m_module_bank = port;
if (bNew) LOGMASKED(LOG_PORT, "GROM write access at %04x - switch to bank %d\n", offset & 0xffff, port);
}
@@ -591,7 +591,7 @@ void snug_high_speed_gpl_device::grom_write(offs_t offset, uint8_t data)
{
if (port < 16)
{
- m_grom_b_eeprom->write(m_grom_address | ((port-8)<<16), data);
+ m_grom_b_eeprom->write(space, m_grom_address | ((port-8)<<16), data, mem_mask);
m_module_bank = port;
if (bNew) LOGMASKED(LOG_PORT, "GROM write access at %04x - switch to bank %d\n", offset & 0xffff, port);
}
@@ -599,14 +599,14 @@ void snug_high_speed_gpl_device::grom_write(offs_t offset, uint8_t data)
{
if (port < 24)
{
- m_dsr_eeprom->write(m_grom_address | ((port-16)<<16), data);
+ m_dsr_eeprom->write(space, m_grom_address | ((port-16)<<16), data, mem_mask);
if (bNew) LOGMASKED(LOG_DSR, "write access to DSR bank %d-%d (%04x)\n", (port-16)<<3, ((port-16)<<3)+7, offset);
}
else
{
if (port < 32)
{
- m_rom6_eeprom->write(m_grom_address | ((port-24)<<16), data);
+ m_rom6_eeprom->write(space, m_grom_address | ((port-24)<<16), data, mem_mask);
if (bNew) LOGMASKED(LOG_PORT, "ROM6 write access for module bank %d-%d (%04x)\n", (port-24)<<1, ((port-24)<<1)+1,offset & 0xffff);
}
else
diff --git a/src/devices/bus/ti99/peb/hsgpl.h b/src/devices/bus/ti99/peb/hsgpl.h
index 7248436963f..65cca91a081 100644
--- a/src/devices/bus/ti99/peb/hsgpl.h
+++ b/src/devices/bus/ti99/peb/hsgpl.h
@@ -29,10 +29,10 @@ class snug_high_speed_gpl_device : public device_t, public device_ti99_peribox_c
public:
snug_high_speed_gpl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
protected:
virtual void device_start() override;
@@ -51,12 +51,12 @@ private:
required_device<ram_device> m_ram6_memory;
required_device<ram_device> m_gram_memory;
- void dsrspace_readz(offs_t offset, uint8_t* value);
- void cartspace_readz(offs_t offset, uint8_t* value);
- void grom_readz(offs_t offset, uint8_t* value);
+ void dsrspace_readz(address_space& space, offs_t offset, uint8_t* value, uint8_t mem_mask);
+ void cartspace_readz(address_space& space, offs_t offset, uint8_t* value, uint8_t mem_mask);
+ void grom_readz(address_space& space, offs_t offset, uint8_t* value, uint8_t mem_mask);
- void cartspace_write(offs_t offset, uint8_t data);
- void grom_write(offs_t offset, uint8_t data);
+ void cartspace_write(address_space& space, offs_t offset, uint8_t data, uint8_t mem_mask);
+ void grom_write(address_space& space, offs_t offset, uint8_t data, uint8_t mem_mask);
bool m_dsr_enabled;
bool m_gram_enabled;
diff --git a/src/devices/bus/ti99/peb/memex.cpp b/src/devices/bus/ti99/peb/memex.cpp
index 3a3116d262d..1d770a9b224 100644
--- a/src/devices/bus/ti99/peb/memex.cpp
+++ b/src/devices/bus/ti99/peb/memex.cpp
@@ -101,7 +101,7 @@ READ8Z_MEMBER( geneve_memex_device::readz )
/*
Memory write
*/
-void geneve_memex_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER( geneve_memex_device::write )
{
/* If not Genmod, add the upper two address bits 10 */
if (!m_genmod) offset |= 0x100000;
@@ -152,12 +152,11 @@ INPUT_PORTS_START( memex )
PORT_DIPSETTING( MDIP8, "Lock out pages FC-FF")
INPUT_PORTS_END
-void geneve_memex_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(geneve_memex_device::device_add_mconfig)
RAM(config, m_ram, 0);
m_ram->set_default_size("2M");
m_ram->set_default_value(0);
-}
+MACHINE_CONFIG_END
ioport_constructor geneve_memex_device::device_input_ports() const
{
diff --git a/src/devices/bus/ti99/peb/memex.h b/src/devices/bus/ti99/peb/memex.h
index fb7ca27a1ad..3aa44429dc0 100644
--- a/src/devices/bus/ti99/peb/memex.h
+++ b/src/devices/bus/ti99/peb/memex.h
@@ -26,10 +26,10 @@ class geneve_memex_device : public device_t, public device_ti99_peribox_card_int
public:
geneve_memex_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override { }
- void cruwrite(offs_t offset, uint8_t data) override { }
+ DECLARE_WRITE8_MEMBER(cruwrite) override { }
protected:
void device_start() override;
diff --git a/src/devices/bus/ti99/peb/myarcmem.cpp b/src/devices/bus/ti99/peb/myarcmem.cpp
index 79add7a6c72..ccb8f0091cf 100644
--- a/src/devices/bus/ti99/peb/myarcmem.cpp
+++ b/src/devices/bus/ti99/peb/myarcmem.cpp
@@ -101,7 +101,7 @@ READ8Z_MEMBER(myarc_memory_expansion_device::readz)
/*
Memory write access. DSRROM does not allow writing.
*/
-void myarc_memory_expansion_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(myarc_memory_expansion_device::write)
{
int base = get_base(offset);
@@ -142,7 +142,7 @@ READ8Z_MEMBER(myarc_memory_expansion_device::crureadz)
1006 = bit 2 of RAM bank value (512K)
1008 = bit 3 of RAM bank value (512K)
*/
-void myarc_memory_expansion_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(myarc_memory_expansion_device::cruwrite)
{
if (((offset & 0xff00)==MYARCMEM_CRU_BASE1)||((offset & 0xff00)==MYARCMEM_CRU_BASE2))
{
diff --git a/src/devices/bus/ti99/peb/myarcmem.h b/src/devices/bus/ti99/peb/myarcmem.h
index 175b8d60344..3ea9d52419a 100644
--- a/src/devices/bus/ti99/peb/myarcmem.h
+++ b/src/devices/bus/ti99/peb/myarcmem.h
@@ -25,10 +25,10 @@ class myarc_memory_expansion_device : public device_t, public device_ti99_peribo
public:
myarc_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
protected:
void device_start() override;
diff --git a/src/devices/bus/ti99/peb/pcode.cpp b/src/devices/bus/ti99/peb/pcode.cpp
index dbdd7c9f1a9..f0a24ad1646 100644
--- a/src/devices/bus/ti99/peb/pcode.cpp
+++ b/src/devices/bus/ti99/peb/pcode.cpp
@@ -142,7 +142,7 @@ SETADDRESS_DBIN_MEMBER( ti_pcode_card_device::setaddress_dbin )
}
}
-void ti_pcode_card_device::debugger_read(uint16_t offset, uint8_t& value)
+void ti_pcode_card_device::debugger_read(address_space& space, uint16_t offset, uint8_t& value)
{
// The debuger does not call setaddress
if (m_active && ((offset & m_select_mask)==m_select_value))
@@ -160,7 +160,7 @@ READ8Z_MEMBER( ti_pcode_card_device::readz )
// Care for debugger
if (machine().side_effects_disabled())
{
- debugger_read(offset, *value);
+ debugger_read(space, offset, *value);
}
if (m_active && m_inDsrArea && m_selected)
@@ -200,7 +200,7 @@ READ8Z_MEMBER( ti_pcode_card_device::readz )
Write a byte in P-Code ROM space. This is only used for setting the
GROM address.
*/
-void ti_pcode_card_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER( ti_pcode_card_device::write )
{
if (machine().side_effects_disabled()) return;
if (m_active && m_isgrom && m_selected)
@@ -253,7 +253,7 @@ READ8Z_MEMBER(ti_pcode_card_device::crureadz)
A8, A13, and A14 so bit 0 is at 0x1f00, but bit 4 is at 0x1f80. Accordingly,
bit 7 would be 0x1f86 but it is not used.
*/
-void ti_pcode_card_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(ti_pcode_card_device::cruwrite)
{
if ((offset & 0xff00)==CRU_BASE)
m_crulatch->write_bit((offset & 0x80) >> 5 | (offset & 0x06) >> 1, data);
diff --git a/src/devices/bus/ti99/peb/pcode.h b/src/devices/bus/ti99/peb/pcode.h
index 5e7a2cb6ce0..96462dba527 100644
--- a/src/devices/bus/ti99/peb/pcode.h
+++ b/src/devices/bus/ti99/peb/pcode.h
@@ -28,9 +28,9 @@ class ti_pcode_card_device : public device_t, public device_ti99_peribox_card_in
public:
ti_pcode_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
DECLARE_WRITE_LINE_MEMBER(clock_in) override;
@@ -51,7 +51,7 @@ private:
DECLARE_WRITE_LINE_MEMBER(pcpage_w);
DECLARE_WRITE_LINE_MEMBER(ekrpg_w);
- void debugger_read(uint16_t addr, uint8_t& value);
+ void debugger_read(address_space& space, uint16_t addr, uint8_t& value);
required_device_array<tmc0430_device, 8> m_groms;
diff --git a/src/devices/bus/ti99/peb/peribox.cpp b/src/devices/bus/ti99/peb/peribox.cpp
index b75a15a49ed..80da29f6dd4 100644
--- a/src/devices/bus/ti99/peb/peribox.cpp
+++ b/src/devices/bus/ti99/peb/peribox.cpp
@@ -272,15 +272,15 @@ READ8Z_MEMBER(peribox_device::readz)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=nullptr) m_slot[i]->readz(offset | m_address_prefix, value);
+ if (m_slot[i]!=nullptr) m_slot[i]->readz(space, offset | m_address_prefix, value, mem_mask);
}
}
-void peribox_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(peribox_device::write)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=nullptr) m_slot[i]->write(offset | m_address_prefix, data);
+ if (m_slot[i]!=nullptr) m_slot[i]->write(space, offset | m_address_prefix, data, mem_mask);
}
}
@@ -291,7 +291,7 @@ SETADDRESS_DBIN_MEMBER(peribox_device::setaddress_dbin)
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=nullptr) m_slot[i]->setaddress_dbin(offset | m_address_prefix, state);
+ if (m_slot[i]!=nullptr) m_slot[i]->setaddress_dbin(space, offset | m_address_prefix, state);
}
}
@@ -299,15 +299,15 @@ READ8Z_MEMBER(peribox_device::crureadz)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=nullptr) m_slot[i]->crureadz(offset, value);
+ if (m_slot[i]!=nullptr) m_slot[i]->crureadz(space, offset, value);
}
}
-void peribox_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(peribox_device::cruwrite)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=nullptr) m_slot[i]->cruwrite(offset, data);
+ if (m_slot[i]!=nullptr) m_slot[i]->cruwrite(space, offset, data);
}
}
@@ -647,27 +647,27 @@ peribox_slot_device::peribox_slot_device(const machine_config &mconfig, const ch
READ8Z_MEMBER(peribox_slot_device::readz)
{
- m_card->readz(offset, value);
+ m_card->readz(space, offset, value, mem_mask);
}
-void peribox_slot_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(peribox_slot_device::write)
{
- m_card->write(offset, data);
+ m_card->write(space, offset, data, mem_mask);
}
SETADDRESS_DBIN_MEMBER(peribox_slot_device::setaddress_dbin)
{
- m_card->setaddress_dbin(offset, state);
+ m_card->setaddress_dbin(space, offset, state);
}
READ8Z_MEMBER(peribox_slot_device::crureadz)
{
- m_card->crureadz(offset, value);
+ m_card->crureadz(space, offset, value);
}
-void peribox_slot_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(peribox_slot_device::cruwrite)
{
- m_card->cruwrite(offset, data);
+ m_card->cruwrite(space, offset, data);
}
WRITE_LINE_MEMBER( peribox_slot_device::senila )
diff --git a/src/devices/bus/ti99/peb/peribox.h b/src/devices/bus/ti99/peb/peribox.h
index 405ded3338e..a936a5346ef 100644
--- a/src/devices/bus/ti99/peb/peribox.h
+++ b/src/devices/bus/ti99/peb/peribox.h
@@ -36,11 +36,11 @@ public:
// Next eight methods are called from the console
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
DECLARE_WRITE_LINE_MEMBER(senila);
DECLARE_WRITE_LINE_MEMBER(senilb);
@@ -176,9 +176,9 @@ class device_ti99_peribox_card_interface : public device_slot_card_interface
public:
virtual DECLARE_READ8Z_MEMBER(readz) = 0;
- virtual void write(offs_t offset, uint8_t data) = 0;
+ virtual DECLARE_WRITE8_MEMBER(write) = 0;
virtual DECLARE_READ8Z_MEMBER(crureadz) = 0;
- virtual void cruwrite(offs_t offset, uint8_t data) = 0;
+ virtual DECLARE_WRITE8_MEMBER(cruwrite) = 0;
virtual DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) { };
virtual DECLARE_WRITE_LINE_MEMBER(clock_in) { }
@@ -231,7 +231,7 @@ public:
// Called from the box (direction to card)
DECLARE_READ8Z_MEMBER(readz);
- void write(offs_t offset, uint8_t data);
+ DECLARE_WRITE8_MEMBER(write);
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin);
DECLARE_WRITE_LINE_MEMBER(senila);
@@ -245,7 +245,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( set_ready );
DECLARE_READ8Z_MEMBER(crureadz);
- void cruwrite(offs_t offset, uint8_t data);
+ DECLARE_WRITE8_MEMBER(cruwrite);
// called from the box itself
void set_genmod(bool set);
diff --git a/src/devices/bus/ti99/peb/samsmem.cpp b/src/devices/bus/ti99/peb/samsmem.cpp
index dff96b57198..1bc315fed1f 100644
--- a/src/devices/bus/ti99/peb/samsmem.cpp
+++ b/src/devices/bus/ti99/peb/samsmem.cpp
@@ -70,7 +70,7 @@ READ8Z_MEMBER(sams_memory_expansion_device::readz)
}
}
-void sams_memory_expansion_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(sams_memory_expansion_device::write)
{
int base;
@@ -104,7 +104,7 @@ READ8Z_MEMBER(sams_memory_expansion_device::crureadz)
/*
CRU write. Turns on the mapper and allows to change it.
*/
-void sams_memory_expansion_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(sams_memory_expansion_device::cruwrite)
{
if ((offset & 0xff00)==SAMS_CRU_BASE)
m_crulatch->write_bit((offset & 0x000e) >> 1, data);
diff --git a/src/devices/bus/ti99/peb/samsmem.h b/src/devices/bus/ti99/peb/samsmem.h
index da05b58438e..c002252d773 100644
--- a/src/devices/bus/ti99/peb/samsmem.h
+++ b/src/devices/bus/ti99/peb/samsmem.h
@@ -28,10 +28,10 @@ class sams_memory_expansion_device : public device_t, public device_ti99_peribox
public:
sams_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
protected:
void device_start() override;
diff --git a/src/devices/bus/ti99/peb/spchsyn.cpp b/src/devices/bus/ti99/peb/spchsyn.cpp
index b4bcebf3c94..0f10eea1f33 100644
--- a/src/devices/bus/ti99/peb/spchsyn.cpp
+++ b/src/devices/bus/ti99/peb/spchsyn.cpp
@@ -67,14 +67,14 @@ READ8Z_MEMBER( ti_speech_synthesizer_device::readz )
// lines by setting the address bus to a different value, but the
// Geneve may behave differently. This may not 100% reflect the real
// situation, but it ensures a safe processing.
- m_vsp->combined_rsq_wsq_w(machine().dummy_space(), 0, ~0);
+ m_vsp->combined_rsq_wsq_w(space, 0, ~0);
}
}
/*
Memory write
*/
-void ti_speech_synthesizer_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER( ti_speech_synthesizer_device::write )
{
if (machine().side_effects_disabled()) return;
@@ -92,6 +92,7 @@ SETADDRESS_DBIN_MEMBER( ti_speech_synthesizer_device::setaddress_dbin )
// 1001 00xx xxxx xxx0 DBIN=1
// 1001 01xx xxxx xxx0 DBIN=0
// 1111 1000 0000 0001 mask
+ m_space = &space;
m_reading = (state==ASSERT_LINE);
bool valid = (((offset & 0x0400)==0) == m_reading);
@@ -106,11 +107,11 @@ SETADDRESS_DBIN_MEMBER( ti_speech_synthesizer_device::setaddress_dbin )
// both RS* and WS* are active, which is illegal.
// Alternatively, we'll use the combined settings method
- m_vsp->combined_rsq_wsq_w(machine().dummy_space(), 0, m_reading ? ~tms5220_device::RS : ~tms5220_device::WS);
+ m_vsp->combined_rsq_wsq_w(space, 0, m_reading ? ~tms5220_device::RS : ~tms5220_device::WS);
}
else
// If other address, turn off RS* and WS* (negative logic!)
- m_vsp->combined_rsq_wsq_w(machine().dummy_space(), 0, ~0);
+ m_vsp->combined_rsq_wsq_w(space, 0, ~0);
}
/****************************************************************************/
@@ -125,11 +126,13 @@ WRITE_LINE_MEMBER( ti_speech_synthesizer_device::speech_ready )
if ((state==0) && !m_reading)
// Clear the lines only when we are done with writing.
- m_vsp->combined_rsq_wsq_w(machine().dummy_space(), 0, ~0);
+ m_vsp->combined_rsq_wsq_w(*m_space, 0, ~0);
}
void ti_speech_synthesizer_device::device_start()
{
+ // We don't need to save m_space because the calling method
+ // combined_rsq_wsq_w only needs the address space formally.
save_item(NAME(m_reading));
save_item(NAME(m_sbe));
}
diff --git a/src/devices/bus/ti99/peb/spchsyn.h b/src/devices/bus/ti99/peb/spchsyn.h
index 8efee71aed7..35bf0f680e8 100644
--- a/src/devices/bus/ti99/peb/spchsyn.h
+++ b/src/devices/bus/ti99/peb/spchsyn.h
@@ -26,11 +26,11 @@ class ti_speech_synthesizer_device : public device_t, public device_ti99_peribox
public:
ti_speech_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
DECLARE_READ8Z_MEMBER(crureadz) override { }
- void cruwrite(offs_t offset, uint8_t data) override { }
+ DECLARE_WRITE8_MEMBER(cruwrite) override { }
protected:
virtual void device_start() override;
@@ -41,6 +41,7 @@ protected:
private:
DECLARE_WRITE_LINE_MEMBER( speech_ready );
+ address_space* m_space;
required_device<cd2501e_device> m_vsp;
bool m_reading;
bool m_sbe; // Signal "Speech block enable"
diff --git a/src/devices/bus/ti99/peb/ti_32kmem.cpp b/src/devices/bus/ti99/peb/ti_32kmem.cpp
index b25c7d65784..fce434c70d7 100644
--- a/src/devices/bus/ti99/peb/ti_32kmem.cpp
+++ b/src/devices/bus/ti99/peb/ti_32kmem.cpp
@@ -82,7 +82,7 @@ READ8Z_MEMBER(ti_32k_expcard_device::readz)
}
}
-void ti_32k_expcard_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(ti_32k_expcard_device::write)
{
bool select = ((offset & 0xfc000)==0x7c000) | ((offset & 0xf6000)==0x72000); // PAL output pin 14 [1]
@@ -100,11 +100,10 @@ void ti_32k_expcard_device::device_start()
{
}
-void ti_32k_expcard_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(ti_32k_expcard_device::device_add_mconfig)
RAM(config, m_ram, 0);
m_ram->set_default_size("32k");
m_ram->set_default_value(0);
-}
+MACHINE_CONFIG_END
} } } // end namespace bus::ti99::peb
diff --git a/src/devices/bus/ti99/peb/ti_32kmem.h b/src/devices/bus/ti99/peb/ti_32kmem.h
index 5ed0faac87c..0ff492ca1c7 100644
--- a/src/devices/bus/ti99/peb/ti_32kmem.h
+++ b/src/devices/bus/ti99/peb/ti_32kmem.h
@@ -26,10 +26,10 @@ class ti_32k_expcard_device : public device_t, public device_ti99_peribox_card_i
public:
ti_32k_expcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override { }
- void cruwrite(offs_t offset, uint8_t data) override { }
+ DECLARE_WRITE8_MEMBER(cruwrite) override { }
protected:
void device_start() override;
diff --git a/src/devices/bus/ti99/peb/ti_fdc.cpp b/src/devices/bus/ti99/peb/ti_fdc.cpp
index 79d27cd5460..530dc71d987 100644
--- a/src/devices/bus/ti99/peb/ti_fdc.cpp
+++ b/src/devices/bus/ti99/peb/ti_fdc.cpp
@@ -160,7 +160,7 @@ READ8Z_MEMBER(ti_fdc_device::readz)
}
}
-void ti_fdc_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(ti_fdc_device::write)
{
if (machine().side_effects_disabled()) return;
@@ -201,7 +201,7 @@ READ8Z_MEMBER(ti_fdc_device::crureadz)
if ((offset & 0xff00)==m_cru_base)
{
uint8_t reply = 0;
- if ((offset & 0x0070) == 0)
+ if ((offset & 0x07) == 0)
{
// Selected drive
reply |= ((m_DSEL)<<1);
@@ -212,12 +212,12 @@ READ8Z_MEMBER(ti_fdc_device::crureadz)
// Selected side
if (m_SIDSEL==ASSERT_LINE) reply |= 0x80;
}
- *value = BIT(reply, (offset >> 1) & 0x07);
+ *value = reply;
LOGMASKED(LOG_CRU, "Read CRU = %02x\n", *value);
}
}
-void ti_fdc_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(ti_fdc_device::cruwrite)
{
if ((offset & 0xff00)==m_cru_base)
m_crulatch->write_bit((offset >> 1) & 0x07, BIT(data, 0));
diff --git a/src/devices/bus/ti99/peb/ti_fdc.h b/src/devices/bus/ti99/peb/ti_fdc.h
index 4c07bcb142e..f7312661080 100644
--- a/src/devices/bus/ti99/peb/ti_fdc.h
+++ b/src/devices/bus/ti99/peb/ti_fdc.h
@@ -28,11 +28,11 @@ class ti_fdc_device : public device_t, public device_ti99_peribox_card_interface
public:
ti_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
// bool dvena_r();
diff --git a/src/devices/bus/ti99/peb/ti_rs232.cpp b/src/devices/bus/ti99/peb/ti_rs232.cpp
index cbc164bbcb2..8f2ed3f4c45 100644
--- a/src/devices/bus/ti99/peb/ti_rs232.cpp
+++ b/src/devices/bus/ti99/peb/ti_rs232.cpp
@@ -254,17 +254,17 @@ READ8Z_MEMBER(ti_rs232_pio_device::crureadz)
if ((m_signals[0] & tms9902_device::CTS)!=0) reply |= 0x20;
if ((m_signals[1] & tms9902_device::CTS)!=0) reply |= 0x40;
if (m_led) reply |= 0x80;
- *value = BIT(reply, (offset>>1) & 7);
+ *value = reply;
return;
}
if ((offset & 0x00c0)==0x0040)
{
- *value = m_uart0->cruread(offset>>1);
+ *value = m_uart0->cruread(space, offset>>4, 0xff);
return;
}
if ((offset & 0x00c0)==0x0080)
{
- *value = m_uart1->cruread(offset>>1);
+ *value = m_uart1->cruread(space, offset>>4, 0xff);
return;
}
}
@@ -273,18 +273,18 @@ READ8Z_MEMBER(ti_rs232_pio_device::crureadz)
/*
CRU write
*/
-void ti_rs232_pio_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(ti_rs232_pio_device::cruwrite)
{
if ((offset & 0xff00)==m_cru_base)
{
if ((offset & 0x00c0)==0x0040)
{
- m_uart0->cruwrite(offset>>1, data);
+ m_uart0->cruwrite(space, offset>>1, data, 0xff);
return;
}
if ((offset & 0x00c0)==0x0080)
{
- m_uart1->cruwrite(offset>>1, data);
+ m_uart1->cruwrite(space, offset>>1, data, 0xff);
return;
}
@@ -403,7 +403,7 @@ READ8Z_MEMBER( ti_rs232_pio_device::readz )
/*
Memory write
*/
-void ti_rs232_pio_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER( ti_rs232_pio_device::write )
{
if (((offset & m_select_mask)==m_select_value) && m_selected)
{
@@ -967,12 +967,12 @@ WRITE_LINE_MEMBER( ti_rs232_pio_device::rcv1_callback )
receive_data_or_line_state(1);
}
-void ti_rs232_pio_device::xmit0_callback(uint8_t data)
+WRITE8_MEMBER( ti_rs232_pio_device::xmit0_callback )
{
transmit_data(0, data);
}
-void ti_rs232_pio_device::xmit1_callback(uint8_t data)
+WRITE8_MEMBER( ti_rs232_pio_device::xmit1_callback )
{
transmit_data(1, data);
}
@@ -998,12 +998,12 @@ void ti_rs232_pio_device::ctrl_callback(int uartind, int offset, uint8_t data)
}
}
-void ti_rs232_pio_device::ctrl0_callback(offs_t offset, uint8_t data)
+WRITE8_MEMBER( ti_rs232_pio_device::ctrl0_callback )
{
ctrl_callback(0, offset, data);
}
-void ti_rs232_pio_device::ctrl1_callback(offs_t offset, uint8_t data)
+WRITE8_MEMBER( ti_rs232_pio_device::ctrl1_callback )
{
ctrl_callback(1, offset, data);
}
@@ -1101,8 +1101,7 @@ INPUT_PORTS_START( ti_rs232 )
PORT_CONFSETTING( 0x02, "5-20" )
INPUT_PORTS_END
-void ti_rs232_pio_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(ti_rs232_pio_device::device_add_mconfig)
TMS9902(config, m_uart0, 3000000);
m_uart0->int_cb().set(FUNC(ti_rs232_pio_device::int0_callback));
m_uart0->rcv_cb().set(FUNC(ti_rs232_pio_device::rcv0_callback));
@@ -1129,7 +1128,7 @@ void ti_rs232_pio_device::device_add_mconfig(machine_config &config)
m_crulatch->q_out_cb<5>().set(FUNC(ti_rs232_pio_device::cts0_w));
m_crulatch->q_out_cb<6>().set(FUNC(ti_rs232_pio_device::cts1_w));
m_crulatch->q_out_cb<7>().set(FUNC(ti_rs232_pio_device::led_w));
-}
+MACHINE_CONFIG_END
const tiny_rom_entry *ti_rs232_pio_device::device_rom_region() const
{
diff --git a/src/devices/bus/ti99/peb/ti_rs232.h b/src/devices/bus/ti99/peb/ti_rs232.h
index 3c3b1e89d4b..75e6ff582df 100644
--- a/src/devices/bus/ti99/peb/ti_rs232.h
+++ b/src/devices/bus/ti99/peb/ti_rs232.h
@@ -32,10 +32,10 @@ class ti_rs232_pio_device : public device_t, public device_ti99_peribox_card_int
public:
ti_rs232_pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
protected:
void device_start() override;
@@ -50,10 +50,10 @@ private:
DECLARE_WRITE_LINE_MEMBER(int1_callback);
DECLARE_WRITE_LINE_MEMBER(rcv0_callback);
DECLARE_WRITE_LINE_MEMBER(rcv1_callback);
- void xmit0_callback(uint8_t data);
- void xmit1_callback(uint8_t data);
- void ctrl0_callback(offs_t offset, uint8_t data);
- void ctrl1_callback(offs_t offset, uint8_t data);
+ DECLARE_WRITE8_MEMBER(xmit0_callback);
+ DECLARE_WRITE8_MEMBER(xmit1_callback);
+ DECLARE_WRITE8_MEMBER(ctrl0_callback);
+ DECLARE_WRITE8_MEMBER(ctrl1_callback);
DECLARE_WRITE_LINE_MEMBER(selected_w);
DECLARE_WRITE_LINE_MEMBER(pio_direction_in_w);
diff --git a/src/devices/bus/ti99/peb/tn_ide.cpp b/src/devices/bus/ti99/peb/tn_ide.cpp
index 4654a926791..243450fd34f 100644
--- a/src/devices/bus/ti99/peb/tn_ide.cpp
+++ b/src/devices/bus/ti99/peb/tn_ide.cpp
@@ -71,7 +71,9 @@ READ8Z_MEMBER(nouspikel_ide_interface_device::crureadz)
uint8_t reply = 0;
if ((offset & 0xff00)==m_cru_base)
{
- if ((offset & 0x0070) == 0)
+ int bit = (offset >> 4) & 7;
+
+ if (bit==0)
{
reply = m_cru_register & 0x30;
reply |= 8; /* IDE bus IORDY always set */
@@ -82,14 +84,14 @@ READ8Z_MEMBER(nouspikel_ide_interface_device::crureadz)
if (!m_ata_irq)
reply |= 1;
}
- *value = BIT(reply, (offset >> 1) & 7);
+ *value = reply;
}
}
/*
CRU write
*/
-void nouspikel_ide_interface_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(nouspikel_ide_interface_device::cruwrite)
{
if ((offset & 0xff00)==m_cru_base)
{
@@ -144,18 +146,18 @@ READ8Z_MEMBER(nouspikel_ide_interface_device::readz)
case 0: /* RTC RAM */
if (addr & 0x80)
/* RTC RAM page register */
- reply = m_rtc->xram_r((addr & 0x1f) | 0x20);
+ reply = m_rtc->xram_r(machine().dummy_space(), (addr & 0x1f) | 0x20);
else
/* RTC RAM read */
- reply = m_rtc->xram_r(addr);
+ reply = m_rtc->xram_r(machine().dummy_space(), addr);
break;
case 1: /* RTC registers */
if (addr & 0x10)
/* register data */
- reply = m_rtc->rtc_r(1);
+ reply = m_rtc->rtc_r(machine().dummy_space(), 1);
else
/* register select */
- reply = m_rtc->rtc_r(0);
+ reply = m_rtc->rtc_r(machine().dummy_space(), 0);
break;
case 2: /* IDE registers set 1 (CS1Fx) */
if (m_tms9995_mode ? (!(addr & 1)) : (addr & 1))
@@ -195,7 +197,7 @@ READ8Z_MEMBER(nouspikel_ide_interface_device::readz)
/*
Memory write. The controller is 16 bit, so we need to demultiplex again.
*/
-void nouspikel_ide_interface_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(nouspikel_ide_interface_device::write)
{
if (machine().side_effects_disabled()) return;
@@ -215,18 +217,18 @@ void nouspikel_ide_interface_device::write(offs_t offset, uint8_t data)
case 0: /* RTC RAM */
if (addr & 0x80)
/* RTC RAM page register */
- m_rtc->xram_w((addr & 0x1f) | 0x20, data);
+ m_rtc->xram_w(machine().dummy_space(), (addr & 0x1f) | 0x20, data);
else
/* RTC RAM write */
- m_rtc->xram_w(addr, data);
+ m_rtc->xram_w(machine().dummy_space(), addr, data);
break;
case 1: /* RTC registers */
if (addr & 0x10)
/* register data */
- m_rtc->rtc_w(1, data);
+ m_rtc->rtc_w(machine().dummy_space(), 1, data);
else
/* register select */
- m_rtc->rtc_w(0, data);
+ m_rtc->rtc_w(machine().dummy_space(), 0, data);
break;
case 2: /* IDE registers set 1 (CS1Fx) */
/*
diff --git a/src/devices/bus/ti99/peb/tn_ide.h b/src/devices/bus/ti99/peb/tn_ide.h
index 51d516d5af0..b4aa66f2fe3 100644
--- a/src/devices/bus/ti99/peb/tn_ide.h
+++ b/src/devices/bus/ti99/peb/tn_ide.h
@@ -28,10 +28,10 @@ class nouspikel_ide_interface_device : public device_t, public device_ti99_perib
public:
nouspikel_ide_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
void do_inta(int state);
bool m_ata_irq;
diff --git a/src/devices/bus/ti99/peb/tn_usbsm.cpp b/src/devices/bus/ti99/peb/tn_usbsm.cpp
index 77f933667e9..813ced0eb0d 100644
--- a/src/devices/bus/ti99/peb/tn_usbsm.cpp
+++ b/src/devices/bus/ti99/peb/tn_usbsm.cpp
@@ -93,8 +93,9 @@ READ8Z_MEMBER(nouspikel_usb_smartmedia_device::crureadz)
if ((offset & 0xff00)==m_cru_base)
{
uint8_t reply = 0;
+ offset &= 3;
- if ((offset & 0x0030) == 0)
+ if (offset == 0)
{
// bit
// 0 >1x00 0: USB Host controller requests interrupt.
@@ -116,14 +117,14 @@ READ8Z_MEMBER(nouspikel_usb_smartmedia_device::crureadz)
else if (!m_smartmedia->is_protected())
reply |= 0x80;
}
- *value = BIT(reply, (offset >> 1) & 7);
+ *value = reply;
}
}
/*
CRU write
*/
-void nouspikel_usb_smartmedia_device::cruwrite(offs_t offset, uint8_t data)
+WRITE8_MEMBER(nouspikel_usb_smartmedia_device::cruwrite)
{
if ((offset & 0xff00)==m_cru_base)
{
@@ -211,7 +212,7 @@ READ8Z_MEMBER(nouspikel_usb_smartmedia_device::readz)
{
// FEEPROM
if (!m_write_flash)
- m_input_latch = m_flash->read16((offset>>1)&0xffff);
+ m_input_latch = m_flash->read16(space, (offset>>1)&0xffff);
}
}
else
@@ -239,7 +240,7 @@ READ8Z_MEMBER(nouspikel_usb_smartmedia_device::readz)
/*
Memory write. The controller is 16 bit, so we need to demultiplex again.
*/
-void nouspikel_usb_smartmedia_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(nouspikel_usb_smartmedia_device::write)
{
if (machine().side_effects_disabled()) return;
@@ -279,7 +280,7 @@ void nouspikel_usb_smartmedia_device::write(offs_t offset, uint8_t data)
else
{ // FEEPROM
if (m_write_flash)
- m_flash->write16((offset>>1)&0xffff, m_output_latch);
+ m_flash->write16(space, (offset>>1)&0xffff, m_output_latch);
}
}
else
@@ -365,13 +366,12 @@ INPUT_PORTS_START( tn_usbsm )
PORT_DIPSETTING( 0x01, "Geneve mode")
INPUT_PORTS_END
-void nouspikel_usb_smartmedia_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(nouspikel_usb_smartmedia_device::device_add_mconfig)
SMARTMEDIA(config, "smartmedia", 0);
STRATAFLASH(config, STRATA_TAG, 0);
RAM(config, RAM1_TAG).set_default_size("512K").set_default_value(0);
RAM(config, RAM2_TAG).set_default_size("512K").set_default_value(0);
-}
+MACHINE_CONFIG_END
ioport_constructor nouspikel_usb_smartmedia_device::device_input_ports() const
{
diff --git a/src/devices/bus/ti99/peb/tn_usbsm.h b/src/devices/bus/ti99/peb/tn_usbsm.h
index 52c2690f3ed..a379d67102c 100644
--- a/src/devices/bus/ti99/peb/tn_usbsm.h
+++ b/src/devices/bus/ti99/peb/tn_usbsm.h
@@ -28,10 +28,10 @@ class nouspikel_usb_smartmedia_device : public device_t, public device_ti99_peri
public:
nouspikel_usb_smartmedia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
- void write(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
- void cruwrite(offs_t offset, uint8_t data) override;
+ DECLARE_WRITE8_MEMBER(cruwrite) override;
protected:
virtual void device_start() override;