示例#1
0
        private void InitializeComponents(out Ppu ppu, out Interrupts interrupts, out Memory memory, out Dma dma, out Apu apu, out Cpu cpu, out Input input, out LegacyNesEmu legacy)
        {
            var ppuWip        = new Ppu(this);
            var legacyWip     = new LegacyNesEmu(ppuWip);
            var interruptsWip = new Interrupts(ppuWip);
            var inputWip      = new Input(legacyWip);
            var memoryWip     = new Memory(this, ppuWip, interruptsWip, inputWip, legacyWip);
            var dmaWip        = new Dma(this, memoryWip);
            var apuWip        = new Apu(this, dmaWip, memoryWip);
            var cpuWip        = new Cpu(interruptsWip, memoryWip);

            dmaWip.apu        = apuWip;
            memoryWip.dma     = dmaWip;
            memoryWip.apu     = apuWip;
            interruptsWip.cpu = cpuWip;
            ppuWip.memory     = memoryWip;
            ppuWip.interrupts = interruptsWip;

            ppu        = ppuWip;
            interrupts = interruptsWip;
            memory     = memoryWip;
            dma        = dmaWip;
            apu        = apuWip;
            cpu        = cpuWip;
            input      = inputWip;
            legacy     = legacyWip;
        }
示例#2
0
 public Memory(Emulator emulator, Ppu ppu, Interrupts interrupts, Input input, LegacyNesEmu legacyNesEmu)
 {
     this.emulator   = emulator;
     this.ppu        = ppu;
     this.interrupts = interrupts;
     this.input      = input;
     this.legacy     = legacyNesEmu;
 }
示例#3
0
        public EmulationState(Emulator emulator, Ppu ppu, Interrupts interrupts, Memory memory, Dma dma, Apu apu, Cpu cpu, Input input, IVideoProvider videoProvider)
        {
            this.emulator = emulator;

            this.ppu        = ppu;
            this.interrupts = interrupts;
            this.memory     = memory;
            this.dma        = dma;
            this.apu        = apu;
            this.cpu        = cpu;
            this.input      = input;

            this.view = videoProvider;
        }