示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Nescafe.Console"/> class.
        /// </summary>
        public Console()
        {
            Controller = new Controller();

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

            Cpu = new Cpu(this);
            Ppu = new Ppu(this);
        }
示例#2
0
        /// <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];
        }
示例#3
0
文件: Ppu.cs 项目: UncleJey/nescafe
        /// <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];
            _OAM = new OAM[oamLength];

            //_sprites = new byte[32];
            _Sprites        = new OAM[sprLength];
            _spriteIndicies = new int[sprLength];
        }