• Please review our updated Terms and Rules here

Using multiple controller cards, and learning about IRQs, DMAs, and I/Os

Bill-kun

Veteran Member
Joined
Nov 2, 2020
Messages
685
Location
Michigan
I'd like to try using multiple controller cards to control various drives simultaneously (hard drives, floppy drives, CD-ROM, magneto-optical drive, tape drive, whatever). I know that the following things exist for data flow, and they must be kept separate for everything to function.

IRQ channels
DMA addresses
I/O addresses

  1. How many different IRQ channels are there? Sixteen, numbered 0 to 15.
  2. How many different DMA addresses are there?
  3. How many different I/O addresses are there?
  4. Are DMA addresses, RAM addresses, and I/O addresses referring to the same thing?
  5. Does every device I put into the computer need a unique IRQ channel?
  6. Does every device I put into the computer need a unique DMA address?
  7. IRQs seem to be generally controlled by jumpers on expansion boards. Are DMA addresses controlled by jumpers? If not, how are they controlled?

If my mouse, for example, uses 3F8h, that is 3F8 hexadecimal = 1016 decimal = 1111111000 binary. Does that address then just refer to a specific RAM byte? Or is it a group of bytes? How many bytes are in the group?
 
Following answers are valid for the ISA bus. If otherwise, I'll mention it.


[*]How many different IRQ channels are there? Sixteen, numbered 0 to 15.

But you cannot use them all, certainly not on a 8088/8086 machine.


[*]How many different DMA addresses are there?

Eight, and again, not all usable. Please see: http://baltissen.org/newhtm/isabus.htm


[*]How many different I/O addresses are there?

$000 to $3FF. On PCI machines it can be up to $FFFF.


[*]Are DMA addresses, RAM addresses, and I/O addresses referring to the same thing?

Not at all. It aren't DMA addresses, it are single lines, see my page. The RAM and I/O addresses are different addresses. The 80x86 and Z80 support a separated I/O and memory range. The 6502, 6809 and 680x0 support memory mapped I/O.


[*]Does every device I put into the computer need a unique IRQ channel?

No. But the the IRQ routine for that channel must figure out which device generated the interrupt. This is something the Z80 and 6502 have to do all the time.


[*]Does every device I put into the computer need a unique DMA address?

Sorry, I don't know the answer for this question.


[*]IRQs seem to be generally controlled by jumpers on expansion boards. Are DMA addresses controlled by jumpers? If not, how are they controlled?

On older boards: yes. But by using extra ICs, a CPLD or FPGA, one can control what DMA or INQ to use by software.


If my mouse, for example, uses 3F8h, that is 3F8 hexadecimal = 1016 decimal = 1111111000 binary. Does that address then just refer to a specific RAM byte? ]

$3F8 to $3FF is reserved for COM1. This means your mouse is a serial mouse and not a bus mouse or a PS/2 mouse. And this is I/O, not RAM. Various parts of the I/O range is reserved for various I/O of the PC. $2F8 for COM2, $378 for LPT1, $278 for LPT2. But $3BC can be used by LPT1 as well and a LPT port on $378 becomes LPT2 then. Some I/O ranges are reserved for certain hardware. Some of those ranges you can use for your own purposes but be careful to use those other reserved ranges: the PC will search for this specific hardware but could be confused by yours.

I hope this helps a bit.
 
No. But the the IRQ routine for that channel must figure out which device generated the interrupt. This is something the Z80 and 6502 have to do all the time.

The 80x86 core itself only has mask-able and non-maskable interrupt pins, same as the Z80, it uses external interrupt controllers to cascade that out into the 8 or 15 individual IRQs (8 or 16 bit ISA respectively, not all available). They do the hardware needful to let the CPU figure out which IRQ line on the bus was pulled, IE, they essentially shove a byte onto the bus when the IRQ happens that tells the CPU which memory address to jump to to execute the handler.

Sharing an IRQ between two different devices is technically possible, but it is *not* automatic on the ISA bus and few DOS drivers will support it. Essentially you get one "Jump here when you see this IRQ fired" signal from the hardware, and the software architecture lets *one* driver sit on that. To share an IRQ between two devices you'll need a driver that includes additional intelligence to determine which of those devices fired the interrupt pin; since there's no standard middleware for that under DOS you're essentially not going to be able to do it unless you're willing to write your own drivers for two devices you want to share.
 
I'm using a 386 ISA PC computer. It is a 27-inch tall tower, with 4 bays open to the front, and 2 3.5-inch bays internal only, where I have put hard drives. This is the case I want to use.

The drives I expect I will use the most frequently I have already populated into the case:
  • 5.25-inch floppy (edge connector)
  • 3.5-inch floppy (edge connector)
  • internal Zip drive (IDE connector)
  • DVD drive (I will downgrade to a CD drive if I have to) (IDE connector either way)
Of these, only the floppy drives are connected so far. I need to get hard drives working properly to install drivers for the others.

The drives I can think of that I would want in case 2 are:
  • a magneto-optical drive (50-pin internal SCSI connector)
  • a tape drive (not bought yet)
  • a swappable hard drive bay for IDE drives (IDE connector)

I've got enough controller cards to simultaneously reach all of these, so hopefully it will just be a matter of making sure the IRQs and DMAs and whatever else do not conflict.
 
I’d like to get back to this project, now that I’ve advanced a lot in knowing more and I've gotten many things to work since December 2020. I know my way around vintage computers not expertly, but way better than even a few months ago.

Status updates:

The tall tower 386 has ISA slots. I now have the following working:
  • Both floppy drives
  • Primary 425 MB. physical hard drive
  • Secondary 248 MB. physical hard drive
  • Sound Blaster 16 model CT1750
  • CF card adaptor board and several CF cards
  • Zip 100 parallel port drive
  • Serial mouse
I also have the following available and have gotten them to work. They can’t all work at once, though (I need to install and properly configure a second controller card).
  • Conner tape drive for DC2120 tapes (34-pin)
  • CD-ROM drive (40-pin)
(Regarding the magneto-optical drive I mentioned before and disks for it, it requires a 50-pin SCSI connection. I have the ISA SCSI controller card for this, too. But I will save that for another build.)

I tried plugging the CD-ROM drive into the Panasonic 40-pin set on the Sound Blaster 16, and the Mitsumi 40-pin set, moving the jumper on the SB16 accordingly, but neither worked; MSCDEX.EXE was not able to find it. It looks like the CD-ROM drive can only work when it's connected to the controller card.

I have a controller card that should work as the second controller card so I can connect the tape drive and CD-ROM drive.

Motherboard: Micronics model 09-00021, 386DX, 25 MHz. (math coprocessor boosts it to 29 MHz.)

Primary controller card: SIIG model CI_5000
IMG_6428_crop_small.jpg - Click image for larger version  Name:	IMG_6428_crop_small.jpg Views:	0 Size:	245.2 KB ID:	1204427IMG_6431_cropped_small.jpg - Click image for larger version  Name:	IMG_6431_cropped_small.jpg Views:	0 Size:	244.4 KB ID:	1204429
  • Floppy channel connects to the two floppy drives
  • IDE hard drive channel 1 connects to the primary and secondary physical hard drives
  • IDE hard drive channel 2 connects to the CF card adaptor board. From what I’ve been able to tell, these CF card adaptor boards require themselves to be the only device on the channel.
Proposed secondary controller card: SIIG model SC-JEE012
IMG_6423_cropped_small.jpg - Click image for larger version  Name:	IMG_6423_cropped_small.jpg Views:	0 Size:	178.1 KB ID:	1204430Screenshot 2021-04-18 003120.jpg - Click image for larger version  Name:	Screenshot 2021-04-18 003120.jpg Views:	0 Size:	211.9 KB ID:	1204431
  • Floppy channel would connect to tape drive (and possibly a third floppy drive in the future)
  • IDE hard drive channel would connect to CD-ROM drive (and possibly a third hard drive in the future)
So, the first questions are:
  1. What program can I use to peek at the DMA, I/O, and IRQ addresses?
    • I've got CheckIt 3.0, but I don't know if that will explicitly peek at the addresses and give a report on them.
  2. How do I change any of those values if I want to?
  3. How do I try to do this once I don't think I have any conflicts? Just plug all the hardware in and turn it on?
 

Attachments

  • IMG_6431_cropped_small.jpg
    IMG_6431_cropped_small.jpg
    244.4 KB · Views: 1
Back
Top