Rationalise some of the reset/initialise logic across pProcessor implementations.

Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian.Conlon
2017-09-01 16:01:40 +01:00
parent ef3203d943
commit 9b43b74c28
12 changed files with 24 additions and 61 deletions

View File

@@ -3,17 +3,17 @@
EightBit::IntelProcessor::IntelProcessor(Memory& memory)
: Processor(memory) {
MEMPTR().word = 0;
SP().word = 0xffff;
SP().word = Mask16;
}
void EightBit::IntelProcessor::initialise() {
Processor::initialise();
for (int i = 0; i < 0x100; ++i) {
m_decodedOpcodes[i] = i;
}
MEMPTR().word = 0;
SP().word = 0xffff;
}
void EightBit::IntelProcessor::reset() {
Processor::reset();
SP().word = AF().word = BC().word = DE().word = HL().word = Mask16;
}