VGA

32 views
Skip to first unread message

Lotusdew Wealth

unread,
Apr 11, 2024, 1:13:42 PM4/11/24
to BareMetal OS
Hi all,

I was looking at the code of video.asm in the code and it seems it only works with QEMU and VirtualBox signatures. Is this correct understanding ?

init_video_check_id:
sub rsi, 8 ; Move RSI back to start of Bus record
mov edx, [rsi] ; Load value for os_bus_read/write

mov dl, 0 ; Register 0 for Device/Vendor IDs
xor eax, eax
call os_bus_read
cmp eax, 0x11111234 ; QEMU/ Bochs
je init_video_found_bga
cmp eax, 0xBEEF80EE ; VirtualBox
je init_video_found_bga
jmp init_video_done

Will the signtures of actual hardware be similar or we need to modify the code here ?

Ian Seyler

unread,
Apr 12, 2024, 7:43:59 AM4/12/24
to BareMetal OS
That is correct. Theoretically we should be able to change resolution after boot up with the BGA driver. Otherwise the video parameters are set during boot up.

-Ian

Reply all
Reply to author
Forward
0 new messages