adalbert wrote:I found that project, controlling AdLib with parallel port:
http://www.raphnet.net/electronique/adlib/adlib_en.php
I have already seen that mentioned on this forum, but i will post it here anyway. This project is meant to be used for playing tracker music by computers without ISA slot, but I wonder if that could be used to have music through LPT port in old MS-DOS laptops, without integrated soundcard?
No, not without modifying the sound drivers.
adalbert wrote:
I don't have much experience with low-level PC programming, handling ports, interrupts and stuff, but I understand that both 8-bit ISA and LPT ports can feed data through 8-bit outputs. LPT plug doesn't have address lines, it is fixed at BIOS level or by jumpers, but that shouldn't be a problem because Adlib can receive fake address bits just by pulling adequate levels on adequate pins. So, the question is, if we setup a game to use Adlib sound card at 0x378 address (which would be the address of parallel port), will it just start sending data through parallel port and the in-game music will work? If yes, then I would try to design a SMD version of Adlib with LPT plug and built-in speaker, which would make a nice addition to old laptops, more compatible than the Covox thing. But maybe there will be problems in supporting it directly by the games?
Writing to Adlib port 0x388 gives the OPL chip the data, the address, and write strobe, from where the OPL chip knows the register index port is written. The LPT uses the data, address and write strobe just to load a 8-bit latch so it sets the 8 data pins on the connector.
Therefore, to use OPL chip through LPT port, you'd need at least three IO writes to LPT port to simulate a single data write to OPL chip - write data, write control port to enable write signal, write control port again to disable write signal.
So it is certainly possible and you can write music players for this, but modifying games may not be worth it.
However, building an Adlib clone to IDE connector could work better, it has all the necessary signals, and all it needs is changing the base port.