public Nes(string romfile) { ActiveNes = this; Rom = new Rom(romfile); Mem = new NesMemory(this); Cpu = new Chip6502(Mem); Ppu = new Ppu(this); switch (Rom.MapperNumber) { case 0: Mapper = new NROM(this); break; case 1: Mapper = new MMC1(this); break; case 2: Mapper = new UxROM(this); break; default: // TODO: Cleaner... throw new Exception("Unknown mapper"); } Reset(); }
public Nes(string romfile) { ActiveNes=this; Rom = new Rom(romfile); Mem = new NesMemory(this); Cpu = new Chip6502(Mem); Ppu = new Ppu(this); switch (Rom.MapperNumber) { case 0: Mapper = new NROM(this); break; case 1: Mapper = new MMC1(this); break; case 2: Mapper = new UxROM(this); break; default: // TODO: Cleaner... throw new Exception("Unknown mapper"); } Reset(); }