mirror of
https://github.com/holub/mame
synced 2025-05-20 12:48:53 +03:00
minor optimization
This commit is contained in:
parent
ad691e7e96
commit
f48fafb271
@ -528,40 +528,24 @@ static void m37710_internal_w(m37710i_cpu_struct *cpustate, int offset, UINT8 da
|
||||
static READ16_HANDLER( m37710_internal_word_r )
|
||||
{
|
||||
m37710i_cpu_struct *cpustate = get_safe_token(&space->device());
|
||||
UINT16 ret = 0;
|
||||
|
||||
if (mem_mask == 0xffff)
|
||||
{
|
||||
return (m37710_internal_r(cpustate, offset*2) | m37710_internal_r(cpustate, (offset*2)+1)<<8);
|
||||
}
|
||||
else if (mem_mask == 0xff00)
|
||||
{
|
||||
return m37710_internal_r(cpustate, (offset*2)+1)<<8;
|
||||
}
|
||||
else if (mem_mask == 0x00ff)
|
||||
{
|
||||
return m37710_internal_r(cpustate, (offset*2));
|
||||
}
|
||||
if (mem_mask & 0x00ff)
|
||||
ret |= m37710_internal_r(cpustate, offset*2);
|
||||
if (mem_mask & 0xff00)
|
||||
ret |= m37710_internal_r(cpustate, offset*2+1)<<8;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( m37710_internal_word_w )
|
||||
{
|
||||
m37710i_cpu_struct *cpustate = get_safe_token(&space->device());
|
||||
|
||||
if (mem_mask == 0xffff)
|
||||
{
|
||||
m37710_internal_w(cpustate, (offset*2), data & 0xff);
|
||||
m37710_internal_w(cpustate, (offset*2)+1, data>>8);
|
||||
}
|
||||
else if (mem_mask == 0xff00)
|
||||
{
|
||||
m37710_internal_w(cpustate, (offset*2)+1, data>>8);
|
||||
}
|
||||
else if (mem_mask == 0x00ff)
|
||||
{
|
||||
m37710_internal_w(cpustate, (offset*2), data & 0xff);
|
||||
}
|
||||
if (mem_mask & 0x00ff)
|
||||
m37710_internal_w(cpustate, offset*2, data & 0xff);
|
||||
if (mem_mask & 0xff00)
|
||||
m37710_internal_w(cpustate, offset*2+1, data>>8);
|
||||
}
|
||||
|
||||
extern void (*const m37710i_opcodes_M0X0[])(m37710i_cpu_struct *cpustate);
|
||||
|
Loading…
Reference in New Issue
Block a user