ym2148, vlm5030: Simplify read/write handlers (nw)

This commit is contained in:
AJR 2019-03-10 14:30:23 -04:00
parent 52e991ec3c
commit 9af0dee629
6 changed files with 10 additions and 10 deletions

View File

@ -903,7 +903,7 @@ void msx_cart_keyboard_master_device::device_add_mconfig(machine_config &config)
void msx_cart_keyboard_master_device::device_start()
{
// Install IO read/write handlers
io_space().install_write_handler(0x00, 0x00, write8_delegate(FUNC(vlm5030_device::data_w), m_vlm5030.target()));
io_space().install_write_handler(0x00, 0x00, write8smo_delegate(FUNC(vlm5030_device::data_w), m_vlm5030.target()));
io_space().install_write_handler(0x20, 0x20, write8smo_delegate(FUNC(msx_cart_keyboard_master_device::io_20_w), this));
io_space().install_read_handler(0x00, 0x00, read8smo_delegate(FUNC(msx_cart_keyboard_master_device::io_00_r), this));
}

View File

@ -155,7 +155,7 @@ uint8_t msx_cart_sfg_device::read_cart(offs_t offset)
case 0x3ff6: // YM-2148 MIDI UART status register
// ------x- - 1 = received a byte/receive buffer full?
// -------x - 1 = ready to send next byte/send buffer empty?
return m_ym2148->read(machine().dummy_space(), offset & 7);
return m_ym2148->read(offset & 7);
}
if (offset < 0x8000)
@ -191,7 +191,7 @@ void msx_cart_sfg_device::write_cart(offs_t offset, uint8_t data)
// x------- - 1 = reset
// -----x-- - 1 = enable receiving / sending midi data
// -------x - 1 = enable receiving / sending midi data
m_ym2148->write(machine().dummy_space(), offset & 7, data);
m_ym2148->write(offset & 7, data);
break;
default:

View File

@ -143,7 +143,7 @@ void ym2148_device::device_timer(emu_timer &timer, device_timer_id id, int param
}
READ8_MEMBER(ym2148_device::read)
uint8_t ym2148_device::read(offs_t offset)
{
switch (offset & 7)
{
@ -165,7 +165,7 @@ READ8_MEMBER(ym2148_device::read)
}
WRITE8_MEMBER(ym2148_device::write)
void ym2148_device::write(offs_t offset, uint8_t data)
{
switch (offset & 7)
{

View File

@ -31,8 +31,8 @@ public:
auto port_read_handler() { return m_port_read_handler.bind(); }
auto irq_handler() { return m_irq_handler.bind(); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
uint8_t read(offs_t offset);
void write(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(write_rxd);
uint8_t get_irq_vector();

View File

@ -397,9 +397,9 @@ READ_LINE_MEMBER( vlm5030_device::bsy )
}
/* latch contoll data */
WRITE8_MEMBER( vlm5030_device::data_w )
void vlm5030_device::data_w(uint8_t data)
{
m_latch_data = (uint8_t)data;
m_latch_data = data;
}
/* set RST pin level : reset / set table address A8-A15 */

View File

@ -14,7 +14,7 @@ public:
DECLARE_READ_LINE_MEMBER( bsy );
/* latch contoll data */
DECLARE_WRITE8_MEMBER( data_w );
void data_w(uint8_t data);
/* set RST pin level : reset / set table address A8-A15 */
DECLARE_WRITE_LINE_MEMBER( rst );