VOGONS


Reply 42 of 50, by Cloudschatze

User metadata
Rank Oldbie
Rank
Oldbie
sunmax wrote on 2021-08-12, 04:50:

Btw: comparing SER38400.COM and SER31250.COM, noticed that at the beginning of the latter, we are setting the low bit of port FFEBh to 1. What's the purpose ?

SER31250.COM was created specifically for use with the PSSJ chipset found in later Tandy 1000 systems. In retrospect, I should have named it "TDY31250.COM" or "TAN31250.COM." I can't edit or update the VCFed post, unfortunately, but will appropriately rename the file if I ever get around to making a consolidated thread of serial drivers/resources on this forum.

In any event, and specific to the Tandy PSSJ chipset, flipping bit 0 at port FFEB negates the default division of the UART clock, and permits the setting of a MIDI-compatible 31250bps rate. This then allows for direct MIDI output from the serial port through the use of a simple current-loop adapter, or connectivity to an RS-232-capable module set to the "PC-1" or 31250 bps rate.

Concerning Western computers, and in addition to the Tandy PSSJ example, several SMC chipsets can also be configured to operate at the standard MIDI rate. I created a "SMC31250.COM" utility for the latter, if there's any interest in that.

Reply 43 of 50, by dreamblaster

User metadata
Rank Oldbie
Rank
Oldbie

Thanks cloudschatze.. i will make a special "CloudSchatze" edition of my phil n chil adapter and send you one for testing 😀

Visit http://www.serdashop.com for retro sound cards, video converters, ...
OPL3LPT, X2, S2, S2P, MCE2VGA, ... many projects !
New X2GS sound card : https://www.serdashop.com/X2GS
Thanks for your support !

Reply 44 of 50, by digger

User metadata
Rank Oldbie
Rank
Oldbie

@Cloudschatze First of all, thanks for the amazing work on all these patches! 😃

Not to burden you with extra work, but would it be practical for you to write and maintain these MPU-232 patches in source form on GitHub in the form of something similar to the patches based on the Ragel syntax, as used by ADPATCH (to patch Adlib and Sound Blaster games with OPL2LPT/OPL3LPT support)? This is what I'm referring to: https://github.com/pdewacht/adlipt/wiki/Makin … ADPATCH-patches

(Perhaps someone knows something even better than Ragel. If so, please chime in!)

This way, the patches could be maintained in a central location and improved and extended further by the community, as opposed to mostly just you working on them alone.

Also, this way perhaps the patches could be made more flexible in terms of hardware support, rather than just being hard-coded for (legacy) COM1. For instance, if the patches could be applied with a selectable I/O address, they could perhaps be made to work with PCIe RS-232 cards on more modern legacy-free PCs (that still have a CSM to boot DOS) as well.

I hope this suggestion is useful. 🙂

Reply 45 of 50, by Cloudschatze

User metadata
Rank Oldbie
Rank
Oldbie
dreamblaster wrote on 2021-08-14, 12:40:

Thanks cloudschatze.. i will make a special "CloudSchatze" edition of my phil n chil adapter and send you one for testing 😀

Nice! I can only guess as to what that might be... 😀

digger wrote on 2021-08-14, 13:47:

I hope this suggestion is useful. 🙂

This is exactly what I'd like to see happen. I need to become familiar with Ragel though, and also reach out to Peter to see if he'd be okay with the creation of an "MPUPATCH" variant based on his work.

Until then, however, I'm happy to look into and directly share anything that might be of interest. With that in mind, attached are the patched routines for Descent 1 and 2 (HMIMDRV.386), and Duke Nukem 3D v1.3D (DUKE3D.EXE - Apogee Sound System).

Similar to the DMX-based stuff, the serial port address isn't actually hard-coded here, and is instead specified in the respective .CFG file for each game.

COM1, for example, is specified as follows (and where the appropriate data rate of the serial port has been configured prior to starting the game):

DESCENT.CFG
-----------
MidiPort=0x3f8

DUKE3D.CFG
----------
MidiPort = 0x3f8

Attachments

  • Filename
    HMI_SMIDI.zip
    File size
    34.85 KiB
    Downloads
    16 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    D3D_SMIDI.zip
    File size
    579.49 KiB
    Downloads
    14 downloads
    File license
    Fair use/fair dealing exception

Reply 46 of 50, by pdw

User metadata
Rank Newbie
Rank
Newbie

@Cloudschatze Feel free to build on ADPATCH/S2PPATCH. I've added a standard open source license to the Git repo to make that explicit. But yeah, the build system is a bit complicated, it takes a lot of steps to go from the pattern files to C code.

The "making ADPATCH patches" page actually describes my original approach. The idea was to have bits of assembly code in the pattern files (e.g. wackywheels.yaml). These are assembled with NASM, and the resulting machine code was turned into Ragel patterns. This ended up not working very well for two reasons. The first is that assembly turns out not to be a very good representation of machine code. I often encountered something that couldn't easilly be expressed in NASM syntax. For example, the instruction "mov al, cl" can be encoded either as 8A/C1 or as 88/C8. NASM always generates the former, Wacky Wheels uses the latter (oops). The second problem is that this system allows no good way to deal with minor variations. (For example, a company's second game reuses the sound code from their first, but it's compiled with a newer version of the compiler, which emits slightly different code.) I had a few gross hacks to try to deal with this, but it was awkward and inflexible.

So for later patches I started using Ragel directly. In principle you could just transcribe the bytes to patch as a hex dump, but to keep it a bit readable, I made a big list of Ragel definitions of the x86 instructions I encountered, so you get patterns like this. This looks a bit scary, but you get used to it and it works well.

Or I should say, it works well for Adlib drivers. I haven't had much luck with MIDI drivers. Most Adlib sound drivers have one "initialize Adlib card" routine and one "send Adlib command" routine, and those are easy to identify and replace. I found MIDI drivers to be much more difficult, more I/O code and more complicated control flow. Perhaps I just had bad luck with the games I picked.

Reply 47 of 50, by Cloudschatze

User metadata
Rank Oldbie
Rank
Oldbie

Thank-you for the excellent feedback, Peter (and sorry for the late reply!). I've been sidetracked with a few other projects, but you've provided some great direction for when I get started.

And speaking of being sidetracked, here's yet another use-case for the MPU-232...

200lx_u5_s.jpg

Reply 49 of 50, by Cloudschatze

User metadata
Rank Oldbie
Rank
Oldbie

And, here's the obligatory potato-cam video, showing portions of Ultima V, Budokan, Zeliard, and Space Quest III with the 200LX.

Mini MIDI Gaming with the HP 200LX and Serdaco MPU-232...

https://youtu.be/FtOAXqwvkIU

Reply 50 of 50, by matze79

User metadata
Rank l33t
Rank
l33t

https://www.roland.com/global/support/archive … _downloads_n-s/

It works also with Windows 95/98/ME Driver and also on XP/2003 with Roland Serial Out Driver.

https://dosreloaded.de - The German Retro DOS PC Community
https://www.retroianer.de - under constructing since ever

Co2 - for a endless Summer