mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-04-21 01:16:50 +00:00
Use macros to define our device pins.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
+1
-9
@@ -1,12 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "Device.h"
|
||||
|
||||
void EightBit::Device::raisePOWER() {
|
||||
raise(POWER());
|
||||
RaisedPOWER.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::Device::lowerPOWER() {
|
||||
lower(POWER());
|
||||
LoweredPOWER.fire(EventArgs::empty());
|
||||
}
|
||||
DEFINE_PIN_LEVEL_CHANGERS(POWER, Device);
|
||||
|
||||
+2
-10
@@ -7,22 +7,14 @@ EightBit::IntelProcessor::IntelProcessor(Bus& bus)
|
||||
m_decodedOpcodes[i] = i;
|
||||
}
|
||||
|
||||
DEFINE_PIN_LEVEL_CHANGERS(HALT, IntelProcessor);
|
||||
|
||||
void EightBit::IntelProcessor::raisePOWER() {
|
||||
Processor::raisePOWER();
|
||||
raiseHALT();
|
||||
SP() = AF() = BC() = DE() = HL() = Mask16;
|
||||
}
|
||||
|
||||
void EightBit::IntelProcessor::lowerHALT() {
|
||||
lower(HALT());
|
||||
LoweredHALT.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::IntelProcessor::raiseHALT() {
|
||||
raise(HALT());
|
||||
RaisedHALT.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::IntelProcessor::handleRESET() {
|
||||
Processor::handleRESET();
|
||||
PC() = 0;
|
||||
|
||||
+2
-19
@@ -5,25 +5,8 @@ EightBit::Processor::Processor(Bus& bus)
|
||||
: m_bus(bus) {
|
||||
}
|
||||
|
||||
void EightBit::Processor::lowerRESET() {
|
||||
lower(RESET());
|
||||
LoweredRESET.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::Processor::raiseRESET() {
|
||||
raise(RESET());
|
||||
RaisedRESET.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::Processor::lowerINT() {
|
||||
lower(INT());
|
||||
LoweredINT.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::Processor::raiseINT() {
|
||||
raise(INT());
|
||||
RaisedINT.fire(EventArgs::empty());
|
||||
}
|
||||
DEFINE_PIN_LEVEL_CHANGERS(RESET, Processor);
|
||||
DEFINE_PIN_LEVEL_CHANGERS(INT, Processor);
|
||||
|
||||
void EightBit::Processor::handleRESET() {
|
||||
raiseRESET();
|
||||
|
||||
Reference in New Issue
Block a user