Problem using Vesa modes under BOCHS [SOLVED]
Posted: Mon Jul 26, 2010 3:09 am
Hello, I've been writing DOS like 16 bit operating system with GUI and extended memory support.I am using BOCHS 2.4.5 as the pc-emulator and it had been working fine with all my 16 bit functions. Then came the hiccup.
1. When i initialize the 1024x768x256 vesa mode(using inline assembly) inside the kernel, then I can't get above the first 62 colors. I'm using bank switching(I know it's slow). When i use any color out of the fist 62 colors then my putpixel functions woks fine. But when i try to go above 62 colors then Boch's doesn't show any thing. It simply says "Going to fulscreen mode" and then blank. Surprisingly when i write this code directly to bootloader and actually reboot the pc then my real bios is able to diaplay all the 256 colors. But boch's can't.
2. Secondly, I wrote a mouse handling function to keep track of the mouse button states and position. I've wrritten code to get 3 bytes from the keboard I/O port(also the mouse port) but boch's sends me more than 3 bytes and it also doesn't give me proper bytes as it should be. Apparently, when I use QEMU it woks perfect with no sign of error. Whew!
Qemu is the solution of my second problem but not my first problem. Please help!! I'm desperately looking forward to get out of this trouble.
1. When i initialize the 1024x768x256 vesa mode(using inline assembly) inside the kernel, then I can't get above the first 62 colors. I'm using bank switching(I know it's slow). When i use any color out of the fist 62 colors then my putpixel functions woks fine. But when i try to go above 62 colors then Boch's doesn't show any thing. It simply says "Going to fulscreen mode" and then blank. Surprisingly when i write this code directly to bootloader and actually reboot the pc then my real bios is able to diaplay all the 256 colors. But boch's can't.
2. Secondly, I wrote a mouse handling function to keep track of the mouse button states and position. I've wrritten code to get 3 bytes from the keboard I/O port(also the mouse port) but boch's sends me more than 3 bytes and it also doesn't give me proper bytes as it should be. Apparently, when I use QEMU it woks perfect with no sign of error. Whew!
Qemu is the solution of my second problem but not my first problem. Please help!! I'm desperately looking forward to get out of this trouble.