mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 05:29:43 +00:00
platinum: handle non-DWORD register accesses.
This commit is contained in:
parent
38d94e509f
commit
bc2714ab2a
@ -113,11 +113,10 @@ uint32_t PlatinumCtrl::read(uint32_t rgn_start, uint32_t offset, int size) {
|
||||
}
|
||||
}
|
||||
|
||||
if (size != 4) {
|
||||
LOG_F(WARNING, "%s: unsupported register access size %d!", this->name.c_str(),
|
||||
size);
|
||||
// non-DWORD accesses will produce undefined results according with the ERS
|
||||
// I believe we can safely return 0 in this case
|
||||
if (size != 4)
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (offset) {
|
||||
case PlatinumReg::CPU_ID:
|
||||
@ -169,6 +168,12 @@ void PlatinumCtrl::write(uint32_t rgn_start, uint32_t offset, uint32_t value, in
|
||||
return;
|
||||
}
|
||||
|
||||
if (size != 4) {
|
||||
LOG_F(WARNING, "%s: non-DWORD write access, size %d!", this->name.c_str(),
|
||||
size);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (offset) {
|
||||
case PlatinumReg::ROM_TIMING:
|
||||
this->rom_timing = value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user