mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
k054338.cpp : Simplify handlers, Reduce duplicates (#4949)
This commit is contained in:
parent
0cb3806d37
commit
d1b52c82c8
@ -1011,7 +1011,7 @@ void konamigx_state::gx_base_memmap(address_map &map)
|
||||
map(0xd5a000, 0xd5a003).portr("SYSTEM_DSW");
|
||||
map(0xd5c000, 0xd5c003).portr("INPUTS");
|
||||
map(0xd5e000, 0xd5e003).portr("SERVICE");
|
||||
map(0xd80000, 0xd8001f).w(m_k054338, FUNC(k054338_device::long_w));
|
||||
map(0xd80000, 0xd8001f).w(m_k054338, FUNC(k054338_device::word_w));
|
||||
map(0xda0000, 0xda1fff).rw(m_k056832, FUNC(k056832_device::ram_word_r), FUNC(k056832_device::ram_word_w));
|
||||
map(0xda2000, 0xda3fff).rw(m_k056832, FUNC(k056832_device::ram_word_r), FUNC(k056832_device::ram_word_w));
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ void moo_state::moo_map(address_map &map)
|
||||
#if MOO_DEBUG
|
||||
map(0x0c0000, 0x0c003f).r(m_k056832, FUNC(k056832_device::word_r));
|
||||
map(0x0c2000, 0x0c2007).r(m_k053246, FUNC(k053247_device::k053246_reg_word_r));
|
||||
map(0x0ca000, 0x0ca01f).r(m_k054338, FUNC(k054338_device::word_r));
|
||||
map(0x0ca000, 0x0ca01f).r(m_k054338, FUNC(k054338_device::register_r));
|
||||
map(0x0cc000, 0x0cc01f).r(m_k053251, FUNC(k053251_device::read)).umask16(0x00ff);
|
||||
map(0x0d8000, 0x0d8007).r(m_k056832, FUNC(k056832_device::b_word_r));
|
||||
#endif
|
||||
@ -392,7 +392,7 @@ void moo_state::bucky_map(address_map &map)
|
||||
#if MOO_DEBUG
|
||||
map(0x0c0000, 0x0c003f).r(m_k056832, FUNC(k056832_device::word_r));
|
||||
map(0x0c2000, 0x0c2007).r(m_k053246, FUNC(k053247_device::k053246_reg_word_r));
|
||||
map(0x0ca000, 0x0ca01f).r(m_k054338, FUNC(k054338_device::word_r));
|
||||
map(0x0ca000, 0x0ca01f).r(m_k054338, FUNC(k054338_device::register_r));
|
||||
map(0x0cc000, 0x0cc01f).r(m_k053251, FUNC(k053251_device::read)).umask16(0x00ff);
|
||||
map(0x0d8000, 0x0d8007).r(m_k056832, FUNC(k056832_device::b_word_r));
|
||||
#endif
|
||||
|
@ -374,7 +374,7 @@ void xexex_state::main_map(address_map &map)
|
||||
#if XE_DEBUG
|
||||
map(0x0c0000, 0x0c003f).r(m_k056832, FUNC(k056832_device::word_r));
|
||||
map(0x0c2000, 0x0c2007).r(m_k053246, FUNC(k053247_device::k053246_reg_word_r));
|
||||
map(0x0ca000, 0x0ca01f).r(m_k054338, FUNC(k054338_device::word_r));
|
||||
map(0x0ca000, 0x0ca01f).r(m_k054338, FUNC(k054338_device::register_r));
|
||||
map(0x0cc000, 0x0cc01f).r(m_k053251, FUNC(k053251_device::read)).umask16(0x00ff);
|
||||
map(0x0d8000, 0x0d8007).r(m_k056832, FUNC(k056832_device::b_word_r));
|
||||
#endif
|
||||
|
@ -54,22 +54,15 @@ void k054338_device::device_reset()
|
||||
DEVICE HANDLERS
|
||||
*****************************************************************************/
|
||||
|
||||
WRITE16_MEMBER( k054338_device::word_w )
|
||||
void k054338_device::word_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(m_regs + offset);
|
||||
}
|
||||
|
||||
WRITE32_MEMBER( k054338_device::long_w )
|
||||
{
|
||||
offset <<= 1;
|
||||
word_w(space, offset, data >> 16, mem_mask >> 16);
|
||||
word_w(space, offset + 1, data, mem_mask);
|
||||
}
|
||||
|
||||
// returns a 16-bit '338 register
|
||||
int k054338_device::register_r( int reg )
|
||||
u16 k054338_device::register_r(offs_t offset)
|
||||
{
|
||||
return m_regs[reg];
|
||||
return m_regs[offset];
|
||||
}
|
||||
|
||||
void k054338_device::update_all_shadows( int rushingheroes_hack, palette_device &palette )
|
||||
@ -206,10 +199,3 @@ void k054338_device::export_config( int **shd_rgb )
|
||||
{
|
||||
*shd_rgb = m_shd_rgb;
|
||||
}
|
||||
|
||||
// debug handler
|
||||
|
||||
READ16_MEMBER( k054338_device::word_r )
|
||||
{
|
||||
return(m_regs[offset]);
|
||||
} // CLTC
|
||||
|
@ -38,12 +38,9 @@ public:
|
||||
// configuration
|
||||
void set_alpha_invert(int alpha_inv) { m_alpha_inv = alpha_inv; }
|
||||
|
||||
DECLARE_WRITE16_MEMBER( word_w ); // "CLCT" registers
|
||||
DECLARE_WRITE32_MEMBER( long_w );
|
||||
void word_w(offs_t offset, u16 data, u16 mem_mask = ~0); // "CLCT" registers
|
||||
|
||||
DECLARE_READ16_MEMBER( word_r ); // CLTC
|
||||
|
||||
int register_r(int reg);
|
||||
u16 register_r(offs_t offset);
|
||||
void update_all_shadows(int rushingheroes_hack, palette_device &palette); // called at the beginning of SCREEN_UPDATE()
|
||||
void fill_solid_bg(bitmap_rgb32 &bitmap, const rectangle &cliprect); // solid backcolor fill
|
||||
void fill_backcolor(bitmap_rgb32 &bitmap, const rectangle &cliprect, const pen_t *pal_ptr, int mode); // solid or gradient fill using k055555
|
||||
|
Loading…
Reference in New Issue
Block a user