mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-07-19 02:25:24 +00:00
Tidied up pin management to be synchronised with the .Net code.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -5,16 +5,18 @@ EightBit::IntelProcessor::IntelProcessor(Bus& bus)
|
||||
: LittleEndianProcessor(bus) {
|
||||
for (int i = 0; i < 0x100; ++i)
|
||||
m_decodedOpcodes[i] = i;
|
||||
|
||||
LoweredHALT.connect([this](EventArgs) { --PC(); });
|
||||
RaisedHALT.connect([this](EventArgs) { ++PC(); });
|
||||
|
||||
RaisedPOWER.connect([this](EventArgs) {
|
||||
raiseHALT();
|
||||
SP() = AF() = BC() = DE() = HL() = Mask16;
|
||||
});
|
||||
}
|
||||
|
||||
DEFINE_PIN_LEVEL_CHANGERS(HALT, IntelProcessor);
|
||||
|
||||
void EightBit::IntelProcessor::raisePOWER() {
|
||||
Processor::raisePOWER();
|
||||
raiseHALT();
|
||||
SP() = AF() = BC() = DE() = HL() = Mask16;
|
||||
}
|
||||
|
||||
void EightBit::IntelProcessor::handleRESET() {
|
||||
Processor::handleRESET();
|
||||
PC() = 0;
|
||||
|
Reference in New Issue
Block a user