LCL has powerful packages for example the Chart component (or the Edit component with Highlighter). MUI already have some, but not so powerful and not available for all platforms (especially ARM-AROS and AROS64). I try to keep on the included basic classes to keep it compatible.
I used the very powerful TAChart component in Mapparium to show the Height/Speed trace of a track. Of course for MUIMapparium I also want to have that, so I started to implement a plot class for MUI. Not so powerful but already very nice with two Y-Axes, Zoom and Autoscale.
MUI Plot component start
It already works rather nicely, as first approach can be used like this.
I designed it already in a very abstract way in principle a TPaintBox for MUI and based on that the Plot class, that means I can use them in other programs as well.
Activated the localization for MUIMapparium currently only for english and german (of course ;-)) implemented also the local library unit for AmigaOS4 so localization is available on all platforms.
I also activated the AREXX interface currently only two commands are implemented: goto lat lon [zoom] to jump to a position and addwaypoint lat lon “Name” to create a waypoint. The Portname is the same as for Mapparium an example script can be found in rexx folder. The AREXX port does not work for AROS, Zune has no AREXX support currently.
I tried to compile it on AROS64 sadly the program did not work, it just freeze. Little bit strange sometimes it start but crash directly. I tried some other programs on AROS64 and they work rather nicely so why MUIMapparium not. The difference was easy it uses threads, finally I found the solution, the Critical Sections in FreePascal are mapped to SignalSemaphores of Amiga. In contrast to other OS the SignalSemaphores are not just simple pointers but a complicated structure. The given size there was ok for 32 bit Systems but for 64 bit the structure is much bigger. I included it for that release maybe someone want to try it 😉
Reminder you can use the Example GPX file from the Mapparium page also.
MUIMapparium 0.3 on AROS x64
Locale Localization position
Working on a very old bug. I’m not sure if someone noticed it, at least nobody reported it. The coordinate to pixel conversation was not very precise because it used a average resolution for every tile. This works well for higher zoom levels where the resolution does not change much inside a tile. But for lower zoom levels, especially the whole world picture this is certainly not right any easily visible when using way points. See for example Mapparium 0.6 on the right side of the image, all way points are (and tracks) are shifted to north. The solution was not very difficult but needed some thinking, basically a rounding error and precision problem.
MUIMapparium (Left) and Mapparium (right) Waypoint position comparison and german locale
I also start to play with localization. I never did that before, especially not in FreePascal but it’s not very complicated, just diligent work to replace all strings. So next version will also be available in german (and maybe later some more languages, at least I got an offer for french localization). There is one small problem with that, there is no locale library unit in FreePascal for AmigaOS4 so either I make some defines to turn it off for OS4 or implement the library unit.
Had some time to work a little bit on MUIMapparium, mainly implemented way points and tracks including loading and saving, same formats as Mapparium. Due to multiple requests I created a OS4 version again, but I have no way to test it. Still it’s only a very early version of MUIMapparium.
MUIMapparium 0.2 for Amiga
Yesterday I was at the Amiga and retro computer meeting here in Berlin, always nice to be there and talk to the people. ChainQ was also there so we worked a little bit on this strange WBStartup problem on MorphOS. As some already mentioned in the comments to MUIMapparium, it is not possible to start fpc compiled programs at MorphOS via an Icon. The programs just do not start directly freeze, the reason is simple, when starting via Icon the WBStartup Message is sent to the application via an MsgPort at the Process structure. Freepascal waits for this Message, which never arrives. After some trying we found, that the needed structures and functions in fpc are in good shape so not the root of this problem. The problem appeared when ChainQ changed the startup code from a assembler one to a pure Pascal startup code. So my guess was that it somehow relates to the needed symbol inside the executable, which defines it as a MorphOS executeable __abox__. Of course I do not have much knowledge about it, just a wild guess. But it turns out that this was quite right. The first problem is that I used an older version of vlink, which seems to have a bug and removed this symbol (because never used). After an new compilation of vlink the __abox__ symbol is there but still it do not work. ChainQ knows a little bit more about this stuff and also knows whom to ask in the inner circle of MorphOS developer what could be the root of it. Some strange things I was able to see, the program I started stopped when starting via Icon. But via TaskManager you can see, two of them are started. An other thing with Snoopium you can check when the program does at the start. Especially the OpenLibrary function is interesting in this case. You can see how the program tries to open the ppc.library, which I learned now, is a sign that MorphOS thinks that this program is an PowerUp executable, which explains the odd behavior. In the end the solution was not so difficult, FreePascal did not set symbol type and symbol size as expected by MorphOS. (The size is important because the __abox__ symbol should point to a longword with value one) It appears FreePascal already have a function to care about such things, which only have to be activated for the MorphOS compiler. Finally it’s fixed again. Thanks for the help.
Forum and Tutorial
At Amigacoding.de FreePascal got a own Subforum inside the Language Section. Currently the Freepascal@Amigasystems fans are scattered over different Forums (mostly the Platform forums, like morph.zone, aros-exec, amiga.org, lazarus forum). But there are not much so it would be nice to centralize them to one Forum. Amigacoding.de is a nice idea to have a developer forum for ALL Amiga Platforms, sadly it’s not much in use or known. I wish this would change (even a little doubt). So if you are reading this, step by at the forum a leave a little message, what do you want for FPC, ideas, projects, help.. whatever or just hello world 😉
I started to make a tutorial for FreePascal on Amiga System, it should not be a Pascal tutorial but an Amiga with Pascal experiment. First one only cares about how to use FP-IDE, write and compile an Hello World. Next one would be about Intuition Window and drawing. Later maybe some MUI. There are some such Tutorials for C but mostly they only show how to do, my plan is more to really create a program. I plan to make the Tutorial in german and english.
Amiga LCL goes official 2
The MUI LCL widgetset also got accepted for the official Lazarus repository.
That means the next official Lazarus release will also contain the support for all Amiga Systems and the MUI Widgetset. Sadly the only one usable with the released 3.0.0 FreePascal is i386-AROS. m68k-Amiga has a serious bug, for MorphOS the resource support is missing. Both problems will be fixed for next FPC release 3.0.2. All Other platforms (OS4, ARM-AROS, x86_64-AROS) have to wait until 3.2 because their support was added after 3.0 split. Of course one can use the 3.1.1 compiler for all platforms already, as I usually do and release to public.
But it would be very nice to just install Lazarus via your default package system (deb, rpm, whatever) install your Amiga cross-compilers and binutils(with vasm and vlink it’s really easy) and one is able to use the lazarus as IDE for your Amiga LCL programming.
Today I also got write access to the Lazarus repository, that means I can continue to work on the implementation directly on the official repository.
Already tested and fixed some tiny problems. I will continue to test it on week end, seems there are some new problems inside, at least some of my test codes does not work.
Small, Smaller, Smallest
We (ChainQ and me) activated the section linking for the other Amiga Platforms as well. Freepascal for MorphOS for example will now also use vasm and vlink with section linking. The mentioned MUI demo for example has a size of 82k on MorphOS, so a little bit bigger as on Amiga 68k. Sadly vasm and vlink does not exist for AROS currently (except 68k of course) so there we are bind to the GNU tools. But the AROS ld is much more recent so it supports section linking already. The sizes of the MUI demo for the AROS Platforms: i386: 83k, ARM: 86k, x86_64: 144k. Sadly on AmigaOS4 it still not work, it still needs some fixing in the linker and startup code. Of course it’s nice to have this small sizes on NG Amigas, but more important on the 68k Platform, maybe you remember the compilation attempt on a real Amiga (so not UAE) which needed around 3 minutes and 160 MB RAM. I retried that with vasm and vlink today. It is smaller (1.6 MB instead of 6.5 MB) and also need less RAM for compiling and linking (around 100 MB instead of 160 MB), really nice. The speed does not really change, because it is limited by the Harddisk speed, which is around 1.2 MB/s only for my A1200. I’m thinking to use the SCSI of Blizzard 1260 but I need a fast SCSI to SATA Adpater or so, the one I found in Internet seems not so good, no synchronous transfer, questionable compatibility with the SCSI interface of Blizzard.
Amiga LCL goes official
As explained in the 2016 summary I started to try to introduce the MUI LCL Interface to the official Lazarus subversion repository. I started with the basic compilation nogui LCL, which is a rather small patch (when compared to the complete new MUI widgetset). Today I got answer (after posting that as Bug in the lazarus bug tracker) and the patch got accepted to the official repository. That was my introduction, so now I would like to also include the MUI LCL which will be my next target. It would make the development so much easier. Especially because they change a lot in Lazarus over the time. My branch at github is again so outdated that it means again a new implementation to bring it to latest status (for the 4th time). If it is in the official repository I will directly notice if something change which need my attention. And the people will see the HASAMIGA defines everywhere and maybe care about to not break it 😉
About this year … 2016
Again a year passed so I will try to give a short summary about things going on in the Freepascal world for Amiga-style systems.
In Januar 2016 a big change in Freepascal was done to fix the Varargs version of the amiga library version. All “array of const” are replaced with the better “array of PtrUInt” which is much better to emulate the open end parameter list
The MorphOS LCL implementation took a big step in the begin of the year until got the usual suspects to work. All resulted in the first MorphOS FPC release including LCL units in March 2016.
A little funny new experience started also in March. I created the first 64Bit ABIv1 AROS distribution. Mainly, of course because I need a test field for the FreePascal AROS x64. For me x64 would be the perfect successor of the i386-aros ABIv1. My suggestion for AROS developer would be to leave i386 ABIv0 as it is, backport changes to there. And change then to x64 ABIv1 (and do not use/promote i386 ABIv1). But the x64 AROS still need much work, many things still crash, much code still cast Pointers to integer so not 64bit ready. This is also the main reason the 64bit distribution did not get much new version, not much changed with the problems there, I retest the usual problems from time to time. Also the FPC 64bit had big problems, which I found out end of 2016 are mainly alignment problems, where AROS made it’s own life much harder than it should be. (reminder “stacked int”s)
EdiSyn got a new Version with some bugfixes and basic printing support. End of year it got also a ARM version of EdiSyn to public with some more advanced features.
I also tried EdiSyn on MorphOS and Amiga. But both have some problems because of the different behavior of MUI and Zune. And I did not took much work on it because on MorphOS there is already a very good Editor with syntax highlighting and on Amiga m68k it’s just too slow. But in principle it works just LCL need some more work.
LCL on a native Amiga got some improvements to work also if no Graphic card is present, like my A1200 and also ported the usual suspects to m68k Amiga.
I used already a Lazarus on Linux to cross compile to AROS i386, in April I created a Lazarus which can cross compile for all supported Platforms (AmigaOS 3, AROS, MorphOS). Because it worked to nicely I planed to release a Lazarus for Linux including the binutils and cross compilers for all Amiga systems. But I noticed it is very difficult, even to write a Manual how to install such a systems. Therefore I decided to create a virtual machine which includes Lazarus, cross compilers and binutils for all Amiga Systems. After Amiga OS 4 was added to Freepascal and LCL I released a 2nd Version including the Amiga OS 4 binutils and cross compiler.
ChainQ implemented FreePascal for OS4 long time before already but because of changes in FreePascal and without a maintainer it did not compile anymore. In April ChainQ resurrected it and fixed some basic things, make it self compiling again. Then I took the lead and implemented some OS4units bring FP-IDE to work and finally the LCL with the usual suspects for OS4. Which resulted to a Amiga OS 4 FPC release including LCL. I will continue to maintain the OS4 fpc but will not improve it much more, maybe someone will appear to continue it especially with the unusual interfaces can be found on AmigaOS4.
I continued to work on applications using my LCL. This time I got the idea to create a Map application showing routes of my bike GPS. I played around with google maps API and openstreet API. Openstreetmap is much better because google maps you are forced to use the google libs which is difficult at AROS. It get some releases for all available platforms. I also experimented with GPS support, first via a extra program later also directly inside Mapparium, which is still not released.
Long Time before I got the direct linking of C static objects to freepascal programs at AROS to work, which was really nice, but no real program resulted from it. On magoriums work on mikmod, I got an idea for a Delitracker like program for AROS, to Play my old modules. I results into my first native Zune program (so without LCL wrapper) ZuPaPlayer. And because Delitracker is working directly on MorphOS and Amiga I concentrated on AROS.
There I also noticed its rather difficult to write MUI applications in Freepascal. In C there are many many macros to make it easier, but they are not directly possible to convert to pascal. There is a muihelper unit in MorphOS with some starts to make it easier. I moved it to ami-extra to make it available to all platforms and extended it a lot. To test and prove the usability of it I started to port the example codes of the official MUI 3.8 release. On Amiga it works very nice on AROS it shows very good the differences of MUI and Zune.
Because ChainQ included support for 68000 processor which need some more alignment care. Because of this I created a little RTL for Workbench 1.3 which is really difficult because much things are not available.
This year also the port of FPC to ARM AROS including LCL and the usual suspects was done.
I try to bring the MUI-LCL to the official repository, started with the basic LCL implementation. Announced at mailing list. We will see how it goes.