Page 1 of 1

ISA

Posted: Sat Jan 20, 2007 11:37 am
by xsix
I was wondering about programming ISA bus. I've never programmed it before and i cannot find information about it. I've some sound, video, network cards for ISA, and i want to code them, but there's question, how to detect if there is a device somewhere like old network card

Re: ISA

Posted: Sat Jan 20, 2007 6:19 pm
by Brendan
Hi,
xsix wrote:I was wondering about programming ISA bus. I've never programmed it before and i cannot find information about it. I've some sound, video, network cards for ISA, and i want to code them, but there's question, how to detect if there is a device somewhere like old network card
There is not way to auto-detect most ISA cards (although a few of them support the "ISA Plug & Play" standard, but not many). Mostly you either use a config script (like "config.sys" in DOS) or you do manual probing (or both).


Cheers,

Brendan

Re: ISA

Posted: Sat Jan 20, 2007 7:48 pm
by Tyler
Brendan wrote:Hi,
xsix wrote:I was wondering about programming ISA bus. I've never programmed it before and i cannot find information about it. I've some sound, video, network cards for ISA, and i want to code them, but there's question, how to detect if there is a device somewhere like old network card
There is not way to auto-detect most ISA cards (although a few of them support the "ISA Plug & Play" standard, but not many). Mostly you either use a config script (like "config.sys" in DOS) or you do manual probing (or both).


Cheers,

Brendan
How does one manually probe? Wouldn't sending data to any port have completely diferent results on all ports?

Posted: Sat Jan 20, 2007 10:52 pm
by spix
You can probe for specific ISA cards if you know what you are looking for. For example, if you are looking for an NE2000 ISA card, you know what ports it is likely using.. 0x300, 0x280, 0x320, 0x340, 0x360, 0x380. You send a command to each of those ports, and if a card responds in a way that it should, you know that there is an NE2000 card there.

For the IRQ, linux uses a trick, where it enables all IRQs and then makes the card fire an IRQ, if the IRQ is not assigned to a card already, and it's not a spurious irq, then it belongs to the card.

Hope that helps

Andrew

Posted: Sun Jan 21, 2007 1:24 am
by Brendan
Hi,
spix wrote:You can probe for specific ISA cards if you know what you are looking for. For example, if you are looking for an NE2000 ISA card, you know what ports it is likely using.. 0x300, 0x280, 0x320, 0x340, 0x360, 0x380. You send a command to each of those ports, and if a card responds in a way that it should, you know that there is an NE2000 card there.

For the IRQ, linux uses a trick, where it enables all IRQs and then makes the card fire an IRQ, if the IRQ is not assigned to a card already, and it's not a spurious irq, then it belongs to the card.
Yes..

It's also a good idea to do things in a certain order. For example, disable all PCI cards and Plug & Play ISA cards, then manually probe for "plain" ISA cards, then re-enable Plug & Play ISA cards and set their resources, then re-enable PCI cards and set their resources. That way you minimise the chance of poking something that doesn't like to be poked, and there's less chance of resource conflicts... ;)


Cheers,

Brendan

Posted: Sun Jan 21, 2007 9:49 am
by Tyler
So would you advise having Legacy ISA/COM/LPT device drivers have routines that check if the device exists and i just have to load and run every single one i have? Or are the some standard ISA checksing documents you can send my way?

Posted: Sun Jan 21, 2007 12:26 pm
by xsix
PCI has the detection way of getting vendor and device ID of every BUS.DEVICE.FUNCTION, so if ID is 0xFFFF or zero(0) then there isn't device. If there is device then by it's ID i can load drivers, but if there isn't any detection routine on ISA, except checking for specific device by it's IO ports, it's quite not cool =\ .