QEMU is the latest from HomeBrew.
Here's what I'm using (straight from the wiki)
Code: Select all
void HAL_BgaSetVideoMode(unsigned int Width, unsigned int Height, unsigned int BitDepth, uint8_t UseLinearFrameBuffer, uint8_t ClearVideoMemory, uint8_t GetCaps)
{
HAL_BgaWriteRegister(VBE_DISPI_INDEX_ENABLE, VBE_DISPI_DISABLED);
HAL_BgaWriteRegister(VBE_DISPI_INDEX_XRES, Width);
HAL_BgaWriteRegister(VBE_DISPI_INDEX_YRES, Height);
HAL_BgaWriteRegister(VBE_DISPI_INDEX_BPP, BitDepth);
HAL_BgaWriteRegister(VBE_DISPI_INDEX_ENABLE, VBE_DISPI_ENABLED |
(UseLinearFrameBuffer ? VBE_DISPI_LFB_ENABLED : 0) |
(ClearVideoMemory ? 0 : VBE_DISPI_NOCLEARMEM) |
(GetCaps ? VBE_DISPI_GETCAPS : 0));
}
In Bochs, everything works as expected and I can write to the whole screen at 0xE000 0000.
What's wrong with QEMU? I'm using (-vga std) with it...
PS: In case you're wondering... I would use Bochs as my go-to emulator, but I'm using ST2 as my 'IDE' and Bochs doesn't open it's XQuartz window when launched from there.