T-bit masking fix (bus write)
This commit is contained in:
parent
e7c50e9380
commit
669c9dab71
1 changed files with 2 additions and 2 deletions
4
bus.cpp
4
bus.cpp
|
@ -407,13 +407,13 @@ uint16_t bus::write(const uint16_t a, const bool word_mode, uint16_t value, cons
|
||||||
DOLOG(debug, true, "writeb PSW %s", a & 1 ? "MSB" : "LSB");
|
DOLOG(debug, true, "writeb PSW %s", a & 1 ? "MSB" : "LSB");
|
||||||
uint16_t vtemp = c -> getPSW();
|
uint16_t vtemp = c -> getPSW();
|
||||||
|
|
||||||
value &= ~16; // cannot set T bit via this
|
|
||||||
|
|
||||||
if (a & 1)
|
if (a & 1)
|
||||||
vtemp = (vtemp & 0x00ff) | (value << 8);
|
vtemp = (vtemp & 0x00ff) | (value << 8);
|
||||||
else
|
else
|
||||||
vtemp = (vtemp & 0xff00) | value;
|
vtemp = (vtemp & 0xff00) | value;
|
||||||
|
|
||||||
|
vtemp &= ~16; // cannot set T bit via this
|
||||||
|
|
||||||
c -> setPSW(vtemp, false);
|
c -> setPSW(vtemp, false);
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
|
Loading…
Add table
Reference in a new issue