private void BasicWindow_Load(object sender, EventArgs e) { kernel = new FoenixSystem(version, defaultKernel); terminal = new SerialTerminal(); ShowDebugWindow(); ShowMemoryWindow(); // Now that the kernel is initialized, allocate variables to the GPU gpu.StartOfFrame += SOF; gpu.StartOfLine += SOL; gpu.GpuUpdated += Gpu_Update_Cps_Fps; gpu.VRAM = kernel.MemMgr.VIDEO; gpu.RAM = kernel.MemMgr.RAM; gpu.VICKY = kernel.MemMgr.VICKY; // This fontset is loaded just in case the kernel doesn't provide one. gpu.LoadFontSet("Foenix", @"Resources\Bm437_PhoenixEGA_8x8.bin", 0, CharacterSet.CharTypeCodes.ASCII_PET, CharacterSet.SizeCodes.Size8x8); joystickWindow.gabe = kernel.MemMgr.GABE; if (disabledIRQs) { debugWindow.DisableIRQs(true); } this.Top = 0; this.Left = 0; //this.Width = debugWindow.Left; if (this.Width > 1200) { this.Width = 1200; } this.Height = Convert.ToInt32(this.Width * 0.75); SetDipSwitchMemory(); // Code is tightly coupled with memory manager kernel.MemMgr.UART1.TransmitByte += SerialTransmitByte; kernel.MemMgr.UART2.TransmitByte += SerialTransmitByte; kernel.MemMgr.SDCARD.sdCardIRQMethod += SDCardInterrupt; int left = this.Left + (this.Width - watchWindow.Width) / 2; int top = this.Top + (this.Height - watchWindow.Height) / 2; watchWindow.Location = new Point(left, top); watchWindow.SetKernel(kernel); DisplayBoardVersion(); EnableMenuItems(); ResetSDCard(); if (autoRun) { debugWindow.RunButton_Click(null, null); } autorunEmulatorToolStripMenuItem.Checked = autoRun; }
private void BasicWindow_Load(object sender, EventArgs e) { kernel = new FoenixSystem(this.gpu, version, defaultKernel); terminal = new SerialTerminal(); ShowDebugWindow(); ShowMemoryWindow(); gpu.StartOfFrame += SOF; performanceTimer.Tick += new System.EventHandler(PerformanceTimer_Tick); joystickWindow.beatrix = kernel.MemMgr.BEATRIX; if (disabledIRQs) { debugWindow.DisableIRQs(true); } if (autoRun) { debugWindow.RunButton_Click(null, null); } this.Top = 0; this.Left = 0; //this.Width = debugWindow.Left; if (this.Width > 1200) { this.Width = 1200; } this.Height = Convert.ToInt32(this.Width * 0.75); SetDipSwitchMemory(); // Code is tightly coupled with memory manager kernel.MemMgr.UART1.TransmitByte += SerialTransmitByte; kernel.MemMgr.UART2.TransmitByte += SerialTransmitByte; kernel.MemMgr.SDCARD.sdCardIRQMethod += SDCardInterrupt; int left = this.Left + (this.Width - watchWindow.Width) / 2; int top = this.Top + (this.Height - watchWindow.Height) / 2; watchWindow.Location = new Point(left, top); watchWindow.SetKernel(kernel); DisplayBoardVersion(); EnableMenuItems(); ResetSDCard(); }