diff --git a/Machines/Electron/Electron.cpp b/Machines/Electron/Electron.cpp index 3d3b2eacf..29c932e4d 100644 --- a/Machines/Electron/Electron.cpp +++ b/Machines/Electron/Electron.cpp @@ -108,7 +108,7 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin // _activeRom = (Electron::ROMSlot)(nextROM&0x0e); // printf("%d -> Paged %d\n", nextROM, _activeRom); // } - if((_activeRom&12) != 8 || nextROM&8) + if(((_activeRom&12) != 8) || (nextROM&8)) { _activeRom = (Electron::ROMSlot)nextROM; } @@ -187,7 +187,7 @@ void Machine::set_rom(ROMSlot slot, size_t length, const uint8_t *data) inline void Machine::signal_interrupt(Electron::Interrupt interrupt) { - _interruptStatus |= (interrupt << 2); + _interruptStatus |= interrupt; evaluate_interrupts(); } diff --git a/Machines/Electron/Electron.hpp b/Machines/Electron/Electron.hpp index 30b08d8ce..83eaf070c 100644 --- a/Machines/Electron/Electron.hpp +++ b/Machines/Electron/Electron.hpp @@ -30,11 +30,11 @@ enum ROMSlot: uint8_t { }; enum Interrupt: uint8_t { - InterruptRealTimeClock = 0x01, - InterruptDisplayEnd = 0x02, - InterruptTransmitDataEmpty = 0x04, - InterruptReceiveDataFull = 0x08, - InterruptHighToneDetect = 0x10 + InterruptRealTimeClock = 0x04, + InterruptDisplayEnd = 0x08, + InterruptTransmitDataEmpty = 0x10, + InterruptReceiveDataFull = 0x20, + InterruptHighToneDetect = 0x40 }; class Machine: public CPU6502::Processor {