Skip to content

Commit

Permalink
Revert "devirtualise cpu registers"
Browse files Browse the repository at this point in the history
This reverts commit 908b508.
  • Loading branch information
davecheney committed Sep 21, 2020
1 parent c37fd70 commit 4a980f6
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions kb11.cc
Expand Up @@ -68,16 +68,17 @@ void KB11::switchmode(uint16_t newm) {
}
}

inline uint16_t KB11::read16(uint16_t a) {
inline uint16_t KB11::read16(uint16_t va) {
auto a = mmu.decode<false>(va, currentmode());
switch (a) {
case 0177776:
case 0777776:
return PSW;
case 0177774:
case 0777774:
return stacklimit;
case 0177570:
case 0777570:
return switchregister;
default:
return unibus.read16(mmu.decode<false>(a, currentmode()));
return unibus.read16(a);
}
}

Expand All @@ -87,19 +88,20 @@ inline uint16_t KB11::fetch16() {
return val;
}

inline void KB11::write16(uint16_t a, uint16_t v) {
inline void KB11::write16(uint16_t va, uint16_t v) {
auto a = mmu.decode<true>(va, currentmode());
switch (a) {
case 0177776:
case 0777776:
writePSW(v);
break;
case 0177774:
case 0777774:
stacklimit = v;
break;
case 0177570:
case 0777570:
switchregister = v;
break;
default:
unibus.write16(mmu.decode<true>(a, currentmode()), v);
unibus.write16(a, v);
}
}

Expand Down

0 comments on commit 4a980f6

Please sign in to comment.