Archives for Compiler Core

Whats going on…

Posted by ALB42 on 31. August 2022No Comments

A little bit stuff is happened in the last week, I want to report a bit about it.

The first very nice development is a bugfix in the 68k Free Pascal compiler, there was a long standing bug inside the PNG-loader. I noticed it with MUIMapparium, but it only showed on some computers, namely my Draco. Charlie tried to look into the issue long time ago, but not really found anything to fix.

But now he looked again into the issue and finally was able to track down the problem. The problem is not really fixed but there is a workaround included so now MUIMapparium works on my Draco, very nice.

MUIMapparium on Draco

MorphOS added an OpenSSL3 Amiga style library a while before, as soon that was available I started to try it to get it to work with Free Pascal on MorphOS. Sadly it did not work, always was crashing already when I tried to use even the simplest function, so I was lost. Charlie mentioned that there must be a change in our linker script of some sort to make it work and he will later care about it. But as often too much other stuff happened and this got delayed. Finally I started to implement the stuff via AmiSSL also on MorphOS. I implemented that for Amiga68k already so the switch to MorphOS is just not a big thing. But then Charlie said I should better use the openssl3.library instead and he will fix the problem with the linker script. And he did and it seemed there was even an easier solution for that and finally openssl3.library does work together with Free Pascal for MorphOS.

Get a webpage via HTTPS using the openssl3.library on MorphOS

Charlie tried MCAmiga on his „new“ build Amiga2000. It only has a 68030 with 25 MHz and he noticed that the load is rather high (around 30%) when the program is doing nothing just waiting for the key. That is the case because it is based on old DOS behavior, therefore the key events and so on must be polled and not fired via events as it is common today. But he showed me a special function in the keyboard unit called WaitForSystemEvent() which is only available for Amiga system to be able to really wait for events and not poll them. That reduces the load when the program waits for input (to under 10%) which is nice of course.

The 100% Useless AROS Distribution 0.3

Posted by ALB42 on 7. Februar 2022One Comment

As mentioned yesterday it’s time to make a new AROS 64 release with the new ABI-V11. So here it is. As far as I know, still the only x64 AROS distribution.

As always I included some of my programs like MUIMapparium, LEU, AYA, AmiTube, Hex2, MUIPlot, MCAmiga. All work reasonably well, certainly usable. There are some problems of course. There seems to be a bug on Font size calculation, therefor some size calculations fail, resulting in strange effect, for example ListViews of Zune (like in MUIMapparium or AmiTube), but one can see that also in AYA, where I calculate the size of text for myself. a rescale of window and selecting of entries often cures it. AmiTube works well, shows preview images and downloads all the movies, but there is no working player for CDXL or MPEG installed atm.

As always the warning, the x64 AROS is still a very early alpha Version, most non Free Pascal applications crash so be careful, but as test bed for Free Pascal on a 64bit Amiga-Platform it certainly a good test.

Download as always on the T100pUAD Page

Free Pascal IDE on Workbench 1.3

Posted by ALB42 on 4. August 2021No Comments

Working a little bit on the Workbench 1.x compatibility of Free Pascal compilation. A lot of important calls are missing for 1.x which makes it a bit difficult to compile the same program for OS3.x and 1.x especially all the TagList calls are missing. I implemented some of them by hand (like OpenScreenTags, OpenWindowTags) to make it a bit easier. As a test I chose the Free Pascal IDE, I do not really expect it to be usable, because of the huge DOS mode chars und FreeVision emulation, which is needed. But after some days of coding, finally it somehow works (without any changes inside of the IDE source code). In the DOS Mode emulation I changed it to be always on a own 16 color screen and always use the smaller font, everything is unchanged. so very nice.

A little video:

Sadly I still can’t upload the changes because Free Pascal is still on the move to GitLab and it’s not finished.

Free Pascal 3.2.2 Release

Posted by ALB42 on 20. Mai 2021No Comments

New Release of Free Pascal is done. It’s a bug fix release for 3.2.0 it has also some bug fixes for the Amiga systems, especially structures and functions are checked against official SDKs (especially for MorphOS with its latest SDK Version). For changes that break compatibility you can check official changes document.

Downloads

or you go directly to the Free Pascal home page and download from one of the mirrors. Have Fun.

Test Result

Posted by ALB42 on 23. März 2021One Comment

Some might wondering what happened to the Free Pascal test result on the Amiga. There are some reasons I did not write about the results. 1. it took much longer than though, especially later tests need much longer to compile and run (more like 30s per test) and 2. some tests crash what leaded to idling computer half of the night until I can let it continue, overall it stopped 8 time, of which it was 3 times a „Guru“ and 4 times the enforcer (of Draco) killed the program before it could crash the computer because the program accessed some memory it’s not supposed to and once the Hard disk went full and it stopped with a Disk full requester (I did not notice that the logs and programs need such big amount of HD).

Overall 326 tests are failing either do not compile or the compiled program does not work correctly + for mentioned 7 that crash, which is much more than the m68k-linux test for this compiler version which should be around 40 or. I guess that must be some implementations are missing for the Amiga. I saw scrolling by some Link LibC or other c library errors, which will not work because we did not implement that. The rest I have to check slowly the next days.

It’s not bad after all, 333 tests give problems means around 5600 tests ran well without problems and my Draco did run 3 days without interruption without any problem, also nice to know. After checking the errors, maybe I can fix some of them and make a test list without the 7 crashing tests that I can run on one go. I should repeat that test with the latest Free Pascal and compiled for FPU, especially some tests which are not working with the qemu setup I’m using atm. (if they really show an FPU compiler error or just an qemu problem)

ALB goes crazy episode 9843: Free Pascal test suite on a real Amiga

Posted by ALB42 on 20. März 2021No Comments

Again got a crazy idea… after my attempts to run the Free Pascal test suite on a real m68k linux (I’m not sure whats the problem it it just stopped at some point but did not start the actual tests) I looked a bit closer how these test run is designed (with a bit Makefile, which does not work on Amiga even with unix kind shell installed, I tried already) I wrote a little program make the list of tests and I got around 5800 test, not the same amount as the original (which is nearly 9000) but ok for first list creation, later maybe find out where are the other tests hidden.

the „dotest“ util making the actual test (checking if on the right CPU/OS/Version and so on) does not run because it’s only implemented for windows/dos and unix… and full of {ifdef windows}doDOSstuff{$else}doUNIXstuff{$endif} or vice versa… I made some very nasty changes and implemented a little routine for Amiga to make it at least work to run the tests gather the output and check return code and it works.

Next transfer everything to my Amiga (Draco 68060 in this case) and start and press all thumbs it works somehow.

And? Yeah it works, needs around 10s per test hmmm that makes around 16h for the full 5900 tests :-O ok the Draco is very stable, I just hope none of the test let it crash 😉 lets see tomorrow the result, which tests fail and why 😉 (running currently with 3.2)

If that works well I should also make a run with FPU (thats SoftFPU atm.)

Docking complete

Posted by ALB42 on 17. Dezember 20203 Comments

As promised I worked on the Amiga OS 4 problem in Lazarus Cross Amiga Docker. I tried to used vlink and vasm for it, but it seems vlink has some problems with the resources. But when switching back to the GNU tools (as and ld) it again works.

Cross Amiga Lazarus compiles for Amiga OS 4

I also added a little Updater Script to the archive, so if you want to use the new Amiga OS 4 download again the archive. Start the script ./CheckForUpdate.sh if there is a newer version of the docker it will automatically download.

Have fun!

Docking on Amiga

Posted by ALB42 on 6. Dezember 20202 Comments

I’m playing with docker and how to put Free Pascal for Amiga Systems and even Lazarus inside a docker container. Works quiet nicely with the latest FPC (3.2.0) and Lazarus (2.0.10), sadly there are some bugs in the published MUI interface for Lazarus, or better left overs of old Free Pascal inconsistencies between the Amiga flavors. I fixed them in FPC but did forget to remove the workarounds in the LCL. So I had to patch the official LCL. Must also check them in the official repository. Sadly the OS4 the LCL compile does not work at all, something wrong with the resource stuff, so I removed it for now. I will look into it later. So still some stuff to work on.

To actually use the Lazarus IDE I also installed a VNC server and hence also a small as possible window manager, I played around with some simple one, most old simple window managers are very annoying (e.g. twm) but icewm seems to be nice (looks like Java though).

And why docker? It’s much easier to keep the software up to date and there are automatically running scripts to create, modify and start them. But there are some drawbacks. The first compilation of a LCL program for any Amiga-style system will need a long time (as seen in the video), because it will compile the whole LCL. This will happen for every start of the docker container. This is good to have a clean compilation of LCL (especially when developing on the actual LCL) but a bit annoying when only compile simple programs. There should be some ways around it. But for now for me that’s good enough.

If you want to try it out: CrossAmigaLazarus

Amiga FPC SSL

Posted by ALB42 on 11. Oktober 2020No Comments

Worked a little bit more on the SSL implementation for Amiga in FPC using the AmiSSL.library. First I tried to just use the OpenSSL implementation in FPC. It was much work but sadly it just crashes on SSL connect and I have no idea why, rechecked everything. But before it was working using the BIO_* functions, so I rewrote the FreePascal implementation for AmiSSL using the BIO_* functions and finally it works. That means one could now get a webpage from a HTTPS page with a single line of code (and two uses), which is really nice.

In principle this should also work on MorphOS, for AmigaOS4 it would need to rewrite the import unit for AmiSSL. Sadly AmiSSL still does not exists for AROS only a c-link lib which does not work at the moment in FreePascal-AROS.

The 100% useless AROS distribution Version 0.2

Posted by ALB42 on 15. Juli 20206 Comments

I updated the AROS64 source I had to the new stabilized ABIv1 AROS64 introduced by deadw00d (see source on github). At the start I had some tiny problems, e.g. collect-aros was crashing here as well. But in contrast to the main SMP AROS64/Icaros64 after my bug report, it was fixed very fast. Therefore I was able to compile at 64 bit AROS again using FreePascal, very nice. I also tried some of my old programs and all work rather nicely, some tiny problems of course but overall not bad. I will try to investigate what of these programs are from my code or fpc code and what comes from AROS64 itself. I’m not sure if more bug reports are wanted (because I guess deadw00d aims more to the AxRT) but maybe I will try it.

The 100% useless AROS distribution Version 0.2 with some of my programs and freepascal

Because that worked so flawless, I decided to create a new version of my AROS64 distribution „The 100% useless AROS distribution“ this time already much more stable and much more useful than before.

I added some more programs, (not only my own) the FP-IDE does work, but sadly the compilation still crash, so you have to use the shell to compile. I even got the network to work and MUIMapparium shows the map nicely and search also works, so maybe the name is somewhat wrong now, it’s only 99% useless, after all? Nevertheless have fun with it.

Download on the T100pUAD page