예제 #1
0
        public Chip8Emulator(Chip8Rom rom)
        {
            this.keyboard   = new Chip8Keyboard();
            this.delayTimer = new Chip8Timer();
            this.soundTimer = new Chip8Timer();
            this.cpu        = new Chip8CPU(this);

            Chip8Fontset.loadFontset();
            rom.load();
        }
예제 #2
0
        public Chip8CPU(Chip8Emulator emulator)
        {
            this.random     = new Random();
            this.delayTimer = emulator.getDelayTimer();
            this.soundTimer = emulator.getSoundTimer();
            this.keyboard   = emulator.getKeyboard();

            this.registers = new byte[REGISTER_COUNT];
            this.I         = I_ADDRESS;
        }