public synchronized byte[] getExtendedRAM(int size) { byte[] rv = null; if (size > 0) { if (this.ramExtended != null) { if (size > this.ramExtended.length) { rv = new byte[size]; Arrays.fill(rv, (byte) 0); System.arraycopy(this.ramExtended, 0, rv, 0, this.ramExtended.length); this.ramExtended = rv; } else { rv = this.ramExtended; } } else { rv = new byte[size]; Arrays.fill(rv, (byte) 0); this.ramExtended = rv; } } return rv; }
public FDC8272(DriveSelector driveSelector, int mhz) { this.driveSelector = driveSelector; this.mhz = mhz; this.curCmd = Command.INVALID; this.executingDrive = null; this.dmaMode = false; // wird von RESET nicht beeinflusst this.stepRateMillis = 16; // wird von RESET nicht beeinflusst this.tStatesPerMilli = 0; this.tStatesPerRotation = 0; this.tStatesPerStep = 0; this.debugLevel = 0; this.dataBuf = null; this.args = new int[9]; this.results = new int[7]; this.remainSeekSteps = new int[4]; this.seekStatus = new int[4]; this.ioLock = new Object(); this.ioTaskCmd = IOTaskCmd.IDLE; this.ioTaskEnabled = true; this.ioTaskNoWait = false; this.ioTaskThread = new Thread(this, "JKCEMU FDC"); String text = System.getProperty("jkcemu.debug.fdc"); if (text != null) { try { this.debugLevel = Integer.parseInt(text); } catch (NumberFormatException ex) { } } this.ioTaskThread.start(); }