VOGONS


First post, by Low power

User metadata
Rank Newbie
Rank
Newbie

So, this is still my DOSMid fork that described in DOSMid fork that supporting CMSLPT, OPL2LPT and OPL3LPT.
It now works on kFreeBSD-based and Linux-based Unix-like systems. Also, both i386 (32-bit) and amd64 (64-bit) are supported natively.

Of course this Unix port still runs on vintage hardware, such as this i486 laptop:

compaq-lte-elite-runs-debian-gnu-linux.jpg
Filename
compaq-lte-elite-runs-debian-gnu-linux.jpg
File size
1.18 MiB
Views
293 views
File license
Public domain
compaq-lte-elite-runs-debian-gnu-linux-and-dosmid-unix.jpg
Filename
compaq-lte-elite-runs-debian-gnu-linux-and-dosmid-unix.jpg
File size
1.04 MiB
Views
293 views
File license
Public domain

Note the output device is '/dev/parport0', for the CMSLPT:

cmslpt-v2-on-compaq-lte-elite.jpg
Filename
cmslpt-v2-on-compaq-lte-elite.jpg
File size
1.84 MiB
Views
293 views
File license
Public domain

Low-level port I/O requires corresponding privilege, which usuallly means the program have to be run as root.
Writing to serial port or parallel port only need writing permission of specified device node.
For example to write to firsrt serial port from Linux:

-com=/dev/ttyS0

or from kFreeBSD:

-com=/dev/cuau0

or to write to an OPL2LPT on first parallel port from Linux:

-opl2=/dev/parport0

or from kFreeBSD:

-opl2=/dev/ppi0

And, writing LPT using low-level port I/O should also work, provided the program have the required privilege to proform port I/O. For example this option should also work on Unix, just like in DOS:

-opl2=lpt1

Btw, Debian GNU/Linux runs quiet slow on this machine, probably because the processor runs at 50 MHz only.

The process of porting DOSMid enables compiling the source code using a more modern compiler (such as GCC and ICC), which actually discovered a few bugs in the code, which I failed to notice previously. I think this will benefit the existing DOS support as well.

Links to the source code repository can be found in my previous post DOSMid fork that supporting CMSLPT, OPL2LPT and OPL3LPT.

Last edited by Low power on 2024-01-10, 13:15. Edited 2 times in total.

Reply 1 of 3, by progman.exe

User metadata
Rank Newbie
Rank
Newbie

I'm not a midi enthusiast, but this it still very cool.

One thought on permissions, surely those ports are assigned a group? Or the perms on the ports can be changed, so a normal user can run DOSMid?

On Slackware here, /dev/ttyS* have the group dialout, which my user account is in by default. No parallel port on this PC, but an old laptop (er, young compared to your Compaq, a spritely PII) has one and the group on /dev/parport0 is lp. The user accounts are not in that group, but that's only a usermod away.

Reply 2 of 3, by Low power

User metadata
Rank Newbie
Rank
Newbie

You can change the owner/group and the permission for 'tty*' and 'parport*', to enable unprivileged users to use the corresponding serial ports and parallel ports. And yes, most distributions have some preconfigured groups to control access to these device nodes; all you need to do is adding user accounts to such groups to grant access to the corresponding device nodes.

But granting '/dev/port' (for low-level port I/O) access, to unprivileged users (programs) is just too dangerous.

Reply 3 of 3, by Low power

User metadata
Rank Newbie
Rank
Newbie

The latest commits has made it possible to build for non-x86 platforms; of course any device support that requires the x86-specific port I/O will be unavailable, therefore only serial port and parallel port-based (CMSLPT and OPLLPT) output options are available on such platforms.

I have successfully tested it on a IBM Power System 750, using Debian GNU/Linux, big-endian mode, and a parallel port PCI card:

cmslpt-on-ibm-8233-e8b.jpg
Filename
cmslpt-on-ibm-8233-e8b.jpg
File size
648.46 KiB
Views
84 views
File license
Public domain