Author Topic: programming aviation Technisonic TFM-138(b) using parallel port / emulate MS-DOS  (Read 5658 times)

0 Members and 1 Guest are viewing this topic.

Offline kyndalTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: ca
hi guys

Im trying to come up with a setup to program aviation FM radios, specifically the  Technisonic TFM-138 and TFM-138B
the "new way" requires a very expensive rs232-radio  programming interface box  PIB-100

the radio's manual however does have a simple schematic (few transistors, resistors and a zener)  that allows using the parallel port
to bit-bang a proprietary serial protocol.

the problem however is that it is a very old DOS only program..  will not work directly on modern pc's 

any suggestions on the best approach to emulating/running DOS(slowly) on a newer computer,  with the direct parallel port control required?
dosbox? virtual box?  vmware? 

I know that USB-parallel ports are no good..  I'm hoping to use a PCI-express card and my modern laptop
rather than sourcing and having to carry an OLD computer around.

also if anybody has the dos software  (PCDLB + PCDLB2 / PCDLA.EXE PCDLB.EXE) it was, but is no longer available from technisonic,  only the newer windows versions are

any information on the PIB-100 interface itself / equivalent circuit etc.  would be even better.

Kyndal
« Last Edit: May 14, 2019, 10:25:34 pm by kyndal »
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 8799
  • Country: ca
hum there was  dos box emulators who worked very well,  i had a very old qbasic program i needed to work on a printer.

https://www.dosbox.com/download.php?main=1

« Last Edit: May 15, 2019, 01:34:24 am by coromonadalix »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 22439
  • Country: gb
  • 0999
The problem with DOSBox is it doesn't support the parallel port, at least the common build doesn't.

If you're using Linux, then you could try DOSEmu, which does have parallel port support.
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 8799
  • Country: ca
hum  unless mistaken,  i used a version who had an lpt port output,  i could print to a file or an printer,   but i think it maybe an was an hacked or modded one, ???   can't find it in my archives, still searching ......


Thats why i have an relatively recent <5 years motherboard with a true lpt port,  i dont know for pci and pci-e to lpt port if they work reliably ?

My friend tried with (pci pci-e cards) for ham radios without huge success (buffer issues ?), but resolved it with a mobo having an true lpt port.


And i have another one with what they call an "pci to isa"  interface,  you can find this board on some compaq small form factor  computers ...


https://www-user.tu-chemnitz.de/~heha/basteln/PC/USB2LPT/
https://www-user.tu-chemnitz.de/~heha/basteln/PC/USB2LPT/faq.en.htm

--------------------------------------------------------------------------------------------------------------------------------
this one has lpt support, i think its the one i used

DOSBOX Megabuild

http://ykhwong.x-y.net/
« Last Edit: May 15, 2019, 10:50:53 am by coromonadalix »
 

Online Berni

  • Super Contributor
  • ***
  • Posts: 5390
  • Country: si
You will likely need a old PC with a real parallel port, but if you are lucky it could work.

VMWare does support passtrough for for parallel ports. So you probably would want to run DOS under that. Its not perfect DOS emulation but its good enough to make most things run. Also you could probably get FreeDOS running natively on your PC, tho getting the LPT port working inside of it might be a challenge.

The problem however is that any method of adding a LPT port to a modern machine ends up being quite far from the CPU. The way LPT ports work is pretty much like a GPIO register on a MCU, it simply outputs whatever value is written to it. This means that the timing of the write operation arriving at the ports controller is critical. Back when this was simply a latch sitting directly on the CPUs data bus meant that you could get pretty predictable timing on it. But in a modern PC the Parallel Port PCI card might have a whole chain of stuff between it and the CPU. That PCI slot might go to a PCI bridge chip that converts it into a diferent bus that goes into the motherboards southbridge, this connects to the CPU socket via a PCIe bus, then inside the CPU this connects to the memory controller subsystem (formerly a northbridge on older PCs) and this controller finally connects to the actual CPU cores where the Windows multitasking kernel runs and interrupts its work all the time. Phew... that's a long way.

So because of all this extra crap in between the timing really gets messed up. To make things worse the LPT driver might have some extra functionality to fix this timing, but that functionality is designed to work with LPT printers, so it might make things even worse for other use cases.

So its all a question of how bad timing your device can tolerate and how much your modern PC messes up said timing in the first place.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12640
  • Country: nz
You could try find one of those old tiny ISA single board computers with a printer port.

If your lucky you can find one with a LAN port too.

Stick it into a box so its a little self contained PC and install win98 on it.

Then you can VNC into it from your main laptop and run the dos app to talk to the printer port whenever you need
« Last Edit: May 15, 2019, 12:41:57 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline kyndalTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: ca
thanks for the input guys.

I'm hoping to some how get it working on my laptop.. either booted in ms-dos / free dos.
maby emulated under windows / linux..   

last option. i guess is finding an actual i386 / i 486 SBC of sorts

Rune
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12640
  • Country: nz
thanks for the input guys.

I'm hoping to some how get it working on my laptop.. either booted in ms-dos / free dos.
maby emulated under windows / linux..   

last option. i guess is finding an actual i386 / i 486 SBC of sorts

Rune

I have one you could have for free, but im not in Canada.

This one http://support.elmark.com.pl/advantech/pdf/PCA-6751man.PDF
Even has LAN and printer port.

« Last Edit: May 16, 2019, 01:09:21 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline kyndalTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: ca
Psi (Ψ).  wow..  now that board would probably be just the ticket!   :D     Pentium might be too fast even. lol
« Last Edit: May 16, 2019, 08:51:13 pm by kyndal »
 

Offline Mirobot200

  • Newbie
  • Posts: 1
  • Country: ca
Hi Kyndal,

Were you able to work something out for programming the 138B with that LPT cable? Or finding that old dos programming software?

Thanks,
Miro
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12640
  • Country: nz
I sent him that single board PC above, so it should have been pretty trivial to get win95 or 98 running then run his dos app in a dos prompt.  Win 95/98 had no hardware address block like XP did, so dos apps could talk direct to LPT port address.
In fact if memory serves me, i think i sent it to him with a 128MB CF card in it that had windows on it already.
« Last Edit: February 08, 2023, 11:17:41 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: ca
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12640
  • Country: nz
USB to LPT
https://www.aliexpress.com/item/1005002559575290.html
dosbox work with it ...

It's not quite that simple, old dos apps that use LPT needs bare metal hardware access to LPT address lines.
USB to LPT simulates an LPT port and allow windows printer API calls to be passed to the usb device so the I/O can be simulated.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: ca
" needs bare metal hardware access to LPT address lines."

any idea how actually it done?  or it just speculations?
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12640
  • Country: nz
Before windows, in the DOS days, if you wanted to use the LPT port your program would write direct to the address registers of the system associated with the LPT port number you wanted.

LPT1 had a base address of 0x378 and that was the data byte register address (writing anything to that address would set the high/low state of the 8 data bit pins on the LPT port).   base adr+1 was for the status info,  and base adr+2 was the control byte.
It was pretty much the same as a MCU writing to the port/pin registers.

When windows 95/98 came along the OS was running on top of DOS. So you could still run DOS programs and they could read/write to hardware. But when windows 2000/XP came along they removed that as it was a security issue to have DOS apps able to write/read direct to PC hardware.  Also they got rid of the DOS layer altogether.

USB to LPT adaptors use drivers that create a virtual printer driver in windows (or a virtual LPT port were you can setup a win-printer to point to), then if you print anything to that printer they pass that data along to the USB adaptor in some proprietary format and the MCU inside the adaptor generates the printer commands. 

There were some situations where USB to LPT adaptors did work for things other than printers, but it was very rare. I think you can toggle some of the status bits through the printer driver but you cant set the data bus directly.
« Last Edit: February 09, 2023, 05:01:14 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline cantata.tech

  • Regular Contributor
  • *
  • Posts: 75
  • Country: au
I've used Dosbox extensively.

Quote
To directly print to a dot matrix printer, you configure DOSBox like this: [parallel] parallel1=file dev:lpt1 If the printer is directly connected to the host’s first parallel port, this should already work (I haven’t tried it though).
Printing from DOSBox – twm's blog
blog.dummzeuch.de/2014/03/03/printing-from-dosbox/
blog.dummzeuch.de/2014/03/03/printing-from-dosbox/

Ultimately what you're going to want to do is replace the parallel data interface with something more 'modern?' convenient.

I suggest that you first try running it in Dosbox with the above options.

Just as a hint, Dosbox works on both windows and linux. You might find one may work better than the other. I know that in some instances that Dosbox under linux was better for some things.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12640
  • Country: nz
With a USB to LPT adaptor DOS box is just taking the LPT access from inside dosbox and routing it as if you were in windows command prompt and directed it to :PRN, which goes through the windows print driver. So the USB virtual usb printer works fine.

But it falls over if you want to control specific bits at hardware addresses because the windows printer driver does not have a clue about that.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
For very little money you could pick up one of the oldest generation thin clients that have a parallel port, (e.g. HP t5145/t5540/t5545/t5630) and install FreeDOS.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12640
  • Country: nz
yes an old PC with LPT port is the easier option. They are pretty much sold as junk.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline SuzyC

  • Frequent Contributor
  • **
  • Posts: 846
In my area, fully functioning old laptops with an actual XP installation and a  genuine LPT "D" connector on the rear can be bought for pennies at any flea market.  A XP utility to allow direct access to the LPT port from a program running in the DOS prompt is all that is needed to allow complete real-time direct DOS control of all the LPT registers.

It is also possible to boot up to MSDOS 6.0 with a floppy or from a MSDOS BOOT CD to run small programs without entering windows. Does not need a driver to access LPT.

  Download: Google to easily find  Porttalk22 windows XP driver to open LPT access in XP.
« Last Edit: February 11, 2023, 03:00:40 pm by SuzyC »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12640
  • Country: nz
A XP utility to allow direct access to the LPT port from a program running in the DOS prompt is all that is needed to allow complete real-time direct DOS control of all the LPT registers.

That's right, id forgotten there was a tool for doing that in XP.
Just have to make sure you run 32bit XP. I'm pretty sure it didn't work on 64bit XP.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Njk

  • Frequent Contributor
  • **
  • Posts: 475
  • Country: ru
Yes, that's the main problem with LPT now. MS did not port the driver for the 64-bit address architecture. BTW some third-party solutions exist, for instance
https://www.downtowndougbrown.com/2010/10/sivava-willem-eprom-programmer-on-windows-7-64-bit/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->