1
0
mirror of https://github.com/livingcomputermuseum/ContrAlto.git synced 2026-04-28 20:58:36 +00:00

Simplify mode switching logic

Collapses several switch statements and removes duplicate assignments.
This commit is contained in:
Seth Morabito
2016-08-19 14:22:59 -07:00
parent 18be144349
commit bdc3b0f0e8

View File

@@ -189,9 +189,6 @@ namespace Contralto.CPU
break;
case MicrocodeBank.RAM0:
_microcodeBank[(int)task] = (nextAddress & 0x80) == 0 ? MicrocodeBank.ROM0 : MicrocodeBank.RAM2;
break;
case MicrocodeBank.RAM1:
_microcodeBank[(int)task] = (nextAddress & 0x80) == 0 ? MicrocodeBank.ROM0 : MicrocodeBank.RAM2;
break;
@@ -210,15 +207,12 @@ namespace Contralto.CPU
break;
case MicrocodeBank.RAM0:
_microcodeBank[(int)task] = (nextAddress & 0x80) == 0 ? MicrocodeBank.RAM1 : MicrocodeBank.RAM1;
_microcodeBank[(int)task] = MicrocodeBank.RAM1;
break;
case MicrocodeBank.RAM1:
_microcodeBank[(int)task] = (nextAddress & 0x80) == 0 ? MicrocodeBank.RAM0 : MicrocodeBank.RAM0;
break;
case MicrocodeBank.RAM2:
_microcodeBank[(int)task] = (nextAddress & 0x80) == 0 ? MicrocodeBank.RAM0 : MicrocodeBank.RAM0;
_microcodeBank[(int)task] = MicrocodeBank.RAM0;
break;
}
}