/** Activates the debugger display. */ public void activate() { memoryAddress.setState(memoryAddressValue); memoryAddress.fireStateChanged(); registerA.setState(cpu.getA()); registerBC.setState(cpu.getBC()); registerDE.setState(cpu.getDE()); registerHL.setState(cpu.getHL()); registerSP.setState(cpu.getSP()); ledS.setState(cpu.isSF()); ledZ.setState(cpu.isZF()); ledAC.setState(cpu.isACF()); ledP.setState(cpu.isPF()); ledCY.setState(cpu.isCF()); ledIE.setState(cpu.isIE()); for (int i = 0; i < NUMBER_BREAKPOINTS; i++) { breakpoints[i].setState((long) breakpointValues.get(i)); } programCounter.setState(cpu.getPC()); programCounter.fireStateChanged(); log.fine("Debugger display activated"); }
/** Deactivates (blanks) the debugger display. */ public void deactivate() { memoryAddress.setBlank(); for (SiSDBlock block : memoryData) { block.setBlank(); } registerA.setBlank(); registerBC.setBlank(); registerDE.setBlank(); registerHL.setBlank(); registerSP.setBlank(); ledS.setState(false); ledZ.setState(false); ledAC.setState(false); ledP.setState(false); ledCY.setState(false); ledIE.setState(false); for (SiSDBlock block : breakpoints) { block.setBlank(); } programCounter.setBlank(); instructionDisplay.setState(Application.getString(this, "running")); log.fine("Debugger display deactivated"); }
// auxiliary look-up method private void lookUp(final SiSDBlock block) { if (!block.isBlank()) { memoryAddress.setState(block.getState()); memoryAddress.fireStateChanged(); } }