Exemple #1
0
        private void btnLoadBinary_Click(object sender, RoutedEventArgs e)
        {
            Interop.loadBinary(monitorRomPath, 0xFF00);
            Interop.loadBinary(basicRomPath, 0xE000);
            videoRom = File.ReadAllBytes(characterRomPath);
            decodeGraphics();

            Interop.resetProcessor();
            vm.Processor.UpdateProperties(Interop.getProcessorStatus());

            ushort length          = 0xFFFE;
            IntPtr memoryValuesPtr = Interop.getMemoryRange(0x0000, length);

            byte[] result = new byte[length + 1];
            Marshal.Copy(memoryValuesPtr, result, 0, length);

            Disassembly disassembly = new Disassembly(result);

            disassembly.Begin(0xFF00);

            while (disassembly.NextInstructionAddress < 0xFFFE)
            {
                vm.DisassembledOpcodes.Add(disassembly.ToDisassembledOpcode());
                disassembly.Next();
            }

            btnRun.IsEnabled        = true;
            btnSingleStep.IsEnabled = true;
        }
Exemple #2
0
 public void DoProcessorStep(object sender, EventArgs e)
 {
     Interop.doSingleStep();
     Interop.MC6821Status status = Interop.getMC6821Status();
     UpdateProperties(Interop.getProcessorStatus());
     ProcessorStepCompleted(this, null);
     UpdateDisplay(this, null);
 }
Exemple #3
0
 async public void DoProcessorStepInBackground()
 {
     await Task.Run(() =>
     {
         Interop.doSingleStep();
         Interop.MC6821Status status = Interop.getMC6821Status();
         UpdateProperties(Interop.getProcessorStatus());
         UpdateDisplay(this, null);
     });
 }
Exemple #4
0
 public void DoProcessorStepNoFancyGraphics(object sender, EventArgs e)
 {
     if (breakpointAddresses.Contains(model.programCounter))
     {
         shouldRun = false;
     }
     Interop.doSingleStep();
     Interop.MC6821Status status = Interop.getMC6821Status();
     UpdateModelDirectly(Interop.getProcessorStatus());
     UpdateDisplay(this, null);
 }