Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Jeko
Member
Posts: 500 Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy
Post
by Jeko » Mon Oct 02, 2006 12:20 pm
I'm programming with VESA. I have encountered a problem. In bochs is all normal, but when i try the kernel on my real computer the image is moved right. I think maybe it is due that my computer has 32 bit vbe, while bochs has 24 bit.
carbonBased
Member
Posts: 382 Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:
Post
by carbonBased » Mon Oct 02, 2006 7:09 pm
Can you post pictures?
The bits per pixel is definitly relevant... however, if you were skewing the basic size of a pixel, then your colours would be all off, as well.
--Jeff
gaf
Member
Posts: 349 Joined: Thu Oct 21, 2004 11:00 pm
Location: Munich, Germany
Post
by gaf » Tue Oct 03, 2006 5:43 am
And this is nothing that you could fix with the small buttons below your screen ?
Jeko
Member
Posts: 500 Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy
Post
by Jeko » Tue Oct 03, 2006 7:23 am
carbonBased wrote: Can you post pictures?
The bits per pixel is definitly relevant
I know this. I have developed two function for drawing pixels in 32bit or 24bit.
For 32bit:
blue; green; red; alpha
For 24bit:
blue; green; red
When I try my kernel on my computer, the image is moved right.
Jeko
Member
Posts: 500 Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy
Post
by Jeko » Tue Oct 03, 2006 7:51 am
this is an example of bochs and real:
Bochs:
Real PC:
mrkaktus
Member
Posts: 102 Joined: Thu Jan 06, 2005 12:00 am
Location: Poland - Gdansk
Contact:
Post
by mrkaktus » Wed Oct 04, 2006 12:06 pm
Are you using double or tripple buffering ? Maybe you set wrong adress of beginning second or third buffer. Are you using linear or buffered interface?
carbonBased
Member
Posts: 382 Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:
Post
by carbonBased » Wed Oct 04, 2006 1:27 pm
MarkOS wrote:
When I try my kernel on my computer, the image is moved right.
Oh... I originally misread. Gaf's right, just move the image over via you're monitor's correction keys.
Any shifting is usually caused by the sync rates and pixel clock used, and it's definitly not uncommon to have to adjust.
--Jeff
Jeko
Member
Posts: 500 Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy
Post
by Jeko » Thu Oct 05, 2006 9:15 am
carbonBased wrote:
Oh... I originally misread. Gaf's right, just move the image over via you're monitor's correction keys.
I already try this. Unfortunately it not works! If only it were so easy!
Dex
Member
Posts: 1444 Joined: Fri Jan 27, 2006 12:00 am
Contact:
Post
by Dex » Thu Oct 05, 2006 10:14 am
Here's something to check:
1. Do you hard code screen width or do you use "BytesPerScanLine" ?, as they are not always the same, if so use "BytesPerScanLine".
2. Are your gdt 0 based ?, if not these could be added to offset.
3. Are you multiplying by the bpp, eg: 3 for 24bit and 4 for 32bits ?.
4. Do you live on the side of a hill ?.
Jeko
Member
Posts: 500 Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy
Post
by Jeko » Thu Oct 05, 2006 10:26 am
1 Yes
2 I don't understand
3 Yes
4 No!
Jeko
Member
Posts: 500 Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy
Post
by Jeko » Fri Oct 06, 2006 8:08 am
I solved the problem
Dex
Member
Posts: 1444 Joined: Fri Jan 27, 2006 12:00 am
Contact:
Post
by Dex » Fri Oct 06, 2006 9:45 am
MarkOS wrote: I solved the problem
You should put what it was, so others with same problem can try it.
Jeko
Member
Posts: 500 Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy
Post
by Jeko » Mon Oct 09, 2006 7:20 am
It's a stupid thing! I can't write to the text video memory.