/* Give this thread root permissions to access the hardware */
privity_err = ThreadCtl( _NTO_TCTL_IO, NULL );
if ( privity_err == -1 ) {fprintf( stderr, “can’t get root perm\n”);}
handle = mmap_device_io(1, 0x378 ); //1 byte long register, the address of paralell port
out8( handle, 0xFF ); // a simple write to the port
}
It’s working correctly.
And my question is this:
How can I controll the
IDE0 (address 1f0 - 1f7)
IDE1 (address 3f0 - 3f7)
What do you mean by it doesn’t work. Fooling around with the floppy and ide controler is not a very good ideal mainly if the floppy and ide driver are running at the same time.
It’s mean I used a digital multimeter, to measure the voltages on the IDE port’s pins, and it didn’t changed.
floppy and ide driver are running at the same time
yes but the system don’t use the IDE1 port (the winchester and the CD is on the IDE0).
Can it make some problem?
Or shutdown the driver? (but in this case i can’t use my system )
I’m no expert on IDE but I believe this is more like a bus then say a parallel port. Hence when you write something it only last a fraction of a second, just like to a memory bus. Too fast for a multimeter to catch.
Just to be on the safe side make sure the QNX IDE driver doesn’t use the secondary controller.
What does working mean? Hook up a drive and if the driver will access it, it works. Don’t count on using the EIDE bus as some kind of digital I/O port like you can do with some of the Parallel Port lines. You can just poke the ports and read the status register to see if things seem sane.
I don’t think people really care. It’s the first time in 20 years that I hear about someone wanting to take controle if the AT interface directly. That being said I guess someone could write some sort of device to connect to this but I thing it would be easier to design a PCI board
Nah not an offer However this thing got me thinking about the possibility of have some sort of custom design hanging on the SATA/PATA interface. I still believe it would be easier to design a PCI board but you never know.
You might want to think a bit about where the ATA interface came from. The original IBM AT hard drive had a serious bit of hardware on the controller, which was connected to the drive via two cables. I think the drives were pretty dumb, and the controller had the smarts to control the disk and head movements. When the IDE interface came along, the hardware on the CPU side diminished considerably, and the controller smarts went into the drive itself. This caused a lot of problems early on if you wanted to put a master and a slave on the cable, but from different drive manufacturers, I think because only the master electronics really did anything.
The point I’m getting around to is that I think to a large degree the IDE cable is an extension of the original IBM PC 16 bit bus. I’m sure that the transmission properties have been much improved from the early days, but in the end I think it is still the same basic bus. So I doubt it was be very useful unless it was for a very similar purpose.