/** Updates the debugger display. */ public void update() { memoryAddressValue = longTo16BitInt(memoryAddress.getState()); for (int i = 0; i < NUMBER_BREAKPOINTS; i++) { breakpointValues.set(i, longTo16BitInt(breakpoints[i].getState())); } cpu.setPC(longTo16BitInt(programCounter.getState())); log.fine("Debugger display updated"); }
/** 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"); }