mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-03-12 10:41:58 +00:00
Start big refactor of device/CPU pin usage (to allow pin events throughout).
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -5,24 +5,32 @@ EightBit::Processor::Processor(Bus& bus)
|
||||
: m_bus(bus) {
|
||||
}
|
||||
|
||||
void EightBit::Processor::powerOn() {
|
||||
Chip::powerOn();
|
||||
void EightBit::Processor::lowerRESET() {
|
||||
lower(RESET());
|
||||
LoweredRESET.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::Processor::raiseRESET() {
|
||||
raise(RESET());
|
||||
raise(HALT());
|
||||
RaisedRESET.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::Processor::lowerINT() {
|
||||
lower(INT());
|
||||
LoweredINT.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::Processor::raiseINT() {
|
||||
raise(INT());
|
||||
RaisedINT.fire(EventArgs::empty());
|
||||
}
|
||||
|
||||
void EightBit::Processor::handleRESET() {
|
||||
raise(RESET());
|
||||
PC() = 0;
|
||||
raiseRESET();
|
||||
}
|
||||
|
||||
void EightBit::Processor::handleINT() {
|
||||
raise(INT());
|
||||
}
|
||||
|
||||
void EightBit::Processor::handleIRQ() {
|
||||
raise(IRQ());
|
||||
raiseINT();
|
||||
}
|
||||
|
||||
void EightBit::Processor::busWrite(const register16_t address, const uint8_t data) {
|
||||
|
||||
Reference in New Issue
Block a user