Beispiel #1
0
        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();
        }
Beispiel #2
0
 public NesMemory(Nes nes)
 {
     this.nes = nes;
     this.rom = nes.Rom;
 }
Beispiel #3
0
 public NesMemory(Nes nes)
 {
     this.nes = nes;
     this.rom = nes.Rom;
 }