Archives for Coding

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

Hex2 on KC85

Posted by ALB42 on 3. Februar 2021No Comments

I got my KC85 up an running with ML-DOS a CP/M 2.2 clone, it runs rather well. The main reason I wanted this is that there is a Turbo Pascal 3.3 for CP/M 2.2 Z80 (KC85 has a U880 which is a Z80 clone). I assumed that this would be much easier to use as the native KC-PASCAL which I showed before. And I was right, this feels already much more like a modern pascal. Of course there are many limitation due of age and because of limitations of 8 bit computers.

As a starter I tried to bring my Hex2 calculator, which already exists for Windows/Amiga/Linux/Mac of course here as command line tool (as I did as a starter for Amiga as well)

But that as not so easy, I was underestimating how little 64kb RAM is. This all is new for me, comparing with that even a A500 has a huge amount of memory. Here on 8bit you have to think about to put to many texts into the code, it just inflates the RAM need. I tried to optimize it a lot by keep the texts (help/error) in extra files and only load them when I need them and even use overlays but still on MicroDos I don’t get it to run, seems the program is still too big, but not sure how to solve that any further, maybe I still do something stupid there.

Hex2 under ML-DOS on a KC85/4

Nevertheless I make a first release of it 0.1 and it nearly has the same feature set as the other version, nice to have my standard tool on all platforms.

Download on KC85 Program Page

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

Online FPC with FPU

Posted by ALB42 on 8. November 2020No Comments

You know the online FPC compiler, right? Until now it was only with soft float because usually that is enough. But I added now a possibility also compile with FPU enabled (therefore the resulting program will need a FPU, but will run much faster). For example the raycaster I presented the last days only runs this fast with FPU. And because it’s just a single file, it is perfect for the online FPC compiler, Have fun!

Raycasting mirror floor

Posted by ALB42 on 7. November 2020No Comments

With normal raycasting the floor and ceiling looks kinda boring (like in Wolfenstein), I was trying to introduce texture mapping floor but it was always too slow for my 030 Amiga. New Idea some easy reflection effect should be easy to make and not eat much resources. an voila.

I proudly (?, more present in shame) present the most ugly and nasty reflection like floor.

Also introduced push-able block and switches on the floor, when you move the blocks over it the block changes the color. In principle one could make a sokoban like game with this mechanic, just in 3D, would be much harder to solve, especially if you do not have the map 😉

As always the download with source (still a single file 😉 ) Raycaster3 (source + exe compiled for m68k-amiga 68020+68882, OS3.0+)

Ask Your Amiga 0.3

Posted by ALB42 on 6. November 2020No Comments

I did a big mistake on the last AskYourAmiga release, by accident the MorphOS binary was missing and instead the OS4 binary was copied as MorphOS binary. Sorry for the confusion. Therefore I made a new release. But the MorphOS release is somehow strange (or better MorphOS is) after some picture loaded some pictures look wrong, wrong colors and seems also the size is wrong calculated. But not all pictures are affected only some but when it appears all these type pictures will become wrong. restart AskYourAmiga and try the same question try to load the picture and it works. Very strange, seems like something is crashing inside the datatypes system (but the log does not show anything related).

To be honest I did not try AskYourAmiga very much on the other Amiga Platforms, only on Amiga OS3.x m68k because on all the other you could theoretically use the browser for wolffram alpha. So I concentrate to make it run nicely on classic m68k Amiga.

Other changes with this version are pure internal, some little redrawing problems I got report from OS4 and some bugfixing I found myself (not cleared buffer, such stuff).

You can use the Update function of AskYourAmiga 0.2 (in Suggestion/History Window, it will download the archive and save it to where you want, you only have to unpack it) or you download it from this page.

Have fun!

Raycasting Textures

Posted by ALB42 on 1. November 2020No Comments

A little bit improvement of the raycaster engine, now with simple texture mapping included. I had to invent some fixed point mathematics to make it fast enough on real m68k Amiga but still it works nicely and just a bit slower. I found a little bug in FreePascal when using functions Trunc() or Frac(), but Charlie thankfully saved the day and made a super quick fix of it.

Again a little video on my Amiga 1200 (68030/50Mhz, 68882/50Mhz, 32 color AGA Screen) and it’s still a single source code file of less than 20kb size (many of them are comments 😉 ). and the executable is less than 100k, not bad especially because I did not optimize for size, just for speed

Again the source to download: raycaster with Texture executable for m68k Amiga and FPU with source code.