mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
adc0844.cpp : Remove unnecessary arguments in handlers
bus/electron/plus1.cpp : Remove unnecessary arguments in some handlers, nw
This commit is contained in:
parent
5e0f160b68
commit
a3891a04a8
@ -202,11 +202,11 @@ uint8_t electron_plus1_device::expbus_r(address_space &space, offs_t offset)
|
||||
|
||||
if (offset == 0xfc70)
|
||||
{
|
||||
data &= m_adc->read(space, 0);
|
||||
data &= m_adc->read();
|
||||
}
|
||||
else if (offset == 0xfc72)
|
||||
{
|
||||
data &= status_r(space, 0);
|
||||
data &= status_r();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -255,7 +255,7 @@ void electron_plus1_device::expbus_w(address_space &space, offs_t offset, uint8_
|
||||
|
||||
if (offset == 0xfc70)
|
||||
{
|
||||
m_adc->write(space, 0, data);
|
||||
m_adc->write(data);
|
||||
}
|
||||
else if (offset == 0xfc71)
|
||||
{
|
||||
@ -283,9 +283,9 @@ void electron_plus1_device::expbus_w(address_space &space, offs_t offset, uint8_
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER(electron_plus1_device::status_r)
|
||||
u8 electron_plus1_device::status_r()
|
||||
{
|
||||
uint8_t data = 0x0f;
|
||||
u8 data = 0x0f;
|
||||
// Status: b7: printer Busy
|
||||
// b6: ADC conversion end
|
||||
// b5: Fire Button 1
|
||||
|
@ -41,7 +41,7 @@ protected:
|
||||
virtual void expbus_w(address_space &space, offs_t offset, uint8_t data) override;
|
||||
|
||||
private:
|
||||
DECLARE_READ8_MEMBER(status_r);
|
||||
u8 status_r();
|
||||
DECLARE_WRITE_LINE_MEMBER(busy_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ready_w);
|
||||
|
||||
|
@ -182,14 +182,14 @@ void adc0848_device::device_timer(emu_timer &timer, device_timer_id id, int para
|
||||
// INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER( adc0844_device::read )
|
||||
u8 adc0844_device::read()
|
||||
{
|
||||
m_intr_cb(CLEAR_LINE);
|
||||
|
||||
return m_result;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( adc0844_device::write )
|
||||
void adc0844_device::write(u8 data)
|
||||
{
|
||||
m_intr_cb(CLEAR_LINE);
|
||||
|
||||
@ -198,7 +198,7 @@ WRITE8_MEMBER( adc0844_device::write )
|
||||
m_conversion_timer->adjust(attotime::from_usec(40));
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( adc0848_device::write )
|
||||
void adc0848_device::write(u8 data)
|
||||
{
|
||||
m_intr_cb(CLEAR_LINE);
|
||||
|
||||
|
@ -43,8 +43,8 @@ public:
|
||||
auto ch3_callback() { return m_ch3_cb.bind(); }
|
||||
auto ch4_callback() { return m_ch4_cb.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER(read);
|
||||
virtual DECLARE_WRITE8_MEMBER(write);
|
||||
u8 read();
|
||||
virtual void write(u8 data);
|
||||
|
||||
protected:
|
||||
adc0844_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
@ -78,7 +78,7 @@ public:
|
||||
auto ch7_callback() { return m_ch7_cb.bind(); }
|
||||
auto ch8_callback() { return m_ch8_cb.bind(); }
|
||||
|
||||
virtual DECLARE_WRITE8_MEMBER(write) override;
|
||||
virtual void write(u8 data) override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -259,11 +259,11 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w)
|
||||
|
||||
/* when the read is toggled is when the ADC value is latched */
|
||||
if (!(data & 0x80))
|
||||
m_latched_input = m_maxrpm_adc->read(space, 0);
|
||||
m_latched_input = m_maxrpm_adc->read();
|
||||
|
||||
/* when both the write and the enable are low, it's a write to the ADC0844 */
|
||||
if (!(data & 0x40) && !(data & 0x20))
|
||||
m_maxrpm_adc->write(space, 0, bitswap<4>(m_maxrpm_adc_control, 2, 3, 1, 0));
|
||||
m_maxrpm_adc->write(bitswap<4>(m_maxrpm_adc_control, 2, 3, 1, 0));
|
||||
|
||||
/* low 5 bits control the turbo CS */
|
||||
m_turbo_cheap_squeak->write(space, offset, data);
|
||||
|
@ -107,7 +107,7 @@ WRITE16_MEMBER(mcr68_state::blasted_control_w)
|
||||
READ16_MEMBER(mcr68_state::spyhunt2_port_0_r)
|
||||
{
|
||||
int result = ioport("IN0")->read();
|
||||
int analog = m_adc->read(space, 0);
|
||||
int analog = m_adc->read();
|
||||
|
||||
return result | ((m_sounds_good->read(space, 0) & 1) << 5) | (analog << 8);
|
||||
}
|
||||
@ -130,7 +130,7 @@ WRITE16_MEMBER(mcr68_state::spyhunt2_control_w)
|
||||
m_sounds_good->reset_write(~m_control_word & 0x2000);
|
||||
m_sounds_good->write(space, offset, (m_control_word >> 8) & 0x001f);
|
||||
|
||||
m_adc->write(space, 0, (m_control_word >> 3) & 0x0f);
|
||||
m_adc->write((m_control_word >> 3) & 0x0f);
|
||||
}
|
||||
|
||||
|
||||
|
@ -121,7 +121,7 @@ READ32_MEMBER(midvunit_state::port0_r)
|
||||
READ32_MEMBER( midvunit_state::adc_r )
|
||||
{
|
||||
if (!(m_control_data & 0x40))
|
||||
return m_adc->read(space, 0) << m_adc_shift;
|
||||
return m_adc->read() << m_adc_shift;
|
||||
else
|
||||
logerror("adc_r without enabling reads!\n");
|
||||
|
||||
@ -131,7 +131,7 @@ READ32_MEMBER( midvunit_state::adc_r )
|
||||
WRITE32_MEMBER( midvunit_state::adc_w )
|
||||
{
|
||||
if (!(m_control_data & 0x20))
|
||||
m_adc->write(space, 0, data >> m_adc_shift);
|
||||
m_adc->write(data >> m_adc_shift);
|
||||
else
|
||||
logerror("adc_w without enabling writes!\n");
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ READ16_MEMBER(midyunit_state::term2_input_r)
|
||||
if (offset != 2)
|
||||
return m_ports[offset]->read();
|
||||
|
||||
return m_term2_adc->read(space, 0) | 0xff00;
|
||||
return m_term2_adc->read() | 0xff00;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(midyunit_state::term2_sound_w)
|
||||
@ -160,7 +160,7 @@ WRITE16_MEMBER(midyunit_state::term2_sound_w)
|
||||
}
|
||||
|
||||
if (offset == 0)
|
||||
m_term2_adc->write(space, 0, ((data >> 12) & 3) | 4);
|
||||
m_term2_adc->write(((data >> 12) & 3) | 4);
|
||||
|
||||
m_adpcm_sound->reset_write((~data & 0x100) >> 1);
|
||||
m_adpcm_sound->write(data);
|
||||
|
Loading…
Reference in New Issue
Block a user