mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +03:00
Merge pull request #4829 from cam900/decobsmt_args
decobsmt.cpp : Simplify handlers
This commit is contained in:
commit
7de3997493
@ -97,7 +97,7 @@ void decobsmt_device::device_reset()
|
||||
m_bsmt_comms = 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(decobsmt_device::bsmt_reset_w)
|
||||
void decobsmt_device::bsmt_reset_w(u8 data)
|
||||
{
|
||||
uint8_t diff = data ^ m_bsmt_reset;
|
||||
m_bsmt_reset = data;
|
||||
@ -105,29 +105,29 @@ WRITE8_MEMBER(decobsmt_device::bsmt_reset_w)
|
||||
m_bsmt->reset();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(decobsmt_device::bsmt0_w)
|
||||
void decobsmt_device::bsmt0_w(u8 data)
|
||||
{
|
||||
m_bsmt_latch = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(decobsmt_device::bsmt1_w)
|
||||
void decobsmt_device::bsmt1_w(offs_t offset, u8 data)
|
||||
{
|
||||
m_bsmt->write_reg(offset ^ 0xff);
|
||||
m_bsmt->write_data((m_bsmt_latch << 8) | data);
|
||||
m_ourcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); /* BSMT is not ready */
|
||||
}
|
||||
|
||||
READ8_MEMBER(decobsmt_device::bsmt_status_r)
|
||||
u8 decobsmt_device::bsmt_status_r()
|
||||
{
|
||||
return m_bsmt->read_status() << 7;
|
||||
}
|
||||
|
||||
READ8_MEMBER(decobsmt_device::bsmt_comms_r)
|
||||
u8 decobsmt_device::bsmt_comms_r()
|
||||
{
|
||||
return m_bsmt_comms;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(decobsmt_device::bsmt_comms_w)
|
||||
void decobsmt_device::bsmt_comms_w(u8 data)
|
||||
{
|
||||
m_bsmt_comms = data;
|
||||
}
|
||||
|
@ -21,12 +21,12 @@ public:
|
||||
// construction/destruction
|
||||
decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(bsmt_reset_w);
|
||||
DECLARE_READ8_MEMBER(bsmt_status_r);
|
||||
DECLARE_WRITE8_MEMBER(bsmt0_w);
|
||||
DECLARE_WRITE8_MEMBER(bsmt1_w);
|
||||
DECLARE_READ8_MEMBER(bsmt_comms_r);
|
||||
DECLARE_WRITE8_MEMBER(bsmt_comms_w);
|
||||
void bsmt_reset_w(u8 data);
|
||||
u8 bsmt_status_r();
|
||||
void bsmt0_w(u8 data);
|
||||
void bsmt1_w(offs_t offset, u8 data);
|
||||
u8 bsmt_comms_r();
|
||||
void bsmt_comms_w(u8 data);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(bsmt_reset_line);
|
||||
|
||||
|
@ -174,7 +174,7 @@ WRITE8_MEMBER( de_3_state::sound_w )
|
||||
{
|
||||
m_sound_data = data;
|
||||
if(m_sound_data != 0xfe)
|
||||
m_decobsmt->bsmt_comms_w(space,offset,m_sound_data);
|
||||
m_decobsmt->bsmt_comms_w(m_sound_data);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( de_3_state::pia21_ca2_w )
|
||||
|
@ -150,7 +150,7 @@ WRITE8_MEMBER( de_3b_state::sound_w )
|
||||
{
|
||||
m_sound_data = data;
|
||||
if(m_sound_data != 0xfe)
|
||||
m_decobsmt->bsmt_comms_w(space,offset,m_sound_data);
|
||||
m_decobsmt->bsmt_comms_w(m_sound_data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( de_3b_state::dmd_status_r )
|
||||
|
@ -791,7 +791,7 @@ WRITE_LINE_MEMBER( nslasher_state::tattass_sound_irq_w )
|
||||
uint8_t data = m_ioprot->soundlatch_r(machine().dummy_space(), 0);
|
||||
// Swap bits 0 and 3 to correct for design error from BSMT schematic
|
||||
data = bitswap<8>(data, 7, 6, 5, 4, 0, 2, 1, 3);
|
||||
m_decobsmt->bsmt_comms_w(machine().dummy_space(), 0, data);
|
||||
m_decobsmt->bsmt_comms_w(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user