New bootloader for AROS
Posted: Fri Dec 16, 2005 12:00 am
Hello people of osdev:
I am working on a project to create (or rather, adapt) a new bootloader for the OS AROS. I'm modifying GRUB 0.97. I want to make several changes, some of which are started and working.
I consider this in the realm of an "OS"-like project because grub has so little resources on startup, it's like an OS of its own in a way. That's why I am asking for help in an OS developer's forum.
Here's what I have:
#1: Splash screen that shows AROS logo immediately after OS selection (done).
#2: Addition of a ps/2 mouse "driver" (or half-driver) that detects button positions on startup and uses that to select an OS, or select the menu (this speeds up boot since you no longer need a timeout and keypress)
#3: An aggressive search function that will find an AROS kernel anywhere on the harddrive. I plan to modify the AROS installer to create backups of the kernel. This is to help in a recovery-situation.
The problem I'm having is with #2.
According to this page:
http://www.computer-engineering.org/ps2mouse/
The proper command code to get the current status of the mouse is 0xEB. Or, possibly 0xE9. In any case both of these commands simply return an acknowledgement (0xFA) but nothing else, other than the keyboard code for "release of the return key". It should have sent me a three-byte response to my question. And other commands (such as reset, 0xff) do in fact send me various codes like 0xaa (passed self-tests) when they are done with the acknowledgement, so I know it's not the receiving code. I've looked at web pages until blind, for example:
http://66.102.7.104/search?q=cache:qtST ... =firefox-a
http://www.computer-engineering.org/ps2protocol/
http://coding.derkeiler.com/Archive/@$$ ... 00386.html
http://my.execpc.com/~geezer/osd/kbd/kbd.txt
and so on and so on, but still haven't found something that answers my questions, really.
For example, I often get 0xFE's in response (which is an error message) but have no idea what the error is. I don't know if GRUB already has an interrupt for the PS/2 enabled, if it does I want to disable it.
I want to disable the keyboard, or sort between keyboard and mouse input (better to disable it temporarily). But the disable keyboard command doesn't seem to have any effect (keyboard still sends codes)
So I'm lost in Intel land.
Can someone who knows please explain how to use 0x64 to disable the ps/2 interrupt, or how to install (and then uninstall) an interrupt without any helper-libraries or OS's (like DOS) (maybe the latter is better)?
Does anyone else have trouble requesting status from their ps/2 mouse? Maybe it's my mouse. Streaming mode works, but I'm trying to detect a button already held down, with no changes.
Anyway, sorry about the length. Going crazy, help if possible!
I am working on a project to create (or rather, adapt) a new bootloader for the OS AROS. I'm modifying GRUB 0.97. I want to make several changes, some of which are started and working.
I consider this in the realm of an "OS"-like project because grub has so little resources on startup, it's like an OS of its own in a way. That's why I am asking for help in an OS developer's forum.
Here's what I have:
#1: Splash screen that shows AROS logo immediately after OS selection (done).
#2: Addition of a ps/2 mouse "driver" (or half-driver) that detects button positions on startup and uses that to select an OS, or select the menu (this speeds up boot since you no longer need a timeout and keypress)
#3: An aggressive search function that will find an AROS kernel anywhere on the harddrive. I plan to modify the AROS installer to create backups of the kernel. This is to help in a recovery-situation.
The problem I'm having is with #2.
According to this page:
http://www.computer-engineering.org/ps2mouse/
The proper command code to get the current status of the mouse is 0xEB. Or, possibly 0xE9. In any case both of these commands simply return an acknowledgement (0xFA) but nothing else, other than the keyboard code for "release of the return key". It should have sent me a three-byte response to my question. And other commands (such as reset, 0xff) do in fact send me various codes like 0xaa (passed self-tests) when they are done with the acknowledgement, so I know it's not the receiving code. I've looked at web pages until blind, for example:
http://66.102.7.104/search?q=cache:qtST ... =firefox-a
http://www.computer-engineering.org/ps2protocol/
http://coding.derkeiler.com/Archive/@$$ ... 00386.html
http://my.execpc.com/~geezer/osd/kbd/kbd.txt
and so on and so on, but still haven't found something that answers my questions, really.
For example, I often get 0xFE's in response (which is an error message) but have no idea what the error is. I don't know if GRUB already has an interrupt for the PS/2 enabled, if it does I want to disable it.
I want to disable the keyboard, or sort between keyboard and mouse input (better to disable it temporarily). But the disable keyboard command doesn't seem to have any effect (keyboard still sends codes)
So I'm lost in Intel land.
Can someone who knows please explain how to use 0x64 to disable the ps/2 interrupt, or how to install (and then uninstall) an interrupt without any helper-libraries or OS's (like DOS) (maybe the latter is better)?
Does anyone else have trouble requesting status from their ps/2 mouse? Maybe it's my mouse. Streaming mode works, but I'm trying to detect a button already held down, with no changes.
Anyway, sorry about the length. Going crazy, help if possible!