summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/c64
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/c64')
-rw-r--r--src/devices/bus/c64/16kb.cpp17
-rw-r--r--src/devices/bus/c64/16kb.h2
-rw-r--r--src/devices/bus/c64/c128_comal80.cpp4
-rw-r--r--src/devices/bus/c64/c128_comal80.h4
-rw-r--r--src/devices/bus/c64/c128_partner.cpp4
-rw-r--r--src/devices/bus/c64/c128_partner.h4
-rw-r--r--src/devices/bus/c64/comal80.cpp4
-rw-r--r--src/devices/bus/c64/comal80.h4
-rw-r--r--src/devices/bus/c64/cpm.cpp6
-rw-r--r--src/devices/bus/c64/cpm.h2
-rw-r--r--src/devices/bus/c64/currah_speech.cpp4
-rw-r--r--src/devices/bus/c64/currah_speech.h4
-rw-r--r--src/devices/bus/c64/dela_ep256.cpp35
-rw-r--r--src/devices/bus/c64/dela_ep256.h4
-rw-r--r--src/devices/bus/c64/dela_ep64.cpp19
-rw-r--r--src/devices/bus/c64/dela_ep64.h4
-rw-r--r--src/devices/bus/c64/dela_ep7x8.cpp52
-rw-r--r--src/devices/bus/c64/dela_ep7x8.h12
-rw-r--r--src/devices/bus/c64/dinamic.cpp2
-rw-r--r--src/devices/bus/c64/dinamic.h2
-rw-r--r--src/devices/bus/c64/dqbb.cpp4
-rw-r--r--src/devices/bus/c64/dqbb.h4
-rw-r--r--src/devices/bus/c64/easy_calc_result.cpp4
-rw-r--r--src/devices/bus/c64/easy_calc_result.h4
-rw-r--r--src/devices/bus/c64/easyflash.cpp12
-rw-r--r--src/devices/bus/c64/easyflash.h4
-rw-r--r--src/devices/bus/c64/epyx_fast_load.cpp4
-rw-r--r--src/devices/bus/c64/epyx_fast_load.h4
-rw-r--r--src/devices/bus/c64/exos.cpp2
-rw-r--r--src/devices/bus/c64/exos.h2
-rw-r--r--src/devices/bus/c64/exp.cpp8
-rw-r--r--src/devices/bus/c64/exp.h12
-rw-r--r--src/devices/bus/c64/fcc.cpp13
-rw-r--r--src/devices/bus/c64/fcc.h4
-rw-r--r--src/devices/bus/c64/final.cpp4
-rw-r--r--src/devices/bus/c64/final.h4
-rw-r--r--src/devices/bus/c64/final3.cpp4
-rw-r--r--src/devices/bus/c64/final3.h4
-rw-r--r--src/devices/bus/c64/fun_play.cpp4
-rw-r--r--src/devices/bus/c64/fun_play.h4
-rw-r--r--src/devices/bus/c64/geocable.cpp9
-rw-r--r--src/devices/bus/c64/georam.cpp4
-rw-r--r--src/devices/bus/c64/georam.h4
-rw-r--r--src/devices/bus/c64/ide64.cpp8
-rw-r--r--src/devices/bus/c64/ide64.h4
-rw-r--r--src/devices/bus/c64/ieee488.cpp12
-rw-r--r--src/devices/bus/c64/ieee488.h4
-rw-r--r--src/devices/bus/c64/kingsoft.cpp4
-rw-r--r--src/devices/bus/c64/kingsoft.h4
-rw-r--r--src/devices/bus/c64/mach5.cpp4
-rw-r--r--src/devices/bus/c64/mach5.h4
-rw-r--r--src/devices/bus/c64/magic_desk.cpp4
-rw-r--r--src/devices/bus/c64/magic_desk.h4
-rw-r--r--src/devices/bus/c64/magic_formel.cpp6
-rw-r--r--src/devices/bus/c64/magic_formel.h4
-rw-r--r--src/devices/bus/c64/magic_voice.cpp14
-rw-r--r--src/devices/bus/c64/magic_voice.h4
-rw-r--r--src/devices/bus/c64/midi_maplin.cpp22
-rw-r--r--src/devices/bus/c64/midi_maplin.h4
-rw-r--r--src/devices/bus/c64/midi_namesoft.cpp22
-rw-r--r--src/devices/bus/c64/midi_namesoft.h4
-rw-r--r--src/devices/bus/c64/midi_passport.cpp26
-rw-r--r--src/devices/bus/c64/midi_passport.h4
-rw-r--r--src/devices/bus/c64/midi_sci.cpp22
-rw-r--r--src/devices/bus/c64/midi_sci.h4
-rw-r--r--src/devices/bus/c64/midi_siel.cpp22
-rw-r--r--src/devices/bus/c64/midi_siel.h4
-rw-r--r--src/devices/bus/c64/mikro_assembler.cpp2
-rw-r--r--src/devices/bus/c64/mikro_assembler.h2
-rw-r--r--src/devices/bus/c64/multiscreen.cpp17
-rw-r--r--src/devices/bus/c64/multiscreen.h4
-rw-r--r--src/devices/bus/c64/music64.cpp8
-rw-r--r--src/devices/bus/c64/music64.h4
-rw-r--r--src/devices/bus/c64/neoram.cpp4
-rw-r--r--src/devices/bus/c64/neoram.h4
-rw-r--r--src/devices/bus/c64/ocean.cpp4
-rw-r--r--src/devices/bus/c64/ocean.h4
-rw-r--r--src/devices/bus/c64/pagefox.cpp4
-rw-r--r--src/devices/bus/c64/pagefox.h4
-rw-r--r--src/devices/bus/c64/partner.cpp4
-rw-r--r--src/devices/bus/c64/partner.h4
-rw-r--r--src/devices/bus/c64/prophet64.cpp4
-rw-r--r--src/devices/bus/c64/prophet64.h4
-rw-r--r--src/devices/bus/c64/ps64.cpp25
-rw-r--r--src/devices/bus/c64/ps64.h4
-rw-r--r--src/devices/bus/c64/reu.cpp20
-rw-r--r--src/devices/bus/c64/reu.h4
-rw-r--r--src/devices/bus/c64/rex.cpp2
-rw-r--r--src/devices/bus/c64/rex.h2
-rw-r--r--src/devices/bus/c64/rex_ep256.cpp35
-rw-r--r--src/devices/bus/c64/rex_ep256.h4
-rw-r--r--src/devices/bus/c64/ross.cpp4
-rw-r--r--src/devices/bus/c64/ross.h4
-rw-r--r--src/devices/bus/c64/sfx_sound_expander.cpp12
-rw-r--r--src/devices/bus/c64/sfx_sound_expander.h4
-rw-r--r--src/devices/bus/c64/silverrock.cpp4
-rw-r--r--src/devices/bus/c64/silverrock.h4
-rw-r--r--src/devices/bus/c64/simons_basic.cpp4
-rw-r--r--src/devices/bus/c64/simons_basic.h4
-rw-r--r--src/devices/bus/c64/speakeasy.cpp16
-rw-r--r--src/devices/bus/c64/speakeasy.h4
-rw-r--r--src/devices/bus/c64/stardos.cpp4
-rw-r--r--src/devices/bus/c64/stardos.h4
-rw-r--r--src/devices/bus/c64/std.cpp2
-rw-r--r--src/devices/bus/c64/std.h2
-rw-r--r--src/devices/bus/c64/structured_basic.cpp4
-rw-r--r--src/devices/bus/c64/structured_basic.h4
-rw-r--r--src/devices/bus/c64/super_explode.cpp4
-rw-r--r--src/devices/bus/c64/super_explode.h4
-rw-r--r--src/devices/bus/c64/super_games.cpp4
-rw-r--r--src/devices/bus/c64/super_games.h4
-rw-r--r--src/devices/bus/c64/supercpu.cpp8
-rw-r--r--src/devices/bus/c64/supercpu.h4
-rw-r--r--src/devices/bus/c64/sw8k.cpp2
-rw-r--r--src/devices/bus/c64/sw8k.h2
-rw-r--r--src/devices/bus/c64/swiftlink.cpp8
-rw-r--r--src/devices/bus/c64/swiftlink.h4
-rw-r--r--src/devices/bus/c64/system3.cpp4
-rw-r--r--src/devices/bus/c64/system3.h4
-rw-r--r--src/devices/bus/c64/tdos.cpp12
-rw-r--r--src/devices/bus/c64/tdos.h4
-rw-r--r--src/devices/bus/c64/turbo232.cpp10
-rw-r--r--src/devices/bus/c64/turbo232.h4
-rw-r--r--src/devices/bus/c64/vizastar.cpp2
-rw-r--r--src/devices/bus/c64/vizastar.h2
-rw-r--r--src/devices/bus/c64/vw64.cpp2
-rw-r--r--src/devices/bus/c64/vw64.h2
-rw-r--r--src/devices/bus/c64/warp_speed.cpp4
-rw-r--r--src/devices/bus/c64/warp_speed.h4
-rw-r--r--src/devices/bus/c64/westermann.cpp2
-rw-r--r--src/devices/bus/c64/westermann.h2
-rw-r--r--src/devices/bus/c64/xl80.cpp29
-rw-r--r--src/devices/bus/c64/xl80.h4
-rw-r--r--src/devices/bus/c64/zaxxon.cpp2
-rw-r--r--src/devices/bus/c64/zaxxon.h2
135 files changed, 479 insertions, 438 deletions
diff --git a/src/devices/bus/c64/16kb.cpp b/src/devices/bus/c64/16kb.cpp
index 4b497f88591..4b23cb663f7 100644
--- a/src/devices/bus/c64/16kb.cpp
+++ b/src/devices/bus/c64/16kb.cpp
@@ -22,12 +22,13 @@ DEFINE_DEVICE_TYPE(C64_16KB, c64_16kb_cartridge_device, "c64_16kb", "C64 16KB EP
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_16kb_cartridge_device::device_add_mconfig(machine_config &config)
-{
- GENERIC_CARTSLOT(config, m_low, generic_linear_slot, nullptr, "rom,bin,80");
+MACHINE_CONFIG_START(c64_16kb_cartridge_device::device_add_mconfig)
+ MCFG_GENERIC_CARTSLOT_ADD("roml", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("rom,bin,80")
- GENERIC_CARTSLOT(config, m_high, generic_linear_slot, nullptr, "rom,bin,a0,e0");
-}
+ MCFG_GENERIC_CARTSLOT_ADD("romh", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("rom,bin,a0,e0")
+MACHINE_CONFIG_END
//-------------------------------------------------
@@ -98,15 +99,15 @@ void c64_16kb_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_16kb_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_16kb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
- data = m_low->read_rom(offset & 0x1fff);
+ data = m_low->read_rom(space, offset & 0x1fff);
}
else if (!romh)
{
- data = m_high->read_rom(offset & 0x1fff);
+ data = m_high->read_rom(space, offset & 0x1fff);
}
return data;
diff --git a/src/devices/bus/c64/16kb.h b/src/devices/bus/c64/16kb.h
index db7f294fda0..97afa77f5af 100644
--- a/src/devices/bus/c64/16kb.h
+++ b/src/devices/bus/c64/16kb.h
@@ -41,7 +41,7 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
required_ioport m_sw1;
diff --git a/src/devices/bus/c64/c128_comal80.cpp b/src/devices/bus/c64/c128_comal80.cpp
index f1ce8c5c87a..234a3499a19 100644
--- a/src/devices/bus/c64/c128_comal80.cpp
+++ b/src/devices/bus/c64/c128_comal80.cpp
@@ -60,7 +60,7 @@ void c128_comal80_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c128_comal80_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c128_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!romh)
{
@@ -80,7 +80,7 @@ uint8_t c128_comal80_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c128_comal80_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c128_comal80_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/c128_comal80.h b/src/devices/bus/c64/c128_comal80.h
index fe413f9bef6..c141cffb69e 100644
--- a/src/devices/bus/c64/c128_comal80.h
+++ b/src/devices/bus/c64/c128_comal80.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/c128_partner.cpp b/src/devices/bus/c64/c128_partner.cpp
index 91b7cf751ab..d5e74cc43cb 100644
--- a/src/devices/bus/c64/c128_partner.cpp
+++ b/src/devices/bus/c64/c128_partner.cpp
@@ -147,7 +147,7 @@ void c128_partner_cartridge_device::device_timer(emu_timer &timer, device_timer_
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c128_partner_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c128_partner_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -185,7 +185,7 @@ uint8_t c128_partner_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c128_partner_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c128_partner_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/c128_partner.h b/src/devices/bus/c64/c128_partner.h
index 1f4402d5b22..632e526b035 100644
--- a/src/devices/bus/c64/c128_partner.h
+++ b/src/devices/bus/c64/c128_partner.h
@@ -42,8 +42,8 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
// device_vcs_control_port_interface overrides
virtual void vcs_joy_w(uint8_t data);
diff --git a/src/devices/bus/c64/comal80.cpp b/src/devices/bus/c64/comal80.cpp
index 0ce6dcbfb5a..24c966eccc1 100644
--- a/src/devices/bus/c64/comal80.cpp
+++ b/src/devices/bus/c64/comal80.cpp
@@ -60,7 +60,7 @@ void c64_comal80_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_comal80_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh)
{
@@ -76,7 +76,7 @@ uint8_t c64_comal80_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_comal80_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_comal80_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/comal80.h b/src/devices/bus/c64/comal80.h
index af0958a8940..fb0ceaad303 100644
--- a/src/devices/bus/c64/comal80.h
+++ b/src/devices/bus/c64/comal80.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/cpm.cpp b/src/devices/bus/c64/cpm.cpp
index 7a909f6e920..81b6dd4eea2 100644
--- a/src/devices/bus/c64/cpm.cpp
+++ b/src/devices/bus/c64/cpm.cpp
@@ -161,7 +161,7 @@ void c64_cpm_cartridge_device::device_reset()
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_cpm_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_cpm_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -201,7 +201,7 @@ READ8_MEMBER( c64_cpm_cartridge_device::dma_r )
{
offs_t addr = (offset + 0x1000) & 0xffff;
- data = m_slot->dma_cd_r(addr);
+ data = m_slot->dma_cd_r(space, addr);
}
return data;
@@ -218,6 +218,6 @@ WRITE8_MEMBER( c64_cpm_cartridge_device::dma_w )
{
offs_t addr = (offset + 0x1000) & 0xffff;
- m_slot->dma_cd_w(addr, data);
+ m_slot->dma_cd_w(space, addr, data);
}
}
diff --git a/src/devices/bus/c64/cpm.h b/src/devices/bus/c64/cpm.h
index 63d3a7123cd..f0da4d6c0f7 100644
--- a/src/devices/bus/c64/cpm.h
+++ b/src/devices/bus/c64/cpm.h
@@ -38,7 +38,7 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
private:
diff --git a/src/devices/bus/c64/currah_speech.cpp b/src/devices/bus/c64/currah_speech.cpp
index 2ce77f2ea04..84d64f2ea2a 100644
--- a/src/devices/bus/c64/currah_speech.cpp
+++ b/src/devices/bus/c64/currah_speech.cpp
@@ -170,7 +170,7 @@ void c64_currah_speech_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_currah_speech_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!romh)
{
@@ -210,7 +210,7 @@ uint8_t c64_currah_speech_cartridge_device::c64_cd_r(offs_t offset, uint8_t data
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_currah_speech_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_currah_speech_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/currah_speech.h b/src/devices/bus/c64/currah_speech.h
index f856833f659..44d5adb083a 100644
--- a/src/devices/bus/c64/currah_speech.h
+++ b/src/devices/bus/c64/currah_speech.h
@@ -40,8 +40,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
inline void set_osc1(int voice, int intonation);
diff --git a/src/devices/bus/c64/dela_ep256.cpp b/src/devices/bus/c64/dela_ep256.cpp
index 107f2828d21..e11b3ae8f53 100644
--- a/src/devices/bus/c64/dela_ep256.cpp
+++ b/src/devices/bus/c64/dela_ep256.cpp
@@ -22,17 +22,24 @@ DEFINE_DEVICE_TYPE(C64_DELA_EP256, c64_dela_ep256_cartridge_device, "delep256",
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_dela_ep256_cartridge_device::device_add_mconfig(machine_config &config)
-{
- GENERIC_SOCKET(config, "rom1", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom2", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom3", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom4", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom5", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom6", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom7", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom8", generic_linear_slot, nullptr, "bin,rom");
-}
+MACHINE_CONFIG_START(c64_dela_ep256_cartridge_device::device_add_mconfig)
+ MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom8", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+MACHINE_CONFIG_END
@@ -87,7 +94,7 @@ void c64_dela_ep256_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_dela_ep256_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_dela_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -98,7 +105,7 @@ uint8_t c64_dela_ep256_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, i
else
{
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
- data = m_eproms[m_socket]->read_rom(addr);
+ data = m_eproms[m_socket]->read_rom(space, addr);
}
}
@@ -110,7 +117,7 @@ uint8_t c64_dela_ep256_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, i
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_dela_ep256_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_dela_ep256_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2 && ((offset & 0xf0) == 0xa0))
{
diff --git a/src/devices/bus/c64/dela_ep256.h b/src/devices/bus/c64/dela_ep256.h
index 61501df0790..bcc1992b969 100644
--- a/src/devices/bus/c64/dela_ep256.h
+++ b/src/devices/bus/c64/dela_ep256.h
@@ -40,8 +40,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
generic_slot_device *m_eproms[8];
diff --git a/src/devices/bus/c64/dela_ep64.cpp b/src/devices/bus/c64/dela_ep64.cpp
index 5798794f7eb..c9eee384a5a 100644
--- a/src/devices/bus/c64/dela_ep64.cpp
+++ b/src/devices/bus/c64/dela_ep64.cpp
@@ -22,11 +22,12 @@ DEFINE_DEVICE_TYPE(C64_DELA_EP64, c64_dela_ep64_cartridge_device, "c64_dela_ep64
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_dela_ep64_cartridge_device::device_add_mconfig(machine_config &config)
-{
- GENERIC_SOCKET(config, m_eprom1, generic_linear_slot, nullptr, "rom,bin");
- GENERIC_SOCKET(config, m_eprom2, generic_linear_slot, nullptr, "rom,bin");
-}
+MACHINE_CONFIG_START(c64_dela_ep64_cartridge_device::device_add_mconfig)
+ MCFG_GENERIC_SOCKET_ADD("eprom1", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("rom,bin")
+ MCFG_GENERIC_SOCKET_ADD("eprom2", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("rom,bin")
+MACHINE_CONFIG_END
//**************************************************************************
@@ -77,7 +78,7 @@ void c64_dela_ep64_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_dela_ep64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_dela_ep64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -90,8 +91,8 @@ uint8_t c64_dela_ep64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
if (!m_rom0_ce) data |= m_roml[offset & 0x1fff];
- if (!m_rom1_ce) data |= m_eprom1->read_rom(addr);
- if (!m_rom2_ce) data |= m_eprom2->read_rom(addr);
+ if (!m_rom1_ce) data |= m_eprom1->read_rom(space, addr);
+ if (!m_rom2_ce) data |= m_eprom2->read_rom(space, addr);
}
}
@@ -103,7 +104,7 @@ uint8_t c64_dela_ep64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_dela_ep64_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_dela_ep64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/dela_ep64.h b/src/devices/bus/c64/dela_ep64.h
index 95ac3440871..a3e2d77bd48 100644
--- a/src/devices/bus/c64/dela_ep64.h
+++ b/src/devices/bus/c64/dela_ep64.h
@@ -40,8 +40,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
required_device<generic_slot_device> m_eprom1;
diff --git a/src/devices/bus/c64/dela_ep7x8.cpp b/src/devices/bus/c64/dela_ep7x8.cpp
index 0c71555b880..564e7196449 100644
--- a/src/devices/bus/c64/dela_ep7x8.cpp
+++ b/src/devices/bus/c64/dela_ep7x8.cpp
@@ -22,16 +22,22 @@ DEFINE_DEVICE_TYPE(C64_DELA_EP7X8, c64_dela_ep7x8_cartridge_device, "c64_dela_ep
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_dela_ep7x8_cartridge_device::device_add_mconfig(machine_config &config)
-{
- GENERIC_SOCKET(config, m_eprom[0], generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, m_eprom[1], generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, m_eprom[2], generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, m_eprom[3], generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, m_eprom[4], generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, m_eprom[5], generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, m_eprom[6], generic_linear_slot, nullptr, "bin,rom");
-}
+MACHINE_CONFIG_START(c64_dela_ep7x8_cartridge_device::device_add_mconfig)
+ MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+MACHINE_CONFIG_END
//**************************************************************************
@@ -45,7 +51,13 @@ void c64_dela_ep7x8_cartridge_device::device_add_mconfig(machine_config &config)
c64_dela_ep7x8_cartridge_device::c64_dela_ep7x8_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, C64_DELA_EP7X8, tag, owner, clock),
device_c64_expansion_card_interface(mconfig, *this),
- m_eprom(*this, "rom%u", 1U)
+ m_eprom1(*this, "rom1"),
+ m_eprom2(*this, "rom2"),
+ m_eprom3(*this, "rom3"),
+ m_eprom4(*this, "rom4"),
+ m_eprom5(*this, "rom5"),
+ m_eprom6(*this, "rom6"),
+ m_eprom7(*this, "rom7"), m_bank(0)
{
}
@@ -76,20 +88,20 @@ void c64_dela_ep7x8_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_dela_ep7x8_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_dela_ep7x8_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
offs_t addr = offset & 0x1fff;
if (!BIT(m_bank, 0)) data |= m_roml[addr];
- if (!BIT(m_bank, 1)) data |= m_eprom[0]->read_rom(addr);
- if (!BIT(m_bank, 2)) data |= m_eprom[1]->read_rom(addr);
- if (!BIT(m_bank, 3)) data |= m_eprom[2]->read_rom(addr);
- if (!BIT(m_bank, 4)) data |= m_eprom[3]->read_rom(addr);
- if (!BIT(m_bank, 5)) data |= m_eprom[4]->read_rom(addr);
- if (!BIT(m_bank, 6)) data |= m_eprom[5]->read_rom(addr);
- if (!BIT(m_bank, 7)) data |= m_eprom[6]->read_rom(addr);
+ if (!BIT(m_bank, 1)) data |= m_eprom1->read_rom(space, addr);
+ if (!BIT(m_bank, 2)) data |= m_eprom2->read_rom(space, addr);
+ if (!BIT(m_bank, 3)) data |= m_eprom3->read_rom(space, addr);
+ if (!BIT(m_bank, 4)) data |= m_eprom4->read_rom(space, addr);
+ if (!BIT(m_bank, 5)) data |= m_eprom5->read_rom(space, addr);
+ if (!BIT(m_bank, 6)) data |= m_eprom6->read_rom(space, addr);
+ if (!BIT(m_bank, 7)) data |= m_eprom7->read_rom(space, addr);
}
return data;
@@ -100,7 +112,7 @@ uint8_t c64_dela_ep7x8_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, i
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_dela_ep7x8_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_dela_ep7x8_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/dela_ep7x8.h b/src/devices/bus/c64/dela_ep7x8.h
index 50e1b3af01e..48146d1c5e1 100644
--- a/src/devices/bus/c64/dela_ep7x8.h
+++ b/src/devices/bus/c64/dela_ep7x8.h
@@ -40,11 +40,17 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
- required_device_array<generic_slot_device, 7> m_eprom;
+ required_device<generic_slot_device> m_eprom1;
+ required_device<generic_slot_device> m_eprom2;
+ required_device<generic_slot_device> m_eprom3;
+ required_device<generic_slot_device> m_eprom4;
+ required_device<generic_slot_device> m_eprom5;
+ required_device<generic_slot_device> m_eprom6;
+ required_device<generic_slot_device> m_eprom7;
uint8_t m_bank;
};
diff --git a/src/devices/bus/c64/dinamic.cpp b/src/devices/bus/c64/dinamic.cpp
index 13d37749335..8ab60892263 100644
--- a/src/devices/bus/c64/dinamic.cpp
+++ b/src/devices/bus/c64/dinamic.cpp
@@ -60,7 +60,7 @@ void c64_dinamic_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_dinamic_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_dinamic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
diff --git a/src/devices/bus/c64/dinamic.h b/src/devices/bus/c64/dinamic.h
index e204964e4a1..84bd1503503 100644
--- a/src/devices/bus/c64/dinamic.h
+++ b/src/devices/bus/c64/dinamic.h
@@ -35,7 +35,7 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/dqbb.cpp b/src/devices/bus/c64/dqbb.cpp
index 20adedd9057..b9cb32ce1cc 100644
--- a/src/devices/bus/c64/dqbb.cpp
+++ b/src/devices/bus/c64/dqbb.cpp
@@ -78,7 +78,7 @@ void c64_dqbb_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_dqbb_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_dqbb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!m_cs && (!roml || !romh))
{
@@ -93,7 +93,7 @@ uint8_t c64_dqbb_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sph
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_dqbb_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_dqbb_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!m_cs && m_we && (offset >= 0x8000 && offset < 0xc000))
{
diff --git a/src/devices/bus/c64/dqbb.h b/src/devices/bus/c64/dqbb.h
index aaa8c0e1bf4..6c472eb6696 100644
--- a/src/devices/bus/c64/dqbb.h
+++ b/src/devices/bus/c64/dqbb.h
@@ -42,8 +42,8 @@ protected:
virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } }
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
int m_cs;
diff --git a/src/devices/bus/c64/easy_calc_result.cpp b/src/devices/bus/c64/easy_calc_result.cpp
index 123870d5d3e..4ddd4cbdac0 100644
--- a/src/devices/bus/c64/easy_calc_result.cpp
+++ b/src/devices/bus/c64/easy_calc_result.cpp
@@ -80,7 +80,7 @@ void c64_easy_calc_result_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_easy_calc_result_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_easy_calc_result_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -99,7 +99,7 @@ uint8_t c64_easy_calc_result_cartridge_device::c64_cd_r(offs_t offset, uint8_t d
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_easy_calc_result_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_easy_calc_result_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/easy_calc_result.h b/src/devices/bus/c64/easy_calc_result.h
index 2d945b7dea2..377bbd12b17 100644
--- a/src/devices/bus/c64/easy_calc_result.h
+++ b/src/devices/bus/c64/easy_calc_result.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
int m_bank;
diff --git a/src/devices/bus/c64/easyflash.cpp b/src/devices/bus/c64/easyflash.cpp
index 38cdf9739c6..abdd891572f 100644
--- a/src/devices/bus/c64/easyflash.cpp
+++ b/src/devices/bus/c64/easyflash.cpp
@@ -114,17 +114,17 @@ void c64_easyflash_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_easyflash_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_easyflash_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
- data = m_flash_roml->read(addr);
+ data = m_flash_roml->read(space, addr);
}
else if (!romh)
{
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
- data = m_flash_romh->read(addr);
+ data = m_flash_romh->read(space, addr);
}
else if (!io2)
{
@@ -139,17 +139,17 @@ uint8_t c64_easyflash_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_easyflash_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_easyflash_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
- m_flash_roml->write(addr, data);
+ m_flash_roml->write(space, addr, data);
}
else if (!romh)
{
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
- m_flash_romh->write(addr, data);
+ m_flash_romh->write(space, addr, data);
}
else if (!io1)
{
diff --git a/src/devices/bus/c64/easyflash.h b/src/devices/bus/c64/easyflash.h
index 377de25d50d..ef11fa5162d 100644
--- a/src/devices/bus/c64/easyflash.h
+++ b/src/devices/bus/c64/easyflash.h
@@ -40,8 +40,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
diff --git a/src/devices/bus/c64/epyx_fast_load.cpp b/src/devices/bus/c64/epyx_fast_load.cpp
index 4dced91c76a..d119091555b 100644
--- a/src/devices/bus/c64/epyx_fast_load.cpp
+++ b/src/devices/bus/c64/epyx_fast_load.cpp
@@ -80,7 +80,7 @@ void c64_epyx_fast_load_cartridge_device::device_timer(emu_timer &timer, device_
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_epyx_fast_load_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_epyx_fast_load_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -107,7 +107,7 @@ uint8_t c64_epyx_fast_load_cartridge_device::c64_cd_r(offs_t offset, uint8_t dat
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_epyx_fast_load_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_epyx_fast_load_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/epyx_fast_load.h b/src/devices/bus/c64/epyx_fast_load.h
index 64d23f6febb..42f04254703 100644
--- a/src/devices/bus/c64/epyx_fast_load.h
+++ b/src/devices/bus/c64/epyx_fast_load.h
@@ -36,8 +36,8 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
emu_timer *m_exrom_timer;
diff --git a/src/devices/bus/c64/exos.cpp b/src/devices/bus/c64/exos.cpp
index 13c5d972642..5c41cd7d6d3 100644
--- a/src/devices/bus/c64/exos.cpp
+++ b/src/devices/bus/c64/exos.cpp
@@ -47,7 +47,7 @@ void c64_exos_cartridge_device::device_start()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_exos_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_exos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!romh)
{
diff --git a/src/devices/bus/c64/exos.h b/src/devices/bus/c64/exos.h
index 73b9b2699aa..93872e38e7a 100644
--- a/src/devices/bus/c64/exos.h
+++ b/src/devices/bus/c64/exos.h
@@ -34,7 +34,7 @@ protected:
virtual void device_start() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
};
diff --git a/src/devices/bus/c64/exp.cpp b/src/devices/bus/c64/exp.cpp
index 2d4743fe7c4..1dc007f95a0 100644
--- a/src/devices/bus/c64/exp.cpp
+++ b/src/devices/bus/c64/exp.cpp
@@ -225,11 +225,11 @@ std::string c64_expansion_slot_device::get_default_card_software(get_default_car
// cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_expansion_slot_device::cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_expansion_slot_device::cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (m_card != nullptr)
{
- data = m_card->c64_cd_r(offset, data, sphi2, ba, roml, romh, io1, io2);
+ data = m_card->c64_cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
}
return data;
@@ -240,11 +240,11 @@ uint8_t c64_expansion_slot_device::cd_r(offs_t offset, uint8_t data, int sphi2,
// cd_w - cartridge data write
//-------------------------------------------------
-void c64_expansion_slot_device::cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_expansion_slot_device::cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (m_card != nullptr)
{
- m_card->c64_cd_w(offset, data, sphi2, ba, roml, romh, io1, io2);
+ m_card->c64_cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
}
}
diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h
index 7cba776f683..c188434d1b8 100644
--- a/src/devices/bus/c64/exp.h
+++ b/src/devices/bus/c64/exp.h
@@ -81,14 +81,14 @@ public:
auto dma_callback() { return m_write_dma.bind(); }
// computer interface
- uint8_t cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2);
- void cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2);
+ uint8_t cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2);
+ void cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2);
int game_r(offs_t offset, int sphi2, int ba, int rw, int hiram);
int exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram);
// cartridge interface
- uint8_t dma_cd_r(offs_t offset) { return m_read_dma_cd(offset); }
- void dma_cd_w(offs_t offset, uint8_t data) { m_write_dma_cd(offset, data); }
+ DECLARE_READ8_MEMBER( dma_cd_r ) { return m_read_dma_cd(offset); }
+ DECLARE_WRITE8_MEMBER( dma_cd_w ) { m_write_dma_cd(offset, data); }
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_write_irq(state); }
DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_write_nmi(state); }
DECLARE_WRITE_LINE_MEMBER( dma_w ) { m_write_dma(state); }
@@ -145,8 +145,8 @@ public:
// construction/destruction
virtual ~device_c64_expansion_card_interface();
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) { return data; };
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) { };
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) { return data; };
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) { };
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) { return m_game; }
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) { return m_exrom; }
diff --git a/src/devices/bus/c64/fcc.cpp b/src/devices/bus/c64/fcc.cpp
index 24aaa6ec523..77d505e97a3 100644
--- a/src/devices/bus/c64/fcc.cpp
+++ b/src/devices/bus/c64/fcc.cpp
@@ -75,11 +75,10 @@ void c64_final_chesscard_device::c64_fcc_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_final_chesscard_device::device_add_mconfig(machine_config &config)
-{
- M65SC02(config, m_maincpu, XTAL(5'000'000));
- m_maincpu->set_addrmap(AS_PROGRAM, &c64_final_chesscard_device::c64_fcc_map);
-}
+MACHINE_CONFIG_START(c64_final_chesscard_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(G65SC02P4_TAG, M65SC02, XTAL(5'000'000))
+ MCFG_DEVICE_PROGRAM_MAP(c64_fcc_map)
+MACHINE_CONFIG_END
//-------------------------------------------------
@@ -148,7 +147,7 @@ void c64_final_chesscard_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_final_chesscard_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_final_chesscard_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -174,7 +173,7 @@ uint8_t c64_final_chesscard_device::c64_cd_r(offs_t offset, uint8_t data, int sp
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_final_chesscard_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_final_chesscard_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
diff --git a/src/devices/bus/c64/fcc.h b/src/devices/bus/c64/fcc.h
index 3988a597fd4..4d548f38528 100644
--- a/src/devices/bus/c64/fcc.h
+++ b/src/devices/bus/c64/fcc.h
@@ -46,8 +46,8 @@ protected:
virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } }
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
required_device<m65sc02_device> m_maincpu;
diff --git a/src/devices/bus/c64/final.cpp b/src/devices/bus/c64/final.cpp
index 36b8ee1bae6..90be1e6e588 100644
--- a/src/devices/bus/c64/final.cpp
+++ b/src/devices/bus/c64/final.cpp
@@ -94,7 +94,7 @@ void c64_final_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_final_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_final_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh || !io1 || !io2)
{
@@ -120,7 +120,7 @@ uint8_t c64_final_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sp
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_final_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_final_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/final.h b/src/devices/bus/c64/final.h
index 6d59e737c02..a8ed113f13b 100644
--- a/src/devices/bus/c64/final.h
+++ b/src/devices/bus/c64/final.h
@@ -40,8 +40,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/final3.cpp b/src/devices/bus/c64/final3.cpp
index 23b54a829e0..9a64e7c4172 100644
--- a/src/devices/bus/c64/final3.cpp
+++ b/src/devices/bus/c64/final3.cpp
@@ -104,7 +104,7 @@ void c64_final3_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_final3_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_final3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh || !io1 || !io2)
{
@@ -120,7 +120,7 @@ uint8_t c64_final3_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int s
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_final3_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_final3_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!m_hidden && !io2 && ((offset & 0xff) == 0xff))
{
diff --git a/src/devices/bus/c64/final3.h b/src/devices/bus/c64/final3.h
index 8b020482560..d424c76537a 100644
--- a/src/devices/bus/c64/final3.h
+++ b/src/devices/bus/c64/final3.h
@@ -40,8 +40,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/fun_play.cpp b/src/devices/bus/c64/fun_play.cpp
index 2a211b21ab5..b4b7a7285d2 100644
--- a/src/devices/bus/c64/fun_play.cpp
+++ b/src/devices/bus/c64/fun_play.cpp
@@ -60,7 +60,7 @@ void c64_fun_play_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_fun_play_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_fun_play_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -76,7 +76,7 @@ uint8_t c64_fun_play_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_fun_play_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_fun_play_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/fun_play.h b/src/devices/bus/c64/fun_play.h
index 6fc082164c6..ba62626651a 100644
--- a/src/devices/bus/c64/fun_play.h
+++ b/src/devices/bus/c64/fun_play.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/geocable.cpp b/src/devices/bus/c64/geocable.cpp
index e07734f987f..e740ec0da69 100644
--- a/src/devices/bus/c64/geocable.cpp
+++ b/src/devices/bus/c64/geocable.cpp
@@ -30,11 +30,10 @@ DEFINE_DEVICE_TYPE(C64_GEOCABLE, c64_geocable_device, "c64_geocable", "C64 geoCa
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_geocable_device::device_add_mconfig(machine_config &config)
-{
- CENTRONICS(config, m_centronics, centronics_devices, "printer");
- m_centronics->busy_handler().set(FUNC(c64_geocable_device::output_b));
-}
+MACHINE_CONFIG_START(c64_geocable_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
+ MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, c64_geocable_device, output_b))
+MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/georam.cpp b/src/devices/bus/c64/georam.cpp
index 6bf8a16a1d8..e82061df80e 100644
--- a/src/devices/bus/c64/georam.cpp
+++ b/src/devices/bus/c64/georam.cpp
@@ -64,7 +64,7 @@ void c64_georam_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_georam_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_georam_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -80,7 +80,7 @@ uint8_t c64_georam_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int s
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_georam_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_georam_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/georam.h b/src/devices/bus/c64/georam.h
index 03967625c23..352ddff6d1b 100644
--- a/src/devices/bus/c64/georam.h
+++ b/src/devices/bus/c64/georam.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
optional_shared_ptr<uint8_t> m_ram;
diff --git a/src/devices/bus/c64/ide64.cpp b/src/devices/bus/c64/ide64.cpp
index 1942ce466b5..f70ca03c10a 100644
--- a/src/devices/bus/c64/ide64.cpp
+++ b/src/devices/bus/c64/ide64.cpp
@@ -134,7 +134,7 @@ void c64_ide64_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_ide64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!m_enable) return data;
@@ -225,7 +225,7 @@ uint8_t c64_ide64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sp
{
offs_t addr = (m_bank << 14) | (offset & 0x3fff);
- data = m_flash_rom->read(addr);
+ data = m_flash_rom->read(space, addr);
}
else if (!ram_oe)
{
@@ -240,7 +240,7 @@ uint8_t c64_ide64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sp
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_ide64_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_ide64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!m_enable) return;
@@ -259,7 +259,7 @@ void c64_ide64_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2
if ((offset >= 0x8000 && offset < 0xc000) && !m_wp)
{
offs_t addr = (m_bank << 14) | (offset & 0x3fff);
- m_flash_rom->write(addr, data);
+ m_flash_rom->write(space, addr, data);
}
if (!io1)
diff --git a/src/devices/bus/c64/ide64.h b/src/devices/bus/c64/ide64.h
index bfabad10c87..b43e7bdaf98 100644
--- a/src/devices/bus/c64/ide64.h
+++ b/src/devices/bus/c64/ide64.h
@@ -43,8 +43,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override;
diff --git a/src/devices/bus/c64/ieee488.cpp b/src/devices/bus/c64/ieee488.cpp
index d77e5064dfc..db1558b9766 100644
--- a/src/devices/bus/c64/ieee488.cpp
+++ b/src/devices/bus/c64/ieee488.cpp
@@ -202,9 +202,9 @@ void c64_ieee488_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_ieee488_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_ieee488_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- data = m_exp->cd_r(offset, data, sphi2, ba, roml, romh, io1, io2);
+ data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
if (!roml && m_roml_sel)
{
@@ -212,7 +212,7 @@ uint8_t c64_ieee488_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int
}
else if (!io2)
{
- data = m_tpi->read(offset & 0x07);
+ data = m_tpi->read(space, offset & 0x07);
}
return data;
@@ -223,14 +223,14 @@ uint8_t c64_ieee488_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_ieee488_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_ieee488_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2)
{
- m_tpi->write(offset & 0x07, data);
+ m_tpi->write(space, offset & 0x07, data);
}
- m_exp->cd_w(offset, data, sphi2, ba, roml, romh, io1, io2);
+ m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
}
diff --git a/src/devices/bus/c64/ieee488.h b/src/devices/bus/c64/ieee488.h
index ab3c7748b8d..185a2623317 100644
--- a/src/devices/bus/c64/ieee488.h
+++ b/src/devices/bus/c64/ieee488.h
@@ -39,8 +39,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
private:
diff --git a/src/devices/bus/c64/kingsoft.cpp b/src/devices/bus/c64/kingsoft.cpp
index 510032fb720..84263b71da7 100644
--- a/src/devices/bus/c64/kingsoft.cpp
+++ b/src/devices/bus/c64/kingsoft.cpp
@@ -57,7 +57,7 @@ void c64_kingsoft_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_kingsoft_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_kingsoft_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -80,7 +80,7 @@ uint8_t c64_kingsoft_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_kingsoft_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_kingsoft_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/kingsoft.h b/src/devices/bus/c64/kingsoft.h
index 3a9fda45fef..89b2a4e0367 100644
--- a/src/devices/bus/c64/kingsoft.h
+++ b/src/devices/bus/c64/kingsoft.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
};
diff --git a/src/devices/bus/c64/mach5.cpp b/src/devices/bus/c64/mach5.cpp
index ddd44407d3e..f312a14e1d4 100644
--- a/src/devices/bus/c64/mach5.cpp
+++ b/src/devices/bus/c64/mach5.cpp
@@ -88,7 +88,7 @@ void c64_mach5_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_mach5_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_mach5_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh || !io1 || !io2)
{
@@ -103,7 +103,7 @@ uint8_t c64_mach5_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sp
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_mach5_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_mach5_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!m_c128)
{
diff --git a/src/devices/bus/c64/mach5.h b/src/devices/bus/c64/mach5.h
index a49e1bec347..affe03a52dc 100644
--- a/src/devices/bus/c64/mach5.h
+++ b/src/devices/bus/c64/mach5.h
@@ -37,8 +37,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
required_ioport m_s1;
diff --git a/src/devices/bus/c64/magic_desk.cpp b/src/devices/bus/c64/magic_desk.cpp
index 2fe55681966..9f72a1f416f 100644
--- a/src/devices/bus/c64/magic_desk.cpp
+++ b/src/devices/bus/c64/magic_desk.cpp
@@ -60,7 +60,7 @@ void c64_magic_desk_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_magic_desk_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_magic_desk_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -76,7 +76,7 @@ uint8_t c64_magic_desk_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, i
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_magic_desk_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_magic_desk_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/magic_desk.h b/src/devices/bus/c64/magic_desk.h
index 75f76dee732..4082fc5ff56 100644
--- a/src/devices/bus/c64/magic_desk.h
+++ b/src/devices/bus/c64/magic_desk.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/magic_formel.cpp b/src/devices/bus/c64/magic_formel.cpp
index 9ebadc5320b..7575320b765 100644
--- a/src/devices/bus/c64/magic_formel.cpp
+++ b/src/devices/bus/c64/magic_formel.cpp
@@ -206,7 +206,7 @@ void c64_magic_formel_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_magic_formel_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_magic_formel_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!romh)
{
@@ -227,7 +227,7 @@ uint8_t c64_magic_formel_cartridge_device::c64_cd_r(offs_t offset, uint8_t data,
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_magic_formel_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_magic_formel_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1 && !m_ram_oe)
{
@@ -239,7 +239,7 @@ void c64_magic_formel_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, in
offs_t addr = (offset >> 6) & 0x03;
uint8_t new_data = (BIT(data, 1) << 7) | (offset & 0x3f);
- m_pia->write(addr, new_data);
+ m_pia->write(space, addr, new_data);
}
else if (offset == 0x0001)
{
diff --git a/src/devices/bus/c64/magic_formel.h b/src/devices/bus/c64/magic_formel.h
index 818342d3c3f..b4427511f32 100644
--- a/src/devices/bus/c64/magic_formel.h
+++ b/src/devices/bus/c64/magic_formel.h
@@ -41,8 +41,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
private:
diff --git a/src/devices/bus/c64/magic_voice.cpp b/src/devices/bus/c64/magic_voice.cpp
index 72d4afe5cf3..8479f56a238 100644
--- a/src/devices/bus/c64/magic_voice.cpp
+++ b/src/devices/bus/c64/magic_voice.cpp
@@ -168,7 +168,7 @@ WRITE8_MEMBER( c64_magic_voice_cartridge_device::tpi_pb_w )
if (!BIT(m_tpi_pb, 4) && BIT(data, 4))
{
- m_vslsi->write(data & 0x0f);
+ m_vslsi->write(space, 0, data & 0x0f);
}
m_tpi_pb = data;
@@ -303,12 +303,12 @@ void c64_magic_voice_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_magic_voice_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_magic_voice_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2 && sphi2)
{
m_ca = offset;
- data = m_tpi->read(offset & 0x07);
+ data = m_tpi->read(space, offset & 0x07);
}
if (PB6 && A13 && A15)
@@ -319,7 +319,7 @@ uint8_t c64_magic_voice_cartridge_device::c64_cd_r(offs_t offset, uint8_t data,
int roml2 = !(!roml || (roml && !PB5 && A12 && A13 && !A14 && A15));
int romh2 = !((!romh && !PB6) || (!PB5 && A12 && A13 && !A14 && !A15));
- data = m_exp->cd_r(get_offset(offset), data, sphi2, ba, roml2, romh2, io1, 1);
+ data = m_exp->cd_r(space, get_offset(offset), data, sphi2, ba, roml2, romh2, io1, 1);
return data;
}
@@ -329,17 +329,17 @@ uint8_t c64_magic_voice_cartridge_device::c64_cd_r(offs_t offset, uint8_t data,
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_magic_voice_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_magic_voice_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2 && sphi2)
{
- m_tpi->write(offset & 0x07, data);
+ m_tpi->write(space, offset & 0x07, data);
}
int roml2 = !(!roml || (roml && !PB5 && A12 && A13 && !A14 && A15));
int romh2 = !((!romh && !PB6) || (!PB5 && A12 && A13 && !A14 && !A15));
- m_exp->cd_w(get_offset(offset), data, sphi2, ba, roml2, romh2, io1, 1);
+ m_exp->cd_w(space, get_offset(offset), data, sphi2, ba, roml2, romh2, io1, 1);
}
diff --git a/src/devices/bus/c64/magic_voice.h b/src/devices/bus/c64/magic_voice.h
index bf6f081fd67..264c2531197 100644
--- a/src/devices/bus/c64/magic_voice.h
+++ b/src/devices/bus/c64/magic_voice.h
@@ -40,8 +40,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
private:
diff --git a/src/devices/bus/c64/midi_maplin.cpp b/src/devices/bus/c64/midi_maplin.cpp
index adc8556a7bd..1845f167e33 100644
--- a/src/devices/bus/c64/midi_maplin.cpp
+++ b/src/devices/bus/c64/midi_maplin.cpp
@@ -44,19 +44,19 @@ WRITE_LINE_MEMBER( c64_maplin_midi_cartridge_device::write_acia_clock )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_maplin_midi_cartridge_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(c64_maplin_midi_cartridge_device::device_add_mconfig)
ACIA6850(config, m_acia, 0);
m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
m_acia->irq_handler().set(FUNC(c64_maplin_midi_cartridge_device::acia_irq_w));
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
+ MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
+ MCFG_MIDI_RX_HANDLER(WRITELINE(MC6850_TAG, acia6850_device, write_rxd))
- MIDI_PORT(config, "mdout", midiout_slot, "midiout");
+ MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
- clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16));
- acia_clock.signal_handler().set(FUNC(c64_maplin_midi_cartridge_device::write_acia_clock));
-}
+ MCFG_DEVICE_ADD("acia_clock", CLOCK, 31250*16)
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, c64_maplin_midi_cartridge_device, write_acia_clock))
+MACHINE_CONFIG_END
@@ -100,7 +100,7 @@ void c64_maplin_midi_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_maplin_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_maplin_midi_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2)
{
@@ -108,7 +108,7 @@ uint8_t c64_maplin_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data,
{
case 0:
case 1:
- data = m_acia->read(offset & 1);
+ data = m_acia->read(space, offset & 1);
break;
}
}
@@ -121,7 +121,7 @@ uint8_t c64_maplin_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data,
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_maplin_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_maplin_midi_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2)
{
@@ -129,7 +129,7 @@ void c64_maplin_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int
{
case 0:
case 1:
- m_acia->write(offset & 1, data);
+ m_acia->write(space, offset & 1, data);
break;
}
}
diff --git a/src/devices/bus/c64/midi_maplin.h b/src/devices/bus/c64/midi_maplin.h
index eff1129802d..d844d007b36 100644
--- a/src/devices/bus/c64/midi_maplin.h
+++ b/src/devices/bus/c64/midi_maplin.h
@@ -38,8 +38,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
diff --git a/src/devices/bus/c64/midi_namesoft.cpp b/src/devices/bus/c64/midi_namesoft.cpp
index d4e7c8b59ac..c572cf4ea55 100644
--- a/src/devices/bus/c64/midi_namesoft.cpp
+++ b/src/devices/bus/c64/midi_namesoft.cpp
@@ -44,19 +44,19 @@ WRITE_LINE_MEMBER( c64_namesoft_midi_cartridge_device::write_acia_clock )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_namesoft_midi_cartridge_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(c64_namesoft_midi_cartridge_device::device_add_mconfig)
ACIA6850(config, m_acia, 0);
m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
m_acia->irq_handler().set(FUNC(c64_namesoft_midi_cartridge_device::acia_irq_w));
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
+ MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
+ MCFG_MIDI_RX_HANDLER(WRITELINE(MC6850_TAG, acia6850_device, write_rxd))
- MIDI_PORT(config, "mdout", midiout_slot, "midiout");
+ MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
- clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16));
- acia_clock.signal_handler().set(FUNC(c64_namesoft_midi_cartridge_device::write_acia_clock));
-}
+ MCFG_DEVICE_ADD("acia_clock", CLOCK, 31250*16)
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, c64_namesoft_midi_cartridge_device, write_acia_clock))
+MACHINE_CONFIG_END
@@ -98,7 +98,7 @@ void c64_namesoft_midi_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_namesoft_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_namesoft_midi_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -106,7 +106,7 @@ uint8_t c64_namesoft_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data
{
case 2:
case 3:
- data = m_acia->read(offset & 1);
+ data = m_acia->read(space, offset & 1);
break;
}
}
@@ -119,7 +119,7 @@ uint8_t c64_namesoft_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_namesoft_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_namesoft_midi_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -127,7 +127,7 @@ void c64_namesoft_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, i
{
case 0:
case 1:
- m_acia->write(offset & 1, data);
+ m_acia->write(space, offset & 1, data);
break;
}
}
diff --git a/src/devices/bus/c64/midi_namesoft.h b/src/devices/bus/c64/midi_namesoft.h
index ab5064486c0..fe583e9cac1 100644
--- a/src/devices/bus/c64/midi_namesoft.h
+++ b/src/devices/bus/c64/midi_namesoft.h
@@ -38,8 +38,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
diff --git a/src/devices/bus/c64/midi_passport.cpp b/src/devices/bus/c64/midi_passport.cpp
index 05a3fbb1a36..bedab8e52c1 100644
--- a/src/devices/bus/c64/midi_passport.cpp
+++ b/src/devices/bus/c64/midi_passport.cpp
@@ -58,8 +58,7 @@ WRITE_LINE_MEMBER( c64_passport_midi_cartridge_device::write_acia_clock )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_passport_midi_cartridge_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(c64_passport_midi_cartridge_device::device_add_mconfig)
ACIA6850(config, m_acia, 0);
m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
m_acia->irq_handler().set(FUNC(c64_passport_midi_cartridge_device::acia_irq_w));
@@ -68,13 +67,14 @@ void c64_passport_midi_cartridge_device::device_add_mconfig(machine_config &conf
m_ptm->set_external_clocks(1021800.0f, 1021800.0f, 1021800.0f);
m_ptm->irq_callback().set(FUNC(c64_passport_midi_cartridge_device::ptm_irq_w));
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
+ MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
+ MCFG_MIDI_RX_HANDLER(WRITELINE(MC6850_TAG, acia6850_device, write_rxd))
- MIDI_PORT(config, "mdout", midiout_slot, "midiout");
+ MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
- clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); // TODO: work out if the clock should come from the 6840
- acia_clock.signal_handler().set(FUNC(c64_passport_midi_cartridge_device::write_acia_clock));
-}
+ MCFG_DEVICE_ADD("acia_clock", CLOCK, 31250*16) /// TODO: work out if the clock should come from the 6840
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, c64_passport_midi_cartridge_device, write_acia_clock))
+MACHINE_CONFIG_END
@@ -124,7 +124,7 @@ void c64_passport_midi_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_passport_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_passport_midi_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -132,11 +132,11 @@ uint8_t c64_passport_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data
{
case 0: case 1: case 2: case 3:
case 4: case 5: case 6: case 7:
- data = m_ptm->read(offset & 0x07);
+ data = m_ptm->read(space, offset & 0x07);
break;
case 8: case 9:
- data = m_acia->read(offset & 0x01);
+ data = m_acia->read(space, offset & 0x01);
break;
}
}
@@ -149,7 +149,7 @@ uint8_t c64_passport_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_passport_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_passport_midi_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -157,11 +157,11 @@ void c64_passport_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, i
{
case 0: case 1: case 2: case 3:
case 4: case 5: case 6: case 7:
- m_ptm->write(offset & 0x07, data);
+ m_ptm->write(space, offset & 0x07, data);
break;
case 8: case 9:
- m_acia->write(offset & 0x01, data);
+ m_acia->write(space, offset & 0x01, data);
break;
case 0x30:
diff --git a/src/devices/bus/c64/midi_passport.h b/src/devices/bus/c64/midi_passport.h
index a538d312912..5385e3fff91 100644
--- a/src/devices/bus/c64/midi_passport.h
+++ b/src/devices/bus/c64/midi_passport.h
@@ -39,8 +39,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
DECLARE_WRITE_LINE_MEMBER( ptm_irq_w );
diff --git a/src/devices/bus/c64/midi_sci.cpp b/src/devices/bus/c64/midi_sci.cpp
index 14309ee5e7c..9d58052b38a 100644
--- a/src/devices/bus/c64/midi_sci.cpp
+++ b/src/devices/bus/c64/midi_sci.cpp
@@ -44,19 +44,19 @@ WRITE_LINE_MEMBER( c64_sequential_midi_cartridge_device::write_acia_clock )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_sequential_midi_cartridge_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(c64_sequential_midi_cartridge_device::device_add_mconfig)
ACIA6850(config, m_acia, 0);
m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
m_acia->irq_handler().set(FUNC(c64_sequential_midi_cartridge_device::acia_irq_w));
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
+ MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
+ MCFG_MIDI_RX_HANDLER(WRITELINE(MC6850_TAG, acia6850_device, write_rxd))
- MIDI_PORT(config, "mdout", midiout_slot, "midiout");
+ MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
- clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16));
- acia_clock.signal_handler().set(FUNC(c64_sequential_midi_cartridge_device::write_acia_clock));
-}
+ MCFG_DEVICE_ADD("acia_clock", CLOCK, 31250*16)
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, c64_sequential_midi_cartridge_device, write_acia_clock))
+MACHINE_CONFIG_END
@@ -99,7 +99,7 @@ void c64_sequential_midi_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_sequential_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_sequential_midi_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -107,7 +107,7 @@ uint8_t c64_sequential_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t da
{
case 2:
case 3:
- data = m_acia->read(offset & 1);
+ data = m_acia->read(space, offset & 1);
break;
}
}
@@ -120,7 +120,7 @@ uint8_t c64_sequential_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t da
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_sequential_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_sequential_midi_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -128,7 +128,7 @@ void c64_sequential_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data,
{
case 0:
case 1:
- m_acia->write(offset & 1, data);
+ m_acia->write(space, offset & 1, data);
break;
}
}
diff --git a/src/devices/bus/c64/midi_sci.h b/src/devices/bus/c64/midi_sci.h
index b0d52a0f70d..2c3dfc7f8ff 100644
--- a/src/devices/bus/c64/midi_sci.h
+++ b/src/devices/bus/c64/midi_sci.h
@@ -38,8 +38,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
diff --git a/src/devices/bus/c64/midi_siel.cpp b/src/devices/bus/c64/midi_siel.cpp
index eea7a4b333d..f5338bc6995 100644
--- a/src/devices/bus/c64/midi_siel.cpp
+++ b/src/devices/bus/c64/midi_siel.cpp
@@ -44,19 +44,19 @@ WRITE_LINE_MEMBER( c64_siel_midi_cartridge_device::write_acia_clock )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_siel_midi_cartridge_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(c64_siel_midi_cartridge_device::device_add_mconfig)
ACIA6850(config, m_acia, 0);
m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
m_acia->irq_handler().set(FUNC(c64_siel_midi_cartridge_device::acia_irq_w));
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
+ MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
+ MCFG_MIDI_RX_HANDLER(WRITELINE(MC6850_TAG, acia6850_device, write_rxd))
- MIDI_PORT(config, "mdout", midiout_slot, "midiout");
+ MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
- clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16));
- acia_clock.signal_handler().set(FUNC(c64_siel_midi_cartridge_device::write_acia_clock));
-}
+ MCFG_DEVICE_ADD("acia_clock", CLOCK, 31250*16)
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, c64_siel_midi_cartridge_device, write_acia_clock))
+MACHINE_CONFIG_END
@@ -100,7 +100,7 @@ void c64_siel_midi_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_siel_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_siel_midi_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -108,7 +108,7 @@ uint8_t c64_siel_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
{
case 6:
case 7:
- data = m_acia->read(offset & 1);
+ data = m_acia->read(space, offset & 1);
break;
}
}
@@ -121,7 +121,7 @@ uint8_t c64_siel_midi_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_siel_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_siel_midi_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -129,7 +129,7 @@ void c64_siel_midi_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int s
{
case 4:
case 5:
- m_acia->write(offset & 1, data);
+ m_acia->write(space, offset & 1, data);
break;
}
}
diff --git a/src/devices/bus/c64/midi_siel.h b/src/devices/bus/c64/midi_siel.h
index fe38834278e..9e84f5e1852 100644
--- a/src/devices/bus/c64/midi_siel.h
+++ b/src/devices/bus/c64/midi_siel.h
@@ -38,8 +38,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
diff --git a/src/devices/bus/c64/mikro_assembler.cpp b/src/devices/bus/c64/mikro_assembler.cpp
index d6c02be7681..fe97c9472d7 100644
--- a/src/devices/bus/c64/mikro_assembler.cpp
+++ b/src/devices/bus/c64/mikro_assembler.cpp
@@ -47,7 +47,7 @@ void c64_mikro_assembler_cartridge_device::device_start()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_mikro_assembler_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_mikro_assembler_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh || !io1 || !io2)
{
diff --git a/src/devices/bus/c64/mikro_assembler.h b/src/devices/bus/c64/mikro_assembler.h
index 754a91385d4..edeb220fd43 100644
--- a/src/devices/bus/c64/mikro_assembler.h
+++ b/src/devices/bus/c64/mikro_assembler.h
@@ -34,7 +34,7 @@ protected:
virtual void device_start() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/multiscreen.cpp b/src/devices/bus/c64/multiscreen.cpp
index 890c1a35799..e243a335e50 100644
--- a/src/devices/bus/c64/multiscreen.cpp
+++ b/src/devices/bus/c64/multiscreen.cpp
@@ -112,14 +112,13 @@ void c64_multiscreen_cartridge_device::multiscreen_mem(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_multiscreen_cartridge_device::device_add_mconfig(machine_config &config)
-{
- m6802_cpu_device &cpu(M6802(config, MC6802P_TAG, XTAL(4'000'000)));
- cpu.set_addrmap(AS_PROGRAM, &c64_multiscreen_cartridge_device::multiscreen_mem);
+MACHINE_CONFIG_START(c64_multiscreen_cartridge_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(MC6802P_TAG, M6802, XTAL(4'000'000))
+ MCFG_DEVICE_PROGRAM_MAP(multiscreen_mem)
- PIA6821(config, MC6821P_0_TAG, 0);
- PIA6821(config, MC6821P_1_TAG, 0);
-}
+ MCFG_DEVICE_ADD(MC6821P_0_TAG, PIA6821, 0)
+ MCFG_DEVICE_ADD(MC6821P_1_TAG, PIA6821, 0)
+MACHINE_CONFIG_END
//**************************************************************************
@@ -162,7 +161,7 @@ void c64_multiscreen_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_multiscreen_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_multiscreen_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -199,7 +198,7 @@ uint8_t c64_multiscreen_cartridge_device::c64_cd_r(offs_t offset, uint8_t data,
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_multiscreen_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_multiscreen_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (offset >= 0x8000 && offset < 0xa000)
{
diff --git a/src/devices/bus/c64/multiscreen.h b/src/devices/bus/c64/multiscreen.h
index 619154d18c5..9d26edb723a 100644
--- a/src/devices/bus/c64/multiscreen.h
+++ b/src/devices/bus/c64/multiscreen.h
@@ -41,8 +41,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/music64.cpp b/src/devices/bus/c64/music64.cpp
index 9e31a26c62b..7042774ec5d 100644
--- a/src/devices/bus/c64/music64.cpp
+++ b/src/devices/bus/c64/music64.cpp
@@ -172,9 +172,9 @@ void c64_music64_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_music64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_music64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- data = m_exp->cd_r(offset, data, sphi2, ba, roml, romh, io1, io2);
+ data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
if (!io2)
{
@@ -194,9 +194,9 @@ uint8_t c64_music64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_music64_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_music64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- m_exp->cd_w(offset, data, sphi2, ba, roml, romh, io1, io2);
+ m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
}
diff --git a/src/devices/bus/c64/music64.h b/src/devices/bus/c64/music64.h
index cf494c481b8..c9ae5414ac9 100644
--- a/src/devices/bus/c64/music64.h
+++ b/src/devices/bus/c64/music64.h
@@ -38,8 +38,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override;
diff --git a/src/devices/bus/c64/neoram.cpp b/src/devices/bus/c64/neoram.cpp
index 4cb34cbbb57..a2576cebeeb 100644
--- a/src/devices/bus/c64/neoram.cpp
+++ b/src/devices/bus/c64/neoram.cpp
@@ -64,7 +64,7 @@ void c64_neoram_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_neoram_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_neoram_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -80,7 +80,7 @@ uint8_t c64_neoram_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int s
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_neoram_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_neoram_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/neoram.h b/src/devices/bus/c64/neoram.h
index d5058b878b7..e75a76cd088 100644
--- a/src/devices/bus/c64/neoram.h
+++ b/src/devices/bus/c64/neoram.h
@@ -41,8 +41,8 @@ protected:
virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } }
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint16_t m_bank;
diff --git a/src/devices/bus/c64/ocean.cpp b/src/devices/bus/c64/ocean.cpp
index 92b18de6a51..6f4fecda52f 100644
--- a/src/devices/bus/c64/ocean.cpp
+++ b/src/devices/bus/c64/ocean.cpp
@@ -82,7 +82,7 @@ void c64_ocean_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_ocean_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_ocean_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml && m_roml.bytes())
{
@@ -107,7 +107,7 @@ uint8_t c64_ocean_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sp
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_ocean_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_ocean_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/ocean.h b/src/devices/bus/c64/ocean.h
index 9a78f5e21f9..1af2101b3fa 100644
--- a/src/devices/bus/c64/ocean.h
+++ b/src/devices/bus/c64/ocean.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/pagefox.cpp b/src/devices/bus/c64/pagefox.cpp
index 80264aab13b..975f64d5408 100644
--- a/src/devices/bus/c64/pagefox.cpp
+++ b/src/devices/bus/c64/pagefox.cpp
@@ -85,7 +85,7 @@ void c64_pagefox_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_pagefox_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_pagefox_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh)
{
@@ -110,7 +110,7 @@ uint8_t c64_pagefox_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_pagefox_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_pagefox_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (offset >= 0x8000 && offset < 0xc000)
{
diff --git a/src/devices/bus/c64/pagefox.h b/src/devices/bus/c64/pagefox.h
index 74ed5a4edf0..25eedac9eb0 100644
--- a/src/devices/bus/c64/pagefox.h
+++ b/src/devices/bus/c64/pagefox.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
optional_shared_ptr<uint8_t> m_ram;
diff --git a/src/devices/bus/c64/partner.cpp b/src/devices/bus/c64/partner.cpp
index 55e4d07f3e1..9f198bc1220 100644
--- a/src/devices/bus/c64/partner.cpp
+++ b/src/devices/bus/c64/partner.cpp
@@ -120,7 +120,7 @@ void c64_partner_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_partner_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_partner_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -154,7 +154,7 @@ uint8_t c64_partner_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_partner_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_partner_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/partner.h b/src/devices/bus/c64/partner.h
index 6ecf4503a91..cfd82208a8b 100644
--- a/src/devices/bus/c64/partner.h
+++ b/src/devices/bus/c64/partner.h
@@ -39,8 +39,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
private:
diff --git a/src/devices/bus/c64/prophet64.cpp b/src/devices/bus/c64/prophet64.cpp
index ea5e16a3000..3b84ea81a5d 100644
--- a/src/devices/bus/c64/prophet64.cpp
+++ b/src/devices/bus/c64/prophet64.cpp
@@ -61,7 +61,7 @@ void c64_prophet64_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_prophet64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_prophet64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -77,7 +77,7 @@ uint8_t c64_prophet64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_prophet64_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_prophet64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2)
{
diff --git a/src/devices/bus/c64/prophet64.h b/src/devices/bus/c64/prophet64.h
index f58ba30b7b7..af7b1c32544 100644
--- a/src/devices/bus/c64/prophet64.h
+++ b/src/devices/bus/c64/prophet64.h
@@ -34,8 +34,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/ps64.cpp b/src/devices/bus/c64/ps64.cpp
index c14008b2c08..b70c8a61c0f 100644
--- a/src/devices/bus/c64/ps64.cpp
+++ b/src/devices/bus/c64/ps64.cpp
@@ -61,14 +61,25 @@ DEFINE_DEVICE_TYPE(C64_PS64, c64_ps64_cartridge_device, "c64_ps64", "C64 PS-64")
//-------------------------------------------------
+// votrax_sc02_interface votrax_intf
+//-------------------------------------------------
+/*
+static struct votrax_sc02_interface votrax_intf =
+{
+ DEVCB_NOOP
+};
+*/
+
+
+//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_ps64_cartridge_device::device_add_mconfig(machine_config &config)
-{
- //SPEAKER(config, "speaker").front_center();
- //VOTRAX_SC02(config, SSI263_TAG, 2000000).add_route(ALL_OUTPUTS, "mono", 1.00);
-}
+MACHINE_CONFIG_START(c64_ps64_cartridge_device::device_add_mconfig)
+ //MCFG_SPEAKER_STANDARD_MONO("mono")
+ //MCFG_VOTRAX_SC02_ADD(SSI263_TAG, 2000000, votrax_intf)
+ //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+MACHINE_CONFIG_END
@@ -109,7 +120,7 @@ void c64_ps64_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_ps64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -128,7 +139,7 @@ uint8_t c64_ps64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sph
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_ps64_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_ps64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/ps64.h b/src/devices/bus/c64/ps64.h
index 69a9c5b0110..4d75432d51a 100644
--- a/src/devices/bus/c64/ps64.h
+++ b/src/devices/bus/c64/ps64.h
@@ -39,8 +39,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/reu.cpp b/src/devices/bus/c64/reu.cpp
index 332ac53f8a8..b7ab238e47e 100644
--- a/src/devices/bus/c64/reu.cpp
+++ b/src/devices/bus/c64/reu.cpp
@@ -31,12 +31,12 @@ DEFINE_DEVICE_TYPE(C64_REU1764, c64_reu1764_cartridge_device, "c64_1764reu", "17
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_reu_cartridge_device::device_add_mconfig(machine_config &config)
-{
- MOS8726(config, m_dmac, 1000000); // dummy clock
+MACHINE_CONFIG_START(c64_reu_cartridge_device::device_add_mconfig)
+ MCFG_MOS8726_ADD(MOS8726R1_TAG)
- GENERIC_SOCKET(config, m_eprom, generic_linear_slot, nullptr, "bin,rom");
-}
+ MCFG_GENERIC_SOCKET_ADD("rom", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+MACHINE_CONFIG_END
@@ -99,15 +99,15 @@ void c64_reu_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_reu_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_reu_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!m_dmac->romsel_r(roml, romh))
{
- data = m_eprom->read_rom(offset & 0x7fff);
+ data = m_eprom->read_rom(space, offset & 0x7fff);
}
else if (!io2)
{
- data = m_dmac->read(offset);
+ data = m_dmac->read(space, offset);
}
return data;
@@ -118,10 +118,10 @@ uint8_t c64_reu_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_reu_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_reu_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2)
{
- m_dmac->write(offset, data);
+ m_dmac->write(space, offset, data);
}
}
diff --git a/src/devices/bus/c64/reu.h b/src/devices/bus/c64/reu.h
index 0cbb67d9576..dd8b9e32d5f 100644
--- a/src/devices/bus/c64/reu.h
+++ b/src/devices/bus/c64/reu.h
@@ -47,8 +47,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
required_device<mos8726_device> m_dmac;
required_device<generic_slot_device> m_eprom;
diff --git a/src/devices/bus/c64/rex.cpp b/src/devices/bus/c64/rex.cpp
index 97fecd740af..73bcdaf453a 100644
--- a/src/devices/bus/c64/rex.cpp
+++ b/src/devices/bus/c64/rex.cpp
@@ -57,7 +57,7 @@ void c64_rex_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_rex_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_rex_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
diff --git a/src/devices/bus/c64/rex.h b/src/devices/bus/c64/rex.h
index cc0cccb52da..42d565971ed 100644
--- a/src/devices/bus/c64/rex.h
+++ b/src/devices/bus/c64/rex.h
@@ -35,7 +35,7 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/rex_ep256.cpp b/src/devices/bus/c64/rex_ep256.cpp
index da1f7b601b7..67f1ce015b9 100644
--- a/src/devices/bus/c64/rex_ep256.cpp
+++ b/src/devices/bus/c64/rex_ep256.cpp
@@ -22,17 +22,24 @@ DEFINE_DEVICE_TYPE(C64_REX_EP256, c64_rex_ep256_cartridge_device, "rexexp256", "
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_rex_ep256_cartridge_device::device_add_mconfig(machine_config &config)
-{
- GENERIC_SOCKET(config, "rom1", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom2", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom3", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom4", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom5", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom6", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom7", generic_linear_slot, nullptr, "bin,rom");
- GENERIC_SOCKET(config, "rom8", generic_linear_slot, nullptr, "bin,rom");
-}
+MACHINE_CONFIG_START(c64_rex_ep256_cartridge_device::device_add_mconfig)
+ MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ MCFG_GENERIC_SOCKET_ADD("rom8", generic_linear_slot, nullptr)
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+MACHINE_CONFIG_END
@@ -87,7 +94,7 @@ void c64_rex_ep256_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_rex_ep256_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_rex_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -98,7 +105,7 @@ uint8_t c64_rex_ep256_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
else
{
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
- data = m_eproms[m_socket]->read_rom(addr);
+ data = m_eproms[m_socket]->read_rom(space, addr);
}
}
else if (!io2)
@@ -121,7 +128,7 @@ uint8_t c64_rex_ep256_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_rex_ep256_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_rex_ep256_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2 && ((offset & 0xf0) == 0xa0))
{
diff --git a/src/devices/bus/c64/rex_ep256.h b/src/devices/bus/c64/rex_ep256.h
index 06f4a4325d5..536929d8cdb 100644
--- a/src/devices/bus/c64/rex_ep256.h
+++ b/src/devices/bus/c64/rex_ep256.h
@@ -40,8 +40,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
generic_slot_device *m_eproms[8];
diff --git a/src/devices/bus/c64/ross.cpp b/src/devices/bus/c64/ross.cpp
index 25c1a996df8..827f98f9401 100644
--- a/src/devices/bus/c64/ross.cpp
+++ b/src/devices/bus/c64/ross.cpp
@@ -62,7 +62,7 @@ void c64_ross_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_ross_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_ross_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh)
{
@@ -79,7 +79,7 @@ uint8_t c64_ross_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sph
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_ross_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_ross_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/ross.h b/src/devices/bus/c64/ross.h
index 97f2698fb6c..c36e616948d 100644
--- a/src/devices/bus/c64/ross.h
+++ b/src/devices/bus/c64/ross.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/sfx_sound_expander.cpp b/src/devices/bus/c64/sfx_sound_expander.cpp
index 71229014c46..bf55a2994df 100644
--- a/src/devices/bus/c64/sfx_sound_expander.cpp
+++ b/src/devices/bus/c64/sfx_sound_expander.cpp
@@ -206,9 +206,9 @@ void c64_sfx_sound_expander_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_sfx_sound_expander_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- data = m_exp->cd_r(get_offset(offset, 1), data, sphi2, ba, roml, romh, io1, io2);
+ data = m_exp->cd_r(space, get_offset(offset, 1), data, sphi2, ba, roml, romh, io1, io2);
if (!io2 && sphi2)
{
@@ -219,7 +219,7 @@ uint8_t c64_sfx_sound_expander_cartridge_device::c64_cd_r(offs_t offset, uint8_t
if (BIT(offset, 5))
{
- data = m_opl->read(BIT(offset, 4));
+ data = m_opl->read(space, BIT(offset, 4));
}
}
@@ -231,14 +231,14 @@ uint8_t c64_sfx_sound_expander_cartridge_device::c64_cd_r(offs_t offset, uint8_t
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_sfx_sound_expander_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_sfx_sound_expander_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2 && sphi2)
{
- m_opl->write(BIT(offset, 4), data);
+ m_opl->write(space, BIT(offset, 4), data);
}
- m_exp->cd_w(get_offset(offset, 0), data, sphi2, ba, roml, romh, io1, io2);
+ m_exp->cd_w(space, get_offset(offset, 0), data, sphi2, ba, roml, romh, io1, io2);
}
diff --git a/src/devices/bus/c64/sfx_sound_expander.h b/src/devices/bus/c64/sfx_sound_expander.h
index 9380e055c18..eb402bf1e54 100644
--- a/src/devices/bus/c64/sfx_sound_expander.h
+++ b/src/devices/bus/c64/sfx_sound_expander.h
@@ -39,8 +39,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override;
diff --git a/src/devices/bus/c64/silverrock.cpp b/src/devices/bus/c64/silverrock.cpp
index f52efc569b6..a34f21d17a7 100644
--- a/src/devices/bus/c64/silverrock.cpp
+++ b/src/devices/bus/c64/silverrock.cpp
@@ -92,7 +92,7 @@ void c64_silverrock_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_silverrock_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_silverrock_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -109,7 +109,7 @@ uint8_t c64_silverrock_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, i
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_silverrock_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_silverrock_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/silverrock.h b/src/devices/bus/c64/silverrock.h
index 3d9c4e015f2..4bd33a4db71 100644
--- a/src/devices/bus/c64/silverrock.h
+++ b/src/devices/bus/c64/silverrock.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/simons_basic.cpp b/src/devices/bus/c64/simons_basic.cpp
index 246e67b8b56..043d43531c0 100644
--- a/src/devices/bus/c64/simons_basic.cpp
+++ b/src/devices/bus/c64/simons_basic.cpp
@@ -57,7 +57,7 @@ void c64_simons_basic_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_simons_basic_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_simons_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -76,7 +76,7 @@ uint8_t c64_simons_basic_cartridge_device::c64_cd_r(offs_t offset, uint8_t data,
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_simons_basic_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_simons_basic_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/simons_basic.h b/src/devices/bus/c64/simons_basic.h
index 63d2dfb5cb9..9f9cd5a1636 100644
--- a/src/devices/bus/c64/simons_basic.h
+++ b/src/devices/bus/c64/simons_basic.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/speakeasy.cpp b/src/devices/bus/c64/speakeasy.cpp
index 23caee3488f..09427458fe7 100644
--- a/src/devices/bus/c64/speakeasy.cpp
+++ b/src/devices/bus/c64/speakeasy.cpp
@@ -31,12 +31,12 @@ DEFINE_DEVICE_TYPE(C64_SPEAKEASY, c64_speakeasy_cartridge_device, "c64_speakeasy
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_speakeasy_cartridge_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(c64_speakeasy_cartridge_device::device_add_mconfig)
SPEAKER(config, "mono").front_center();
- VOTRAX_SC01(config, m_votrax, 720000).add_route(ALL_OUTPUTS, "mono", 0.85);
-}
+ MCFG_DEVICE_ADD(SC01A_TAG, VOTRAX_SC01, 720000)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.85)
+MACHINE_CONFIG_END
@@ -69,7 +69,7 @@ void c64_speakeasy_cartridge_device::device_start()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_speakeasy_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_speakeasy_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
@@ -84,11 +84,11 @@ uint8_t c64_speakeasy_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_speakeasy_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_speakeasy_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
- m_votrax->write(data & 0x3f);
- m_votrax->inflection_w(data >> 6);
+ m_votrax->write(space, 0, data & 0x3f);
+ m_votrax->inflection_w(space, 0, data >> 6);
}
}
diff --git a/src/devices/bus/c64/speakeasy.h b/src/devices/bus/c64/speakeasy.h
index 0816e4caa2e..8c8ecdc9403 100644
--- a/src/devices/bus/c64/speakeasy.h
+++ b/src/devices/bus/c64/speakeasy.h
@@ -36,8 +36,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
required_device<votrax_sc01_device> m_votrax;
diff --git a/src/devices/bus/c64/stardos.cpp b/src/devices/bus/c64/stardos.cpp
index 601ada2778c..c8e47d300e8 100644
--- a/src/devices/bus/c64/stardos.cpp
+++ b/src/devices/bus/c64/stardos.cpp
@@ -138,7 +138,7 @@ void c64_stardos_cartridge_device::device_start()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_stardos_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_stardos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh)
{
@@ -162,7 +162,7 @@ uint8_t c64_stardos_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_stardos_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_stardos_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/stardos.h b/src/devices/bus/c64/stardos.h
index 9be9f599957..d9c8699a991 100644
--- a/src/devices/bus/c64/stardos.h
+++ b/src/devices/bus/c64/stardos.h
@@ -38,8 +38,8 @@ protected:
virtual void device_start() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override;
diff --git a/src/devices/bus/c64/std.cpp b/src/devices/bus/c64/std.cpp
index 08f4c1d65e0..fac9d021696 100644
--- a/src/devices/bus/c64/std.cpp
+++ b/src/devices/bus/c64/std.cpp
@@ -47,7 +47,7 @@ void c64_standard_cartridge_device::device_start()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_standard_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_standard_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml && m_roml.bytes())
{
diff --git a/src/devices/bus/c64/std.h b/src/devices/bus/c64/std.h
index 391e9ac973f..8a2599fe7bd 100644
--- a/src/devices/bus/c64/std.h
+++ b/src/devices/bus/c64/std.h
@@ -34,7 +34,7 @@ protected:
virtual void device_start() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/structured_basic.cpp b/src/devices/bus/c64/structured_basic.cpp
index e7773c772c0..2f968643b7d 100644
--- a/src/devices/bus/c64/structured_basic.cpp
+++ b/src/devices/bus/c64/structured_basic.cpp
@@ -62,7 +62,7 @@ void c64_structured_basic_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_structured_basic_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_structured_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -79,7 +79,7 @@ uint8_t c64_structured_basic_cartridge_device::c64_cd_r(offs_t offset, uint8_t d
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_structured_basic_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_structured_basic_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/structured_basic.h b/src/devices/bus/c64/structured_basic.h
index 44d370cdb3f..7b36402dcf5 100644
--- a/src/devices/bus/c64/structured_basic.h
+++ b/src/devices/bus/c64/structured_basic.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/super_explode.cpp b/src/devices/bus/c64/super_explode.cpp
index 4ed2456bd2a..88e7a9b48ab 100644
--- a/src/devices/bus/c64/super_explode.cpp
+++ b/src/devices/bus/c64/super_explode.cpp
@@ -85,7 +85,7 @@ void c64_super_explode_cartridge_device::device_timer(emu_timer &timer, device_t
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_super_explode_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_super_explode_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -112,7 +112,7 @@ uint8_t c64_super_explode_cartridge_device::c64_cd_r(offs_t offset, uint8_t data
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_super_explode_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_super_explode_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/super_explode.h b/src/devices/bus/c64/super_explode.h
index ca3abdeebf5..74edade0e6e 100644
--- a/src/devices/bus/c64/super_explode.h
+++ b/src/devices/bus/c64/super_explode.h
@@ -36,8 +36,8 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/super_games.cpp b/src/devices/bus/c64/super_games.cpp
index 610861c360e..7a58d29cd57 100644
--- a/src/devices/bus/c64/super_games.cpp
+++ b/src/devices/bus/c64/super_games.cpp
@@ -60,7 +60,7 @@ void c64_super_games_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_super_games_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_super_games_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh)
{
@@ -76,7 +76,7 @@ uint8_t c64_super_games_cartridge_device::c64_cd_r(offs_t offset, uint8_t data,
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_super_games_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_super_games_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2)
{
diff --git a/src/devices/bus/c64/super_games.h b/src/devices/bus/c64/super_games.h
index 11e4b44046a..64a50f9e240 100644
--- a/src/devices/bus/c64/super_games.h
+++ b/src/devices/bus/c64/super_games.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/supercpu.cpp b/src/devices/bus/c64/supercpu.cpp
index 4e48d77c35c..a517eecb016 100644
--- a/src/devices/bus/c64/supercpu.cpp
+++ b/src/devices/bus/c64/supercpu.cpp
@@ -144,9 +144,9 @@ void c64_supercpu_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_supercpu_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_supercpu_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- data = m_exp->cd_r(offset, data, sphi2, ba, roml, romh, io1, io2);
+ data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
switch (offset)
{
@@ -198,7 +198,7 @@ uint8_t c64_supercpu_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, in
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_supercpu_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_supercpu_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
switch (offset)
{
@@ -275,7 +275,7 @@ void c64_supercpu_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int b
break;
}
- m_exp->cd_w(offset, data, sphi2, ba, roml, romh, io1, io2);
+ m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
}
diff --git a/src/devices/bus/c64/supercpu.h b/src/devices/bus/c64/supercpu.h
index 73982328c31..006449400c1 100644
--- a/src/devices/bus/c64/supercpu.h
+++ b/src/devices/bus/c64/supercpu.h
@@ -40,8 +40,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override;
diff --git a/src/devices/bus/c64/sw8k.cpp b/src/devices/bus/c64/sw8k.cpp
index 2f55b223797..ff0e3310101 100644
--- a/src/devices/bus/c64/sw8k.cpp
+++ b/src/devices/bus/c64/sw8k.cpp
@@ -103,7 +103,7 @@ void c64_switchable_8k_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_switchable_8k_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_switchable_8k_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
diff --git a/src/devices/bus/c64/sw8k.h b/src/devices/bus/c64/sw8k.h
index 186e96792d6..94bcb17b5a3 100644
--- a/src/devices/bus/c64/sw8k.h
+++ b/src/devices/bus/c64/sw8k.h
@@ -38,7 +38,7 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
required_ioport m_sw;
diff --git a/src/devices/bus/c64/swiftlink.cpp b/src/devices/bus/c64/swiftlink.cpp
index 3855da85ca3..3f807fb13dc 100644
--- a/src/devices/bus/c64/swiftlink.cpp
+++ b/src/devices/bus/c64/swiftlink.cpp
@@ -126,12 +126,12 @@ void c64_swiftlink_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_swiftlink_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_swiftlink_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (((m_cs == DE00) && !io1) || ((m_cs == DF00) && !io2) ||
((m_cs == D700) && ((offset & 0xff00) == 0xd700)))
{
- data = m_acia->read(offset & 0x03);
+ data = m_acia->read(space, offset & 0x03);
}
return data;
@@ -142,12 +142,12 @@ uint8_t c64_swiftlink_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, in
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_swiftlink_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_swiftlink_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (((m_cs == DE00) && !io1) || ((m_cs == DF00) && !io2) ||
((m_cs == D700) && ((offset & 0xff00) == 0xd700)))
{
- m_acia->write(offset & 0x03, data);
+ m_acia->write(space, offset & 0x03, data);
}
}
diff --git a/src/devices/bus/c64/swiftlink.h b/src/devices/bus/c64/swiftlink.h
index 409cfafa33a..0c1f577bafe 100644
--- a/src/devices/bus/c64/swiftlink.h
+++ b/src/devices/bus/c64/swiftlink.h
@@ -41,8 +41,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
diff --git a/src/devices/bus/c64/system3.cpp b/src/devices/bus/c64/system3.cpp
index f02ef692b3b..7a1fd54ab3e 100644
--- a/src/devices/bus/c64/system3.cpp
+++ b/src/devices/bus/c64/system3.cpp
@@ -60,7 +60,7 @@ void c64_system3_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_system3_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_system3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
@@ -82,7 +82,7 @@ uint8_t c64_system3_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_system3_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_system3_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/system3.h b/src/devices/bus/c64/system3.h
index 024798fc77e..ff5ed78b53d 100644
--- a/src/devices/bus/c64/system3.h
+++ b/src/devices/bus/c64/system3.h
@@ -35,8 +35,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
uint8_t m_bank;
diff --git a/src/devices/bus/c64/tdos.cpp b/src/devices/bus/c64/tdos.cpp
index b52b61f57a4..a814ccc26a8 100644
--- a/src/devices/bus/c64/tdos.cpp
+++ b/src/devices/bus/c64/tdos.cpp
@@ -230,9 +230,9 @@ void c64_tdos_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_tdos_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_tdos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- data = m_exp->cd_r(offset, data, sphi2, ba, roml, romh, io1, io2);
+ data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
if (m_enabled && !roml)
{
@@ -244,7 +244,7 @@ uint8_t c64_tdos_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sph
switch ((offset >> 1) & 0x7f)
{
case 0:
- data = m_ssda->read(offset & 0x01);
+ data = m_ssda->read(space, offset & 0x01);
break;
case 1:
@@ -277,16 +277,16 @@ uint8_t c64_tdos_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sph
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_tdos_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_tdos_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- m_exp->cd_w(offset, data, sphi2, ba, roml, romh, io1, io2);
+ m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
if (m_enabled && !io2 && sphi2)
{
switch ((offset >> 1) & 0x7f)
{
case 0:
- m_ssda->write(offset & 0x01, data);
+ m_ssda->write(space, offset & 0x01, data);
break;
case 1:
diff --git a/src/devices/bus/c64/tdos.h b/src/devices/bus/c64/tdos.h
index 49c1b07651c..adf2bf874b5 100644
--- a/src/devices/bus/c64/tdos.h
+++ b/src/devices/bus/c64/tdos.h
@@ -39,8 +39,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override;
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override;
diff --git a/src/devices/bus/c64/turbo232.cpp b/src/devices/bus/c64/turbo232.cpp
index f9113bed1c5..4c6e5f1ebdb 100644
--- a/src/devices/bus/c64/turbo232.cpp
+++ b/src/devices/bus/c64/turbo232.cpp
@@ -128,7 +128,7 @@ void c64_turbo232_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_turbo232_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_turbo232_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (((m_cs == DE00) && !io1) || ((m_cs == DF00) && !io2) ||
((m_cs == D700) && ((offset & 0xff00) == 0xd700)))
@@ -138,7 +138,7 @@ uint8_t c64_turbo232_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
switch (offset & 0x07)
{
case 0: case 1: case 2: case 3:
- data = m_acia->read(offset & 0x03);
+ data = m_acia->read(space, offset & 0x03);
break;
case 7:
@@ -155,7 +155,7 @@ uint8_t c64_turbo232_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_turbo232_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_turbo232_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (((m_cs == DE00) && !io1) || ((m_cs == DF00) && !io2) ||
((m_cs == D700) && ((offset & 0xff00) == 0xd700)))
@@ -165,11 +165,11 @@ void c64_turbo232_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sp
switch (offset & 0x07)
{
case 0: case 1: case 2:
- m_acia->write(offset & 0x03, data);
+ m_acia->write(space, offset & 0x03, data);
break;
case 3:
- m_acia->write(offset & 0x03, data);
+ m_acia->write(space, offset & 0x03, data);
if (data & 0x0f)
m_es &= ~ES_M;
diff --git a/src/devices/bus/c64/turbo232.h b/src/devices/bus/c64/turbo232.h
index 4f5638f88fa..177e044307d 100644
--- a/src/devices/bus/c64/turbo232.h
+++ b/src/devices/bus/c64/turbo232.h
@@ -41,8 +41,8 @@ protected:
virtual ioport_constructor device_input_ports() const override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
diff --git a/src/devices/bus/c64/vizastar.cpp b/src/devices/bus/c64/vizastar.cpp
index 443c232bde7..444ff656b68 100644
--- a/src/devices/bus/c64/vizastar.cpp
+++ b/src/devices/bus/c64/vizastar.cpp
@@ -79,7 +79,7 @@ void c64_vizastar_cartridge_device::device_start()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_vizastar_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_vizastar_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
diff --git a/src/devices/bus/c64/vizastar.h b/src/devices/bus/c64/vizastar.h
index 26ec63cd46b..95453eb6e38 100644
--- a/src/devices/bus/c64/vizastar.h
+++ b/src/devices/bus/c64/vizastar.h
@@ -34,7 +34,7 @@ protected:
virtual void device_start() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/vw64.cpp b/src/devices/bus/c64/vw64.cpp
index bf4d584d40d..ea0d3c3dac2 100644
--- a/src/devices/bus/c64/vw64.cpp
+++ b/src/devices/bus/c64/vw64.cpp
@@ -111,7 +111,7 @@ void c64_vizawrite_cartridge_device::device_timer(emu_timer &timer, device_timer
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_vizawrite_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_vizawrite_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
diff --git a/src/devices/bus/c64/vw64.h b/src/devices/bus/c64/vw64.h
index 64287c0c785..abff81acb4b 100644
--- a/src/devices/bus/c64/vw64.h
+++ b/src/devices/bus/c64/vw64.h
@@ -36,7 +36,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override { return 0; }
private:
diff --git a/src/devices/bus/c64/warp_speed.cpp b/src/devices/bus/c64/warp_speed.cpp
index ff485c05277..3c266e3618d 100644
--- a/src/devices/bus/c64/warp_speed.cpp
+++ b/src/devices/bus/c64/warp_speed.cpp
@@ -117,7 +117,7 @@ void c64_warp_speed_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_warp_speed_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_warp_speed_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml || !romh || !io1 || !io2)
{
@@ -133,7 +133,7 @@ uint8_t c64_warp_speed_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, i
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_warp_speed_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_warp_speed_cartridge_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io1)
{
diff --git a/src/devices/bus/c64/warp_speed.h b/src/devices/bus/c64/warp_speed.h
index d5c61f50f49..7a3b25cecfc 100644
--- a/src/devices/bus/c64/warp_speed.h
+++ b/src/devices/bus/c64/warp_speed.h
@@ -38,8 +38,8 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/westermann.cpp b/src/devices/bus/c64/westermann.cpp
index ac254733f01..8cb86b39a1c 100644
--- a/src/devices/bus/c64/westermann.cpp
+++ b/src/devices/bus/c64/westermann.cpp
@@ -57,7 +57,7 @@ void c64_westermann_cartridge_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_westermann_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_westermann_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
diff --git a/src/devices/bus/c64/westermann.h b/src/devices/bus/c64/westermann.h
index 4b7b2e4389f..b9392c52f72 100644
--- a/src/devices/bus/c64/westermann.h
+++ b/src/devices/bus/c64/westermann.h
@@ -35,7 +35,7 @@ protected:
virtual void device_reset() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
};
diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp
index 8e09508e2a3..fbeacd759b3 100644
--- a/src/devices/bus/c64/xl80.cpp
+++ b/src/devices/bus/c64/xl80.cpp
@@ -123,15 +123,14 @@ GFXDECODE_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void c64_xl80_device::device_add_mconfig(machine_config &config)
-{
- screen_device &screen(SCREEN(config, MC6845_SCREEN_TAG, SCREEN_TYPE_RASTER, rgb_t::white()));
- screen.set_screen_update(HD46505SP_TAG, FUNC(h46505_device::screen_update));
- screen.set_size(80*8, 24*8);
- screen.set_visarea(0, 80*8-1, 0, 24*8-1);
- screen.set_refresh_hz(50);
-
- GFXDECODE(config, "gfxdecode", m_palette, gfx_c64_xl80);
+MACHINE_CONFIG_START(c64_xl80_device::device_add_mconfig)
+ MCFG_SCREEN_ADD_MONOCHROME(MC6845_SCREEN_TAG, RASTER, rgb_t::white())
+ MCFG_SCREEN_UPDATE_DEVICE(HD46505SP_TAG, h46505_device, screen_update)
+ MCFG_SCREEN_SIZE(80*8, 24*8)
+ MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1)
+ MCFG_SCREEN_REFRESH_RATE(50)
+
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_c64_xl80)
PALETTE(config, m_palette, palette_device::MONOCHROME);
H46505(config, m_crtc, XTAL(14'318'181) / 8);
@@ -139,7 +138,7 @@ void c64_xl80_device::device_add_mconfig(machine_config &config)
m_crtc->set_show_border_area(true);
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(c64_xl80_device::crtc_update_row), this);
-}
+MACHINE_CONFIG_END
@@ -186,13 +185,13 @@ void c64_xl80_device::device_reset()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_xl80_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_xl80_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!io2 && BIT(offset, 2))
{
if (offset & 0x01)
{
- data = m_crtc->register_r();
+ data = m_crtc->register_r(space, 0);
}
}
else if (offset >= 0x8000 && offset < 0x9000)
@@ -212,7 +211,7 @@ uint8_t c64_xl80_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba
// c64_cd_w - cartridge data write
//-------------------------------------------------
-void c64_xl80_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+void c64_xl80_device::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (offset >= 0x9800 && offset < 0xa000)
{
@@ -222,11 +221,11 @@ void c64_xl80_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, i
{
if (offset & 0x01)
{
- m_crtc->register_w(data);
+ m_crtc->register_w(space, 0, data);
}
else
{
- m_crtc->address_w(data);
+ m_crtc->address_w(space, 0, data);
}
}
}
diff --git a/src/devices/bus/c64/xl80.h b/src/devices/bus/c64/xl80.h
index 82ebdee51d0..fe406af174b 100644
--- a/src/devices/bus/c64/xl80.h
+++ b/src/devices/bus/c64/xl80.h
@@ -41,8 +41,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
- virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override { return 1; }
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) override { return 0; }
diff --git a/src/devices/bus/c64/zaxxon.cpp b/src/devices/bus/c64/zaxxon.cpp
index d63b05da095..8de226cfb9d 100644
--- a/src/devices/bus/c64/zaxxon.cpp
+++ b/src/devices/bus/c64/zaxxon.cpp
@@ -50,7 +50,7 @@ void c64_zaxxon_cartridge_device::device_start()
// c64_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t c64_zaxxon_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+uint8_t c64_zaxxon_cartridge_device::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
if (!roml)
{
diff --git a/src/devices/bus/c64/zaxxon.h b/src/devices/bus/c64/zaxxon.h
index 8e47d4caff7..dafd293081f 100644
--- a/src/devices/bus/c64/zaxxon.h
+++ b/src/devices/bus/c64/zaxxon.h
@@ -34,7 +34,7 @@ protected:
virtual void device_start() override;
// device_c64_expansion_card_interface overrides
- virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
private:
int m_bank;