DarkElvenAngel
Posts: 802
Joined: Tue Mar 20, 2018 9:53 pm

Running DOS with an LPT port

Mon May 18, 2020 5:52 pm

Hello everyone,

I was going though some of my old things and I have a bunch of old Basic Stamps Modules all the software is for DOS and the programer requires a parallel port (LPT). I have a USB Dock that has serial and parallel ports so I have that covered.

What I don't have is a way to run the software. Now I know that they have updated software that unfortunately doesn't work for these old models.

Does anyone know of a DOSbox or like emulator that supports the Parallel and Serial ports that runs on a Pi?

If I only had one or two modules I wouldn't bother but I have about 20 and I have many projects they are well suited to.

Thanks

trejan
Posts: 2118
Joined: Tue Jul 02, 2019 2:28 pm

Re: Running DOS with an LPT port

Mon May 18, 2020 6:04 pm

USB parallel port adapters will usually only work with printers. They're not suitable for the old bitbang tricks that were used to interface it to other devices.

DarkElvenAngel
Posts: 802
Joined: Tue Mar 20, 2018 9:53 pm

Re: Running DOS with an LPT port

Mon May 18, 2020 6:27 pm

trejan wrote:
Mon May 18, 2020 6:04 pm
USB parallel port adapters will usually only work with printers. They're not suitable for the old bitbang tricks that were used to interface it to other devices.
They came up with some serial interface to program them but it doesn't work. I would still want to try it if I could find the software that could at least try. My only other option would be to rebuild a computer with a native port on it.

trejan
Posts: 2118
Joined: Tue Jul 02, 2019 2:28 pm

Re: Running DOS with an LPT port

Mon May 18, 2020 6:49 pm

The "easiest" solution is going to be running it on an old DOS PC.

There are patched versions of Dosbox with direct parallel port access but you need a real parallel port that has an I/O port. A USB parallel port isn't going to work. In theory it should be possible to use the Pi GPIOs but you'd need to write it all yourself. You'll also need level translation as it will be using 5V signals.

I can't find anybody that has documented the old BS1 parallel protocol so making your own programmer would require that to be done first. It shouldn't be a complicated protocol considering the PIC they used on the modules.

DarkElvenAngel
Posts: 802
Joined: Tue Mar 20, 2018 9:53 pm

Re: Running DOS with an LPT port

Mon May 18, 2020 7:16 pm

trejan wrote:
Mon May 18, 2020 6:49 pm
The "easiest" solution is going to be running it on an old DOS PC.

There are patched versions of Dosbox with direct parallel port access but you need a real parallel port that has an I/O port. A USB parallel port isn't going to work. In theory it should be possible to use the Pi GPIOs but you'd need to write it all yourself. You'll also need level translation as it will be using 5V signals.

I can't find anybody that has documented the old BS1 parallel protocol so making your own programmer would require that to be done first. It shouldn't be a complicated protocol considering the PIC they used on the modules.
I was afraid of that I went down this road years ago and it was a dead end. I was hoping things would have progressed. I have a better grasp of programming than at that time. The BS1 if memory serves uses D0 and the Stobe lines for programming it would be easy to check with the cable. If there was a patch for DOSbox or whatever that could output writes to the LPT port I believe there are 2 addresses one for data one for command. Maybe I could write something to catch the events.

Might be far easier to repair an old PC I have a few kicking around.

trejan
Posts: 2118
Joined: Tue Jul 02, 2019 2:28 pm

Re: Running DOS with an LPT port

Mon May 18, 2020 7:49 pm

You might be able to adapt https://github.com/schuppeste/Dosbox-AR ... inter-Port for a Raspberry Pi. No idea how well it works so YMMV.
DarkElvenAngel wrote:
Mon May 18, 2020 7:16 pm
The BS1 if memory serves uses D0 and the Stobe lines for programming it would be easy to check with the cable.
Yeah. It is using the strobe as a clock.

DarkElvenAngel
Posts: 802
Joined: Tue Mar 20, 2018 9:53 pm

Re: Running DOS with an LPT port

Mon May 18, 2020 8:26 pm

trejan wrote:
Mon May 18, 2020 7:49 pm
You might be able to adapt https://github.com/schuppeste/Dosbox-AR ... inter-Port for a Raspberry Pi. No idea how well it works so YMMV.
DarkElvenAngel wrote:
Mon May 18, 2020 7:16 pm
The BS1 if memory serves uses D0 and the Stobe lines for programming it would be easy to check with the cable.
Yeah. It is using the strobe as a clock.
Thanks for the link I'll see if I can figure it out. This is a back burner project so I don't see any swift progress being made it does explain why the new method of serial programing doesn't work properly.

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Running DOS with an LPT port

Wed May 20, 2020 2:07 am

BasicStamp's weird proprietary programming system is one of the reasons we have Arduino: the Interaction Design folks at Ivrea were using BasicStamps but found them expensive and difficult to program. A grad student put together the first Wiring board using an Atmel µc, and his advisor thought it was such a good idea he ripped the idea off and called it Arduino.

A tube of cheap ATtinys and a programmer might be cheaper and less work - and end up more capable. Alternatively, there are 100 MHz STM32 boards that can run MicroPython at a fair clip.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

DarkElvenAngel
Posts: 802
Joined: Tue Mar 20, 2018 9:53 pm

Re: Running DOS with an LPT port

Wed May 20, 2020 5:37 am

scruss wrote:
Wed May 20, 2020 2:07 am
BasicStamp's weird proprietary programming system is one of the reasons we have Arduino: the Interaction Design folks at Ivrea were using BasicStamps but found them expensive and difficult to program. A grad student put together the first Wiring board using an Atmel µc, and his advisor thought it was such a good idea he ripped the idea off and called it Arduino.

A tube of cheap ATtinys and a programmer might be cheaper and less work - and end up more capable. Alternatively, there are 100 MHz STM32 boards that can run MicroPython at a fair clip.
A very good point plus I already have the programmer for Attinys. I was working at one time in R&D developed PLCs using 2 basic stamps in a network I still have all the prototypes and almost all the production models. I was hoping to get one or two running again. The alternative was to replace the stamps with a new daughter board powered by something else. I've thought about using the propeller but then Atmel chips are much easier to get.

I remember clearly that a PLC costed us about 500USD more if you factor in the software and custom hardware, and we could build our own for less than half.

At one point I know we contacted someone about our project and about 6 months later there was a commercial release of a basic stamp PLC. Might have no connection but we abandoned the project after rushing units into service and switched back to already available device's.

Now PLCs are cheap but a basic stamp is still about the same.

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: Running DOS with an LPT port

Wed May 20, 2020 9:12 am

Parallax Inc supplies a BASIC STAMP programming solution for Linux: https://www.parallax.com/downloads/basi ... x-solution

Unfortunately the BASIC compiler in there relies on a binary only library file from Parallax which is a bit of a bummer.

But there is source code in there for a STAMP loader. It uses a serial port.
Memory in C++ is a leaky abstraction .

Return to “General discussion”