correction of protection of bits 1...7

This commit is contained in:
folkert van heusden 2022-06-17 20:34:37 +02:00
parent 89bca61148
commit 47f2ad193f

View file

@ -308,6 +308,11 @@ void bus::setMMR0(int value)
if (value & 1) if (value & 1)
value &= ~(7 << 13); // reset error bits value &= ~(7 << 13); // reset error bits
if (MMR0 & 0160000) {
if ((value & 1) == 0)
value &= 254; // bits 7...1 are protected
}
// TODO if bit 15/14/13 are set (either of them), then do not modify bit 1...7 // TODO if bit 15/14/13 are set (either of them), then do not modify bit 1...7
MMR0 = value; MMR0 = value;