Recent

Author Topic: Migrate turbo pascal 7.0 with ISA bus GPIB card to a laptop or recompilation?  (Read 3982 times)

Argus

  • Newbie
  • Posts: 4
Dear all,
I am in charge of an instrument (magnetic susceptometer) where the software was developed in tp7 around 1995. It needs communication over GPIB.
Over the years it has changed very little, and the last modification (ca 8 ys ago) was about how to fix the run time 200 error (the clock became too fast leading to division by zero).

Issue 1. Now the GPIB hard ware is dead, but I have found an alive one (with the old ISA bus, brand CEC). So, how can I make the 1995 program to understand that the GPIB card is new?
Does it involve a new compilation of the source code?

Issue 2. I would prefer to run this program from a *modern* laptop with - possibly - w10. Can I do that with Lazarus?

Grateful for input  :)


winni

  • Hero Member
  • *****
  • Posts: 2806
Hi!

GPIB still alive. I wont believe it.

For 150.- € .. 200,- € there are adapters from GPIB to USB to buy.
With drivers for the most OS.

Example: https://www.antratek.de/prologix-gpib-usb-controller

This is the connector from 1970 to now ...

This way you get rid of all that GPIB stuff in the code and only have to read the USB connection. The are units in fpc for this case.

fpc has a "Turbo Mode" so you don't have to care about the "new" features.

Anyway: Moving from Turbo to fpc there are restrictions and caveats - read the docs first.  First steps:

https://www.freepascal.org/port.html

Winni

Argus

  • Newbie
  • Posts: 4
Thank you Winni,

we have more things you wouldn't understand...  :D

Eg a thermo balance from Perkin Elmer. It is run by the worlds 1st pc (?). On 5' floppy disks and with a proprietary DOS.

Anyway, my hope for a relatively quick fix, is to use the driver package I found (CEC) which seems to recognize the ISA GPIB card I found. Hopefully there is a tp driver file, and then I expect to recompile the program. A complication is that this particular software from CEC does not work on my laptop, so everything needs to be done on the (already) obsolete ISA pc under w98.

Yes, I know of these USB-GPIB modules, but in that case we are talking about a total migration to a w10 environment. Certainly that project will be a greater feat - at least for me. %)

Eventually, I would like to rewrite everything as a LabView application.

Is this a well posed question: If I make a new .exe file where all references to the old GPIB is replaced with the new card, should it work?

All the Best and Stay Safe

MarkMLl

  • Hero Member
  • *****
  • Posts: 3535
we have more things you wouldn't understand...  :D

Try us.

Quote
Eg a thermo balance from Perkin Elmer. It is run by the worlds 1st pc (?). On 5' floppy disks and with a proprietary DOS.

I can assure you that the only thing there that causes me to raise an eyebrow is the idea of a five foot floppy. I've worked with discs three feet or so in diameter, but they were the sort of thing that went through walls if not accorded appropriate respect.

Now as for IEEE-488 etc., a few months ago I got a "Prologix-compatible" (https://github.com/fenrir-naru/gpib-usbcdc http://prologix.biz/downloads/PrologixGpibUsbManual-6.0.pdf) USB -> GPIB interface from some anonymous Chinese supplier, and am using it to good effect to capture printer output from a couple of HP instruments via a Pascal program: as far as the host computer is concerned it's a serial device and I'm driving it from FPC's standard serial.pp unit on Linux.

This one I think https://www.aliexpress.com/item/1005001424834228.html or perhaps https://www.aliexpress.com/item/4000672343858.html Bit of a delay while he made one up in (I suspect) his university room. And I'm not sure how much is being shipped by anybody in China at the moment...

I'm not saying that that adapter has a complete controller implementation, but it's certainly a very good starting point even if you have to pay for it yourself. Otherwise you'll find this sort of thing fairly regularly discussed on https://www.eevblog.com/forum/index.php

Hope that helps.

MarkMLl


« Last Edit: December 09, 2020, 04:24:17 pm by MarkMLl »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

avra

  • Hero Member
  • *****
  • Posts: 2262
    • Additional info
Eventually, I would like to rewrite everything as a LabView application.
Eventually, you could rewrite everything as a PascalSCADA application.  ;)
http://pascalscada.com
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

winni

  • Hero Member
  • *****
  • Posts: 2806
@Angus

I have that feeling that you are afraid to go the "big step" to move to fpc.
On the long run you can't avoid it.

But as the machines with ISA-Bus are dying, there is not so much time left.

For saving the old hardware configuration and to give you some time:
For industrial use you can buy an ISA- Bus (PC/104 ) with a connector to USB3.

You can  use this meanwhile on new hardware and don't have to be afraid that your old ISA stuff dies.

Winni - who worked once a lot with 8" floppies.
77 tracks and gigantic 1.1 MB!!

PS.: Turbo Pascal Runtime Error 200 first appeared 1997. Three years of patching against quicker CPUs. The final solution appeared in spring 2000 in german c't magazin. Uhh what a trouble then.
« Last Edit: December 11, 2020, 09:17:48 pm by winni »

Argus

  • Newbie
  • Posts: 4
Thank you all Winni, MarkMLI and avra,

yes, I am afraid of taking the big step, and simultaneously I know I am forced to..... at some point.
So first I will make an effort with the short cut: install the used (but likely functioning) GPIB ISA card, and do the compilation etc.
And when it becomes inevitable, I'll do it.

Yep, I didn't mean 5 feet discs...... 5+1/4 inch it was.
But speaking of pretty old equipment, I do have a couple of relevant questions. The Perkin Elmer 'pc' 3600 is fundamental for our thermo balance. One awkward thing is that this operative system is PE. Not DOS. I have no idea of how to read these floppies outside the PE pc. Can this be done? Ie, is there a (possibly) DOS software, which can read a completely differently formatted floppy?

As it is, I have patched the PE software (PETOS Basic), so it sends the data over RS232 to a windows pc.

And more: I have recognized a couple of EPROMs in this pc........ the machine is from ca 1982. For how long can I expect these tiny, tiny charges still be sitting there? Can I rewrite these EPROMs? So they keep the info another 40ys?

As you might understand, I take it as a mostly rewarding activity to avoid buying *new* equipment, and instead enjoy the often miraculously detailed documentation of equipment 20-30-40 ys old.

Interesting you mentioned the run time error 200. Yes, I remember that I was in contact with someone (maybe Germany) about it, and after some careful reading etc, I obviously succeeded with the patch.

All the Best
Argus

MarkMLl

  • Hero Member
  • *****
  • Posts: 3535
@Argus: If I were you I'd focus on trying to find documentation of the GPIB commands to control the instruments. The description that accompanies the item below suggests that it's like nothing else on Earth... is it really 6800 rather than 68000 based?

https://www.ebay.com/itm/Perkin-Elmer-3600-PETOS-Like-Microsoft-BASIC-Computer-6800-CPU-Works-/303540134722

Do you have the sourcecode of the programs- is that's what's on the floppies? I no longer have the equipment to do this sort of thing and TBH don't know who has... usual comments apply i.e. are they hard- or soft-sectored etc. Liam might have suggestions.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

winni

  • Hero Member
  • *****
  • Posts: 2806
Yep, I didn't mean 5 feet discs...... 5+1/4 inch it was.
But speaking of pretty old equipment, I do have a couple of relevant questions. The Perkin Elmer 'pc' 3600 is fundamental for our thermo balance. One awkward thing is that this operative system is PE. Not DOS. I have no idea of how to read these floppies outside the PE pc. Can this be done? Ie, is there a (possibly) DOS software, which can read a completely differently formatted floppy?

As it is, I have patched the PE software (PETOS Basic), so it sends the data over RS232 to a windows pc.

And more: I have recognized a couple of EPROMs in this pc........ the machine is from ca 1982. For how long can I expect these tiny, tiny charges still be sitting there? Can I rewrite these EPROMs? So they keep the info another 40ys?

Argus

Hi!

* For 25.- .. 30.- € you can buy a 5 1/4 floppy with USB connection

or

* You know the BASIC of  the machine, you got RS 232. So send the contens of the floppy via RS 232 to another Computer.
That's what we did in CP/M times when every manufacturer  created his own  disk format.

Winni


lucamar

  • Hero Member
  • *****
  • Posts: 4219
One awkward thing is that this operative system is PE. Not DOS. I have no idea of how to read these floppies outside the PE pc. Can this be done? Ie, is there a (possibly) DOS software, which can read a completely differently formatted floppy?

Yes, if you have adequate hardware, like a DOS PC with an old floppy controler (a properly setup Intel 8272- or, better, NEC 765-based controller board and a good old) and a full interface 5,25" drive. You'll have to look for software for retro-computing, etc. Google "transferring CP/M disks" (for example). We do use a fairly complete tool from (IIRC) Dave Dunfield to transfer both CP/M and Prologue disks but I don't remember ATM the name and I don't have at hand the computer where it's installed , sorry :-[

And with Linux you can use cpmtools to read almost any disk, no matter its original OS, provided you have access to adequate hardware.

Quote
And more: I have recognized a couple of EPROMs in this pc........ the machine is from ca 1982. For how long can I expect these tiny, tiny charges still be sitting there? Can I rewrite these EPROMs? So they keep the info another 40ys?

If reasonably well treated, old EPROMS keep the info for quite a lot of time (up to 50 years or more) but it's always a good idea to back them up and burn new ones when needed. Or you can refresh the old ones once every 10 or 20 years but that has a high probability of shortening their useful life.

Quote
As you might understand, I take it as a mostly rewarding activity to avoid buying *new* equipment, and instead enjoy the often miraculously detailed documentation of equipment 20-30-40 ys old.

Yes, I (for one) do understand perfectly, as can be seen from my signature :D
Though I must confess I enjoy new hardware and its possibilities just as much :)
« Last Edit: December 14, 2020, 01:44:14 am by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Argus

  • Newbie
  • Posts: 4
Dear all,

thank you for all the input!

At this point I have some feedback concerning my original *problem*, the failing GPIB card.

So, I took the 'easy' solution. (Yes, I know I need to make a bolder step sometime in the future....) I set up my still working relatively old pc with a still functioning ISA bus under w98, and used the original tp7.0 IDE (There are 2 options, either turbo.exe, or tpx.exe, both work.)
It was a great feeling of having swung back 25ys in time, and recalling the bright blue background and the yellow text in the editor. It has also support for mouse operation!
After having struggled a bit - not too much - by replacing the GPIB commands for the old card to the ones for the newer (in fact, I don't know if it is really newer), I could successfully compile the turbo pascal unit for the ieee communication, and I could also confirm that at least one portion of the software functions as expected. Since I am sitting at home, I don't have access to all the hardware, so final verification needs to wait. But there should be very good hope.

Concerning the other issues, I should have been  clearer. I was talking about 2 different pc's. The other one is a specific PerkinElmer pc: It is called System 3600 and I think it is run with a 6800, the link I got shows an 'identical' pc.
I shall do a proper check what the exact EPROMs are, so I could hopefully duplicate these and put them in the pc, so I can use this equipment for another 30ys. (Why are my kids calling me boomer?)

So, a substantial glimpse of success at the end of this crazy year.

All the Best, Seasons Greetings and Stay Safe
Argus


MarkMLl

  • Hero Member
  • *****
  • Posts: 3535
Concerning the other issues, I should have been  clearer. I was talking about 2 different pc's. The other one is a specific PerkinElmer pc: It is called System 3600 and I think it is run with a 6800, the link I got shows an 'identical' pc.
I shall do a proper check what the exact EPROMs are, so I could hopefully duplicate these and put them in the pc, so I can use this equipment for another 30ys.

Yes, we know. In fact I posted a link to internal photos and triggered some queries elsewhere with limited success.

I strongly suggest that you get an up to date interface since if you continue relying on old kit you'll catch a cold. Leaving aside the issue of the "PC-that-isn't", I'd suggest that by now any ISA-based PC is well past its sell-by date as far as component longevity is concerned... I'm talking about things like electrolytic caps here.

But what do I know...

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

PascalDragon

  • Hero Member
  • *****
  • Posts: 3518
  • Compiler Developer
Well, there are sellers that still provide ISA capabale boards. And there's also industrial boards like the iBASE MB960AF that provides an ISA bus together with PCI, PCIe and USB3.

MarkMLl

  • Hero Member
  • *****
  • Posts: 3535
Yes, and there's USB-connected interfaces from HP et al. (with caveats regarding their firmware support), and I'm using one which cost around £20 to good effect.

Historically, I've not shied away from using older kit when there's good reason, and I swear that we used to have an IEEE card knocking around the lab. OP, IMO, does not have a good reason and needs to focus on recovering any available sources and getting off that antediluvian hardware.

MarkMLl

MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018