Exemple #1
0
 public static void Main(string[] args)
 {
     Engine e = new Engine("Balloon Fight.nes");
     e.Run();
     //Graphics g = new Graphics(256, 240);
     //Console.Read();
     //while (true);
 }
Exemple #2
0
        public PPU(Engine engine)
        {
            this.Engine = engine;
            this.dumpSprite = new SpriteDumpFunc(dumpSpriteSmall);
            // Attribute Lookup Tables
             	for (int i = 0; i != 0x400; ++i)
            {
                AttributeShiftTable[i] = (byte)(((i >> 4) & 0x04) | (i & 0x02));
                AttributeLocationTable[i] = (byte)(((i >> 4) & 0x38) | ((i >> 2))  & 7);
               }

            // Setup nametables
            Nametables.SetupNametables(this.Mirroring);
        }
Exemple #3
0
        public Graphics(Engine engine, int width, int height)
        {
            Engine = engine;
            Width = width;
            Height = height;
            //Screen = new int[Width * Height];
            BGBuffer =  new int[(Width)*(Height)];
            SprHighBuffer = new int[(Width)*(Height)];
            SprLowBuffer = new int[(Width)*(Height)];
            // Debug
            /*int offset = width * (height/2);
            for (int x = 0; x < width; x++)
                Screen[offset + x] = Color.Blue.ToArgb();*/

            Initialise(1);

            Render();
        }
Exemple #4
0
 public Stack(Engine engine)
 {
     this.Engine = engine;
 }
Exemple #5
0
 public IORegisters(Engine engine, PPU ppu)
 {
     this.Engine = engine;
     this.PPU = ppu;
     this.PPUFlags = this.PPU.Flags;
 }
Exemple #6
0
 public APU(Engine engine)
 {
     Engine = engine;
 }
Exemple #7
0
 public Cartridge(Engine engine, int prg, int chr, int ram)
 {
     this.Engine = engine;
     PRGROMBanks = new byte[prg][];
     CHRBanks = new byte[chr][];
 }
Exemple #8
0
 public CPU(Engine engine)
 {
     this.Engine = engine;
     this.Stack = new Stack(this.Engine);
 }