Archives for Coding

CRT Unit

Posted by ALB42 on 29. Dezember 2019No Comments

Most Tutorials about Pascal use the CRT unit in a very early Lesson. They use it only for ReadKey() to wait for a key at end of Program. It would be of course the same to just use a ReadLn and wait for an Enter.

I tried already to implement CRT before using an old implementation, but exactly this ReadKey implementation does not work at all when KingCON or other console replacements is used.

Now I got a hint in MorphOS Forum (always a very good Source for Implementation hints) to set the console in RAW: mode (using SetMode()) and then just read from the console the pressed keys. If console in raw mode, one can read cursor keys and F keys from the console.

I tried that and on MorphOS and AmigaOS3 it works well, Read blocks until a Button is pressed. But AROS of course is different again 😉 it always returns a Value sometimes 185, sometimes 184, not really know what that means. I thought about some kind of timer event but this should look different.

But finally it works, mapped some keys like F-keys and cursor. Also worked on the output gotoxy and colors, the colors are a little bit tricky, because the Amiga console only supports the first 8 pens (as far as I see it) so I cannot just ObtainBestPen, and the first 8 Pens are usually fixed and not the colors I need. I try to change them with ObtainPen but when they are already taken I just try to find one which has a close color, which does not work very well. Solution unknown.

I compile the example of ReadKey as example3.pas and compiled a little RPG-Game I found which is console based, which is a good testcase for colors and GotoXY. Of course looks not the same as in the DOS console but it is usable.

Not Release

Posted by ALB42 on 18. Dezember 2019No Comments

I guess there was some confusion about the installers I presented the last days… these are not official Releases of FreePascal 3.2. In fact FreePascal 3.2 is not released yet and also no fixed date for it yet.

My work on the installers just show my work preparing the next release that we have a real Amiga style installers with all needed Readme and copyright text that they can serve as official packages and even published on the official FreePascal site.

You can download these packages and test the installer, and that was the purpose of showing them, but please do not distribute them as FreePascal 3.2 releases. (I added also a beta marker at the page and in the ReadMe to make it clear) And do not post news messages about FreePascal 3.2 Release until there is an official announcement.

Thanks!

Installer MorphOS

Posted by ALB42 on 15. Dezember 2019No Comments

And as promised the Installer for MorphOS also to the latest Version. I used my old MacMini (with the acient MorphOS3.8) for that, but somehow it is rather slow. Maybe I’m spoiled with my PowerBook now, which feels much faster. But the MacMini is much better for such tries, not destroying my working setup on MorphOS.

Again a little Video:

Have Fun!

Installer Amiga 68k

Posted by ALB42 on 15. Dezember 20192 Comments

As mentioned yesterday the 68k Amiga Installer needed a little bit more work, but now it is working nicely the same way as the other two.

In the video the customized Option selection is shown.

Next I will test the MorphOS installer again and try to make an own Installer for AROS. Thats a little bit tricky because of the Package system they use, which is nice but no support for it in the Installer as far as I can see. Path and assigns are not added to user-startup but should be made via a Package-Startup file, in the folder and a text file in the Envarc: pointing to this Package-Startup File. I did this already for the AROS install process but not with the Install tool.

MUIMapparium 0.8

Posted by ALB42 on 1. Dezember 2019No Comments

One disadvantage of writing a program relying on web resources is, that you have to update that program everytime the webresource is changed/updated. In the next days the search for MUIMapparium will break again, and the Find by IP/ Find me is broken a while before already.

So I updated MUIMapparium to Version 0.8 I also added some small new features, like some more shortcuts and also by popular demand to jump automatically to the first search result. Best update soon before the search function does not work anymore.

Also the 68k freepascal compiler got some updates which hopefully improve the stability and speed of the m68k-amiga Version.

Download the latest Version at: MUIMapparium Page

MultiLine and Selection

Posted by ALB42 on 16. Oktober 2019No Comments

Worked a little bit on Leu, a click on row/column title it selects the whole row/column as used in other spreadsheet applications. On RTG Screens with 15bit or more colors the selection now blends the background color instead just replacing it, that means you can still see different background colors when selected.

Multi-line is something people where asking me for, so I implemented that, if you are in a cell typing you can use Ctrl+Enter to go to next line, instead of finishing the editing. I got a question, if I plan to support different Font sizes and type, and I’m not sure about that until now. It would need a complicated replacement table from the Windows/Linux fonts to typical Amiga fonts and back. Especially on classic Amiga the Font sizes of Windows and Linux are WAY to big. We will see.

Leu with Multi-line text, column selection and blended selection color.

A while before I was working on the cell format (number format, date, time and so on) but this is rather complicated. It needs a bit more time it’s still not reliable but I want to finish it before release the next version. Some of these features (like the selection blending) are already present in the Leu version I gave Paolo Besser for the Icaros64 alpha WIP.

RealTime Draco

Posted by ALB42 on 8. Oktober 2019No Comments

Again playing with 3D stuff, realtime raytracing, but this time a little bit stripped that it also can work on a real 68k Amiga, like the Draco, so without mirrors and so on. The new improvement by Charlie in the FreePascal compiler seems to work as it should be and also increase the speed a little bit, so it’s almost fast. Ok its still horrible slow, but hey the first version needed around 10s per frame, now it’s under 2s.

Also tested with AROS and because its the new “hot stuff” of course on AROS64 and even the image is 4 times bigger it moves smoothly. If you make it the same size as the Amiga68k one, it needs around 8ms per frame but the window is very tiny.

It’s still heavy with floating point calculations so the 68060 is very good to use the 68881 will be much too slow. I also tried the Vampire 68080 which have a much faster but not so precise FPU. Good news it works, bad news it looks broken. I only use Singles everywhere and removed all Round() from the source but still it looks completely wrong, no idea why.

Copy, Paste, Action!

Posted by ALB42 on 5. Juli 2019One Comment

Next thing about Leu was the clipboard, originally I only planed to make a simple solution, where only the texts get copied. But when I thought about, the Amiga clipboard is perfect to use as multiformat clipboard, as windows has. The clipboard on Amiga systems is in principle just a IFF file and there you can put in everything you want. You can put in a Text (e.g. IFF-FTXT) or an Image (e.g. IFF-IILBM) or a sound (e.g. IFF_8SVX). And because IFF is tag based its also possible to put more then one format at the time into.

So I started to write a own clipboard routine for Leu, which takes the selected cells and put them to Clipboard as OpenOffice XML (like the ods file) and as standard text as tab separated list.

And this works rather nicely as you can see:

I also added a little requester to set the number of Cols and Rows

If you want to download the latest version go to the Leu Page

Leu in action

Posted by ALB42 on 28. Juni 2019No Comments

I tried Leu on a real A1200 with 68030/50 Mhz and a 32 color AGA screen. It worked but the idea to redraw everything if you type something in, was not very smart. (To show the changed calculation results)

I changed that to a function which checks which cells are changing because of this cell enter, in principle which formula depend on this cell. And it’s working quiet well. Time for a little video

I noticed the colors are still very buggy on big endian systems, I have to care about that again later, in the saved file the colors are swaped, I must debug that. Should be not too hard, I fixed that already once at the loading of files.

Oh, so colorful

Posted by ALB42 on 24. Juni 20192 Comments

As it was the case with borders, I took the LibreOffice color requester as GUI blueprint for my Leu color chooser, Basically it’s the same as for the borders. The only difference, you need two of them, one for background one for text (in principle a one more for border color, but I left that out for now.)

Leu also got a own Page now where always the newest version can be found and some central information about it. For now I will not keep a history for it, because still changing too much things.

Leu Page

    

Color requester in MorphOS Leu