Hi,
kan wrote:I know someone , somewhere must have thought abt this but still we don't see this thing happning means , there is some glitch in this!
A large amount of hardware uses "generic interfaces".
For video there's the VGA standard and VBE 2 & 3, which is enough to get limited video support. With some code to set a default video mode during boot (using BIOS from real mode), a standard VGA driver and a generic VBE 3 driver you can get at least some support for all video cards.
For IDE/ATA/ATAPI/SATA controllers there's the legacy interface which works with all of them. The IDE/ATA/ATAPI devices are all standard.
Floppy drives and the floppy drive controller is standard - same on all computers with minor variations in the controller.
USB mouse, joystick, keyboard, etc all conform to a HID (Human Interface Device) standard, so a single driver can do all of them. For other USB devices a reasonable number of them use device specific interface standards (AFAIK all the common device types).
PS/2 keyboard & mouse are all standard. There's 3 different protocols for the mouse (standard, standard+scroll wheel, 5 button+scroll wheel), but its easy enough to handle this within the same driver. All keyboard code should use "keyboard mapping tables" which can be changed for internationalization - one table for US keyboards, one for French, one for German, etc but the same device driver for all of them.
Serial ports, parallel ports, CMOS/RTC, ISA DMA, PIT, PIC - all of these are standard and haven't really changed in the last 20 years.
Modems (for serial ports) all extend the "Hayes Command Set" with their own stuff. Supporting the generic commands is easy.
All printers will print standard ASCII with a minimal driver. Not sure if there's other standards for better support.
For sound cards, there's about 5 common digitized sound interfaces, 3 common MIDI interfaces and the game port is standard. Writing device drivers for all of these common interfaces will get about 60% of sound cards working enough.
For ethernet the NE2000 (or compatible) cards are common, so that's a good start. There's a few other common interfaces (e.g. RealTek). With about 4 drivers you can cover 60% of the networking cards (forget about token ring and other obsolete networking cards).
I think SCSI is all standardized (the devices are at least), but I haven't looked into SCSI controllers properly. To be honest I'm expecting trouble with SCSI controllers - there's a wide range of features (caching, RAID, etc).
Then there's buses. PCI, PCIMCIA and USB are all standard and can be scanned using common code. For USB there's actually 3 slightly different interfaces. For ISA there's the Plug&Play standard that was introduced far too late, but the number of computers with ISA cards that are too old for Plug&Play is very small, and getting smaller by the day. By the time your OS is ready you probably won't need ISA much at all.
With all of that, you'd need code to scan the buses plus about 40 device drivers. Once this is done you'd have at least generic support for most hardware and your OS will be usable on a large number of computers, Then you'll be looking at writing device specific drivers (and attracting volunteers to help).
IMHO at this stage it's best to have a well defined/documented interface between the OS and each device type, and an example driver for each device type.
Cheers,
Brendan