public Spectrum48K() { Memory = new Memory48K(); Ula = new Spectrum48KULA(); Cpu = new Z80CPU(Memory, Ula); Reset(); }
public ExecutionForm(Z80CPU z80) { this.z80 = z80; z80Disassembler = new Disassembler(z80); InitializeComponent(); RefreshDisplay(); }
public MemoryForm(PagedMemory pagedMemory, Z80CPU z80) { this.pagedMemory = pagedMemory; this.z80 = z80; display = new SpectrumDisplay(pagedMemory.AllPages[1]); InitializeComponent(); FollowCombo.SelectedIndex = 2; BankCombo.SelectedIndex = 0; RefreshDisplay(); }
public CPUForm(Z80CPU z80) { InitializeComponent(); this.z80 = z80; }
private String DecodeText(State state, Z80CPU.Op op) { if (op == null) return String.Format("DEFB " + HexByte, z80.Memory.ReadByte(state.Address)); var text = op.Name; if (manipulateDecoded != null) { text = manipulateDecoded.Invoke(text); manipulateDecoded = null; } if (text.Contains("x")) { var x = state.IndexerOffset ?? (SByte)z80.Memory.ReadByte(state.Address++); text = text.Replace("x", x.ToString("+;-;") + String.Format(HexByte, x)); } if (text.Contains("e")) { var e = (SByte)(z80.Memory.ReadByte(state.Address++)); text = text.Replace("e", "$" + new LEWord((UInt16)(state.Address + e))); // + " (" + e.ToString("+0;-0;0") + ")"); } if (text.Contains("nn")) { var nn = z80.Memory.ReadWord(state.Address); state.Address += 2; text = text.Replace("nn", String.Format(HexWord, nn)); } if (text.Contains("n")) { var n = z80.Memory.ReadByte(state.Address++); text = text.Replace("n", String.Format(HexByte, n)); } return text; }
public Disassembler(Z80CPU z80) { this.z80 = z80; }