bus/a1bus, bus/a2bus, bus/acorn, bus/bbc: Simplify handler signatures (nw)

This commit is contained in:
AJR 2020-06-07 18:57:24 -04:00
parent cc3f16ec95
commit 29c7171702
30 changed files with 74 additions and 73 deletions

View File

@ -124,7 +124,7 @@ void a1bus_device::set_nmi_line(int state)
m_out_nmi_cb(state);
}
void a1bus_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
void a1bus_device::install_device(offs_t start, offs_t end, read8sm_delegate rhandler, write8sm_delegate whandler)
{
m_space->install_readwrite_handler(start, end, rhandler, whandler);
}
@ -190,7 +190,7 @@ void device_a1bus_card_interface::interface_pre_start()
m_a1bus->add_a1bus_card(this);
}
void device_a1bus_card_interface::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
void device_a1bus_card_interface::install_device(offs_t start, offs_t end, read8sm_delegate rhandler, write8sm_delegate whandler)
{
m_a1bus->install_device(start, end, rhandler, whandler);
}

View File

@ -68,7 +68,7 @@ public:
void set_irq_line(int state);
void set_nmi_line(int state);
void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
void install_device(offs_t start, offs_t end, read8sm_delegate rhandler, write8sm_delegate whandler);
void install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data);
DECLARE_WRITE_LINE_MEMBER( irq_w );
@ -117,7 +117,7 @@ protected:
void raise_slot_nmi() { m_a1bus->set_nmi_line(ASSERT_LINE); }
void lower_slot_nmi() { m_a1bus->set_nmi_line(CLEAR_LINE); }
void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
void install_device(offs_t start, offs_t end, read8sm_delegate rhandler, write8sm_delegate whandler);
void install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data);
device_a1bus_card_interface(const machine_config &mconfig, device_t &device);

View File

@ -72,7 +72,7 @@ a1bus_cassette_device::a1bus_cassette_device(const machine_config &mconfig, devi
void a1bus_cassette_device::device_start()
{
install_device(0xc000, 0xc0ff, read8_delegate(*this, FUNC(a1bus_cassette_device::cassette_r)), write8_delegate(*this, FUNC(a1bus_cassette_device::cassette_w)));
install_device(0xc000, 0xc0ff, read8sm_delegate(*this, FUNC(a1bus_cassette_device::cassette_r)), write8sm_delegate(*this, FUNC(a1bus_cassette_device::cassette_w)));
install_bank(0xc100, 0xc1ff, "bank_a1cas", &m_rom[0]);
save_item(NAME(m_cassette_output_flipflop));
@ -145,9 +145,10 @@ void a1bus_cassette_device::cassette_toggle_output()
m_cassette->output(m_cassette_output_flipflop ? 1.0 : -1.0);
}
READ8_MEMBER(a1bus_cassette_device::cassette_r)
uint8_t a1bus_cassette_device::cassette_r(offs_t offset)
{
cassette_toggle_output();
if (!machine().side_effects_disabled())
cassette_toggle_output();
if (offset <= 0x7f)
{
@ -180,7 +181,7 @@ READ8_MEMBER(a1bus_cassette_device::cassette_r)
}
}
WRITE8_MEMBER(a1bus_cassette_device::cassette_w)
void a1bus_cassette_device::cassette_w(offs_t offset, uint8_t data)
{
/* Writes toggle the output flip-flop in the same way that reads
do; other than that they have no effect. Any repeated accesses

View File

@ -28,8 +28,8 @@ public:
// construction/destruction
a1bus_cassette_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER(cassette_r);
DECLARE_WRITE8_MEMBER(cassette_w);
uint8_t cassette_r(offs_t offset);
void cassette_w(offs_t offset, uint8_t data);
protected:
a1bus_cassette_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);

View File

@ -68,7 +68,7 @@ a1bus_cffa_device::a1bus_cffa_device(const machine_config &mconfig, device_type
void a1bus_cffa_device::device_start()
{
install_device(0xafe0, 0xafff, read8_delegate(*this, FUNC(a1bus_cffa_device::cffa_r)), write8_delegate(*this, FUNC(a1bus_cffa_device::cffa_w)));
install_device(0xafe0, 0xafff, read8sm_delegate(*this, FUNC(a1bus_cffa_device::cffa_r)), write8sm_delegate(*this, FUNC(a1bus_cffa_device::cffa_w)));
install_bank(0x9000, 0xafdf, "bank_cffa1", &m_rom[0]);
save_item(NAME(m_lastdata));
@ -81,7 +81,7 @@ void a1bus_cffa_device::device_reset()
m_lastdata = 0;
}
READ8_MEMBER(a1bus_cffa_device::cffa_r)
uint8_t a1bus_cffa_device::cffa_r(offs_t offset)
{
switch (offset & 0xf)
{
@ -113,7 +113,7 @@ READ8_MEMBER(a1bus_cffa_device::cffa_r)
return 0xff;
}
WRITE8_MEMBER(a1bus_cffa_device::cffa_w)
void a1bus_cffa_device::cffa_w(offs_t offset, uint8_t data)
{
switch (offset & 0xf)
{

View File

@ -28,8 +28,8 @@ public:
// construction/destruction
a1bus_cffa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER(cffa_r);
DECLARE_WRITE8_MEMBER(cffa_w);
uint8_t cffa_r(offs_t offset);
void cffa_w(offs_t offset, uint8_t data);
protected:
a1bus_cffa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);

View File

@ -174,7 +174,7 @@ void a2bus_applicard_device::write_c0nx(uint8_t offset, uint8_t data)
}
}
READ8_MEMBER( a2bus_applicard_device::z80_io_r )
uint8_t a2bus_applicard_device::z80_io_r(offs_t offset)
{
uint8_t tmp = 0;
@ -204,7 +204,7 @@ READ8_MEMBER( a2bus_applicard_device::z80_io_r )
return 0xff;
}
WRITE8_MEMBER( a2bus_applicard_device::z80_io_w )
void a2bus_applicard_device::z80_io_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@ -230,7 +230,7 @@ WRITE8_MEMBER( a2bus_applicard_device::z80_io_w )
// dma_r -
//-------------------------------------------------
READ8_MEMBER( a2bus_applicard_device::dma_r )
uint8_t a2bus_applicard_device::dma_r(offs_t offset)
{
if (offset < 0x8000)
{
@ -256,7 +256,7 @@ READ8_MEMBER( a2bus_applicard_device::dma_r )
// dma_w -
//-------------------------------------------------
WRITE8_MEMBER( a2bus_applicard_device::dma_w )
void a2bus_applicard_device::dma_w(offs_t offset, uint8_t data)
{
if (offset < 0x8000)
{

View File

@ -27,8 +27,8 @@ public:
// construction/destruction
a2bus_applicard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( z80_io_r );
DECLARE_WRITE8_MEMBER( z80_io_w );
uint8_t z80_io_r(offs_t offset);
void z80_io_w(offs_t offset, uint8_t data);
protected:
a2bus_applicard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@ -51,8 +51,8 @@ private:
uint8_t m_z80ram[64*1024];
uint8_t *m_z80rom;
DECLARE_READ8_MEMBER( dma_r );
DECLARE_WRITE8_MEMBER( dma_w );
uint8_t dma_r(offs_t offset);
void dma_w(offs_t offset, uint8_t data);
void z80_io(address_map &map);
void z80_mem(address_map &map);

View File

@ -100,7 +100,7 @@ void a2bus_softcard_device::write_cnxx(uint8_t offset, uint8_t data)
}
}
READ8_MEMBER( a2bus_softcard_device::dma_r )
uint8_t a2bus_softcard_device::dma_r(offs_t offset)
{
if (m_bEnabled)
{
@ -138,7 +138,7 @@ READ8_MEMBER( a2bus_softcard_device::dma_r )
// dma_w -
//-------------------------------------------------
WRITE8_MEMBER( a2bus_softcard_device::dma_w )
void a2bus_softcard_device::dma_w(offs_t offset, uint8_t data)
{
if (m_bEnabled)
{

View File

@ -41,8 +41,8 @@ private:
bool m_bEnabled;
bool m_FirstZ80Boot;
DECLARE_READ8_MEMBER( dma_r );
DECLARE_WRITE8_MEMBER( dma_w );
uint8_t dma_r(offs_t offset);
void dma_w(offs_t offset, uint8_t data);
void z80_mem(address_map &map);
};

View File

@ -226,7 +226,7 @@ void a2bus_themill_device::write_c0nx(uint8_t offset, uint8_t data)
}
}
READ8_MEMBER( a2bus_themill_device::dma_r )
uint8_t a2bus_themill_device::dma_r(offs_t offset)
{
// MAME startup ordering has the 6809 free-running at boot, which is undesirable
if (!m_bEnabled)
@ -277,7 +277,7 @@ READ8_MEMBER( a2bus_themill_device::dma_r )
// dma_w -
//-------------------------------------------------
WRITE8_MEMBER( a2bus_themill_device::dma_w )
void a2bus_themill_device::dma_w(offs_t offset, uint8_t data)
{
if (m_6809Mode)
{

View File

@ -46,8 +46,8 @@ private:
bool m_6809Mode;
uint8_t m_status;
DECLARE_READ8_MEMBER( dma_r );
DECLARE_WRITE8_MEMBER( dma_w );
uint8_t dma_r(offs_t offset);
void dma_w(offs_t offset, uint8_t data);
void m6809_mem(address_map &map);
};

View File

@ -442,17 +442,17 @@ void a2bus_pcxporter_device::write_c800(uint16_t offset, uint8_t data)
}
}
READ16_MEMBER(a2bus_pcxporter_device::pc_bios_r)
uint16_t a2bus_pcxporter_device::pc_bios_r(offs_t offset)
{
return m_ram[offset+0xa0000] | (m_ram[offset+0xa0001]<<8);
}
READ8_MEMBER( a2bus_pcxporter_device::kbd_6502_r )
uint8_t a2bus_pcxporter_device::kbd_6502_r(offs_t offset)
{
return m_c800_ram[offset+0x60];
}
WRITE8_MEMBER( a2bus_pcxporter_device::kbd_6502_w )
void a2bus_pcxporter_device::kbd_6502_w(offs_t offset, uint8_t data)
{
m_c800_ram[offset+0x60] = data;
}
@ -463,7 +463,7 @@ WRITE8_MEMBER( a2bus_pcxporter_device::kbd_6502_w )
*
*************************************************************************/
WRITE8_MEMBER( a2bus_pcxporter_device::pc_page_w)
void a2bus_pcxporter_device::pc_page_w(offs_t offset, uint8_t data)
{
switch(offset % 4)
{
@ -630,7 +630,7 @@ WRITE_LINE_MEMBER( a2bus_pcxporter_device::keyboard_data_w )
*
**********************************************************/
WRITE8_MEMBER( a2bus_pcxporter_device::nmi_enable_w )
void a2bus_pcxporter_device::nmi_enable_w(uint8_t data)
{
m_nmi_enabled = BIT(data,7);
if (!m_nmi_enabled)

View File

@ -38,7 +38,7 @@ public:
// construction/destruction
a2bus_pcxporter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ16_MEMBER(pc_bios_r);
uint16_t pc_bios_r(offs_t offset);
protected:
a2bus_pcxporter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@ -106,13 +106,13 @@ private:
DECLARE_WRITE_LINE_MEMBER( pc_dack2_w );
DECLARE_WRITE_LINE_MEMBER( pc_dack3_w );
DECLARE_READ8_MEMBER( kbd_6502_r );
DECLARE_WRITE8_MEMBER( kbd_6502_w );
uint8_t kbd_6502_r(offs_t offset);
void kbd_6502_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata );
DECLARE_WRITE8_MEMBER(pc_page_w);
DECLARE_WRITE8_MEMBER(nmi_enable_w);
void pc_page_w(offs_t offset, uint8_t data);
void nmi_enable_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(iochck_w);
void pc_select_dma_channel(int channel, bool state);

View File

@ -210,7 +210,7 @@ void a2bus_transwarp_device::device_timer(emu_timer &timer, device_timer_id id,
m_timer->adjust(attotime::never);
}
READ8_MEMBER( a2bus_transwarp_device::dma_r )
uint8_t a2bus_transwarp_device::dma_r(offs_t offset)
{
if (offset == 0xc070)
{
@ -235,7 +235,7 @@ READ8_MEMBER( a2bus_transwarp_device::dma_r )
// dma_w -
//-------------------------------------------------
WRITE8_MEMBER( a2bus_transwarp_device::dma_w )
void a2bus_transwarp_device::dma_w(offs_t offset, uint8_t data)
{
//if ((offset >= 0xc070) && (offset <= 0xc07f)) printf("%02x to %04x\n", data, offset);

View File

@ -49,8 +49,8 @@ private:
required_region_ptr<uint8_t> m_rom;
required_ioport m_dsw1, m_dsw2;
DECLARE_READ8_MEMBER( dma_r );
DECLARE_WRITE8_MEMBER( dma_w );
uint8_t dma_r(offs_t offset);
void dma_w(offs_t offset, uint8_t data);
void m65c02_mem(address_map &map);

View File

@ -64,14 +64,14 @@ void atom_econet_device::device_start()
address_space &space = m_bus->memspace();
space.install_readwrite_handler(0xb400, 0xb403, read8sm_delegate(*m_adlc, FUNC(mc6854_device::read)), write8sm_delegate(*m_adlc, FUNC(mc6854_device::write)));
space.install_read_handler(0xb404, 0xb404, read8_delegate(*this, FUNC(atom_econet_device::statid_r)));
space.install_read_handler(0xb404, 0xb404, read8smo_delegate(*this, FUNC(atom_econet_device::statid_r)));
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
READ8_MEMBER(atom_econet_device::statid_r)
uint8_t atom_econet_device::statid_r()
{
return 0xfe;
}

View File

@ -36,7 +36,7 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
private:
DECLARE_READ8_MEMBER(statid_r);
uint8_t statid_r();
DECLARE_WRITE_LINE_MEMBER(bus_irq_w);
required_device<mc6854_device> m_adlc;

View File

@ -71,7 +71,7 @@ void cms_fdc_device::device_start()
{
address_space &space = m_bus->memspace();
space.install_readwrite_handler(0xfc50, 0xfc5f, read8_delegate(*this, FUNC(cms_fdc_device::wd1770_state_r)), write8_delegate(*this, FUNC(cms_fdc_device::wd1770_control_w)));
space.install_readwrite_handler(0xfc50, 0xfc5f, read8smo_delegate(*this, FUNC(cms_fdc_device::wd1770_state_r)), write8smo_delegate(*this, FUNC(cms_fdc_device::wd1770_control_w)));
space.install_readwrite_handler(0xfc40, 0xfc4f, read8sm_delegate(*m_fdc, FUNC(wd1770_device::read)), write8sm_delegate(*m_fdc, FUNC(wd1770_device::write)));
}
@ -80,7 +80,7 @@ void cms_fdc_device::device_start()
// IMPLEMENTATION
//**************************************************************************
READ8_MEMBER(cms_fdc_device::wd1770_state_r)
uint8_t cms_fdc_device::wd1770_state_r()
{
uint8_t data = 0x3f;
@ -90,7 +90,7 @@ READ8_MEMBER(cms_fdc_device::wd1770_state_r)
return data;
}
WRITE8_MEMBER(cms_fdc_device::wd1770_control_w)
void cms_fdc_device::wd1770_control_w(uint8_t data)
{
floppy_image_device *floppy = nullptr;

View File

@ -39,8 +39,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
private:
DECLARE_READ8_MEMBER(wd1770_state_r);
DECLARE_WRITE8_MEMBER(wd1770_control_w);
uint8_t wd1770_state_r();
void wd1770_control_w(uint8_t data);
required_device<wd_fdc_device_base> m_fdc;
required_device_array<floppy_connector, 3> m_floppy;

View File

@ -72,7 +72,7 @@ void cms_hires_device::device_start()
address_space &space = m_bus->memspace();
space.install_readwrite_handler(0xfc10, 0xfc1f, read8sm_delegate(*m_gdp, FUNC(ef9365_device::data_r)), write8sm_delegate(*m_gdp, FUNC(ef9365_device::data_w)));
space.install_write_handler(0xfc20, 0xfc2f, write8_delegate(*this, FUNC(cms_hires_device::colour_reg_w)));
space.install_write_handler(0xfc20, 0xfc2f, write8smo_delegate(*this, FUNC(cms_hires_device::colour_reg_w)));
save_item(NAME(m_flash_state));
}
@ -109,7 +109,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cms_hires_device::flash_rate)
}
}
WRITE8_MEMBER(cms_hires_device::colour_reg_w)
void cms_hires_device::colour_reg_w(uint8_t data)
{
m_gdp->set_color_filler(data & 0x0f);
}

View File

@ -38,7 +38,7 @@ protected:
private:
TIMER_DEVICE_CALLBACK_MEMBER(flash_rate);
DECLARE_WRITE8_MEMBER(colour_reg_w);
void colour_reg_w(uint8_t data);
required_device<screen_device> m_screen;
required_device<ef9365_device> m_gdp;

View File

@ -71,14 +71,14 @@ void acorn_econet_device::device_reset()
address_space &space = m_bus->memspace();
space.install_readwrite_handler(0x1940, 0x1943, read8sm_delegate(*m_adlc, FUNC(mc6854_device::read)), write8sm_delegate(*m_adlc, FUNC(mc6854_device::write)));
space.install_read_handler(0x1944, 0x1944, read8_delegate(*this, FUNC(acorn_econet_device::statid_r)));
space.install_read_handler(0x1944, 0x1944, read8smo_delegate(*this, FUNC(acorn_econet_device::statid_r)));
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
READ8_MEMBER(acorn_econet_device::statid_r)
uint8_t acorn_econet_device::statid_r()
{
return 0xfe;
}

View File

@ -39,7 +39,7 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
private:
DECLARE_READ8_MEMBER(statid_r);
uint8_t statid_r();
DECLARE_WRITE_LINE_MEMBER(bus_irq_w);
required_device<mc6854_device> m_adlc;

View File

@ -162,7 +162,7 @@ void bbc_multiform_device::fred_w(offs_t offset, uint8_t data)
}
}
READ8_MEMBER(bbc_multiform_device::mem_r)
uint8_t bbc_multiform_device::mem_r(offs_t offset)
{
uint8_t data;
@ -174,12 +174,12 @@ READ8_MEMBER(bbc_multiform_device::mem_r)
return data;
}
WRITE8_MEMBER(bbc_multiform_device::mem_w)
void bbc_multiform_device::mem_w(offs_t offset, uint8_t data)
{
m_ram[offset] = data;
}
WRITE8_MEMBER(bbc_multiform_device::rom_disable_w)
void bbc_multiform_device::rom_disable_w(uint8_t data)
{
if (!machine().side_effects_disabled())
m_rom_enabled = false;

View File

@ -30,9 +30,9 @@ public:
// construction/destruction
bbc_multiform_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( mem_r );
DECLARE_WRITE8_MEMBER( mem_w );
DECLARE_WRITE8_MEMBER( rom_disable_w );
uint8_t mem_r(offs_t offset);
void mem_w(offs_t offset, uint8_t data);
void rom_disable_w(uint8_t data);
protected:
// device-level overrides

View File

@ -207,7 +207,7 @@ void bbc_cumana68k_device::fsel_w(offs_t offset, uint8_t data)
}
READ8_MEMBER(bbc_cumana68k_device::mem6502_r)
uint8_t bbc_cumana68k_device::mem6502_r(offs_t offset)
{
uint8_t data = 0xff;
@ -228,7 +228,7 @@ READ8_MEMBER(bbc_cumana68k_device::mem6502_r)
return data;
}
WRITE8_MEMBER(bbc_cumana68k_device::mem6502_w)
void bbc_cumana68k_device::mem6502_w(offs_t offset, uint8_t data)
{
address_space &program = m_maincpu->space(AS_PROGRAM);

View File

@ -37,8 +37,8 @@ public:
void pia_rtc_pb_w(uint8_t data);
void pia_sasi_pb_w(uint8_t data);
DECLARE_READ8_MEMBER(mem6502_r);
DECLARE_WRITE8_MEMBER(mem6502_w);
uint8_t mem6502_r(offs_t offset);
void mem6502_w(offs_t offset, uint8_t data);
DECLARE_FLOPPY_FORMATS(floppy_formats);

View File

@ -188,7 +188,7 @@ void bbc_tube_32016_device::host_w(offs_t offset, uint8_t data)
}
READ8_MEMBER(bbc_tube_32016_device::read)
uint8_t bbc_tube_32016_device::read(offs_t offset)
{
uint16_t data = 0xffff;
@ -200,7 +200,7 @@ READ8_MEMBER(bbc_tube_32016_device::read)
return data;
}
WRITE8_MEMBER(bbc_tube_32016_device::write)
void bbc_tube_32016_device::write(offs_t offset, uint8_t data)
{
/* clear ROM select on first write */
if (!machine().side_effects_disabled()) m_rom_enabled = false;

View File

@ -54,8 +54,8 @@ private:
required_device<ram_device> m_ram;
required_memory_region m_rom;
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
uint8_t read(offs_t offset);
void write(offs_t offset, uint8_t data);
void tube_32016_mem(address_map &map);