private void listState_DoubleClick(object sender, EventArgs e) { if (this.listState.SelectedIndex < 0) { return; } if (this._spectrum.IsRunning) { return; } switch (this.listState.SelectedIndex) { case 0: this._spectrum.CPU.IFF1 = (this._spectrum.CPU.IFF2 = !this._spectrum.CPU.IFF1); break; case 1: this._spectrum.CPU.HALTED = !this._spectrum.CPU.HALTED; break; case 2: { Z80CPU cpu = this._spectrum.CPU; cpu.IM += 1; if (this._spectrum.CPU.IM > 2) { this._spectrum.CPU.IM = 0; } break; } } this.UpdateCPU(false); }
public void ConnectTo(Z80CPU cpu, TestMemory memory, TestSignal busreqSignal, TestSignal intSignal, TestSignal nmiSignal, TestSignal resetSignal, TestSignal waitSignal) { base.ConnectTo(cpu, memory); this.busreqSignal = busreqSignal; this.intSignal = intSignal; this.nmiSignal = nmiSignal; this.resetSignal = resetSignal; this.waitSignal = waitSignal; }
public void ConnectTo(Clock clock, Z80CPU cpu, DualAccessMemoryMappedChip ram16K, Keyboard keyboard, Screen screen, Speaker speaker) { this.clock = clock; this.cpu = cpu; this.ram16K = ram16K; this.keyboard = keyboard; this.screen = screen; this.speaker = speaker; }
public bool CheckExitCondition(Z80CPU cpu, Z80CPU.InternalState internalState, Z80CPU.LifecycleEventType eventType) { if (eventType == Z80CPU.LifecycleEventType.InstructionStart) { if (internalState.InstructionOrigin.Address == instructionAddress) { return(true); } } return(false); }
public Computer() { ComputerRunning = true; _beeperDevice = new Beeper(); _displayUnit = new Display(_ram); _IOdataBus = new Bus16Bit(_beeperDevice); _z80 = new Z80CPU(_ram, _IOdataBus); _z80.Reset(); TestVideoBuffer(); }
public bool CheckExitCondition(Z80CPU cpu, Z80CPU.InternalState internalState, Z80CPU.LifecycleEventType eventType) { if (eventType == Z80CPU.LifecycleEventType.InstructionEnd) { if (internalInstructionCounterInitialValue < 0) { internalInstructionCounterInitialValue = internalState.InstructionCounter - 1; } if (internalState.InstructionCounter == internalInstructionCounterInitialValue + instructionCount) { return(true); } } return(false); }
protected virtual void StepOver() { ulong num = this.Config.MaxStepOverTactCount; ulong tact = this.CPU.Tact; int num2; string mnemonic = Z80CPU.GetMnemonic(new Z80CPU.MEMREADER(this.ReadMemory), (int)this.CPU.regs.PC, true, out num2); ushort num3 = (ushort)((int)this.CPU.regs.PC + num2 & 65535); bool flag = mnemonic.IndexOf("J") >= 0 || mnemonic.IndexOf("RET") >= 0; if (flag) { this.StepInto(); return; } for (;;) { if (this.CPU.Tact - tact >= num) { if (this.OnMaxTactExceed(num)) { break; } tact = this.CPU.Tact; num *= 2UL; } this.StepInto(); if (this.CPU.regs.PC == num3) { return; } if (this.CheckBreakpoint(this.CPU.regs.PC)) { goto Block_6; } } return; Block_6: this.OnBreakpoint(); }
public void ConnectTo(Z80CPU cpu, TestMemory memory) { this.cpu = cpu; this.memory = memory; }
internal void ConnectTo(Clock clock, Z80CPU cpu) { this.clock = clock; this.cpu = cpu; }
public void ConnectTo(Z80CPU cpu, TestMemory memory, TestDevice device1, TestDevice device2) { base.ConnectTo(cpu, memory); this.device1 = device1; this.device2 = device2; }
public void ConnectTo(Z80CPU cpu) { this.cpu = cpu; }
public void ConnectTo(Z80CPU cpu, ULA ula) { this.cpu = cpu; this.ula = ula; }
public CPUStateLogger(Z80CPU cpu) { this.cpu = cpu; log = new StringBuilder(); }
internal void ConnectTo(Z80CPU cpu) { this.cpu = cpu; }
private void dasmPanel_GetDasm(object Sender, ushort ADDR, out string DASM, out int len) { DASM = Z80CPU.GetMnemonic(new Z80CPU.MEMREADER(this._spectrum.ReadMemory), (int)ADDR, true, out len); }
public void ConnectTo(Z80CPU cpu, TestMemory memory, TestInterruptingDevice device) { base.ConnectTo(cpu, memory); this.device = device; }