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); }
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); }
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(); }
public Stack(Engine engine) { this.Engine = engine; }
public IORegisters(Engine engine, PPU ppu) { this.Engine = engine; this.PPU = ppu; this.PPUFlags = this.PPU.Flags; }
public APU(Engine engine) { Engine = engine; }
public Cartridge(Engine engine, int prg, int chr, int ram) { this.Engine = engine; PRGROMBanks = new byte[prg][]; CHRBanks = new byte[chr][]; }
public CPU(Engine engine) { this.Engine = engine; this.Stack = new Stack(this.Engine); }