mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-22 15:29:58 +00:00
control: Support unaligned read and size != 4.
This commit is contained in:
parent
c42e1f28d6
commit
aa33a1644c
@ -280,10 +280,15 @@ uint32_t ControlVideo::read(uint32_t rgn_start, uint32_t offset, int size)
|
|||||||
value = 0;
|
value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offset & 3)
|
AccessDetails details;
|
||||||
LOG_F(WARNING, "Control: unaligned read from register 0x%X", offset >> 4);
|
details.size = size;
|
||||||
|
details.offset = offset & 3;
|
||||||
|
uint32_t result = pci_conv_rd_data(value, value, details);
|
||||||
|
if ((offset & 3) || (size != 4)) {
|
||||||
|
LOG_F(WARNING, "%s: read %s %03x.%c = %08x -> %0*x", this->name.c_str(), get_name_controlreg(offset), offset, SIZE_ARG(size), value, size * 2, result);
|
||||||
|
}
|
||||||
|
|
||||||
return BYTESWAP_SIZED(value, size);;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user