mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
misc demacroization (nw)
This commit is contained in:
parent
81b354e4ed
commit
18450941d5
@ -39,7 +39,7 @@ void k056230_device::device_start()
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(k056230_device::read)
|
||||
uint8_t k056230_device::read(offs_t offset)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
@ -61,7 +61,7 @@ TIMER_CALLBACK_MEMBER(k056230_device::network_irq_clear)
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(k056230_device::write)
|
||||
void k056230_device::write(offs_t offset, uint8_t data)
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
@ -94,13 +94,13 @@ WRITE8_MEMBER(k056230_device::write)
|
||||
// logerror("k056230_w: %d, %02X at %08X\n", offset, data, machine().describe_context());
|
||||
}
|
||||
|
||||
READ32_MEMBER(k056230_device::lanc_ram_r)
|
||||
uint32_t k056230_device::lanc_ram_r(offs_t offset, uint32_t mem_mask)
|
||||
{
|
||||
//logerror("LANC_RAM_r: %08X, %08X %s\n", offset, mem_mask, machine().describe_context());
|
||||
return m_ram[offset & 0x7ff];
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(k056230_device::lanc_ram_w)
|
||||
void k056230_device::lanc_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask)
|
||||
{
|
||||
//logerror("LANC_RAM_w: %08X, %08X, %08X %s\n", data, offset, mem_mask, machine().describe_context());
|
||||
COMBINE_DATA(m_ram + (offset & 0x7ff));
|
||||
|
@ -26,11 +26,11 @@ public:
|
||||
|
||||
void set_thunderh_hack(bool thunderh) { m_is_thunderh = thunderh; }
|
||||
|
||||
DECLARE_READ32_MEMBER(lanc_ram_r);
|
||||
DECLARE_WRITE32_MEMBER(lanc_ram_w);
|
||||
uint32_t lanc_ram_r(offs_t offset, uint32_t mem_mask = ~0);
|
||||
void lanc_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
|
||||
DECLARE_READ8_MEMBER(read);
|
||||
DECLARE_WRITE8_MEMBER(write);
|
||||
uint8_t read(offs_t offset);
|
||||
void write(offs_t offset, uint8_t data);
|
||||
|
||||
TIMER_CALLBACK_MEMBER(network_irq_clear);
|
||||
|
||||
|
@ -111,12 +111,12 @@ void tdc1008_device::device_reset()
|
||||
m_p_out.u = 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(tdc1008_device::x_w)
|
||||
void tdc1008_device::x_w(uint8_t data)
|
||||
{
|
||||
m_x_in = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(tdc1008_device::y_w)
|
||||
void tdc1008_device::y_w(uint8_t data)
|
||||
{
|
||||
m_y_in = data;
|
||||
}
|
||||
@ -142,28 +142,28 @@ WRITE_LINE_MEMBER(tdc1008_device::tsl_w)
|
||||
m_p_out.u = (m_p_out.u & 0x7ff00) | m_lsp_in;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(tdc1008_device::xtp_w)
|
||||
void tdc1008_device::xtp_w(uint8_t data)
|
||||
{
|
||||
m_xtp_in = data;
|
||||
if (m_prel && m_tsx)
|
||||
m_p_out.u = (m_p_out.u & 0x0ffff) | (m_xtp_in << 16);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(tdc1008_device::msp_w)
|
||||
void tdc1008_device::msp_w(uint8_t data)
|
||||
{
|
||||
m_msp_in = data;
|
||||
if (m_prel && m_tsm)
|
||||
m_p_out.u = (m_p_out.u & 0x700ff) | (m_msp_in << 8);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(tdc1008_device::lsp_w)
|
||||
void tdc1008_device::lsp_w(uint8_t data)
|
||||
{
|
||||
m_lsp_in = data;
|
||||
if (m_prel && m_tsl)
|
||||
m_p_out.u = (m_p_out.u & 0x7ff00) | m_lsp_in;
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(tdc1008_device::output_w)
|
||||
void tdc1008_device::output_w(uint32_t data)
|
||||
{
|
||||
m_p_in = data;
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ public:
|
||||
// construction/destruction
|
||||
tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(x_w);
|
||||
DECLARE_WRITE8_MEMBER(y_w);
|
||||
void x_w(uint8_t data);
|
||||
void y_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(tsx_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(tsm_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(tsl_w);
|
||||
@ -39,12 +39,12 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(sub_w);
|
||||
|
||||
// Output preloads by group
|
||||
DECLARE_WRITE8_MEMBER(xtp_w);
|
||||
DECLARE_WRITE8_MEMBER(msp_w);
|
||||
DECLARE_WRITE8_MEMBER(lsp_w);
|
||||
void xtp_w(uint8_t data);
|
||||
void msp_w(uint8_t data);
|
||||
void lsp_w(uint8_t data);
|
||||
|
||||
// Full output preload
|
||||
DECLARE_WRITE32_MEMBER(output_w);
|
||||
void output_w(uint32_t data);
|
||||
|
||||
// Outputs by group
|
||||
auto xtp() { return m_xtp.bind(); }
|
||||
|
@ -6998,8 +6998,8 @@ READ32_MEMBER(model2_state::doa_prot_r)
|
||||
// doa only reads 16-bits at a time, while STV reads 32-bits
|
||||
uint32 ret = 0;
|
||||
|
||||
if (mem_mask&0xffff0000) ret |= (m_0229crypt->data_r(space,0,0xffff)<<16);
|
||||
if (mem_mask&0x0000ffff) ret |= m_0229crypt->data_r(space,0,0xffff);
|
||||
if (mem_mask&0xffff0000) ret |= (m_0229crypt->data_r()<<16);
|
||||
if (mem_mask&0x0000ffff) ret |= m_0229crypt->data_r();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -825,8 +825,8 @@ READ32_MEMBER(stv_state::decathlt_prot_r)
|
||||
}
|
||||
|
||||
uint32 ret = 0;
|
||||
if (mem_mask & 0xffff0000) ret |= (m_5838crypt->data_r(space, offset, mem_mask)<<16);
|
||||
if (mem_mask & 0x0000ffff) ret |= m_5838crypt->data_r(space, offset, mem_mask);
|
||||
if (mem_mask & 0xffff0000) ret |= (m_5838crypt->data_r()<<16);
|
||||
if (mem_mask & 0x0000ffff) ret |= m_5838crypt->data_r();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -840,11 +840,11 @@ WRITE32_MEMBER(stv_state::decathlt_prot_srcaddr_w)
|
||||
|
||||
if ((offs & 0x7fffff) == 0x7FFFF0)
|
||||
{
|
||||
m_5838crypt->srcaddr_w(space, offset, data, mem_mask);
|
||||
m_5838crypt->srcaddr_w(data, mem_mask);
|
||||
}
|
||||
else if ((offs & 0x7fffff) == 0x7FFFF4)
|
||||
{
|
||||
m_5838crypt->data_w(space, offset, data, mem_mask);
|
||||
m_5838crypt->data_w(data, mem_mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ uint8_t sega_315_5838_comp_device::get_decompressed_byte(void)
|
||||
}
|
||||
}
|
||||
|
||||
READ16_MEMBER(sega_315_5838_comp_device::data_r)
|
||||
uint16_t sega_315_5838_comp_device::data_r()
|
||||
{
|
||||
return (get_decompressed_byte() << 8) | (get_decompressed_byte() << 0);
|
||||
}
|
||||
@ -354,7 +354,7 @@ void sega_315_5838_comp_device::write_prot_data(uint32_t data, uint32_t mem_mask
|
||||
}
|
||||
}
|
||||
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::data_w_doa ) { write_prot_data(data, mem_mask, 1); }
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::data_w) { write_prot_data(data, mem_mask, 0); }
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::srcaddr_w ) { set_prot_addr(data, mem_mask); }
|
||||
void sega_315_5838_comp_device::data_w_doa(uint32_t data, uint32_t mem_mask) { write_prot_data(data, mem_mask, 1); }
|
||||
void sega_315_5838_comp_device::data_w(uint32_t data, uint32_t mem_mask) { write_prot_data(data, mem_mask, 0); }
|
||||
void sega_315_5838_comp_device::srcaddr_w(uint32_t data, uint32_t mem_mask) { set_prot_addr(data, mem_mask); }
|
||||
|
||||
|
@ -16,11 +16,11 @@ public:
|
||||
// construction/destruction
|
||||
sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
DECLARE_READ16_MEMBER(data_r);
|
||||
uint16_t data_r();
|
||||
|
||||
DECLARE_WRITE32_MEMBER(data_w_doa);
|
||||
DECLARE_WRITE32_MEMBER(data_w);
|
||||
DECLARE_WRITE32_MEMBER(srcaddr_w);
|
||||
void data_w_doa(uint32_t data, uint32_t mem_mask = ~0);
|
||||
void data_w(uint32_t data, uint32_t mem_mask = ~0);
|
||||
void srcaddr_w(uint32_t data, uint32_t mem_mask = ~0);
|
||||
|
||||
void debug_helper(int id);
|
||||
|
||||
|
@ -165,7 +165,7 @@ WRITE_LINE_MEMBER( cmi_music_keyboard_device::cmi10_u20_cb2_w )
|
||||
m_dp3->wr_w(state);
|
||||
}
|
||||
|
||||
template <unsigned N> WRITE16_MEMBER( cmi_music_keyboard_device::update_dp )
|
||||
template <unsigned N> void cmi_music_keyboard_device::update_dp(offs_t offset, u16 data)
|
||||
{
|
||||
m_digit[(N << 2) | ((offset ^ 3) & 3)] = data;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ private:
|
||||
DECLARE_WRITE_LINE_MEMBER( kbd_txd_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( kbd_rts_w );
|
||||
|
||||
template <unsigned N> DECLARE_WRITE16_MEMBER( update_dp );
|
||||
template <unsigned N> void update_dp(offs_t offset, u16 data);
|
||||
|
||||
void muskeys_map(address_map &map);
|
||||
|
||||
|
@ -47,7 +47,7 @@ void pgm_asic3_state::asic3_compute_hold(int y, int z)
|
||||
break;
|
||||
}
|
||||
}
|
||||
READ16_MEMBER(pgm_asic3_state::pgm_asic3_r)
|
||||
u16 pgm_asic3_state::pgm_asic3_r()
|
||||
{
|
||||
switch (m_asic3_reg)
|
||||
{
|
||||
@ -93,7 +93,7 @@ READ16_MEMBER(pgm_asic3_state::pgm_asic3_r)
|
||||
return 0;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(pgm_asic3_state::pgm_asic3_w)
|
||||
void pgm_asic3_state::pgm_asic3_w(offs_t offset, u16 data)
|
||||
{
|
||||
if (offset == 0)
|
||||
{
|
||||
@ -166,7 +166,8 @@ void pgm_asic3_state::init_orlegend()
|
||||
{
|
||||
pgm_basic_init();
|
||||
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xC04000, 0xC0400f, read16_delegate(*this, FUNC(pgm_asic3_state::pgm_asic3_r)), write16_delegate(*this, FUNC(pgm_asic3_state::pgm_asic3_w)));
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc04000, 0xc0400f, read16smo_delegate(*this, FUNC(pgm_asic3_state::pgm_asic3_r)));
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0xc04000, 0xc0400f, write16sm_delegate(*this, FUNC(pgm_asic3_state::pgm_asic3_w)));
|
||||
|
||||
m_asic3_reg = 0;
|
||||
m_asic3_latch[0] = 0;
|
||||
|
@ -21,8 +21,8 @@ private:
|
||||
u16 m_asic3_hold;
|
||||
|
||||
void asic3_compute_hold(int,int);
|
||||
DECLARE_READ16_MEMBER( pgm_asic3_r );
|
||||
DECLARE_WRITE16_MEMBER( pgm_asic3_w );
|
||||
u16 pgm_asic3_r();
|
||||
void pgm_asic3_w(offs_t offset, u16 data);
|
||||
};
|
||||
|
||||
INPUT_PORTS_EXTERN( orlegend );
|
||||
|
@ -105,7 +105,7 @@ void rx01_device::device_reset()
|
||||
// read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ16_MEMBER( rx01_device::read )
|
||||
uint16_t rx01_device::read(offs_t offset)
|
||||
{
|
||||
switch(offset & 1) {
|
||||
case 0: return status_read();
|
||||
@ -119,7 +119,7 @@ READ16_MEMBER( rx01_device::read )
|
||||
// write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE16_MEMBER( rx01_device::write )
|
||||
void rx01_device::write(offs_t offset, uint16_t data)
|
||||
{
|
||||
switch(offset & 1) {
|
||||
case 0: command_write(data); break;
|
||||
|
@ -26,8 +26,8 @@ public:
|
||||
// construction/destruction
|
||||
rx01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
DECLARE_READ16_MEMBER( read );
|
||||
DECLARE_WRITE16_MEMBER( write );
|
||||
uint16_t read(offs_t offset);
|
||||
void write(offs_t offset, uint16_t data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -74,7 +74,7 @@ image_init_result x68k_hdc_image_device::call_create(int format_type, util::opti
|
||||
return image_init_result::PASS;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( x68k_hdc_image_device::hdc_w )
|
||||
void x68k_hdc_image_device::hdc_w(offs_t offset, u16 data)
|
||||
{
|
||||
unsigned int lba = 0;
|
||||
std::vector<char> blk;
|
||||
@ -302,7 +302,7 @@ WRITE16_MEMBER( x68k_hdc_image_device::hdc_w )
|
||||
// logerror("SASI: write to HDC, offset %04x, data %04x\n",offset,data);
|
||||
}
|
||||
|
||||
READ16_MEMBER( x68k_hdc_image_device::hdc_r )
|
||||
u16 x68k_hdc_image_device::hdc_r(offs_t offset)
|
||||
{
|
||||
int retval = 0xff;
|
||||
|
||||
|
@ -109,8 +109,8 @@ public:
|
||||
virtual const char *custom_brief_instance_name() const noexcept override { return "sasi"; }
|
||||
virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override;
|
||||
|
||||
DECLARE_WRITE16_MEMBER( hdc_w );
|
||||
DECLARE_READ16_MEMBER( hdc_r );
|
||||
void hdc_w(offs_t offset, u16 data);
|
||||
u16 hdc_r(offs_t offset);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
Loading…
Reference in New Issue
Block a user