Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:RoyNES.Console"/> class.
        /// </summary>
        public Console()
        {
            Controller = new Controller();

            CpuMemory = new CpuMemory(this);
            PpuMemory = new PpuMemory(this);

            Cpu = new Cpu(this);
            Ppu = new Ppu(this);
        }
Exemplo n.º 2
0
Arquivo: Ppu.cs Projeto: rna0/RNANES
        /// <summary>
        /// Constructs a new PPU.
        /// </summary>
        /// <param name="console">Console that this PPU is a part of</param>
        public Ppu(Console console)
        {
            _memory  = console.PpuMemory;
            _console = console;

            BitmapData = new byte[256 * 240];

            _oam            = new byte[256];
            _sprites        = new byte[32];
            _spriteIndicies = new int[8];
        }