Strange problem appeared with Mapparium on AmigaOS4, all texts are invisible. The funny thing: on my UAE and the OS4 computer at Amiga meeting it was working, difficult to debug. But thanks to some guys at amiga.org I was able to solve it. First I thought it was some Font issue but then I found an informations about color setting in AmigaOS4 and that the given color also contains an alpha value and this was of course always zero for my setting now. MorphOS/AROS/Amiga does not need there a value. And after a failed try (I missed one call) I got a positive feedback from Amiga.org.
Besides this I fixed some little things and implemented Garmin tcx reading (also a xml format but seems only for tracks). Because of this I decided to make a new release for all platforms not only for AmigaOS4 and called it 0.3.
Mapparium 0.3
OpenStreetMap viewer for all Amiga systems.
0.3
FIX: Invisible texts on OS4
FIX: Go offline if internet is down
FIX: Start folder for load/save dialogs
FIX: Filter for dialogs
FIX: Version informations
ADD: Load tracks from Garmin TCX files
ADD: Set size of middle marker
ADD: Support for geo: URIs
ADD: DblClick to lower panel copies middle position to clipboard as geo: URI
Working on the Mapparium, implementing an view for the height and speed curve of a track. The new TAChart component became much more powerful the last years. Now one also can add multiple Y-Axis so different scaling for two curves.
When you click on a track (single mouse click) it shows the curves for this track with the time as x-axis and height and speed as y-axes. I’m not sure if the distance would be a better x axis as default.
I saw already on MorphOS that the arrows for spin edit are rather big if they are one over the other. The idea was to make them side by side.
The OpenStreetMap is now named Mapparium and I created a Release, until now only for MorphOS and AROS(i386). The Version for Amiga 68k needs a little bit more optimization, and for AmigaOS4 it needs a request ;-).
Implemented GPX reading and writing, really very easy. Tested with some of my cycle routes (I cuted the start away for the screenshot). It also saves the waypoints and tracks into a default.gpx to load at next start, its the easiest way to start. At the moment I draw a little rectangle at every track point and connect them with a line. Sadly it seems to be not possible to draw a thick line with the standard methods, the PenWidth and PenHeight in RastPort are ignored. so I guess this point approach works best for recorded tracks. For planed routes with little points its hard to see. Maybe I write an own line drawing routine, with Bresenham it should be possible to make.
OpenStreetMap with Waypoints and Tracks
Besides I increased the speed dramatically on drawing, on Amiga 68k its much faster now, even usable and resizing on MorphOS with less problems and much faster, it does not recalculate the complete image on every resize step, but only draws the image.
New Version for the Virtual Lazarus crosscompiler, some crashes with mouse events (OnClick, OnMove, OnEnter, OnLeave), Redrawing and resizing problems and of course the biggest change adding support AmigaOS4 (PowerPC). I removed some not needed files and installations, so the download is much smaller this time.
Changes in short:
FIX: Redraw problems on AmigaOS3
FIX: Size problems
FIX: Mouse event crashes
ADD: Support for AmigaOS4
CHG: Striped image from unneeded things, reduced download size
I am thinking how to make an online updater, in principle not so difficult with a script, svn update from repository, recompile/install all compilers/crosscompilers, update lazarus repository, recompile and install lazarus, done.
As promised, I cared about drawing with alpha channel on m68k Amiga. Little bit background. When I make a StretchDraw() the raw data is scaled directly in pascal (to keep the alpha channel) via a nearest neighbor routine. And exactly there I need to touch every pixel to scale it, of course a good position to also care about the alpha channel. For speed optimization the special cases 0 and 255 alpha channel are handled separately. And its not so slow as I thought, so I let it inside.
Amiga m68k with alpha channel drawing (left) and as comparison on AmigaOS4 (right)
Besides this I worked more on size calculations especially on MorphOS, still not completely sure how it should be. An additional problem appeared in the OS4 LCL. The size calculation as done before crashes, because it reads the Width/Height from the the MUI object which seems to be forbidden inside the Layout. If think about it’s not very surprising because the layout is called before the window is opened and to get the right size the Layout must be done. So I had to rewrite the section with AROS in mind of course. Seems it works now (again? I hope). With this changes the EdiSyn now also work on OS4.
Working on the image drawing in LCL, not only for OS4 but for all, the problem is that it needs (semi-)transparent drawing. I started with Picasso96 for OS4 but it seems it still has no Alpha channel support. But luckily it also supports the cybergraphics compatible layer with the alpha channel support. So I changed everything in LCL back to cybergraphics, which is even much better, because now it’s the same for all platforms.
On this occasion the problem on MorphOS came to light. I always had the problem that at MorphOS the images are not shown. I thought it is a problem with resources but now it became clear, it’s the drawing the globalalpha value was too small.
Sadly the cybergraphics on classic AmigaOS does not support this Alphachannel, thats the reason the image has the black border in the screenshot. Maybe one could try to make a simple Alpha (0/1) by hand, which will be very slow I guess.
Besides I found a big Event problem. Got this as bug report already, it was just a not initialized variable. A little bit more testing and I will make a release and also create a Virtual Lazarus again with all 4 platforms :-).
Some questions to this virtual machine arrived so I started to write a FAQ for the Virtual Lazarus bundle I created. Also made a separate page for this product. There is not much of a response until now… lets hope for later.
Questions and Answers
Q: How to change the default keymap?
A: Open xterm and type „setxkbmap us“, replace the us (= american layout) by your favourite keyboard layout (de, us, fr, ….). To make it permanent for every boot, edit /home/test/.profile and add the setxkbmap call to end of the file.
Q: How did you transfer the compiled programs to the target computer?
A: I used the VMware shared folder on the host computer and used samba to access from MorphOS the program. Amiga/UAE and AROS can directly access the files on the harddisk but with dedicated computers of course samba would also work.
Q: The AROS compilation seems to be different from the previous AROS release?
A: Yes, the LCL diverted fro AROS on the one side and Amiga/MorphOS on the other side. this is the first try to join them, but its not on par currently. (For example Groupboxes does not work in this version also speedbuttons look weird and so on) So if you experience problems just compile your program at AROS again, or wait for bugfixes 😉
Q: How to compile for Amiga/AROS/MorphOS?
A: You can set by hand in Project Options. But I suggest you use my prepared config file as shown in the video. Open „Menu – Project -Project Options“ press import (button on the lower edge) choose the „/home/test/AllAmigaPlatforms.xml“. Now you have build settings for all four platforms.
Q: Synedit (or other package) is missing in the component icon list?
A: Make sure this package is already supported for Amiga style systems (SynEdit is 😉 ) and go to Package – Install/Uninstall Packages and choose to install. Lazarus have to compile again after installing/uninstalling an package.
Q: Are there examples/How to know which components are availabel for our systems?
A: Examples are available at GitHub. If you want to download directly to this virtual machine just open a xterm and type „git clone https://github.com/alb42/fpc-tests.git“. you will find a directory named fpc-tests in your home directory with a sub directory LCL, where you can find many test code examples to use, and test which elements are working, or not.
Q: I added a TMemo to my program now it does crash on MorphOS an/or Amiga. Whats wrong?
A: TMemo uses the Texteditor.mcc class as MUI implementation. Sorry I didn’t added a error handling for such case currently, because at AROS it’s installed by default.
I created a virtual machine with my compiled Lazarus source and cross compilers for Amiga, AROS and MorphOS. The virtual machine is for VMWare Player. Lazarus and a short description is placed on the Desktop. Should be really easy to use. I used the shared folder feature of VMWare to place the data where the other OS can reach them.
At the start I wanted to use DSL (Damn Small Linux) but sadly I didn’t get it to run (mouse does not move), so I changed to an other one. But the DSL stayed as name. Therefore the package is rather big (1.6 GB packed, 9 GB unpacked).
I hope someone is brave enough to try it and give some feedback.
Virtual machine with Lazarus Amiga, AROS, MorphOS: VM Lazarus (1544 MB)
MD5: cf3e14797f9ba9882ee66247ee1fbc9f