PDA

View Full Version : IBM 5150 parallel port workings?



MartinToton
March 22nd, 2014, 11:02 AM
Hi

Hoping for a helping hand here...

I have an old 5150 (circle 1983) that is hooked up to a bespoke bit of kit to turn and inscribe wood boobins.

The NC device runs off the 5150 parallel port, using code such as

OUT &H300,16:NEXT I%
V%=INP(&H300)

to write and read from the port.

The olf kit has broken, I had previously ported the code to VB6 and a modern (ish!) NT box, and use inpout32.dll to try to drive the parallel port once hooked up to the NT box.

But, no luck - there is some comms as I get a click when I run the program, I have checked I'm writing the right data to the port but no luck.

I've tried inserting delays, writing specific values to the control/status registers (and running a second program to read the port to check) but nothing I do makes a difference.

Has anybody experience of parallel ports on the 5150 and how they might differ from modern PCs?

Thanks...

Martin

Does anybody have any idea

MikeS
March 22nd, 2014, 12:17 PM
Why VB6 and NT? Can't you just keep the original OS and software, running on a dedicated more modern box?

Caluser2000
March 22nd, 2014, 12:32 PM
Makes more sense than adding extra layers of complexity-KISS works every time.

As an aside why not try vb6 through Win9x? http://support.microsoft.com/kb/190775

modem7
March 22nd, 2014, 02:21 PM
The NC device runs off the 5150 parallel port, using code such as
OUT &H300,16:NEXT I%
V%=INP(&H300)
The three I/O base addresses used for IBM parallel ports in the 5150 are: 3BC hex, 378 hex and 278 hex.

I notice that the old code is using 300 hex. Maybe your 'parallel' card is non-standard, or maybe it is standard, but just sitting at 300 hex. Do you know which it is?

Chuck(G)
March 22nd, 2014, 03:04 PM
5150 parallel ports are bog-standard unidirectional. No EPP or ECP, just SPP. Really simple--implemented in SSI and uses IRQ 7 (if selected). The 5150 Techref is your best best for details. Note also, that port addresses corresponding to LPT1, LPT2, LPT3 are stored in low BIOS RAM by the POST routines--so you don't have to hardwire them in your code. You'll find up to 4 port addresses in the 4 words at 0040:0008 et seq.

MikeS
March 22nd, 2014, 03:10 PM
The three I/O base addresses used for IBM parallel ports in the 5150 are: 3BC hex, 378 hex and 278 hex.

I notice that the old code is using 300 hex. Maybe your 'parallel' card is non-standard, or maybe it is standard, but just sitting at 300 hex. Do you know which it is?Yeah, we're assuming that "parallel card" means "standard Centronics Printer" card; looks like 300 is 'officially' reserved for a prototyping card or some odd network cards.

g4ugm
March 22nd, 2014, 03:24 PM
A few options to try to keep you going. Firstly some versions of DOSBOX provide printer port passthru but not sure if it works at the port or BIOS level.

http://www.vogons.org/viewtopic.php?t=11979

Secondly you might try the VMware Player. I use that to run an XP Windows program under Windows/7 64 bit which does not like the non-standard port addresses my PCI-Express cards and VMware converts them to the normal addresses.

Lastly I have a program that writes raw data "directly" to printer ports using VB.Net Its based on the code I found here:-

http://support.microsoft.com/kb/322090

I have it running in VB.Net 2008 for sending data to an HPGL plotter....

Chuck(G)
March 22nd, 2014, 04:45 PM
Any of the old parallel-port AVR programmers go through the parallel port directly on XP. Usually, this involves something like the Direct I/O DLL (http://www.direct-io.com/). However, note that it'll work on 32-bit versions of Server 2003 and earlier. If you've got Windows 7 or XP 64 or later, you're out of luck.

This is a good reason to leave Windows at XP if there ever was one. It seems to me that Microsoft wants people to use Windows on their tablet or smartphone and not for real work.

MartinToton
March 25th, 2014, 03:14 PM
Thanks for all your suggestions, great to know there are helping brains out there!

I'm going to spend a few hours this weekend re-acquainting myself with where I was at; in summary we have an old IBM 5150 that drives the box of tricks but the IBM is poorly - won't boot, white screen, fan spins ok on the power supply but otherwise dead, no beeps, floppy access, boot sequence. I guess its either power supply or motherboard, I've been given some advice on how to establish which, will try this at the weekend too.

I ported the application to VB6 as I thought I'd have more chance getting the program going that way, and to NT as I have an old box with NT installed which has a parallel port.

The ported program is essentially working as the original, it creates a file of stepper instructions that get fired at the parallel port, from memory it initially sends a bunch of writes (OUTs) to move the head on the connected box of tricks to the right place (I''ll post a photo of the whole set up at the w/e too).

I'm pretty my VB6 writes are going to the right port as when I select 'Go' the attached machine makes a click but other than that doesn't do anything, which is what made me wonder whether there's anything different in the control or status registers on the parallel port.

Unfortunately now the IBM 5150 is broken without my figuring it out, so haven;t a point of reference any more, so pretty much in the dark now.

Re the orig setup, the orig code is written in basica - so the A: drive has the DOS bits and pieces plus Basica.com and the program files, and the output files for each job are stored on B:

I wasn't sure whether given this setup it would be straightfoward to use some sort of emulator with the old s/w on a newer PC (I have had the A: floppy contents copied so they are on the NT box)

I'll post some more info at the w/e.

Thanks

Martin