Chain-Q wrote:This is my first post in this forum. Glad to be here. So I'm Karoly Balogh (a.k.a Charlie on the demoscene, a.k.a. Chain-Q on IRC and various other forums), the maintainer of the Free Pascal m68k port, and I also wrote a big chunk of the new/resurrected m68k backend a few years back. As some of you already discovered it, inspired by #QLvember I decided to hack together a quick-and-dirty QL target for Free Pascal this month. If there's interest though, there's nothing stopping extending it further. (But for that I need contributors too.) I'm not a native English speaker (I'm Hungarian, but I live in Germany), so sorry if I make mistakes.
Welcome, good to see a fellow professional here (I'm in Germany, too

) I actually have ported my QPCPrint ESC/P2 printer emulator from Delphi to Lazarus last year, so while I don't use the 68k backend I'm highly impressed with the whole project and downright thrilled that there is a QL cross compiler.
* I do not have QL hardware, so the only thing I can work with so far is the unregistered version of Q-emuLator on my MacBook (I found 40 the USD registration price a bit steep for now, until I wasn't sure I could get something working), which means I also do not really have access to expanded QL things, which probably influenced a lot of my assumptions while making the port. Hardware donations are welcomed, but not in any way expected.
Do check out QPC, it's the emulator I've been developing for the last 25 years. It's free now (formerly 125€) and uses the much advanced OS SMSQ/E (still QDOS compatible). The emulation core was written in pure assembler at a time when 486s were all the rage, but I think it's still among the fastest for the QL. Oh, and it is 68020 compatible.
* The port currently uses a simple BASIC loader, to allow direct cross-compiling. I read somewhere you need some QL native tool to to make your binary executable on the QL after cross compiling it, so I just decided to work that around for now...
Like with files on the Mac there is a header that can get lost on PC drives. But I see Norman has covered that pretty well. If there are more questions, I'm also one of the main developers of the SMSQ/E operating system and happy to help out.
* The code FPC generates is not position independent, but the QL startup code (by me) can relocate the binary after loading.
That is the same with the main C compiler we have, C68.
* I do not get the entire job concept of QL yet, and what are the implications of it for my code. But we'll get there eventually. Probably this is because I don't really have any user experience with the QL, so some things are just hard to relate to.
In other OS a job is called "process". Minus the memory protection
* The compiler can run on real 68k too, but it needs a ton of memory (32MB as a minimum, 128MB recommended for larger projects), and it's quite slow even of a '060/100Mhz... It works quite OK though on fast emulators like UAE though. So if there's something like that for the QL, we can talk about hosting the compiler on QDOS compatibles as well, but it's still a long journey to that point.
QPC is some 1000 times faster than a QL and supports up to 256MB of RAM. Also it has limitles screen resolution, so unlike emulators like QemuLator that targets retro uses like games and hardware compatibility it's actually designed to be used as a desktop environment.
5:20 in the morning? Up early or up late?

I long for the times where I could still work all night on interesting stuff.
And I have a related question too: to support QLfloats, I ripped the double_to_qlfloat function from the C68/QDOS-GCC libc implementation for now, but sadly no source archives available online states what's the license for this code. Therefore I haven't committed it to FPC SVN yet, because I'm not sure I can redistribute this or even include in the RTL. This is why the source is not possible to compile currently. The FPC RTL comes under the LGPL license, with a static linking exception to allow static linking. If it's not possible to use these functions from the libc under this license, they will have to be rewritten too.
If that is the dtoqlfp routine from the C68 source then this was Dave Walker's code and I'm 1000% sure he would be okay with it. Also, last year he gave me all his remaining sources and stuff and given me explicit permission to do with it as I wish. You certainly have my blessing.
Cheers, Marcel