Reply 20 of 22, by digger
- Rank
- Oldbie
It would be a nice improvement if TLPTINT could be enhanced to fetch the I/O address of the parallel port(s) from the BIOS Data Area. (And in addition to that, a command-line argument for an optional port numbe, so 1 for the default LPT1, 2 for LPT2, etc.)
Indeed, on IBM PC and compatibles, the printer ports are almost always at 378h, 278h, and/or 3bch.
But on more modern PCs with PCI Express slots, all the I/O addresses below 1024 are privileged and PCIe cards cannot utilize those. So if you plug in a parallel port PCIe card, it will be reachable at a higher (non-standard) I/O base address.
With the help of a utility like PRTADD, the I/O base address of many PCI and PCIe cards can automatically be registered in the BIOS Data Area (BDA), which is the "proper" source from which applications should fetch the I/O base address of the LPT devices.
If TLPTINT is improved to query the BDA first and then fall back to the hard-coded legacy addresses if it doesn't find any LPT devices registered there, it could be made to work on newer machines (and non-standard) machines as well.
Unfortunately, to my knowledge, there is no way to dynamically obtain the IRQ of the parallel port(s) from the BDA. But most parallel port sound devices (TNDLPT, OPL2LPT, Covox, DSS) don't use the IRQ of the parallel port anyway.
So with this improvement to the TSR, combined with the "CD C0" patch, you'd enable a reasonable level of hardware abstraction when it comes to supporting Tandy sound on more modern hardware. 🙂