summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-07-24 19:19:37 +1000
committer Vas Crabb <vas@vastheman.com>2022-07-24 19:19:37 +1000
commit107d02141dde01aa1c7fddff111944867d9ad19e (patch)
tree1cb24a4899d6579e46499089f12f18a592b30c1a /src/devices/bus
parentbdcc5ec6ad7cbab15cc708f9f438ac79dcc2173a (diff)
More minor cleanup.
Diffstat (limited to 'src/devices/bus')
-rw-r--r--src/devices/bus/vcs/rom.cpp33
-rw-r--r--src/devices/bus/vcs/scharger.cpp9
-rw-r--r--src/devices/bus/vcs/vcs_slot.h4
3 files changed, 18 insertions, 28 deletions
diff --git a/src/devices/bus/vcs/rom.cpp b/src/devices/bus/vcs/rom.cpp
index b823531b7d4..0cde536dbea 100644
--- a/src/devices/bus/vcs/rom.cpp
+++ b/src/devices/bus/vcs/rom.cpp
@@ -427,12 +427,10 @@ void a26_rom_fe_device::install_memory_handlers(address_space *space)
space->install_read_handler(0x1000, 0x1fff, read8sm_delegate(*this, FUNC(a26_rom_fe_device::read)));
space->install_write_handler(0x1000, 0x1fff, write8sm_delegate(*this, FUNC(a26_rom_fe_device::write)));
space->install_readwrite_tap(0x1fe, 0x1fe, "trigger_bank",
- [this](offs_t, u8 &, u8) { if(!machine().side_effects_disabled()) trigger_bank(); },
- [this](offs_t, u8 &, u8) { if(!machine().side_effects_disabled()) trigger_bank(); }
- );
+ [this] (offs_t, u8 &, u8) { if (!machine().side_effects_disabled()) trigger_bank(); },
+ [this] (offs_t, u8 &, u8) { if (!machine().side_effects_disabled()) trigger_bank(); });
space->install_read_tap(0x1ff, 0x1ff, "bank",
- [this](offs_t, u8 &data, u8) { if(!machine().side_effects_disabled()) switch_bank(data); }
- );
+ [this] (offs_t, u8 &data, u8) { if (!machine().side_effects_disabled()) switch_bank(data); });
}
/*
@@ -449,15 +447,13 @@ void a26_rom_fe_device::install_memory_handlers(address_space *space)
uint8_t a26_rom_fe_device::read(offs_t offset)
{
- uint8_t data;
-
// Super Chip RAM reads are mapped in 0x1080-0x10ff
if (!m_ram.empty() && offset >= 0x80 && offset < 0x100)
{
return m_ram[offset & (m_ram.size() - 1)];
}
- data = m_rom[offset + (m_base_bank * 0x1000)];
+ uint8_t const data = m_rom[offset + (m_base_bank * 0x1000)];
if (!machine().side_effects_disabled())
{
@@ -534,8 +530,7 @@ void a26_rom_3e_device::install_memory_handlers(address_space *space)
space->install_read_handler(0x1000, 0x1fff, read8sm_delegate(*this, FUNC(a26_rom_3e_device::read)));
space->install_write_handler(0x1000, 0x1fff, write8sm_delegate(*this, FUNC(a26_rom_3e_device::write)));
space->install_write_tap(0x00, 0x3f, "bank",
- [this](offs_t offset, u8 &data, u8) { if(!machine().side_effects_disabled()) write_bank(offset, data); }
- );
+ [this] (offs_t offset, u8 &data, u8) { if (!machine().side_effects_disabled()) write_bank(offset, data); });
}
uint8_t a26_rom_3e_device::read(offs_t offset)
@@ -599,8 +594,7 @@ void a26_rom_3f_device::install_memory_handlers(address_space *space)
space->install_read_handler(0x1000, 0x1fff, read8sm_delegate(*this, FUNC(a26_rom_3f_device::read)));
space->install_write_handler(0x1000, 0x1fff, write8sm_delegate(*this, FUNC(a26_rom_3f_device::write)));
space->install_write_tap(0x00, 0x3f, "bank",
- [this](offs_t offset, u8 &data, u8) { if(!machine().side_effects_disabled()) write_bank(offset, data); }
- );
+ [this] (offs_t offset, u8 &data, u8) { if (!machine().side_effects_disabled()) write_bank(offset, data); });
}
uint8_t a26_rom_3f_device::read(offs_t offset)
@@ -793,9 +787,8 @@ void a26_rom_ua_device::install_memory_handlers(address_space *space)
{
space->install_read_handler(0x1000, 0x1fff, read8sm_delegate(*this, FUNC(a26_rom_ua_device::read)));
space->install_readwrite_tap(0x200, 0x27f, "bank",
- [this](offs_t offset, u8 &data, u8) { if(!machine().side_effects_disabled()) change_bank(offset); },
- [this](offs_t offset, u8 &data, u8) { if(!machine().side_effects_disabled()) change_bank(offset); }
- );
+ [this] (offs_t offset, u8 &data, u8) { if (!machine().side_effects_disabled()) change_bank(offset); },
+ [this] (offs_t offset, u8 &data, u8) { if (!machine().side_effects_disabled()) change_bank(offset); });
}
uint8_t a26_rom_ua_device::read(offs_t offset)
@@ -980,9 +973,8 @@ void a26_rom_jvp_device::install_memory_handlers(address_space *space)
{
space->install_read_handler(0x1000, 0x1fff, read8sm_delegate(*this, FUNC(a26_rom_jvp_device::read)));
space->install_readwrite_tap(0xfa0, 0xfc0, "bank",
- [this](offs_t offset, u8 &data, u8) { if(!machine().side_effects_disabled()) change_bank(offset); },
- [this](offs_t offset, u8 &data, u8) { if(!machine().side_effects_disabled()) change_bank(offset); }
- );
+ [this] (offs_t offset, u8 &data, u8) { if (!machine().side_effects_disabled()) change_bank(offset); },
+ [this] (offs_t offset, u8 &data, u8) { if (!machine().side_effects_disabled()) change_bank(offset); });
}
uint8_t a26_rom_jvp_device::read(offs_t offset)
@@ -1149,9 +1141,8 @@ void a26_rom_x07_device::install_memory_handlers(address_space *space)
{
space->install_read_handler(0x1000, 0x1fff, read8sm_delegate(*this, FUNC(a26_rom_x07_device::read)));
space->install_readwrite_tap(0x0000, 0x0fff, "bank",
- [this](offs_t offset, u8 &, u8) { if(!machine().side_effects_disabled()) change_bank(offset); },
- [this](offs_t offset, u8 &, u8) { if(!machine().side_effects_disabled()) change_bank(offset); }
- );
+ [this] (offs_t offset, u8 &, u8) { if (!machine().side_effects_disabled()) change_bank(offset); },
+ [this] (offs_t offset, u8 &, u8) { if (!machine().side_effects_disabled()) change_bank(offset); });
}
uint8_t a26_rom_x07_device::read(offs_t offset)
diff --git a/src/devices/bus/vcs/scharger.cpp b/src/devices/bus/vcs/scharger.cpp
index 583d7407475..7b7f5883cb8 100644
--- a/src/devices/bus/vcs/scharger.cpp
+++ b/src/devices/bus/vcs/scharger.cpp
@@ -44,8 +44,8 @@
DEFINE_DEVICE_TYPE(A26_ROM_SUPERCHARGER, a26_rom_ss_device, "a2600_ss", "Atari 2600 ROM Cart Supercharger")
-a26_rom_ss_device::a26_rom_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : a26_rom_base_device(mconfig, A26_ROM_SUPERCHARGER, tag, owner, clock),
+a26_rom_ss_device::a26_rom_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ a26_rom_base_device(mconfig, A26_ROM_SUPERCHARGER, tag, owner, clock),
m_cassette(*this, "cassette"),
m_reg(0),
m_write_delay(0),
@@ -111,9 +111,8 @@ void a26_rom_ss_device::install_memory_handlers(address_space *space)
{
space->install_read_handler(0x1000, 0x1fff, read8sm_delegate(*this, FUNC(a26_rom_ss_device::read)));
space->install_readwrite_tap(0x0000, 0x1fff, "bank",
- [this](offs_t offset, u8 &, u8) { if(!machine().side_effects_disabled()) tap(offset); },
- [this](offs_t offset, u8 &, u8) { if(!machine().side_effects_disabled()) tap(offset); }
- );
+ [this] (offs_t offset, u8 &, u8) { if (!machine().side_effects_disabled()) tap(offset); },
+ [this] (offs_t offset, u8 &, u8) { if (!machine().side_effects_disabled()) tap(offset); });
}
void a26_rom_ss_device::tap(offs_t offset)
diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h
index d5c023e094b..4595602961a 100644
--- a/src/devices/bus/vcs/vcs_slot.h
+++ b/src/devices/bus/vcs/vcs_slot.h
@@ -86,8 +86,8 @@ public:
void rom_alloc(uint32_t size, const char *tag);
void ram_alloc(uint32_t size);
- uint8_t* get_rom_base() { return m_rom; }
- uint8_t* get_ram_base() { return &m_ram[0]; }
+ uint8_t *get_rom_base() { return m_rom; }
+ uint8_t *get_ram_base() { return &m_ram[0]; }
uint32_t get_rom_size() { return m_rom_size; }
uint32_t get_ram_size() { return m_ram.size(); }