mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Instead of cowboy-calling the VESA BIOS in the bootloader, find the emulator VGA adapter by scanning the PCI bus. Then set up the desired video mode by sending device commands.
26 lines
573 B
C++
26 lines
573 B
C++
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <AK/AKString.h>
|
|
#include <Kernel/types.h>
|
|
|
|
// FIXME: This should be a BlockDevice once we have BlockDevice.
|
|
|
|
class BochsVGADevice {
|
|
AK_MAKE_ETERNAL
|
|
public:
|
|
static BochsVGADevice& the();
|
|
static void initialize_statics();
|
|
|
|
BochsVGADevice();
|
|
|
|
PhysicalAddress framebuffer_address() const { return m_framebuffer_address; }
|
|
void set_resolution(int width, int height);
|
|
|
|
private:
|
|
void set_register(word index, word value);
|
|
dword find_framebuffer_address();
|
|
|
|
PhysicalAddress m_framebuffer_address;
|
|
};
|