• Please review our updated Terms and Rules here

A Trick up Its Sleeve - MIDI with the Tandy PSSJ

Cloudschatze

Veteran Member
Joined
Apr 17, 2007
Messages
668
Location
Western United States
Complementing its already capable sound-related functionality, the Tandy PSSJ has yet another, hitherto unknown/uncommon feature: its serial UART is nearly MIDI output compatible, requiring only proper configuration and a simple, passive adapter to provide current-loop and DIN connectivity to a MIDI device.

The "trick" here is that, in the Tandy 1000 RL, RLX, SL(/x) and TL(/x) systems, the serial portion of the PSSJ is clocked with 24 MHz OSC input signal. A configurable division of either thirteen (default), or one, then determines in the UART input clock frequency. With the latter setting, the requisite, MIDI-compatible 31250 bps serial rate can be derived.

pssj_baud.png


A simple debug script can be used to configure the UART for MIDI-compatible operations (where FFEB bits 1-7 will need to be set as appropriate for your system/configuration):

o ffeb d5
o 3fb 83
o 3f8 30
o 3f9 00
o 3fb 03
q


From there, it's simply a matter of constructing, or purchasing, the necessary hardware adapter. There are a few simple designs for Palm Pilot devices that can be used for this purpose, similar to the following:

http://www.frankwillems.com/gig-rig/old_gig-rig9.html

Note that the Palm Pilot is a DCE device. If you build an adapter based on related designs, connect the resistor to pin 3 of the D-SUB connector, rather than pin 2.

If building an adaptor isn't your thing (it's certainly not mine), molded adapters are available from miniMusic that are reasonably priced and look great. Being designed for use with a Palm Pilot, you'll need to use a null-modem cable.




With that, you're almost there. Just need to hack/modify the MPU-401 routines of game drivers for serial-port output, and then boom, MIDI with the PSSJ...


 
Reminds me of the old trick of re-crystaling the original IBM PC async card and setting it to the CL interface. Used before PC MIDI adapters became mainstream.
 
The unusual thing here is that there's no hardware modification necessary, and with the 0.16% error rate for the "standard" baud settings being well within specification, it's a wonder that more UARTs weren't clocked similarly.

I suspect that MIDI wasn't Tandy's intent in providing the additional clocking option, but with a couple of cents in additional parts, and perhaps some additional logic to provide MPU-standard addressing, it would have been interesting to see how far they could have run with this.
 
Well, you still need an EIA RS232C-to-Current Loop adapter, so it's a wash, as you didn't need one with the IBM Async board. Betcha a crystal is way cheaper than a converter. :)
 
Probably not--but recall that MIDI is just a stream of simple messages sent over a serial current loop.

If you want to do something fancy, you do it in software.
 
Well, you still need an EIA RS232C-to-Current Loop adapter, so it's a wash, as you didn't need one with the IBM Async board.
The current-loop conversion is just the addition of an in-series diode and resistor as part of the DE9-to-DIN adapter construction. Here's a shot of another Palm-intended adapter, where the miniMusic version is the same circuit, but encased in molded plastic.

aut_0013.jpg


Likewise, an IBM Async card yet requires DB25-to-DIN adaptation. Given the simplicity of an external current-loop, I'm not clear on why the use of an Async card would have been advantageous or preferred over the use of a standard, OSC-modified serial card. Were the Async cards just less expensive? Regardless, being mod-less, the Tandy PSSJ situation is presumably unique for its time, at least in the IBM-compatible PC world.

Does it behave the same as a dedicated "Intelligent" mode card?
Yes. Other than the non-MPU-standard addressing, lack of command interfacing, and 1-byte data buffer, the behavior is the same as that of an MPU-401 in UART mode. :)

Just to be clear though, the solution presented here is completely obviated by the use of an MPU-401 or compatible card. If you have a free ISA slot, use one of those instead. If, on the other hand, you're blessed with a single-slot Tandy 1000 RL or RLX, serial MIDI output might be appealing, using either a synthesizer or tone generator with RS-232C connectivity and corresponding 38400 bps rate, or the "direct" method outlined here instead.

Concerning the effort involved in hacking MPU-401 drivers for serial output, it's comparable to that required for the recent OPLxLPT and DreamBlaster S2P products. Here's what I had to modify in the AIL MT32MPU.ADV driver used in the Dune 2 video example:

send_byte
---------
MPU-401:
49C: 2E 8B 16 41 04 EC A8 40 74 18 A8 80 75 F7 FB EB 00 EB 00 EB 00 2E 8B 16 3F 04 EC 2E 8B 16 41 04 EB E3 2E 8B 16 3F 04 8A 46 06 EE 5D CB

Serial:
49C: 90 90 BA FD 03 EC A8 20 75 18 A8 80 74 F7 FB EB 00 EB 00 EB 00 90 90 BA F8 03 EC 90 90 BA FD 03 EB E3 90 90 BA F8 03 8A 46 06 EE 5D CB

send_cmd
---------
MPU-401:
4C9: 55 8B 2E 8B 16 41 04 B9 FF FF EC A8 40 74 04 E2 F9 EB 1D 8A 46 06 EE B9 FF FF 2E 8B 16 41 04 EC A8 80 75 0A 2E 8B 16 3F 04 EC 3C FE 74

Serial:
4C9: 55 8B 90 90 BA FD 03 B9 FF FF EC A8 20 75 04 E2 F9 EB 1D 8A 46 06 EE B9 FF FF 90 90 BA FD 03 EC A8 80 75 0A 90 90 BA F8 03 EC 3C FE 75
 
Ah, I don't have any output-only requirements. I use keyboard synths. If all I had were MIDI-output type interfaces, I probably wouldn't have MIDI.

But maybe I'm different--all of my MIDI needs are using MIDI as an input device.
 
Now I'm trying to remember if Chuck has ever introduced us to his synthesizers. Funny how many people in this community have an interest in electronic music.
 
Now I'm trying to remember if Chuck has ever introduced us to his synthesizers. Funny how many people in this community have an interest in electronic music.

My interest isn't electronic music, but rather the traditional sort. You can't beat a full keyboard for input to transcription programs. I'd go nuts with a PC keyboard and a mouse for input only--I'd sooner go to ledger paper and a pen. It is nice to hear an electronic rendering to pick out issues and errors, but I don't for one second think of that as the finished product.
 
So, just to make this a bit more usable and meaningful, here are a number of MPU routines that I've converted for serial (COM1) use.

Electronic Arts
- Budokan
Lucasarts
- The Secret of Monkey Island (EGA)
- The Secret of Monkey Island (VGA)
- The Secret of Monkey Island 2, Day of the Tentacle, et al.
Miles Audio Interface Library
- Dune II, Lands of Lore, The Legend of Kyrandia 1/2, various Interplay titles, et al.
Sierra On-Line
- KQ4, LSL2, PQ2, QFG1, SQ3, et al.
- KQ5, LSL5, PQ3, QFGII, SQ4, et al.
- KQ6, LSL6, SQ6, QFG3, et al.
- Thexder 2 (SCI1 driver variant)
- Zeliard
The modifications are not Tandy specific. That is, whether you're using the connectivity method that is specific to the Tandy 1000 systems described in the original post, or any system, Tandy or otherwise, with a serially-connected (38400 bps) Yamaha tone generator, these modified files can be used. (Roland and Korg devices require slightly different file/driver modifications, which I can also produce, if there's any interest.)

In either case, the UART baud rate appropriate to the method and target device needs to be set beforehand. I've created two small programs that can be used to set the rate on the applicable Tandy systems.



I have two extra null-modem cable and miniMusic adapter pairings to give away. If any Tandy 1000 RL or RLX owner would like to have one, please send me a PM.
 
Microprose did a pretty exceptional job with their Tandy (PSG) sound/music support, but here is a set of Roland MT-32 drivers adapted for serial playback nonetheless.

MicroProse
- Covert Action
- F-15 Strike Eagle II
  • RSOUND.F15 (Rename as RSOUND.EXE; start game with /AR option.)
- F-19 Stealth Fighter
  • RSOUND.F19 (Rename as RSOUND.EXE; start game with /AR option.)
- Hyperspeed
- Knights of the Sky
- Lightspeed
- M1 Tank Platoon
- Railroad Tycoon
- Red Storm Rising
  • RSOUND.RSR (Rename as BSOUND.RSR; start game with /AB option.)
- Sword of the Samurai

Note: F-19's music playback is presently too fast when using the VGA/MCGA graphics option, until such time as I'm able to properly modify that corresponding refresh/playback routine otherwise.


Special thanks to Trixter and NewRisingSun for their technical assistance with these endeavors, the latter of whom also created and provided the UART Sierra SCI0 driver that has been modified and shared with permission.


I still have one extra null-modem/MIDI-adapter set, if anyone is interested.
 
I got mine in the mail late last week, but I haven't had a chance to test it yet. Hopefully sometime soon I can get KQIV loaded up on my 1000RL... ;)
 
As far as other systems supporting this. Pretty sure all Macs, the Apple IIgs (Zilog SCC based like the Mac), and the Amiga support MIDI directly on their serial ports with a similar adapter.
 
Hopefully sometime soon I can get KQIV loaded up on my 1000RL... ;)
You probably already know this, but you'll need to pair the modified MT32.DRV with one of the 1.006 versions of King's Quest IV. That same driver is compatible with Silpheed as well, for what it's worth.

Pretty sure all Macs, the Apple IIgs (Zilog SCC based like the Mac), and the Amiga support MIDI directly on their serial ports with a similar adapter.
NEC's PC-98 systems fall into this category as well. The challenge would be finding any other IBM/PC-compatible that provides soft-switching between standard and MIDI-compatible serial rates.
 
Back
Top