Exemple #1
0
        public void HardReset()
        {
            GB_bios_register    = 0;      // bios enable
            GBC_compat          = is_GBC;
            in_vblank           = true;   // we start off in vblank since the LCD is off
            in_vblank_old       = true;
            double_speed        = false;
            VRAM_Bank           = 0;
            RAM_Bank            = 1;  // RAM bank always starts as 1 (even writing zero still sets 1)
            delays_to_process   = false;
            controller_delay_cd = 0;

            Register_Reset();
            timer.Reset();
            ppu.Reset();
            audio.Reset();
            serialport.Reset();
            mapper.Reset();
            cpu.Reset();

            vid_buffer   = new uint[VirtualWidth * VirtualHeight];
            frame_buffer = new int[VirtualWidth * VirtualHeight];

            uint startup_color = (!is_GBC && (_settings.Palette == GBSettings.PaletteType.Gr)) ? 0xFFA4C505 : 0xFFFFFFFF;

            for (int i = 0; i < vid_buffer.Length; i++)
            {
                vid_buffer[i]   = startup_color;
                frame_buffer[i] = (int)vid_buffer[i];
            }
        }
Exemple #2
0
        private void HardReset()
        {
            GB_bios_register = 0;         // bios enable
            GBC_compat       = true;
            in_vblank        = true;      // we start off in vblank since the LCD is off
            in_vblank_old    = true;

            RAM_Bank = 1;             // RAM bank always starts as 1 (even writing zero still sets 1)

            Register_Reset();
            timer.Reset();
            ppu.Reset();
            audio.Reset();
            serialport.Reset();

            cpu.SetCallbacks(ReadMemory, PeekMemory, PeekMemory, WriteMemory);

            _vidbuffer = new int[VirtualWidth * VirtualHeight];
        }
Exemple #3
0
        public void HardReset()
        {
            GB_bios_register = 0;         // bios enable
            GBC_compat       = is_GBC;
            in_vblank        = true;      // we start off in vblank since the LCD is off
            in_vblank_old    = true;
            double_speed     = false;
            VRAM_Bank        = 0;
            RAM_Bank         = 1;     // RAM bank always starts as 1 (even writing zero still sets 1)

            Register_Reset();
            timer.Reset();
            ppu.Reset();
            audio.Reset();
            serialport.Reset();
            mapper.Reset();
            cpu.Reset();

            _vidbuffer   = new int[VirtualWidth * VirtualHeight];
            frame_buffer = new int[VirtualWidth * VirtualHeight];
        }
Exemple #4
0
        private void HardReset()
        {
            GB_bios_register = 0;         // bios enable
            in_vblank        = true;      // we start off in vblank since the LCD is off
            in_vblank_old    = true;

            // Start off with RAM all 0xFF (the game 'X' (proto) expects this)
            for (int i = 0; i < RAM.Length; i++)
            {
                RAM[i] = 0xFF;
            }

            Register_Reset();
            timer.Reset();
            ppu.Reset();
            audio.Reset();
            serialport.Reset();

            cpu.SetCallbacks(ReadMemory, PeekMemory, PeekMemory, WriteMemory);

            _vidbuffer = new int[VirtualWidth * VirtualHeight];
        }