I want to create a small operating system, but in 32-bit mode with graphics with the full resolution of my screen (1366x768) and 24 bpp. For now, my code in nasm assembly calls the 0x4F02 VESA function in real mode with the value of 0xC118 (the second bit from left is 1 to create a linear frame buffer). After, I enter in 32-bit protected mode and I can only access the first 64Kb of the screen in 0xA0000, so the linear frame buffer hasn't been created. And I can't switch bank because it is in protected mode. I have searched in many sites, but I have not found any way to create a linear frame buffer that works.
Asked
Active
Viewed 1,212 times
3
-
5The LFB isn't created at 0xA0000. You need to call 0x4F01 "Return VBE Mode Information" to find out where the LFB is. – Ross Ridge Jun 01 '16 at 19:11
-
1LFB is wherever the call to 0x4F01 said physbase was (same physical address), just map it into virtual memory. – harold Jun 01 '16 at 19:18
-
How do you know that? – Ross Ridge Jun 01 '16 at 19:18
-
The LFB is not in any place in memory, because I have filled all the memory from 0x100000 with 0xff, and the screen remains black. – Bolgeg Jun 01 '16 at 20:55
-
harold was right! I did the call and it said that the physbase was 0xfd000000, and I filled that space with colors and it worked! – Bolgeg Mar 23 '18 at 22:54
-
1I have just tried that almost 2 years later xd – Bolgeg Mar 23 '18 at 22:56
-
Thanks a lot for this discussion, I found mine at 0xE0000000. – preciousbetine Aug 13 '19 at 10:47