Emulating real mode and video modes
Posted: Mon Aug 24, 2015 11:16 pm
I have integrated libx86emu into my OS so that I can run the BIOS under emulation.
I am able to call int 10h for normal VGA and for SVGA functions. The returned results are good. For example I can list SVGA video modes, set one using 0x4F02 and I get "success".
But, for some reason the video mode will not actually change (tried both QEmu and Bochs). Nothing in the logs. I suspect something is wrong with my VM setup, but I'm not sure what. I tried both VGA modes (0x0013) and SVGA modes (0x4f02).
Anyone has any experience doing this?
My emulation code lives here:
https://github.com/kiznit/kiznix/blob/m ... x86/bios.c
x86emu setup here:
https://github.com/kiznit/kiznix/blob/m ... ios.c#L164
test code here:
https://github.com/kiznit/kiznix/blob/m ... ios.c#L233
Note that my first 1 MB of physical memory (DOS/BIOS area) is mapped at ISA_IO_BASE (which is 0xC0000000 VMA).
Thanks!
I am able to call int 10h for normal VGA and for SVGA functions. The returned results are good. For example I can list SVGA video modes, set one using 0x4F02 and I get "success".
But, for some reason the video mode will not actually change (tried both QEmu and Bochs). Nothing in the logs. I suspect something is wrong with my VM setup, but I'm not sure what. I tried both VGA modes (0x0013) and SVGA modes (0x4f02).
Anyone has any experience doing this?
My emulation code lives here:
https://github.com/kiznit/kiznix/blob/m ... x86/bios.c
x86emu setup here:
https://github.com/kiznit/kiznix/blob/m ... ios.c#L164
test code here:
https://github.com/kiznit/kiznix/blob/m ... ios.c#L233
Note that my first 1 MB of physical memory (DOS/BIOS area) is mapped at ISA_IO_BASE (which is 0xC0000000 VMA).
Thanks!