Hello
I have one problem: Vhen I use VESA function in my operating system to get vesa informations to the 256-byte buffer, my mouse doesn't work. I don't know where is problem. This function is before PM set. After PM set my OS tests for PS/2 and Serial mouse. Before PM set, interrupts are disabled by push dword 2
popfd
, after jump and register set interrupts are enabled simple by sti.
Where can be problem? In interrupt handlers (pushad, popad on begin and end), in CLI-STI or somewhere else?
- My read CMOS date/time now work, but before not. I don't know how I repaired it. Where can be in my OS problem???
- When I start PC and then if I want to exit from my OS by returning to REAL mode and warmboot, it freezes. When I restart PC from Windows and then is my OS booted from floppy disk, returning to REAL mode and warmboot/coldboot is OK. Why my OS doesn't set REAL mode and exit when PC is started???
- excuse my english, I hope you can understand what have I on mind.
- Thanks for answers coders!!!
- Have a nice coding...
Steve
VESA and PM and MOUSE
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:VESA and PM and MOUSE
try to isolate problems. Eg
- you say mouse doesn't work after video mode engaged, and you suspect it's due to interrupts. Do keyboard/timer/etc. still work ? Do mouse work if you don't engaged a video mode ?
- are you sure your *whole* kernel get loaded at the proper address ? it's common to miss parts because of a poor bootloader. Depending on what's missing, feature can work/don't work when you add/remove stuff ...
In any case, make sure you read http://www.osdev.org/osfaq2/index.php/TroubleShooting ...
- you say mouse doesn't work after video mode engaged, and you suspect it's due to interrupts. Do keyboard/timer/etc. still work ? Do mouse work if you don't engaged a video mode ?
- are you sure your *whole* kernel get loaded at the proper address ? it's common to miss parts because of a poor bootloader. Depending on what's missing, feature can work/don't work when you add/remove stuff ...
In any case, make sure you read http://www.osdev.org/osfaq2/index.php/TroubleShooting ...
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:VESA and PM and MOUSE
Quoting the other thread,
Hello
- As I said in "VESA and PM and MOUSE", my mouse doesn't sometimes work (theoretically it may work, but...). When I only set video mode with vesa, all is ok. But if I load eg. 256-byte mode info table into 256 byte buffer - mouse doesn't work. If I delete this part of code, it work. Setting COM1 port (baud, out2, ...) is after PM set. Before setup of COM1 is setup of PS/2 mouse (I have COM1 mouse). But sometimes mouse doesn't work until I put cli/sti somewhere or delete some other part of code, then it work.
- Can be problem with bootloader? I think after bootloader ds=0.
- And what about returning to real mode after computer is turned on? - (excuse my english - when you turn on your PC and your OS is booted before Windows - not when you are in Windows and you reset PC from Windows and then boot your OS). When is PC restarted from Win, and my OS boot, return to the real mode - and exit is successfull.
Thanks for answers
Have a nice coding
Steve
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:VESA and PM and MOUSE
could you be overwriting something important with that 256 bytes of information ? e.g. could it be that you're actually mispointing the VBE information to some code or something alike ?