Skip to content

Commit

Permalink
more macro removal (nw)
Browse files Browse the repository at this point in the history
  • Loading branch information
Osso13 committed May 19, 2020
1 parent 4ecd0d2 commit ef8bb31
Show file tree
Hide file tree
Showing 222 changed files with 1,656 additions and 1,705 deletions.
2 changes: 1 addition & 1 deletion src/devices/bus/vectrex/rom.cpp
Expand Up @@ -78,7 +78,7 @@ READ8_MEMBER(vectrex_rom64k_device::read_rom)
return m_rom[(offset + m_bank * 0x8000) & (m_rom_size - 1)];
}

WRITE8_MEMBER(vectrex_rom64k_device::write_bank)
void vectrex_rom64k_device::write_bank(uint8_t data)
{
m_bank = data >> 6;
}
Expand Down
2 changes: 1 addition & 1 deletion src/devices/bus/vectrex/rom.h
Expand Up @@ -38,7 +38,7 @@ class vectrex_rom64k_device : public vectrex_rom_device

// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom) override;
virtual DECLARE_WRITE8_MEMBER(write_bank) override;
virtual void write_bank(uint8_t data) override;

protected:
// device-level overrides
Expand Down
4 changes: 2 additions & 2 deletions src/devices/bus/vectrex/slot.cpp
Expand Up @@ -247,8 +247,8 @@ WRITE8_MEMBER(vectrex_cart_slot_device::write_ram)
write_bank
-------------------------------------------------*/

WRITE8_MEMBER(vectrex_cart_slot_device::write_bank)
void vectrex_cart_slot_device::write_bank(uint8_t data)
{
if (m_cart)
m_cart->write_bank(space, offset, data);
m_cart->write_bank(data);
}
4 changes: 2 additions & 2 deletions src/devices/bus/vectrex/slot.h
Expand Up @@ -41,7 +41,7 @@ class device_vectrex_cart_interface : public device_interface
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom) { return 0xff; }
virtual DECLARE_WRITE8_MEMBER(write_ram) { }
virtual DECLARE_WRITE8_MEMBER(write_bank) { }
virtual void write_bank(uint8_t data) { }

void rom_alloc(uint32_t size, const char *tag);
uint8_t* get_rom_base() { return m_rom; }
Expand Down Expand Up @@ -89,7 +89,7 @@ class vectrex_cart_slot_device : public device_t,
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
virtual DECLARE_WRITE8_MEMBER(write_ram);
virtual DECLARE_WRITE8_MEMBER(write_bank);
virtual void write_bank(uint8_t data);

protected:
// device-level overrides
Expand Down
6 changes: 3 additions & 3 deletions src/devices/video/huc6272.cpp
Expand Up @@ -549,17 +549,17 @@ uint8_t huc6272_device::adpcm_update(int chan)
return (m_adpcm.input[chan] >> m_adpcm.nibble[chan]) & 0xf;
}

READ8_MEMBER(huc6272_device::adpcm_update_0)
uint8_t huc6272_device::adpcm_update_0()
{
return adpcm_update(0);
}

READ8_MEMBER(huc6272_device::adpcm_update_1)
uint8_t huc6272_device::adpcm_update_1()
{
return adpcm_update(1);
}

WRITE8_MEMBER(huc6272_device::cdda_update)
void huc6272_device::cdda_update(offs_t offset, uint8_t data)
{
if (offset)
m_cdda_r->set_output_gain(ALL_OUTPUTS, float(data) / 63.0);
Expand Down
6 changes: 3 additions & 3 deletions src/devices/video/huc6272.h
Expand Up @@ -40,11 +40,11 @@ class huc6272_device : public device_t,
DECLARE_READ32_MEMBER( read );

// ADPCM operations
DECLARE_READ8_MEMBER( adpcm_update_0 );
DECLARE_READ8_MEMBER( adpcm_update_1 );
uint8_t adpcm_update_0();
uint8_t adpcm_update_1();

// CD-DA operations
DECLARE_WRITE8_MEMBER( cdda_update );
void cdda_update(offs_t offset, uint8_t data);

static void cdrom_config(device_t *device);

Expand Down
12 changes: 6 additions & 6 deletions src/mame/audio/dkong.cpp
Expand Up @@ -1197,7 +1197,7 @@ Addresses found at @0x510, cpu2
*/

WRITE8_MEMBER(dkong_state::m58817_command_w)
void dkong_state::m58817_command_w(uint8_t data)
{
m_m58817->ctl_w(data & 0x0f);
m_m58817->pdc_w((data>>4) & 0x01);
Expand All @@ -1211,29 +1211,29 @@ WRITE8_MEMBER(dkong_state::m58817_command_w)
*
****************************************************************/

WRITE8_MEMBER(dkong_state::dkong_voice_w)
void dkong_state::dkong_voice_w(uint8_t data)
{
/* only provided for documentation purposes
* not actually used
*/
logerror("dkong_speech_w: 0x%02x\n", data);
}

READ8_MEMBER(dkong_state::dkong_voice_status_r)
uint8_t dkong_state::dkong_voice_status_r()
{
/* only provided for documentation purposes
* not actually used
*/
return 0;
}

READ8_MEMBER(dkong_state::dkong_tune_r)
uint8_t dkong_state::dkong_tune_r(offs_t offset)
{
uint8_t page = m_dev_vp2->read(0) & 0x47;

if ( page & 0x40 )
{
return (m_ls175_3d->read(0) & 0x0F) | (dkong_voice_status_r(space, 0) << 4);
return (m_ls175_3d->read(0) & 0x0F) | (dkong_voice_status_r() << 4);
}
else
{
Expand All @@ -1242,7 +1242,7 @@ READ8_MEMBER(dkong_state::dkong_tune_r)
}
}

WRITE8_MEMBER(dkong_state::dkong_p1_w)
void dkong_state::dkong_p1_w(uint8_t data)
{
m_discrete->write(DS_DAC,data);
}
Expand Down
6 changes: 3 additions & 3 deletions src/mame/audio/hng64.cpp
Expand Up @@ -323,12 +323,12 @@ WRITE_LINE_MEMBER(hng64_state::dma_hreq_cb)
m_audiocpu->hack_w(1);
}

READ8_MEMBER(hng64_state::dma_memr_cb)
uint8_t hng64_state::dma_memr_cb(offs_t offset)
{
return m_audiocpu->space(AS_PROGRAM).read_byte(offset);;
return m_audiocpu->space(AS_PROGRAM).read_byte(offset);
}

WRITE8_MEMBER(hng64_state::dma_iow3_cb)
void hng64_state::dma_iow3_cb(uint8_t data)
{
// currently it reads a block of 0x20 '0x00' values from a very specific block of RAM where there is a 0x20 space in the data and transfers them repeatedly, I assume
// this is some kind of buffer for the audio or DSP and eventually will be populated with other values...
Expand Down
8 changes: 4 additions & 4 deletions src/mame/audio/mario.cpp
Expand Up @@ -467,12 +467,12 @@ void mario_state::sound_reset()
*
****************************************************************/

READ8_MEMBER(mario_state::mario_sh_p1_r)
uint8_t mario_state::mario_sh_p1_r()
{
return I8035_P1_R();
}

READ8_MEMBER(mario_state::mario_sh_p2_r)
uint8_t mario_state::mario_sh_p2_r()
{
return I8035_P2_R() & 0xEF; /* Bit 4 connected to GND! */
}
Expand Down Expand Up @@ -508,12 +508,12 @@ WRITE8_MEMBER(mario_state::mario_sh_sound_w)
#endif
}

WRITE8_MEMBER(mario_state::mario_sh_p1_w)
void mario_state::mario_sh_p1_w(uint8_t data)
{
I8035_P1_W(data);
}

WRITE8_MEMBER(mario_state::mario_sh_p2_w)
void mario_state::mario_sh_p2_w(uint8_t data)
{
I8035_P2_W(data);
}
Expand Down
2 changes: 1 addition & 1 deletion src/mame/audio/spacefb.cpp
Expand Up @@ -16,7 +16,7 @@
#include "speaker.h"


READ8_MEMBER(spacefb_state::audio_p2_r)
uint8_t spacefb_state::audio_p2_r()
{
return (m_sound_latch & 0x18) << 1;
}
Expand Down
20 changes: 10 additions & 10 deletions src/mame/drivers/alphasma.cpp
Expand Up @@ -58,10 +58,10 @@ class alphasmart_state : public driver_device
DECLARE_READ8_MEMBER(kb_r);
DECLARE_WRITE8_MEMBER(kb_matrixl_w);
DECLARE_WRITE8_MEMBER(kb_matrixh_w);
DECLARE_READ8_MEMBER(port_a_r);
virtual DECLARE_WRITE8_MEMBER(port_a_w);
DECLARE_READ8_MEMBER(port_d_r);
DECLARE_WRITE8_MEMBER(port_d_w);
uint8_t port_a_r();
virtual void port_a_w(uint8_t data);
uint8_t port_d_r();
void port_d_w(uint8_t data);
void update_lcdc(bool lcdc0, bool lcdc1);

void alphasmart_mem(address_map &map);
Expand All @@ -85,7 +85,7 @@ class asma2k_state : public alphasmart_state
private:
DECLARE_READ8_MEMBER(io_r);
DECLARE_WRITE8_MEMBER(io_w);
virtual DECLARE_WRITE8_MEMBER(port_a_w) override;
virtual void port_a_w(uint8_t data) override;

void asma2k_mem(address_map &map);

Expand Down Expand Up @@ -119,7 +119,7 @@ WRITE8_MEMBER(alphasmart_state::kb_matrixh_w)
m_matrix[1] = data;
}

READ8_MEMBER(alphasmart_state::port_a_r)
uint8_t alphasmart_state::port_a_r()
{
return (m_port_a & 0xfd) | (m_battery_status->read() << 1);
}
Expand Down Expand Up @@ -150,20 +150,20 @@ void alphasmart_state::update_lcdc(bool lcdc0, bool lcdc1)
}
}

WRITE8_MEMBER(alphasmart_state::port_a_w)
void alphasmart_state::port_a_w(uint8_t data)
{
uint8_t changed = (m_port_a ^ data) & data;
update_lcdc(changed & 0x80, changed & 0x20);
m_rambank->set_entry(((data>>3) & 0x01) | ((data>>4) & 0x02));
m_port_a = data;
}

READ8_MEMBER(alphasmart_state::port_d_r)
uint8_t alphasmart_state::port_d_r()
{
return m_port_d;
}

WRITE8_MEMBER(alphasmart_state::port_d_w)
void alphasmart_state::port_d_w(uint8_t data)
{
m_port_d = data;
}
Expand Down Expand Up @@ -202,7 +202,7 @@ WRITE8_MEMBER(asma2k_state::io_w)
//else printf("unknown w: %x %x\n", offset, data);
}

WRITE8_MEMBER(asma2k_state::port_a_w)
void asma2k_state::port_a_w(uint8_t data)
{
if ((m_port_a ^ data) & 0x40)
{
Expand Down
24 changes: 12 additions & 12 deletions src/mame/drivers/alphatpx.cpp
Expand Up @@ -115,9 +115,9 @@ class alphatp_12_state : public driver_device
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);

DECLARE_READ_LINE_MEMBER(kbd_matrix_r);
DECLARE_WRITE8_MEMBER(kbd_matrix_w);
DECLARE_READ8_MEMBER(kbd_port2_r);
DECLARE_WRITE8_MEMBER(kbd_port2_w);
void kbd_matrix_w(uint8_t data);
uint8_t kbd_port2_r();
void kbd_port2_w(uint8_t data);

DECLARE_READ8_MEMBER(fdc_r);
DECLARE_WRITE8_MEMBER(fdc_w);
Expand Down Expand Up @@ -187,9 +187,9 @@ class alphatp_34_state : public driver_device
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);

DECLARE_READ_LINE_MEMBER(kbd_matrix_r);
DECLARE_WRITE8_MEMBER(kbd_matrix_w);
DECLARE_READ8_MEMBER(kbd_port2_r);
DECLARE_WRITE8_MEMBER(kbd_port2_w);
void kbd_matrix_w(uint8_t data);
uint8_t kbd_port2_r();
void kbd_port2_w(uint8_t data);

DECLARE_READ8_MEMBER(fdc_r);
DECLARE_WRITE8_MEMBER(fdc_w);
Expand Down Expand Up @@ -469,7 +469,7 @@ READ_LINE_MEMBER(alphatp_12_state::kbd_matrix_r)
return m_kbdread;
}

WRITE8_MEMBER(alphatp_12_state::kbd_matrix_w)
void alphatp_12_state::kbd_matrix_w(uint8_t data)
{
if ((data & 0x80) && (!m_kbdclk))
{
Expand All @@ -482,13 +482,13 @@ WRITE8_MEMBER(alphatp_12_state::kbd_matrix_w)
}

// bit 2 is UPI-41 host IRQ to Z80
WRITE8_MEMBER(alphatp_12_state::kbd_port2_w)
void alphatp_12_state::kbd_port2_w(uint8_t data)
{
m_kbdport2 = data;

}

READ8_MEMBER(alphatp_12_state::kbd_port2_r)
uint8_t alphatp_12_state::kbd_port2_r()
{
return m_kbdport2;
}
Expand All @@ -502,7 +502,7 @@ READ_LINE_MEMBER(alphatp_34_state::kbd_matrix_r)
return m_kbdread;
}

WRITE8_MEMBER(alphatp_34_state::kbd_matrix_w)
void alphatp_34_state::kbd_matrix_w(uint8_t data)
{
if (data & 0x80)
{
Expand All @@ -516,13 +516,13 @@ WRITE8_MEMBER(alphatp_34_state::kbd_matrix_w)
}

// bit 2 is UPI-41 host IRQ to Z80
WRITE8_MEMBER(alphatp_34_state::kbd_port2_w)
void alphatp_34_state::kbd_port2_w(uint8_t data)
{
m_kbdport2 = data;

}

READ8_MEMBER(alphatp_34_state::kbd_port2_r)
uint8_t alphatp_34_state::kbd_port2_r()
{
return m_kbdport2;
}
Expand Down
8 changes: 4 additions & 4 deletions src/mame/drivers/alphatro.cpp
Expand Up @@ -80,8 +80,8 @@ class alphatro_state : public driver_device
virtual void machine_reset() override;

private:
DECLARE_READ8_MEMBER (ram0000_r);
DECLARE_WRITE8_MEMBER(ram0000_w);
uint8_t ram0000_r(offs_t offset);
void ram0000_w(offs_t offset, uint8_t data);
DECLARE_READ8_MEMBER (ram6000_r);
DECLARE_WRITE8_MEMBER(ram6000_w);
DECLARE_READ8_MEMBER (rama000_r);
Expand Down Expand Up @@ -190,7 +190,7 @@ void alphatro_state::update_banking()
}
}

READ8_MEMBER (alphatro_state::ram0000_r)
uint8_t alphatro_state::ram0000_r(offs_t offset)
{
if (offset < 0xf000)
{
Expand All @@ -200,7 +200,7 @@ READ8_MEMBER (alphatro_state::ram0000_r)
return m_p_videoram[offset & 0xfff];
}

WRITE8_MEMBER(alphatro_state::ram0000_w)
void alphatro_state::ram0000_w(offs_t offset, uint8_t data)
{

if (offset < 0xf000)
Expand Down

0 comments on commit ef8bb31

Please sign in to comment.