summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2025-10-31 10:22:08 +1100
committer Vas Crabb <vas@vastheman.com>2025-10-31 10:22:08 +1100
commit55985a774300a742954cd5ab2609e46b1658410b (patch)
tree4141b2606c131c896807a9567ac4b0e49e40accf
parentd64c0f781257b17c88db0be4267b2e12326c0119 (diff)
olivetti/att6300p_mmu.cpp: Added a side effects check.
-rw-r--r--src/mame/olivetti/att6300p.cpp26
-rw-r--r--src/mame/olivetti/att6300p_mmu.cpp7
-rw-r--r--src/mame/olivetti/att6300p_mmu.h12
-rw-r--r--src/mame/sun/e250.cpp7
4 files changed, 27 insertions, 25 deletions
diff --git a/src/mame/olivetti/att6300p.cpp b/src/mame/olivetti/att6300p.cpp
index 4ce8bfb4868..181da471bf1 100644
--- a/src/mame/olivetti/att6300p.cpp
+++ b/src/mame/olivetti/att6300p.cpp
@@ -60,13 +60,13 @@
#include "machine/pic8259.h"
#include "machine/ram.h"
#include "sound/spkrdev.h"
+
+#include "softlist_dev.h"
#include "speaker.h"
#include "formats/naslite_dsk.h"
#include "formats/m20_dsk.h"
-#include "softlist_dev.h"
-
namespace {
@@ -782,7 +782,7 @@ void att6300p_state::vxlaten_w(offs_t offset, uint8_t data)
uint8_t att6300p_state::bitread_r(offs_t offset)
{
- return (m_protected ? B_VIRT_BR_PROTECTEN : 0) |
+ return (m_protected ? B_VIRT_BR_PROTECTEN : 0) |
(m_sanity_active ? 0 : B_VIRT_BR__SANITYNMI) |
(m_trapio_active ? 0 : B_VIRT_BR__TRAPIO) |
(m_nmi_active ? B_VIRT_BR_NMI: 0) |
@@ -860,43 +860,43 @@ void att6300p_state::att6300p_vio_map(address_map &map)
static INPUT_PORTS_START( att6300p )
PORT_START("DSW1")
- PORT_DIPNAME( 0x01, 0x01, "Drive B Type") PORT_DIPLOCATION("DSW1:1")
+ PORT_DIPNAME( 0x01, 0x01, "Drive B Type") PORT_DIPLOCATION("DSW1:1")
PORT_DIPSETTING( 0x01, "96 TPI" )
PORT_DIPSETTING( 0x00, "48 TPI" )
- PORT_DIPNAME( 0x02, 0x02, "Drive A Type") PORT_DIPLOCATION("DSW1:2")
+ PORT_DIPNAME( 0x02, 0x02, "Drive A Type") PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, "96 TPI" )
PORT_DIPSETTING( 0x00, "48 TPI" )
- PORT_DIPNAME( 0x04, 0x04, "Hard Disk 1 Type") PORT_DIPLOCATION("DSW1:3")
+ PORT_DIPNAME( 0x04, 0x04, "Hard Disk 1 Type") PORT_DIPLOCATION("DSW1:3")
PORT_DIPSETTING( 0x00, "0" )
PORT_DIPSETTING( 0x04, "1" )
- PORT_DIPNAME( 0x08, 0x08, "Hard Disk 0 Type") PORT_DIPLOCATION("DSW1:4")
+ PORT_DIPNAME( 0x08, 0x08, "Hard Disk 0 Type") PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x00, "0" )
PORT_DIPSETTING( 0x08, "1" )
- PORT_DIPNAME( 0x30, 0x20, "Display Type") PORT_DIPLOCATION("DSW1:5,6")
+ PORT_DIPNAME( 0x30, 0x20, "Display Type") PORT_DIPLOCATION("DSW1:5,6")
PORT_DIPSETTING( 0x10, "Color 40x25" )
PORT_DIPSETTING( 0x20, "Color 80x25" )
PORT_DIPSETTING( 0x30, "Monochrome" )
- PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives") PORT_DIPLOCATION("DSW1:7,8")
+ PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives") PORT_DIPLOCATION("DSW1:7,8")
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x40, "2" )
PORT_DIPSETTING( 0x80, "3" )
PORT_START("DSW2")
- PORT_DIPNAME( 0x0f, 0x0b, "Motherboard RAM banks") PORT_DIPLOCATION("DSW2:1,2,3,4")
+ PORT_DIPNAME( 0x0f, 0x0b, "Motherboard RAM banks") PORT_DIPLOCATION("DSW2:1,2,3,4")
PORT_DIPSETTING( 0x01, "128K - 128/0")
PORT_DIPSETTING( 0x02, "256K - 128/128")
PORT_DIPSETTING( 0x08, "512K - 512/0")
PORT_DIPSETTING( 0x09, "640K - 128/512")
PORT_DIPSETTING( 0x0a, "640K - 512/128")
PORT_DIPSETTING( 0x0b, "1M - 512/512")
- PORT_DIPNAME( 0x10, 0x10, "80287 installed") PORT_DIPLOCATION("DSW2:5")
+ PORT_DIPNAME( 0x10, 0x10, "80287 installed") PORT_DIPLOCATION("DSW2:5")
PORT_DIPSETTING( 0x00, DEF_STR(Yes) )
PORT_DIPSETTING( 0x10, DEF_STR(No) )
- PORT_DIPNAME( 0x40, 0x40, "HDD ROM") PORT_DIPLOCATION("DSW2:7")
+ PORT_DIPNAME( 0x40, 0x40, "HDD ROM") PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x00, "Internal" )
PORT_DIPSETTING( 0x40, "External" )
- PORT_DIPNAME( 0x80, 0x80, "EPROM Size") PORT_DIPLOCATION("DSW2:8")
+ PORT_DIPNAME( 0x80, 0x80, "EPROM Size") PORT_DIPLOCATION("DSW2:8")
PORT_DIPSETTING( 0x00, "64K" )
PORT_DIPSETTING( 0x80, "32K" )
INPUT_PORTS_END
diff --git a/src/mame/olivetti/att6300p_mmu.cpp b/src/mame/olivetti/att6300p_mmu.cpp
index 736848209e7..9aef04c7c89 100644
--- a/src/mame/olivetti/att6300p_mmu.cpp
+++ b/src/mame/olivetti/att6300p_mmu.cpp
@@ -92,7 +92,7 @@ void att6300p_mmu_device::set_protected_mode_enabled(bool enabled)
void att6300p_mmu_device::update_fastpath()
{
m_mem_wr_fastpath = (m_mem_prot_limit == 0 &&
- !m_mem_setup_enabled && !m_io_setup_enabled);
+ !m_mem_setup_enabled && !m_io_setup_enabled);
}
void att6300p_mmu_device::set_mem_mapping(uint32_t target_addr[32])
@@ -195,7 +195,7 @@ uint16_t att6300p_mmu_device::io_r(offs_t offset, uint16_t mem_mask)
return m_io->read_byte(offset | 1) << 8;
case 0xffff:
return m_io->read_byte(offset) |
- m_io->read_byte(offset | 1) << 8;
+ m_io->read_byte(offset | 1) << 8;
}
}
else
@@ -241,7 +241,8 @@ uint16_t att6300p_mmu_device::io_r(offs_t offset, uint16_t mem_mask)
if (m_io_read_traps_enabled && ((prot & IO_PROT_NOTRAP) == 0))
{
- m_trapio(offset | val << 16 | flags << 24);
+ if (!machine().side_effects_disabled())
+ m_trapio(offset | val << 16 | flags << 24);
}
data |= val << shift;
diff --git a/src/mame/olivetti/att6300p_mmu.h b/src/mame/olivetti/att6300p_mmu.h
index eea580d55ce..44fdcde65a6 100644
--- a/src/mame/olivetti/att6300p_mmu.h
+++ b/src/mame/olivetti/att6300p_mmu.h
@@ -18,11 +18,7 @@ public:
// construction/destruction
att6300p_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // All CPU accesses are directed to the MMU via these calls
- uint16_t mem_r(offs_t offset, uint16_t mem_mask);
- void mem_w(offs_t offset, uint16_t data, uint16_t mem_mask);
- uint16_t io_r(offs_t offset, uint16_t mem_mask);
- void io_w(offs_t offset, uint16_t data, uint16_t mem_mask);
+ auto trapio_callback() { return m_trapio.bind(); }
// MMU configuration
void set_protected_mode_enabled(bool enabled);
@@ -33,7 +29,11 @@ public:
void set_io_read_traps_enabled(bool enabled);
void set_io_write_traps_enabled(bool enabled);
- auto trapio_callback() { return m_trapio.bind(); }
+ // All CPU accesses are directed to the MMU via these calls
+ uint16_t mem_r(offs_t offset, uint16_t mem_mask);
+ void mem_w(offs_t offset, uint16_t data, uint16_t mem_mask);
+ uint16_t io_r(offs_t offset, uint16_t mem_mask);
+ void io_w(offs_t offset, uint16_t data, uint16_t mem_mask);
protected:
// device-level overrides
diff --git a/src/mame/sun/e250.cpp b/src/mame/sun/e250.cpp
index 111dadfe7cc..ab4ed262cd2 100644
--- a/src/mame/sun/e250.cpp
+++ b/src/mame/sun/e250.cpp
@@ -34,6 +34,10 @@ Main components found on its main PCB:
#include "emu.h"
+#include "sun_gem.h"
+
+//#include "bus/pci/permedia2.h"
+
#include "cpu/powerpc/ppc.h"
#include "cpu/sparc/sparc.h"
@@ -41,9 +45,6 @@ Main components found on its main PCB:
#include "softlist_dev.h"
-#include "sun_gem.h"
-//#include "bus/pci/permedia2.h"
-
namespace {