private void preCheckInstruction() {
        if (_captureMode && _captureOut != null) {
            try {
                // log in the same format as other emulators use to make an easier side-by-side comparison
                // format is: ProcessCounter 3 bytes for Opcode Instruction (readable) (after value if storing)   A: X: Y: P: SP: CYC: SL:
                _captureOut.println(
                        _cpu.getCurrentInstructionDescription()
                        + " A:"
                        + ByteFormatter.formatByte(_cpu.getAccumulator())
                        + " X:"
                        + ByteFormatter.formatByte(_cpu.getXRegister())
                        + " Y:"
                        + ByteFormatter.formatByte(_cpu.getYRegister())
                        + " P:"
                        + ByteFormatter.formatByte(_cpu.getFlags())
                        + " SP:"
                        + ByteFormatter.formatByte(_cpu.getStackPointer())
                        + " CYC:"
                        + ByteFormatter.formatThreePlaces(_ppu.getScanlineCycle())
                        + " SL:"
                        + _ppu.getScanlineIndex()
                  );
               // _captureOut.println(" Before. [A=" + ByteFormatter.formatByte(_cpu.getAccumulator()) + "] [X=" + ByteFormatter.formatByte(_cpu.getXRegister()) + "] [Y=" + ByteFormatter.formatByte(_cpu.getYRegister()) + "] [Flags=" + ByteFormatter.formatBits(_cpu.getFlags()) + "]");
            } catch (Exception e) {
                e.printStackTrace();
                setCaptureMode(false, null);
            }
        }
        if (isBreakpoint(_cpu.getProgramCounter(), _cpu.getOpcode())) {
            pause();
        }
        if (_stepCPUInstruction) {

            forcePartialUpdates();
            try {
                synchronized (condVar) {
                    condVar.wait();
                }
            } catch (Exception e) {
                e.printStackTrace();
                setDebuggingOff();
            }
        }
    }