OSDev.org
https://forum.osdev.org/

drawing with VGA
https://forum.osdev.org/viewtopic.php?f=1&t=33218
Page 3 of 3

Author:  alberinfo [ Fri Jan 25, 2019 3:21 pm ]
Post subject:  Re: drawing with VGA

ok, now trying on fonts.but it doesnt draw nothing or garbage. I.E, if i put the character is 'A' when calling the drawchar func, it doesn't do anything, and if i put the font as a character, then it draws garbage. also i have a problem between the paging and VBE, i cannot access the LFB when paging enabled(it works with paging disabled).can you help me?

Thanks!

Author:  MichaelPetch [ Sat Jan 26, 2019 3:26 pm ]
Post subject:  Re: drawing with VGA

Is your latest code (that doesn't work) in your github account? If it is, are you aware that the video mode being used is a text mode? In QEMU it is 80x25 where the LFB is at 0xb8000. I get the same result of a purplish object on the screen when 'A' is printed whether I enable paging or not (in setup.c). It ill be garbage in text mode because text mode uses 2 bytes for each cell (one character is character, and the other is the attribute). The reason LFB doesn't work is because your function id_map_lfb() is completely broken. It doesn't create proper page tables and page table entries so when you enable paging - any attemptto write to the LFB will fail.

Author:  alberinfo [ Sat Jan 26, 2019 6:31 pm ]
Post subject:  Re: drawing with VGA

MichaelPetch wrote:
Is your latest code (that doesn't work) in your github account?

no, it's not.i've updated the code, so now you can check it out.

MichaelPetch wrote:
The reason LFB doesn't work is because your function id_map_lfb() is completely broken. It doesn't create proper page tables and page table entries so when you enable paging - any attemptto write to the LFB will fail.


you're actually right; i was trying something to map the lfb, but it didn't actually work.

Thanks!

Page 3 of 3 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/