Exemplo n.º 1
0
        private void InitChip8XMachine()
        {
            this.m_VM = new Chip8XMachine();

            m_VM.VideoInterface.DisableWrappingX = (this.m_CheckBox_C8DisableWrappingX.IsChecked == true);
            m_VM.VideoInterface.DisableWrappingY = (this.m_CheckBox_C8DisableYWrap.IsChecked == true);
            if (m_CheckBox_C8EnableHighres.IsChecked == true)
            {
                m_VM.StartingChipMode = ChipMode.SuperChip;
            }
            m_VM.ProcessorCore.AntiFlickerHack              = (this.m_CheckBox_C8AntiFlickerHack.IsChecked == true);
            ((ChipResources)m_VM.Resources).ProgramSource   = m_RomFileSource;
            ((ChipResources)m_VM.Resources).FontSource      = new FileStream(Paths.Chip8FontPath, FileMode.Open, FileAccess.Read);
            ((ChipResources)m_VM.Resources).SuperFontSource = new FileStream(Paths.SChipFontPath, FileMode.Open, FileAccess.Read);
            ((ChipResources)m_VM.Resources).LoadFonts       = (this.m_Checkbox_C8XLoadFonts.IsChecked == true);
            if (m_RadioButton_C8XNormalLoadPoint.IsChecked == true)
            {
                ((ChipResources)m_VM.Resources).LoadPointAddress = Chip8XMachine.PROGRAM_ENTRY_POINT;
            }
            else
            {
                ((ChipResources)m_VM.Resources).LoadPointAddress = Chip8XConfig.customLoadPoint;
            }
            m_VM.ExtraCycleSpeed        = (this.m_CheckBox_C8EpicSpeed.IsChecked == true) ? 9001 : 0;
            m_VM.IsHybridDynarecEnabled = Chip8XConfig.use1802Recompiler;
            m_VM.MachineMode            = (CDP1802Mode)m_ComboBox_HLESelector.SelectedIndex;
        }
Exemplo n.º 2
0
 public RenderWindow(Chip8XMachine machine)
 {
     m_Machine = machine;
     InitializeComponent();
 }
Exemplo n.º 3
0
 public Interpreter(Chip8XMachine machine) : base(machine)
 {
 }
Exemplo n.º 4
0
 public void StartDebugging(VirtualMachine currentMachine)
 {
     m_Machine = (Chip8XMachine)currentMachine;
     memoryViewer1.SetMemory(m_Machine.SystemMemory);
     UpdateDebugInfo();
 }
Exemplo n.º 5
0
 public VideoInterface(Chip8XMachine machine)
 {
     m_ParentMachine = machine;
     m_Buffer        = new bool[(SuperResolutionX + 1) * (SuperResolutionY + 1)];
 }