Recent

Author Topic: Serial unit missing  (Read 16451 times)

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Serial unit missing
« Reply #30 on: June 07, 2021, 08:59:00 am »
@PascalDragon: Is a FPC 64 Bit version available that I could try to test your understanding of the subject ?

As I said, I doubt that you need to have a 64-bit userspace application, to interact with a 64-bit driver (and what you're writing is a user space application). That said you can download the combined FPC 3.2.2 for i386 and x86_64 (named fpc.3.2.2.win32.and.win64.exe from here. For older versions we provide a cross compiler for x86_64 as well that you can install additionally to the i386 one.

kaimex

  • New Member
  • *
  • Posts: 22
Re: Serial unit missing
« Reply #31 on: June 07, 2021, 04:11:40 pm »
I am not familiar with that 64Bit stuff.
I just empirically tried inpout32.dll and inpoutx64.dll with a program written in FPC v2.6.0:
with inpoutx64.dll it did not work at all,
with inpout32.dll read/writes to the PCI-parallel-port worked for a limited number of times (24 to 57) depending on details of the program.

Another question:
Can FPC v3.2.2 coexist with older versions on the same PC ?
In other words: are FPC installations independent ?
If yes, I would like to keep the old v2.6.0 version .

I am "a burnt child" from my experience with Audacity: different versions interfere due to common directories on drive C:.

Regards Kai

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: Serial unit missing
« Reply #32 on: June 07, 2021, 04:58:52 pm »

Another question:
Can FPC v3.2.2 coexist with older versions on the same PC ?
In other words: are FPC installations independent ?
If yes, I would like to keep the old v2.6.0 version .
Look for fpcupdeluxe. Yes it is possible to handle more than one fpc/Lazarus on one PC without a problem. But you must have a little knowledge about the things you do.
regards
Andreas

kaimex

  • New Member
  • *
  • Posts: 22
Re: Serial unit missing
« Reply #33 on: June 07, 2021, 10:00:20 pm »
Thank you for directing my attention to fpcupdeluxe.
Does this hint mean, that without the use of fpcupdeluxe two different installations of FPC would interfere ?

Additional question:
Does fpcupdeluxe organize offline installation such that 2 or more FPC installations can coexist,
or does it require internet connection for online installations ?
I can only use Windows tools suitable for offline work.

Regards Kai

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: Serial unit missing
« Reply #34 on: June 08, 2021, 07:48:19 am »
Thank you for directing my attention to fpcupdeluxe.
Does this hint mean, that without the use of fpcupdeluxe two different installations of FPC would interfere ?

Additional question:
Does fpcupdeluxe organize offline installation such that 2 or more FPC installations can coexist,
or does it require internet connection for online installations ?
I can only use Windows tools suitable for offline work.

Regards Kai
On windows you can set fpc and lazarus on a bare metal pc with fpcupdeluxe. For the installation a connetion to the internet is a must have, because fpcupdeluxe load all need tool, software, components by itself down. After you finish your installation, offline work is possible. fpcupdeluxe, fpc and lazarus need no connection to the internet. Offline work is no problem, only if you want to update your installation you have to go online, because svn or git need it to synchronize the sources.

You can have a lot of installations of the couple fpc/lazarus. Each installation is seperated, but you MUST start Lazarus with the Desktopicon (or the right parameters) to say where are the correct installation. Dont add fpc or Lazarus in the path, this is a no go. And dont use path with space or special characters. And be aware, windows show often other names in the explorer and use other names on the file system, this is a one of problem with the user home dir. On some systems you have problems with fpc/lazarus because windows use spaces in the real dir or filename.

I have 5 installations side by side without a problem, but NO DEFAULT installation, so all is seperated. If you can open a Pascal Project with a double click you have a default installation and this can make confusuion. So deinstall all installed fpc/Lazarus to to avoid this situation. This is my best pratic, to work for a long time without headache.
   



 
regards
Andreas

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Serial unit missing
« Reply #35 on: June 08, 2021, 09:11:01 am »
Does this hint mean, that without the use of fpcupdeluxe two different installations of FPC would interfere ?

No, they wouldn't. Everything is contained inside the installation directory and it will depend on which version you put in your PATH. If you use the Windows installers provided by us, you don't need fpcupdeluxe if you merely want two separate installations.

kaimex

  • New Member
  • *
  • Posts: 22
Re: Serial unit missing
« Reply #36 on: June 08, 2021, 05:09:46 pm »
you can download the combined FPC 3.2.2 for i386 and x86_64 (named fpc.3.2.2.win32.and.win64.exe from here. For older versions we provide a cross compiler for x86_64 as well that you can install additionally to the i386 one.
On the SourceForge site I see the combined fpc-3.2.2.win32.and.win64.exe and a cross compiler for the same version : fpc-3.2.2.i386-win32.cross.x86_64-win64.exe.
I wonder why.
Starting from the FPC download page I am offered the choice of SourceForge & Download mirrors in Hungary and Canada.
The latter two sites both state:
"Download native compiler
There is no native compiler available for x86_64 Win64. You have to use a cross-compiler.
Download cross-compiler running on another host
This cross-compiler runs on another host and needs the corresponding native compiler as a prerequisite."
This confuses me. Is this outdated information ?

By the way: do I have to use Lazarus or can I stay with  the old textmode IDE ?

Regards Kai

Re-searcher

  • New Member
  • *
  • Posts: 16
Re: Serial unit missing
« Reply #37 on: June 08, 2021, 05:36:40 pm »

Hi Kai,
See this site :

https://www.lazarus-ide.org/index.php?page=downloads

Greetings,
Erik

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Serial unit missing
« Reply #38 on: June 09, 2021, 09:15:13 am »
you can download the combined FPC 3.2.2 for i386 and x86_64 (named fpc.3.2.2.win32.and.win64.exe from here. For older versions we provide a cross compiler for x86_64 as well that you can install additionally to the i386 one.
On the SourceForge site I see the combined fpc-3.2.2.win32.and.win64.exe and a cross compiler for the same version : fpc-3.2.2.i386-win32.cross.x86_64-win64.exe.
I wonder why.

It's the first time we provide the combined installer. Before that we've only provided the separate installers. But considering that nowadays most Windows are 64-bit it makes sense to provide a combined one. Please note if you use the cross installer you first need to install fpc-3.2.2.i386-win32.exe.

Starting from the FPC download page I am offered the choice of SourceForge & Download mirrors in Hungary and Canada.
The latter two sites both state:
"Download native compiler
There is no native compiler available for x86_64 Win64. You have to use a cross-compiler.
Download cross-compiler running on another host
This cross-compiler runs on another host and needs the corresponding native compiler as a prerequisite."
This confuses me. Is this outdated information ?

No, it's not. It's still as valid as ever. We only provide a Win64 cross compiler (even inside the combined installer), cause with a Win64 native compiler it's not possible to compile a cross compiler for i386. Lazarus for example provides a native Win64 compiler (the compiler itself can perfectly well be compiled as a native Win64 application). In most cases it won't matter if you use a native Win64 compiler or a cross compiler. It will only matter if you compile really large programs and require more than 3 GB of address space to compile and link.

By the way: do I have to use Lazarus or can I stay with  the old textmode IDE ?

You can stay with the text mode IDE though you will have to use the fp.exe provided with the installer (there will also be a second executable that provides the 64-bit IDE, because the IDE has the compiler built in, though right now I don't know its name).

kaimex

  • New Member
  • *
  • Posts: 22
Re: Serial unit missing
« Reply #39 on: June 09, 2021, 08:17:42 pm »
Hi,
Re-searcher Erik, who in reply #24 supplied a link to the Sunix support site for driver downloads has asked by personal message whether I could send a parallel port driver.
You can get drivers for currently sold parallel port cards with the SUN1999 chip from that site
http://www.sunix.com/en/support.php
by selecting "Method 1", Product name "PAR5008A" or "PAR5008R", which leads to a list of driver packages for  different operating systems.
Older cards like PAR4008... are also in the product name list, but result in an empty driver list.
I found drivers suitable for older cards with the SUN1888 chip like the PAR4008... on this site:
https://drivers.softpedia.com/get/MODEM/OTHER-MODEM-DRIVERS/Lenovo-ThinkStation-P700-Sunix-Parallel-Card-Driver-8-1-5-0-for-Windows-10-64-bit.shtml
The package is called k1par01us17_ts.exe (there is also a k1par01us17_ts.txt) and containes driver version 8.1.5.0. On the Sunix site there is also a 8.1.5.0 driver under the PAR5008 product line (apart from 8.2.0.0 and 9.2.2.0), but I cannot tell, whether that works with the SUN1888 chip.

Among the support software for the PAR5008 product is also a tool called "ParallePortRegisterReadWriteTool_x86_x64" which allows to peek & poke manually in the registers of the parallel cards. This also works with my ...4008... card. This program/package comes with the inpout32.dll & inpoutx64.dll and an installer. It is obviously the same inpout... package as supplied elsewhere. I had installed before from the original source and see with Microsoft's "SystemInfo" under "Software environment", "System drivers" that inpoutx64.sys is installed as an automatically started kernel driver.
A 32Bit application written with FPC can only use the inpout32.dll, it won't load the inpoutx64.dll.
My test application presently either does 14 IO-writes  before appcrash (error 0x80000002) or 2342 IO-writes and does its crash only when the program wants to terminate anyway (error 40010006).
I have no idea, what makes the difference.

Regards Kai

kaimex

  • New Member
  • *
  • Posts: 22
Re: Serial unit missing
« Reply #40 on: June 12, 2021, 05:44:29 pm »
Update:
In the meantime I have found two code versions running at least half a million times until I stop the test without any crash. Both can use the WinRing0 approach and the inpoutxx approach (which seem to be very similar) to direct parallel port access.
Right now I am successfully driving an old RAM-based EPROM-simulator with it. The "RAM-PROM" is the program memory during program development on the PC for a µP-board, which communicates measurement results via V24/RS232 to the same PC.
Nonetheless, success or crash with WinRing0 or inputxx seems to be pure (bad) luck. Adding another IO-access or making other changes to the code may result in failure after some IO-operations.

Kai
 

Re-searcher

  • New Member
  • *
  • Posts: 16
Re: Serial unit missing
« Reply #41 on: June 13, 2021, 04:57:22 pm »
I have two multi io cards here :

For 8bit isa slot : UM8250B (serial) and for parallel port : logic ic from te 74 series


For PCI slot : 2 serial ports and 1 parallel port
Moschip MCS9835CV
https://elcodis.com/parts/6435091/MCS9835CV.html
http://datasheet.elcodis.com/pdf2/100/77/1007731/mcs9835.pdf


Ask sunix the data sheet for you sun1888 IC.

There may be differences between you and my IC.

Erik


 

TinyPortal © 2005-2018