Diary of an Amiga fanatic

Tag Archives: amiga reaction

I was always a fan of opening and closing my libraries myself. You could have them automatically opened and closed and save you the time of writing the code for it. I did sometimes switch to use the auto open and close function so I could skip writing code for it. When you have to open and close a lot of libraries this certainly save you a lot of time. Not to mention the check part if you actually managed to open them. I was about to switch to this automatically opening if libraries when I came across some new info regarding ReAction. Since ReAction classes are implemented as system libraries we use the OpenLibrary function to open them. With the release of OS4.x a new Intuition function called OpenClass has been introduced which will open ReAction classes. If we make use of the auto open function we will also open ReAction classes. To avoid problems we better switch to opening and closing everything ourself. Besides following the proper way of opening our ReAction classes we also have full control on what is happening with our code.

Let’s talk a bit about opening Libraries and of course closing them. And not to forget opening and closing ReAction classes. In this example we are going to open the Intuition Library. If you programmed in C on the classic Amiga and also worked with libraries you will notice something new when it comes to OS4.x. Besides opening the Library we also need to open it’s Interface. The Interface can be seen as a front end for the Library. Let’s say we want to ask the Library to do a certain task. Instead of asking it directly we will ask it’s Interface to talk for us with the Library. The reason why this Interface was added would be to technical and complicated (at this moment) to discuss but one of the reason has to do with compatibility of classic software.

Amiga Editor - Open Libraries STRUCTSFirst up we need to declare two pointer structures for our Library and it’s Interface. When we open both of them we need to store the values we get back and for this we have the above two statements. It is very important we set the value to zero (NULL). If we don’t they might point to a random address in memory which might cause the whole system to crash.

Amiga Editor - Open Libraries OPENINGNext up we need to open the Library and also the Interface. With the statement “IntuitionBase = IExec->OpenLibrary(“intuition.library”, 50L);” we are trying to open the Intuition Library. Important to know is that with the Amiga OS there is always one Library open from the moment the system is up and running and that is the Exec Library. You might have guessed it already that the “IExec->” function is part of the Interface of the Exec Library. As explained before the Interface of the Exec Library is talking to the Exec Library for us and in this case it is asking to open the Intuition Library for us. The “50L” part is the minimum version we want to open. The value that we get back when trying to open it will be stored in IntuitionBase. We will have to check if we managed to open it. For this we will check the value that is stored in IntuitionBase. Remember we set it to zero (NULL)? So if we check that the value is not zero (NULL) we managed to open it. If it still has the value zero (NULL) we failed to open it.

I will divide this article in two parts. In the next and last part I will discuss opening the Interface of a Library as well as closing it including the Library and also discuss ReAction classes.


I am not 100% sure but I think is was at AmiWest 2011 that Steven Solie talked about setting up some kind of developer information site. Over at Hyperion’s Entertainment Blog Steven Solie announced the AmigaOS Documentation Wiki. Let’s hope this will turn into a great resource of developer info. I am worried it might come to a halt after a while with no new info added. At least the beginning is there. I have started already with my ReAction tutorial on how to open a window. I am trying to get the first part released this week. The example code is done and just needs a bit of cleaning. With the first part of the tutorial I will also post the example code so you can already have a go at it. But I will explain the code over several parts since it would take a long time if I wanted to do everything in one tutorial. And I did not want to withhold the example code till later.

Front of the 1084 monitor

Looking at it’s age you can’t help thinking when. But today, Sunday 13-5-2012, my Amiga 1084 monitor finally gave up and died on me. After so many years of loyal service his time has come. Turning it on I hear a high pitch tone and when I switch it off it sounds like a washing machine ending his chore. I am not sure what I will do next. Buy a new one, use a television set or use a VGA monitor. For the last option I have no clue how to get this connected. I would need some kind of converter plug but which one and how it works is beyond me. If anyone got some ideas/tips please let me know. Sadly I was about to start with a new game review. Let’s hope I got this sorted soon. A piece of history died today and only a true Amigan can understand the loss I have experienced today. A toast to a great monitor that accompanied me through a big part of my life.


Earlier this week Old School Game Blog posted about the Amiga demo called Boogie Town by Ghostown & RNO. I never seen this one before and I don’t get excited much about demo’s I have not seen before but this one is really had me excited.  I really love the music from this demo and my favourite part is the 8-bit part at the end which will look familiar to you if you are a Jim Carrey fan. Besides watching the demo on your Amiga you should also watch the video (Old School Game Blog) played in front of a live audience.

Boogie Town by Ghostown & RNO

Boogie Town – 8-bit part

I sorted out the issues I had with ReAction so I am ready to start with a series of articles on how to program in C with Intuition/ReAction for Amiga OS4.x. I will break things up in small articles at first since it would otherwise take some weeks before I have it done and posted. This way I could post almost every week or even twice a week which is a much better concept.

Amiga Lore

This weekend I came across Amiga Lore which is an an updated version of abime.net’s web portal. I am still discovering  new stuff on the site after 2 days. From Amiga Lore you can jump to many other great sites. Currently I am reading some great interviews with programmers of some great Amiga games. I suggest you head over there and have a great time.


Finally I got my Amiga OS4.1 review done and posted. A sort of first impression about me getting Amiga OS4.1 installed. Earlier I already got my Run the Gauntlet review done and posted. The plan is to do some more game reviews.

Beverly Hills Cop

My next game review will be about Beverly Hills Cop. It has been a long time since I played this game. I am really curious what my take will be on this. They are good memories so let’s hope I will not be disappointed.

I got some big plans for my Bucket Programming Corner regarding programming on OS4.x. I want to start with Intuition/ReAction and expand on it. The idea is to cover as much on this as possible and make you understand it all so you can go off and create your own stuff. I talked about it before but there is so much difference between everyone doing this. I see people saying don’t do this while other people do use it. I even struggle with it myself since following the “official” guidelines (as far as they exist) result in none working code for me. Once I have fixed that I will start with the first tutorial of many. It also has been a while since I posted a new tutorial in this section. But trust me it will be worth while waiting for this.

AmigaWorld.NET

I had to get some help from the forums and I noticed the best results are on AmigaWorld.NET. Besides AmigaWorld.NET I also go to Amigans.NET but I get quicker replies on AmigaWorld.NET. At some cases I never get a reply on my forum postings over at Amigans.NET. This clearly has to do with the amount of users on both sites. I don’t go to Amiga.org since I can’t get my user account to work. For some reason it won’t let me set it up complaining the user already exists. I used a mail address that is no longer active so I needed to have this changed s0 I did mail for help and after a really long time I got a reply back last year in February asking if I still had this issue. I did reply yes but one year further it still is not resolved and I can’t be bothered with it any more. That’s it for this week’s column. The game review is pretty much done so expect this to be posted this week already.


The subject says it all about my new project; what it is and what the name is. For some time already I am thinking about what my next project should be. I started on a file manager project some months ago but stopped with it after running into some issues with ReAction. I got that stuck I just left it for what it was. But after reading Trixie’s articles about how to proper use ReAction over at OS4Coding I got a burst of new energy to attack ReAction again. When trying to come up with a new project I kept coming back to the file manager and since I got a better understanding of ReAction thanks to Trixie I concluded to give it another try. Why the name Redhouse? I tribute to Alan Redhouse because without him I would not be programming on OS4 or even having this blog.

DiskMaster has always been my favourite file manager. Even now on OS4 I still use it a lot. I always wanted to develop a file manager myself which is now actually going to happen. I am going to provide regular updates about the progress of it but that is not all. I will also show how I do certain things which means I will also show some programming code and explain it. If there is demand for it I might actually go into great details but at first I will do a sort of global explanation. I have to say that I have no clue on how to put it all together but that is also the fun of it. Learning along the way and getting others to experience the same. I will also create the file manager my way which means I might not follow the “correct” way of handling such a project. Planning everything on paper first before even writing a single line of code is not for me. When you follow my articles you will see what I mean. Let the fun begin!


It has been ages since I worked on my DiskMaster 2 wannabe. No time at all and in between I foolishly decided to start working on Redhouse Basic. The idea behind the file manager program was to get a better understanding about ReAction. The last thing I was working on was trying to display the contents of a drive/folder in a window. I really got stuck at that part. I went through a lot of documentation and tries only to end up with crashing my program. I did get the Window with the slider but I just need to get the contents of a drive/folder displayed in there. I think I will take a different approach at this. Instead of going for the contents of a drive/folder being displayed I will try to get some lines of text displayed in the Window. Once that works I have a better understanding of it and I can move on to the drive/folder contents. I am just looking at that last post I made about this and I see it is from 31-2010. Good grief we are already several months further. Time really flies.


The last bit I had left to do is hang up my whiteboard which is done so the coding can begin. I am using ReAction on my OS4 (final update) system and to be honest I know more about women’s clothing then ReAction. Surely there is plenty of good documentation about ReAction available? Not really. There is info but it is scattered all over the place. There are examples available but if you don’t understand how ReAction works you can stare at the code for centuries and still don’t get it. That also goes for the AutoDocs that come with the development kit. I got to know more by examine the examples and just try out things in my code to see what happens. This will get you far but you have to be a bit of a programmer already to be able to do this. Another important source of information is UtilityBase which has a lot of Q&A’s in the forums regarding ReAction. But the number one source of information for me was the “A Beginner’s Introduction to Programming With ReAction” from Jim Tubbs. You can find this on OS4Depot. It dates back from April 2007 and I would love to see some more tutorials from Jim on this.

Currently I am trying to display the contents of a drive/folder in a window. With of course the ultimate goal of being able to select files and do file manager like things to them. Like a true file manager or DiskMaster2 wannabe if you like.