Archives for Freepascal

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.

Raycasting

Posted by ALB42 on 31. Oktober 2020One Comment

By random I came across a funny video on youtube showing the basics behind a simple raycaster like Wolfenstein 3D. I know the mathematics behind it for real rayshading and on a real Amiga it’s awefuly slow. So for me it was interesting which short-cuts they take to make it fast. It’s really not complicated to understand (if you know the mathematics already, if not I guess it stays a black box).

I tried to implement that into a FreePascal program (with some tiny changes (block size smaller for example, because of the smaller screens on Amiga)). It runs rather well, I did not want to code hardware, but use OS functions which make it a bit slow of course (especially the line drawing).

For the actual 3D image s I used RectFill but of course on a non-RTG Amiga thats very slow, therefore I changed that to write chunky pixels to a temp buffer and use WriteChunkyPixels to copy that to screen, already much faster but still not max speed. I found a funny patch (Blazewcp), which patches the WriteChunkyPixels function to be much faster, and voila really nice speed of already 12.5 fps, without turning OS of or Assembler/Hardware stuff, in pure FreePascal.

You want to have it? try it? Sure why not: Download (Source and Exe for m68k Amiga OS3.x 68020+ and FPU needed, but can be compiled and run for all Amiga-likes)

Ask Your Amiga 0.2

Posted by ALB42 on 23. Oktober 2020One Comment

You know whats most funny when browsing Wolfram Alpha or such databases, just following the links inside it, sadly the API does not give infomations for links in the text. BUT it supplies related searches, I implemented an additional page to AYA that you can find close searches, sometimes there are even some weird stuff… maybe they are searches other user used? I don’t know.

Besides that I implemented a history of your searches and also added some suggestions sorted in categories, some starting points what to search. Also if you find something funny (like the people curves e.g. “Arnold Schwarzenegger curve” and so on) why not share them with other. In the result window is now a “Share” button where you can add a short description and your name (if you like) and I will add them to the suggestion database. (which you can update via the suggestion window)

Also the software itself can be updated from the suggestion window.

Download as always for all Amiga Systems: AskYourAmiga 0.2

Ask Your Amiga 0.1

Posted by ALB42 on 17. Oktober 20205 Comments

Finally I found some motivation to put a release together of “Ask Your Amiga” the new tool for your beloved Amiga. It’s working nicely, now also can save the image or text, but nothing more… just very basic functionality but even so I like it working rather smooth even on my slower Amiga 68030.

As always it is available for all Amiga systems with an Internet connection and a GIF Datatype installed.

  • Amiga 68020+ OS3.0+
  • AROS x86 ABIv0, ARM Raspi ABIv0, x64 ABIv1 nonSMP
  • MorphOS 3.x
  • AmigaOS 4.x

Download: AYA 0.1

Amiga FPC SSL

Posted by ALB42 on 11. Oktober 2020No Comments

Worked a little bit more on the SSL implementation for Amiga in FPC using the AmiSSL.library. First I tried to just use the OpenSSL implementation in FPC. It was much work but sadly it just crashes on SSL connect and I have no idea why, rechecked everything. But before it was working using the BIO_* functions, so I rewrote the FreePascal implementation for AmiSSL using the BIO_* functions and finally it works. That means one could now get a webpage from a HTTPS page with a single line of code (and two uses), which is really nice.

In principle this should also work on MorphOS, for AmigaOS4 it would need to rewrite the import unit for AmiSSL. Sadly AmiSSL still does not exists for AROS only a c-link lib which does not work at the moment in FreePascal-AROS.