示例#1
0
        public Gpu(IDisplay display, InterruptManager interruptManager, Dma dma, Ram oamRam, bool gbc)
        {
            _r                = new MemoryRegisters(GpuRegister.Values().ToArray());
            _lcdc             = new Lcdc();
            _interruptManager = interruptManager;
            _gbc              = gbc;
            _videoRam0        = new Ram(0x8000, 0x2000);
            _videoRam1        = gbc ? new Ram(0x8000, 0x2000) : null;
            _oamRam           = oamRam;
            _dma              = dma;

            _bgPalette  = new ColorPalette(0xff68);
            _oamPalette = new ColorPalette(0xff6a);
            _oamPalette.FillWithFf();

            _oamSearchPhase     = new OamSearch(oamRam, _lcdc, _r);
            _pixelTransferPhase = new PixelTransfer(_videoRam0, _videoRam1, oamRam, display, _lcdc, _r, gbc, _bgPalette,
                                                    _oamPalette);
            _hBlankPhase = new HBlankPhase();
            _vBlankPhase = new VBlankPhase();

            _mode  = Mode.OamSearch;
            _phase = _oamSearchPhase.Start();

            _display = display;
        }
示例#2
0
 public void PixelTransfer(PixelTransfer pname, int param)
 {
     gl.glPixelTransferi((int)pname, param);
     CheckException();
 }
示例#3
0
文件: GL.cs 项目: Wiladams/NewTOAPIA
 public static void PixelTransfer(PixelTransfer pname, int param)
 {
     gl.glPixelTransferi((int)pname, param);
 }
示例#4
0
文件: GL.cs 项目: Wiladams/NewTOAPIA
 public static void PixelTransfer(PixelTransfer pname, float param)
 {
     gl.glPixelTransferf((int)pname, param);
 }