Recent

Author Topic: Atari m68k  (Read 2015 times)

peters060

  • New member
  • *
  • Posts: 8
Atari m68k
« on: April 17, 2022, 11:36:29 am »
Hi all,

I just thought I would introduce myself and take the opportunity to thank the fpc developers especially ChainQ and Thorsten who put a lot of effort into getting fpc working on Atari tos and mint.

I've been long term Pascal "fan" but never had great opportunity to use it in my job. I started dabbling again with Atari PurePascal in 2020 and then, last year, discovered fpc.

I tried porting the app I was working on and was able to get it running. My next aim was to use some fpc libraries.  Unfortunately, atari fpc doesn't find source files with long filenames, it only works with 8+3 even when it is installed on a suitable partition.  This means that any existing fpc apps cantor cannot be easily ported and fpc can't build itself.

Maybe this could be added to feature request (wish list) ?


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10399
  • FPC developer.
Re: Atari m68k
« Reply #1 on: April 17, 2022, 01:31:37 pm »
Wishing is all good and dandy, but how do you expect this would work without renaming all sources to whatever limited convention atari supports?

Actually we kept 8.3 till 2015 because of plain dos, but it was untenable to keep such limits forever on all targets.

MarkMLl

  • Hero Member
  • *****
  • Posts: 5577
Re: Atari m68k
« Reply #2 on: April 17, 2022, 01:38:23 pm »
Actually we kept 8.3 till 2015 because of plain dos, but it was untenable to keep such limits forever on all targets.

What version was that? If OP specifically wants to compile natively it would be worth his while investigating what's changed since both in the core libraries and extra packages.

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

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10399
  • FPC developer.
Re: Atari m68k
« Reply #3 on: April 17, 2022, 01:47:11 pm »
Actually we kept 8.3 till 2015 because of plain dos, but it was untenable to keep such limits forever on all targets.

What version was that? If OP specifically wants to compile natively it would be worth his while investigating what's changed since both in the core libraries and extra packages.

3.0.0, together with win9x support; but those don't support m68k/Atari. But even those older versions had little kinks due to limited plain dos testing.

I think the first step would be to find out what Atari community has to offer for such problems, that are not unique to Free Pascal(e.g. dos worked on a doslfn driver for a while).

Otherwise you are limited to using the filesystems that can or cross compile. (and since recompiling FPC takes 8 minutes on a RPI4, I shudder how long it does on Amiga. Even a small twenty years ago, with FPC 1.0.x on Mac 840AV (the heaviest retail m68k machine from  Apple with a factory overclocked 68040/40 + 128MB of RAM, more than oldies typically have) it iirc took 35 minutes.

added later: or maybe I misunderstand and there is a way to do lfn support, and must it be added to the RTL
« Last Edit: April 17, 2022, 06:30:49 pm by marcov »

peters060

  • New member
  • *
  • Posts: 8
Re: Atari m68k
« Reply #4 on: April 17, 2022, 06:32:19 pm »
Atari MINT os supports long filenames on FAT32 and ext2 so in theory I don't need to rename anything.

However when compiling with fpc it fails to find the lib files.  When I renamed them to 8+3 then they are found.

I suspect it's an issue in how fpc is getting the files but I don't know enough about how this works.

MarkMLl

  • Hero Member
  • *****
  • Posts: 5577
Re: Atari m68k
« Reply #5 on: April 17, 2022, 07:26:36 pm »
That sounds like an fpc.cfg problem...

Somewhat later: I'm not sure the "right" way to do this, but running the FPC compiler with -va and looking for "Handling" lines shows what's being fed to it.

What immediately stands out is this sort of thing

Code: Text  [Select][+][-]
  1. [0.008] Handling option "-Fu/usr/local/lib/fpc/3.2.2/units/x86_64-linux"
  2.  

which is the expansion of

Code: Text  [Select][+][-]
  1. -Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget
  2.  

Hardcoding (in fpc.cfg) that with something that doesn't embed quite as many dots in the directory name and uses a shorter target name might fix the problem.

MarkMLl
« Last Edit: April 17, 2022, 09:48:31 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

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10399
  • FPC developer.
Re: Atari m68k
« Reply #6 on: April 17, 2022, 09:58:42 pm »
Atari MINT os supports long filenames on FAT32 and ext2 so in theory I don't need to rename anything.

However when compiling with fpc it fails to find the lib files.  When I renamed them to 8+3 then they are found.

Exactly which lib files (.ppu ? .a ?), and which program couldn't find it. The compiler or the linker (vlink I assume)? 

Quote
I suspect it's an issue in how fpc is getting the files but I don't know enough about how this works.

Sometimes compiling with -va, piping that to file, and then searching for the filename in question can be a revelation.

peters060

  • New member
  • *
  • Posts: 8
Re: Atari m68k
« Reply #7 on: April 18, 2022, 12:24:32 am »
I was using djLogOverSimpleLogger from slf4p

If the name is reduced to 8+3 and all lower case , djsimple.pas, then the file is found.

I will recreate the error and post it here.

avra

  • Hero Member
  • *****
  • Posts: 2385
    • Additional info
Re: Atari m68k
« Reply #8 on: April 18, 2022, 01:10:38 am »
Unfortunately, atari fpc doesn't find source files with long filenames, it only works with 8+3 even when it is installed on a suitable partition.  This means that any existing fpc apps cantor cannot be easily ported and fpc can't build itself.
As an ex Atari MEGA STE user I do sympathize for what you are trying to do, but why don't you just use cross compilation from pc?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

peters060

  • New member
  • *
  • Posts: 8
Re: Atari m68k
« Reply #9 on: April 18, 2022, 11:23:45 am »
That's like saying, why not abandon all the other platforms and everyone just use Windows.
 The whole point is to use fpc on Atari.

I don't find cross compiling to be convenient.  I don't have enough space to set up multiple computers so i generally use either Atari or this phone.

MarkMLl

  • Hero Member
  • *****
  • Posts: 5577
Re: Atari m68k
« Reply #10 on: April 18, 2022, 11:59:10 am »
Surely you can run a Windows emulator on an Atari >:-)

Actually, I sympathise: I'd quite like to get FPC working on CCP/M-86 which is a distant cousin of (what used to be?) the Arati's underlying OS.

"Surely you've got more than one computer?" was a quaint joke when Dave Moore was telling people how to debug FTL Modula-2 on systems which were very likely driven by an RS232 terminal, but now that every computer has a screen, keyboard, mouse...

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: 3164
Re: Atari m68k
« Reply #11 on: April 18, 2022, 12:17:10 pm »

Actually, I sympathise: I'd quite like to get FPC working on CCP/M-86 which is a distant cousin of (what used to be?) the Arati's underlying OS.


MarkMLl

Hi!

It is called "Atari TOS". More details (in german )

http://www.atari-computermuseum.de/tos.htm


Winni

Handoko

  • Hero Member
  • *****
  • Posts: 4723
  • My goal: build my own game engine using Lazarus
Re: Atari m68k
« Reply #12 on: April 18, 2022, 12:30:43 pm »
That's like saying, why not abandon all the other platforms and everyone just use Windows.

I hope you can understand, we actually want to keep support for as many platforms as possible unfortunately Lazarus/FPC is a volunteer project. We are currently lack of manpower.

Learning cross compiling is not easy, I know it. But that is a solution, you only need to invest some time at the beginning to understand how to do it.

PascalDragon

  • Hero Member
  • *****
  • Posts: 4759
  • Compiler Developer
Re: Atari m68k
« Reply #13 on: April 18, 2022, 12:36:24 pm »
Maybe this could be added to feature request (wish list) ?

ChainQ already wrote on the Atari forum that long filenames are simply not yet supported on Atari, but if someone provides code for them they'll definitely be considered.
For now you best use the cross compiler which does not have these restrictions.

MarkMLl

  • Hero Member
  • *****
  • Posts: 5577
Re: Atari m68k
« Reply #14 on: April 18, 2022, 01:04:47 pm »
Actually, I sympathise: I'd quite like to get FPC working on CCP/M-86 which is a distant cousin of (what used to be?) the Arati's underlying OS.

It is called "Atari TOS".

Thank you, I know.

But my point is that by now it's unclear how much of the original TOS (nee CP/M-68K) is considered supportable, or if MiNT has completely superseded it.

And while Turbo Pascal ran on CP/M-80 and CP/M-86 (hence on CCP/M-86), those OSes provided an API roughly comparable with MS-DOS v1 (no support for directories etc.) so I'd be surprised if FPC were to run on them without major surgery.

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