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!
drawing with VGA
-
- Member
- Posts: 799
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
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.
Re: drawing with VGA
no, it's not.i've updated the code, so now you can check it out.MichaelPetch wrote:Is your latest code (that doesn't work) in your github account?
you're actually right; i was trying something to map the lfb, but it didn't actually work.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.
Thanks!