Archives for Coding

Ask Your Amiga 0.5

Posted by ALB42 on 15. April 2021No Comments

I added assumptions to Ask Your Amiga. Assumptions are the way the different meaning of one word are separated from each other in Wolfram alpha. For example if you ask for “Berlin” it will show you information about the capital of germany, but also shows you a list of other cities (mostly in USA) named Berlin and also other meanings like Berlin as a name or a music band (never heard that before) and so on.

Like on the web page I put these assumptions to at the top of the results to select from a cycle widget.

AYA 0.5 with Assumptions

Download latest AYA at hte AYA Page or use the build-in Update Version

Chess mate TProcess

Posted by ALB42 on 10. April 2021No Comments

Still trying the TProcess and Pip stuff on MorphOS (I do not want to steal the gdb from Charlie though 😉 ). I remembered, a while before someone told me that he has a shell based chess program for MorphOS compiled Predateur. It uses a rather common command line API (uci). I also found a UCI GUI written in FreePascal the GUI itself is made with fpGUI, but that’s not a big problem. I changed the GUI to MUIClass and try it. It did not work directly on the first try, there are some problems with the TProcess. I have to think about that, how to solve. But with a little bit tweaking it works now. You can play chess nicely. The author of the GUI also has some uci compatible engines written in FreePascal, but they sometimes crash after some moves. But this Predateur one works quite nicely. Disclaimer: I’m very bad at chess, never really played, barely know the rules.

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.)

Docker direct compile and AROS update

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

Besides the documentation work I also updated the docker container. I created 4 scripts to compile directly from the docker (without using VNC/lazarus) so you can directly compile in your linux installation, that there is a docker container behind it you barely notice. But it only can compile standard Free Pascal things, no LCL applications (missing pathes to the lcl units, also not easy possible, but without Lazarus make not much sense, I think)

The AROS compilation had a big problem, when you compile without -g option it tries to strip but the strip tool was not installed, so I added some more tools to make it possible to compile without -g (makes the executable much smaller)

On this I updated the lazarus version to the latest version 2.0.12 as well.

If you want to use the newest Version of the docker (with the AROS bugfix) start the “” script if you also want to have the direct compile command download the CrossAmigaLazarus Package.

Watching TV on MorphOS

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

To be honest I don’t watch much TV, I like playing games much more but sometimes there are nice movies or interesting news, but mostly I’m repelled by the amount of commercials these days.

But nevertheless I have a satellite bowl and it connected to a DVB-S2 card in my Linux server with TVHeadend as TV server which works quite nicely especially together with Kodi. But the Webpage does not work very nicely, the it’s very complicated and the in browser watching of TV program does not work most of the time. So I seldom use it (basically only to program recordings).

In the past there was a nice VLC plugin for it make it very easy to use, sadly it’s not maintained for very long time. VLC moved on and the plugin does not work again, I got it to compile somehow but still no luck still does not work.

A long introduction to what I did now, the TVHeadend have a JSON based API, therefore it was rather easy to write a little program to get all the information from the Server show it in a window and select a channel to stream. And of course as I always do when I start a new program I also make it for Amiga style systems, MorphOS is this case. (but also for Linux 😉 )


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

This weekend I extended (and sometimes created) the documentation for all four Amiga systems library units (amunits, arosunits, morphunits, os4units) and the util units (ami-extra).

It is available as chm file or HTML pages created with the Free Pascal fpdoc tool. The documentation is kept in separate XML file, I created a GitHub repository for that.

The build server compiles the documentation on every change and put it for download an direct use to the build server pages

There is also a new SDK (3.16) for MorphOS which also has some new function to handle TLS-memory functions (Thread Locale Storage) to handle variable switching for different threads. Charlie wants to use them for Free Pascal thread implementation for MorphOS (AThreads). To make it easier I checked the current SDK and tried to update the Free Pascal library units for MorphOS. (of course not only the TLS functions, but all updates I found). And to make it even easier also created the documentation for these functions.

My long term plan is to have for many of the library units functions an example code, I added now example code for ExamineFH, Examine/ ExNext and MatchFirst/MatchNext.

Sudoku on KC85

Posted by ALB42 on 8. Februar 2021No Comments

Another little project for KC85 (MicroDOS, ML-DOS or any other CP/M) a little game, the Graphic output is really slow, because done by escape sequences, so only a slow thinking game comes to mid, like the sudoku i wrote a while before. But here an other arise it uses a solver to create sudoku fields which are valid, but this is heavy recursive and did not work, but I tweaked it a bit, now it does work most of the times, but sometimes it can not find a suitable solution and just stop (due to bad radnom values for the start). To net let it run in an endless loop I tell the user that there might be a problem with too deep recursive steps and if he wants to try again, mostly it still will not find anything nice, mostly you have to end the program and restart, but most of the time it works.

Sudoku on ML-DOS KC85

I still do not get how the colors work, I found function to change front and back color but they are changing the whole screen. I also found fond a drawing colors but they seem not to do anything, strange. Thats the reason I let it be b/w instead of colors for the fixed values. As marker for the fixed Values I placed a point behind them. To select a field to edit I just use the cursor Keys or wasd 😉

It can also load and save files if you want to stop but later continue the with same field and the positions you found already.

Download Sudoku on the KC85-Programs Page

HEX2 0.3 on KC85

Posted by ALB42 on 5. Februar 2021No Comments

Small improvements on the HEX2 for CP/M especially KC85 with MicroDOS/ML-DOS. Some little suggestions, like a command history and a command line option, both now included. The History option needed that I program myself the key input (instead of just using Readln) but this also means one can now edit the string if you made a mistake. You can use the Cursor keys right and left to move the cursor and type and “Del” to delete a char, but Delete works here like a Backspace.

The History function keeps the last 10 commands you send to HEX2 in a ring buffer and you can use cursor up and down to browse and edit them.

An other wish was to use the command line parameter to directly calculate and just return the result, rather easy really so I also included that as well.

Download as always on the KC85 Programs Page

Hex2 on KC85

Posted by ALB42 on 4. Februar 2021No Comments

I was able to revert mostly all of the memory saving tricks I tried (like overlays) because they are apparently not needed. When I compile it on MicroDOS it runs even without this tricks. And even a simple hello world compiled on ML-DOS does not work on MicroDOS, very strange, sounds like a bug in ML-DOS to me.

So there is a new HEX2 version 0.2 download at the KC85 Programs Page