mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
[VIA6522] Read port A/B only if some pins are inputs.
This commit is contained in:
parent
f058d3f6e0
commit
11232428dc
@ -518,10 +518,13 @@ READ8_DEVICE_HANDLER(via_r)
|
||||
/* update the input */
|
||||
if (PB_LATCH_ENABLE(v->acr) == 0)
|
||||
{
|
||||
if (v->in_b_func.read != NULL)
|
||||
v->in_b = devcb_call_read8(&v->in_b_func, 0);
|
||||
else
|
||||
logerror("%s:6522VIA chip %s: Port B is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag.cstr());
|
||||
if (v->ddr_b != 0xff)
|
||||
{
|
||||
if (v->in_b_func.read != NULL)
|
||||
v->in_b = devcb_call_read8(&v->in_b_func, 0);
|
||||
else
|
||||
logerror("%s:6522VIA chip %s: Port B is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag.cstr());
|
||||
}
|
||||
}
|
||||
|
||||
CLR_PB_INT(device);
|
||||
@ -537,10 +540,13 @@ READ8_DEVICE_HANDLER(via_r)
|
||||
/* update the input */
|
||||
if (PA_LATCH_ENABLE(v->acr) == 0)
|
||||
{
|
||||
if (v->in_a_func.read != NULL)
|
||||
v->in_a = devcb_call_read8(&v->in_a_func, 0);
|
||||
else
|
||||
logerror("%s:6522VIA chip %s: Port A is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag.cstr());
|
||||
if (v->ddr_a != 0xff)
|
||||
{
|
||||
if (v->in_a_func.read != NULL)
|
||||
v->in_a = devcb_call_read8(&v->in_a_func, 0);
|
||||
else
|
||||
logerror("%s:6522VIA chip %s: Port A is being read but has no handler\n", cpuexec_describe_context(device->machine), device->tag.cstr());
|
||||
}
|
||||
}
|
||||
|
||||
/* combine input and output values */
|
||||
|
Loading…
Reference in New Issue
Block a user