public void Init(ref FastBitmapLib.FastBitmap frameBuffer) { bus = new Bus(); LoadRom(@"C:\Users\JS\Downloads\super.nes"); bus.Init(ref frameBuffer, chr); //LoadRom(@"G:\roms\nes\Mega Man (E) [!].nes"); //bus.cpu.pc = 0x8000; }
public void Init(ref FastBitmapLib.FastBitmap frameBuffer, byte[] chrrom) { mapper.rom = rom; cpu = new CPU(this); ppu = new PPU(this, ref frameBuffer); ppu.chr = chrrom; cpu.pc = 0x8000; io1[2] = 0x40; }
private static void Window_Load(object sender, EventArgs e) { GL.Enable(EnableCap.Blend); GL.Enable(EnableCap.Texture2D); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); //zet het gebied waar de tekeningen in getekend kunnen worden GL.Viewport(0, 0, window.Width, window.Height); //zet de coordiaaten systeem (niet mogelijk in GL 4). SetOrthographicProjection(); img = new FastBitmapLib.FastBitmap(new Bitmap(width, height)); GL.BindTexture(TextureTarget.Texture2D, textureBuffer); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Clamp); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Clamp); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); }