public FM2TASController(string fm2Path, int playerNumber, NESConsole console) { this.playerNumber = playerNumber; this.console = console; string[] lines = File.ReadAllLines(fm2Path).Where(x => x.StartsWith("|")).ToArray(); keysForFrame = new byte[lines.Length]; int frame = 0; foreach(string line in lines) { byte keys = 0; if (line.Substring(3, 12).Contains("R")) keys |= 0x80; if (line.Substring(3, 12).Contains("L")) keys |= 0x40; if (line.Substring(3, 12).Contains("D")) keys |= 0x20; if (line.Substring(3, 12).Contains("U")) keys |= 0x10; if (line.Substring(3, 12).Contains("T")) keys |= 0x08; if (line.Substring(3, 12).Contains("S")) keys |= 0x04; if (line.Substring(3, 12).Contains("B")) keys |= 0x02; if (line.Substring(3, 12).Contains("A")) keys |= 0x01; keysForFrame[frame] = keys; frame++; } }
public PPU(NESConsole console) { this.console = console; for (int i = 0; i < 0x4000; ++i) { RAM[i] = 0; } }
public FM2TASController(string fm2Path, int playerNumber, NESConsole console) { this.playerNumber = playerNumber; this.console = console; string[] lines = File.ReadAllLines(fm2Path).Where(x => x.StartsWith("|")).ToArray(); keysForFrame = new byte[lines.Length]; int frame = 0; foreach (string line in lines) { byte keys = 0; if (line.Substring(3, 12).Contains("R")) { keys |= 0x80; } if (line.Substring(3, 12).Contains("L")) { keys |= 0x40; } if (line.Substring(3, 12).Contains("D")) { keys |= 0x20; } if (line.Substring(3, 12).Contains("U")) { keys |= 0x10; } if (line.Substring(3, 12).Contains("T")) { keys |= 0x08; } if (line.Substring(3, 12).Contains("S")) { keys |= 0x04; } if (line.Substring(3, 12).Contains("B")) { keys |= 0x02; } if (line.Substring(3, 12).Contains("A")) { keys |= 0x01; } keysForFrame[frame] = keys; frame++; } }
public Memory(NESConsole console) { this.console = console; RAM = new byte[0x800]; }
public Mapper004(NESConsole console) { this.console = console; }
public CPU(NESConsole console) { this.console = console; initializeOpCodeTable(); }
private void initializeSystem() { cart = new Cartridge("C:\\roms\\lolo.nes"); system = new NESConsole(cart); system.cpu.coldBoot(); system.ppu.coldBoot(); system.ppu.setLoggerEnabled(false); system.cpu.setLoggerEnabled(false); system.io.setLoggerEnabled(false); }