mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-07-26 02:24:07 +00:00
Rationalise some of the reset/initialise logic across pProcessor implementations.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
Reference in New Issue
Block a user