Exemplo n.º 1
0
        public void Load(byte[] rom)
        {
            cartridge = new Cartridge(rom);

            clock = new Clock();

            cpuRegisters = new CPURegisters(cartridge);
            gpuRegisters = new GPURegisters();

            gpu = new GPU(clock, gpuRegisters);

            keyboard = new Keyboard();

            memory = new Memory(cartridge, gpu, cpuRegisters, gpuRegisters, keyboard);

            processor = new Processor(memory, cpuRegisters, gpu, clock);

            memory.Initialize();
            processor.Initialize();
        }
Exemplo n.º 2
0
 public CPUInstructions(CPURegisters cpuRegisters, Memory memory)
 {
     this.cpuRegisters = cpuRegisters;
     this.memory       = memory;
 }