I found the reason Mapparium, Edisyn and some other application crashed. All things have to be compiled with “-CaEABIHF” to make sure all sources use the same way to transfer floating point values. The -dFPC_ARMHF is only needed by the compiler, the ABI has to set for every other compilation, so I added them also to the fpc.cfg, fp.cfg.
I created Mapparium Release, with the latest not official Release 0.7 which already has some basic GPS Support (position only) and the Zoom and Find me Buttons are moved into a small menu inside the map (like google maps and open streetmap webpage also have). The menu can be hidden if this disturbs someone 😉
Releases for all the other Platforms will need more time.
In principle the ARM AROS freepascal works very nicely, but some of the LCL programs does crash, especially EdiSyn and Mapparium have this problem. I try to debug it, its strange that it only appears on ARM (i386, PowerPC, m68k no problem at this point). It seems that it is a classical use after free, but the source seems to be right. I need to check if this also happen on the other platforms and only work by random. Or ARM has special properties which bring this error. With some tricks I come around this problem and got EdiSyn and Mapparium to work. Both work well on RasPi AROS but still crash on exit so I guess there are more problems inside.
Tried a little bit more the ZuPaPlayer on ARM, seems the Zune on ARM is not on the same status as i386. A List event fired on i386, seems never fire on ARM, which makes it impossible to move songs in the list. Because I compiled the libmikmod myself, I increased the buffer for the AHI mikmod module (on i386 AROS I had some stutter problems). It works but now the pause button needs nearly 500 ms before it really stops. Not so nice, so I edited the AHI driver again a little bit and calculate the Buffersize dynamically from the frequency to cover 120 ms (got the idea from the Windows driver). Works rather nicely. So I made a release for ARM-AROS of ZuPaPlayer 0.2
I tried some linking to AROS C Linklibs on ARM-AROS and the basic example with sqlite3 works rather nicely. But more interesting for me would be the mikmod lib because then I could compile ZuPaPlayer for my RasPi.
The main problem is the Libmikmod is not available for arm as binary. But I found the source a while ago. I tried to compile directly on the ARM-AROS and it works. And I was also amazed that also my ZuPaPlayer compiles without much changes… and you would not believe ZuPaPlayer even plays the sounds without any problems 🙂
ZuPaPlayer on arm-AROS
Very nice, my Raspi has a touchscreen, so now I can use my Raspi as nice little Mod Player 😉
Compiled some programs for ARM AROS, most work, but some also do not work, with a rather strange error message. First I will add my new startup code to official repository, then I will try to debug this problem.
Games on ARM AROS
Download for arm-aros: FPCMines – A Mines clone ColorIt – Fill field with one color APict – Simple Image Viewer
Working on the startupcode, added option to alloc a new Stack if the freepascal needed stack is bigger than the stack supplied by AROS. (which is mostly the case, AROS delivers 40k stack, FPC wants 256k). It works, even not completely finished. It’s my first bigger project with arm assembler better let someone check with more arm assembler knowledge 😉
I tried also LCL on arm, but it did not work, the Handlemessage inside MUI/Zune makes the problem. When I checked on the Structures involved. I noticed that on AROS there are two different structures, one for BINCOMPAT mode one without this define. Until now the BINCOMPAT was only needed for m68k, but there is no special m68k-aros but only m68k-amiga and the x64-aros does not work well because AROS on x64 is near to not usable.
The define AROS_FLAVOUR_BINCOMPAT is now defined as default for arm-aros and it seems to work. Compiled the FPCMines as first try and it is working well.
Included more menus and key strokes for the different functions, the hotkeys for existing buttons is very easy, there is a special field to trigger them (MUIA_ControlChar). That means you do not have to care about, Zune does it care about. But for other hotkeys, like Volume up, down, mute and so on, it is not possible. I did not get it to work using InputEvent field. The event is fired on keypress. I didn’t find a way to check which key is pressed because the Message pointer points to a Zero-ed area, maybe a Zune bug. In the net I didn’t find a source using that function (except directly, but not via a Hook). Of course it is nice to have the hotkeys also denoted at the menu entry. Sadly the MUI_MenuItem_Commandstring still does not work, so the Amiga sign is always shown at the menu entry with the key. I filed a Bug report about it, but I checked the latest source, it’s still not fixed. I looked into the source and found that this field is just not used and sent to the system. I’m not very good at C coding but even I was able to include this, because it’s just equivalent to the enabled flag for example. The Diff of this change is now included for ABIv0 and ABIv1 and it also work in the latest nightly. Hopefully the next Icaros will also include this change, until that the Amiga-key sign is there, but you do not need to press it.
Besides this I also included a hotkey to open ZuPaPlayer if it is hidden. (Ctrl-Alt-z is the default, but can be configured in the Prefs Window). For this purpose the commodities.library unit had to be included to Freepascal.
Added a settings window to ZuPaPlayer, the most things are working already, at least what I need 😛 hotkeys and menu is not finished but the rest works already very nice. Maybe I should check some other MUI applications how Hotkeys are made MUI/Zune style. I’m still not very satisfied with mikmod, maybe it would worth a try on modplug. Nevertheless if someone is interested here is the current state. It’s early version so it is not complete maybe crash or strange behavior.
Working more on the ZuPaPlayer, now with the Listing of MOD Files, with sorting, moving like Delitracker does it. Even it is a little bit strange 😉
Of course, it saves and loads MODlists compatible to Delitrackers MODLists (#?.program).
(Note: the sound errors only appear in the video, seems due to the recording software)
Implemented Volume setting and play position to ZuPaPlayer. The Pause does not work well, sometimes it crashes after pause. I implemented an other method, simply not calling update for the Pause time, seems to work, without crash.