Category Archives: AmigaOS - Page 5

AmigaOS 4.1 Update 3 Released

AmigaOS 4.1 Update 3 has been released! http://upload.wikimedia.org/wikipedia/en/0/05/Boingball.png

You can find all the details and a place to download the update at Hyperion’s main web site.

Special thanks to the AmigaOS development team and the beta testing team for a great effort. This update is rather complex and involves no less than 7 different hardware platforms not including variants.

For direct customer support please go to Hyperion’s support forum.

Where is AmigaOS 4.1 Update 3?

I am happy to report that AmigaOS 4.1 Update 3 is finally nearing completion. Release candidate testing is underway so as long as the testers don’t discover any new issues this will be it.

As is normal for any complex software effort, there have been some last minute issues that held things back. Most of the issues have been taken care of now. If necessary, we will organize an Update 4 if any major issues are discovered after release.

Along with the usual bug fixes we have included a new feature or two along with this update. Other features will be held until the next major release (AmigaOS 4.2) of course.

The update will be distributed via Hyperion’s main home page. If you have not created an account and registered your product(s) yet then this is the time to do so. A registered AmigaOS 4.1 serial number is required to download the update.

Steven Solie
AmigaOS Development Team Lead

Update 3 Status Report

AmigaOS 4.1 Update 3 is currently in the works and will be released as a free update for all of Hyperion’s registered customers. If you have not yet registered your AmigaOS 4.1 license go to Hyperion’s main web site and do it now.

The current list of supported AmigaOS platforms include: AmigaOne-XE, MicroA1-C, Pegasos II, CyberstormPPC, BlizzardPPC, Sam440ep and Sam460ex. The update should also work on the limited developer boards such as the AmigaOne-SE and MicroA1-C Mark 2 but these will not be tested.

The focus of Update 3 is system stability and bug fixes. Brand new OS features like hardware accelerated OpenGL are reserved for AmigaOS 4.2 which is currently planned for release along with the powerful AmigaOne X1000 platform.

All platforms will be brought up to date in terms of fixes and enhancements. I think everyone will enjoy the substantial MUI update which simplifies MUI application porting. Sam users can expect noticeable performance boosts as more of the hardware is utilized for acceleration. A majority of the USB issues have also been addressed.

In the time that has passed since the AmigaOS 4.1 Classic release, our testers have assisted the development team in identifying some difficult issues which are taking some time to resolve. The time has come to decide whether to further postpone Update 3 or push some of those issues out to a possible Update 4. I’m a big fan of frequent releases so I tend to lean towards releasing early and more often.

Steven Solie
AmigaOS Development Team Lead

P.S. Happy Canada DayCanadian Flag

The Right Tool for the Job

For any task, using the right tool for the job is always a crucial matter. This applies to driving a nail into a wall as much as developing software. And while nobody would ever try to use a glass bottle for the nail, the tools of the trade of the software developer are a bit more abstract (and sometimes, more brittle too).

Shared != Shared

On AmigaOS the word “shared” is used in two major contexts: Shared Library, and Shared Object. Both are tools for sharing code between applications. However, they have very different methods for doing this, and with that comes a very different approach to using them.

Let’s first look at what they are.

Shared Libraries

Since the early days of AmigaOS, shared libraries have been a means of sharing code and, to a certain degree, data between multiple users. A shared library is, essentially, a structure in memory called the Library Base, and one or more jump tables to functions that are to be shared. Since Version 4.0 of the OS, these jump tables are called Interface, and although their use differs slightly from their setup in AmigaOS 3.9 and earlier, the principles are the same. A program intending to use a library has to do two steps in order to perform any calls into that library:

  • It has to open the library by calling Exec’s OpenLibrary call.
  • It has to obtain at least one interface from the library by calling GetInterface.

The latter step was not needed on the classic AmigaOS 3.x, but has opened up a host of new possibilities on AmigaOS 4.0 (we’ll talk more about that in a later article).

Interfaces, like the classic AmigaOS 3.x jump tables, are a collection of function pointers in a structure. Calling a function in an interface usually involves knowing the offset of that function. We typically call a function like this:

struct Library *library = IExec->OpenLibrary("foo.library", 0);

The variable IExec contains the interface. The OpenLibrary call is a member of the interface. During compile time, the compiler will calculate the offset of the member and generate appropriate code for that. The code will load the IExec interface pointer into a register, load the CTR register with the address at the specified offset, and branch into the routine using the bctrl mnemonic.

The process relies on a few factors. First of all, it requires to have the library open and have the interface ready. It also relies on the fact that an interface, once written, will at most be extended at the end. It will never be possible to remove functions from the interface (at least it will always have to have a ‘dummy’ entry) nor will it be possible to re-order functions.

Data access is done via the library’s base pointer. The implementer might chose to store user-accessible data within the library base and document (at least part) of it for public access. Since this is a compile-time decision to make, again, the organization of data, just like the organization of functions, must not change once it has been published (unless the library base data is private).

Shared Objects

Shared Objects are a relatively recent addition to AmigaOS 4. They work radically different from the traditional shared libraries. A shared object is, as its name implies, somewhat reminiscent of an object file that is used during compilation of a program. In essence, a shared object allows a program to defer complete and final linking of the program until such time as the program is actually executed on the target user’s machine. This means that some symbols in the program remain unresolved until such time as the program is run.

As a matter of fact, even then the symbols might still remain undefined if a feature called Lazy Binding is active. In essence, Lazy Binding delays the linkage of a function until the very moment it is called for the first time. So, suppose you have a function MyGreatFunc that you call. If Lazy Binding is active, the call will jump into a routine called .resolv within elf.library which performs a symbol look-up on the name of the function and, if it finds it, overwrites the call to .resolv with a call to MyGreatFunc which is located somewhere in the shared objects that are bound to this program.

From the programmer’s point of view, though, there is no difference in whether the program was linked completely (statically) during the development cycle, or dynamically during load time or run time. In essence, the programmer can use a shared object like he uses any other object file in his program. This includes referencing data in the shared object file. Even more, the shared object file can reference data and code in any other shared object file bound to the program, and in the program itself.

In fact, this is a common case. If a program uses a shared object implementation of the standard C library, the start-up code in the shared object file will usually reference and call the program’s main function. This works completely transparent for both; there is no need to open the shared object, it just needs to be specified during linking.

Shared Objects can do even more. There is a set of functions to dynamically load shared objects during runtime of the program, and to look up symbols in the program or any of the loaded shared objects, including those that have been loaded at runtime.

Don’t use the Bottle!

Looking at the above, it seems natural to want to use shared objects instead of shared libraries. The shared objects seem to have so many advantages over the traditional AmigaOS shared libraries, so why would you want to use shared libraries in the first place?

The answer is simple: The flexibility and power of shared objects comes at a cost. Depending on what you do, these costs can be quite substantial:

  1. Shared Objects, in their current implementation as of AmigaOS 4.1 Update 3, are not really shared. Each program using them will load the file again into memory, completely, including all code and data associated with the file. This means that e.g. a shared object version of libc will load all math functions, all system functions, in fact, everything, even if the program only ever uses printf.
  2. Shared Objects are not versioned. While you can specify a minimum library version when you open a shared library to make sure that you get a guaranteed set of functionality, shared objects are provided “as-is” and do not have this kind of information.
  3. Shared Objects require a certain amount of infrastructure up and running. Therefore they cannot be used for Kickstart modules, or device drivers.

Especially point 2 is an issue, in theory and in practice. Some libraries that are implemented as shared objects carry their own versioning information, or provide a call to find out what version a program is using, but this is not standardized in any way, and therefore a shared object might or might not implement such a mechanism. A lot of systems using shared object exclusively end up with something commonly referred to as “Dll Hell” – meaning the system has to provide a wide variety of different versions of the same library, mostly encoded in their file name. If you look at the average Linux distribution, you will see what this means. This here is an example from my local network server:

-rw-r--r-- 1 root root  9156 2009-04-10 18:29 libgmodule-2.0.a
lrwxrwxrwx 1 root root    26 2010-05-04 13:05 libgmodule-2.0.so -> libgmodule-2.0.so.0.2000.1
lrwxrwxrwx 1 root root    26 2009-06-02 12:48 libgmodule-2.0.so.0 -> libgmodule-2.0.so.0.2000.1
-rw-r--r-- 1 root root 13644 2009-04-10 18:29 libgmodule-2.0.so.0.2000.1

As you can see, there are four “versions” of the libgmodule library, two of which are soft links to provide somewhat generic names. If this were AmigaOS, you would simply have one gmodule.library file, and nothing more.

Another issue is different “builds” of the same shared object library. For example, suppose a library that can be used to load image files. Depending on the facilities of the original compiler of the library, he might have decided to compile the library to include support for PNG and JPEG but not GIF. They end up with a shared object file called libImageLoad.so which, for all intend and purpose, looks like libImageLoad.so from another programmer. The other programmer might however have decided to use GIF as an image format and has compiled his copy of libImageLoad.so with GIF support enabled. A user trying to run this program on a system that only has the first version installed will not work (at best, the program will not load because of the missing symbols). The decision on which libImageLoad.so to install/keep  is left to the user – not a good idea.

Of course, this is still somewhat possible for AmigaOS shared libraries as well. A bad practice in the past has been to always install libraries in to the LIBS: drawer, even if the library was only ever used by a specific program. That lead to situations where two programs would install a library of identical name into LIBS:, and only one program would still work.

Glass Hammers and Steel Bottles

So, this leaves the question as to what kind of tool to use in what circumstance. In spite of their individual shortcomings, both shared libraries and shared objects provide a lot of power if used right.

Shared Objects are primary intended for porting of programs from other systems. Any sufficiently large or complex program from Linux or Windows will, in one way or the other, rely on shared code, for various reasons. Usually, this type of code sharing does not translate very well (if at all) to the AmigaOS shared library model. Using shared objects for such projects is almost mandatory.

Shared Objects have other possible uses on AmigaOS, even for new, native development. As an example, a concept like plugins or overlays can be easily and efficiently implemented using shared objects. Anything that is specific to an application and does not install on a global scope is probably easier to do with shared objects, more so since the compiler has intrinsic support for them (as opposed to AmigaOS shared libraries that need to be more or less hand-crafted).

For almost any other purpose, it is recommended to not use shared objects. If you are developing a library, chances are good that you should use a library for that purpose. AmigaOS shared libraries have limitations that are easy to work around in newly developed code. They offer a solid framework for versioning and an escape from other systems’ “Dll Hell”. They are independent on the compiler used, and as a rule, their limitation will force the programmer into a better designed interface. Since AmigaOS 4.0, the Interface concept allows for a strict versioning, meaning that changing the layout of an interface is even possible if they have a different version number, and GetInterface can retrieve a specific version of an interface if the library still implements it.

Closing Words

This post has tried to shed some light on a question that has confused some developers for a while. It tried to give a broad overview of how the different mechanisms work, and when to chose which method for implementing a task. AmigaOS 4.x and beyond tries to give you, the programmer, the tools required to build, but choosing the right tool is still your job.

Oh yeah, and we’re not responsible if you hit your thumb 😉

AmigaOS Support Forum Launched

I am happy to announce that Hyperion Entertainment has launched a new AmigaOS support http://upload.wikimedia.org/wikipedia/en/0/05/Boingball.pngforum!

This forum is designed to centralize communications between AmigaOS customers and the AmigaOS software development team. Think you found a bug? Then post a message in the support forum. If an AmigaOS beta tester is able to reproduce the bug then they will take it from there. AmigaOS core developers are also encouraged to participate in the forums and can answer questions directly as well.

Additional support forums are available for Hyperion’s game products such as Freespace and Shogo.

AmigaOS developers have not been left out. There is a support forum for you as well. Found a bug in the SDK? Then just post a message and get it fixed.

Everyone will be allowed to read the web forums but only registered product customers will be allowed to post. To become a registered user, just register your product with Hyperion at their main web site using your product serial number. Remember to register all your Hyperion products for full access.

To summarize:
1. Register your product serial numbers at the main Hyperion Entertainment web site.
2. Create an account on the new Hyperion Entertainment Message Boards.

Steven Solie
AmigaOS Development Team Lead

AmigaOS 4.1 Classic – Latest Update!

Hyperion Entertainment CVBA and AmigaKit.com would like to give you a sneak peak at the upcoming print advertisement for AmigaOS 4.1 Classic that will appear in the next issue of Amiga Future magazine.

AmigaOS 4.1 Classic Advertisement

Look for a full review of AmigaOS 4.1 Classic in the next issue of Amiga Future,  and other reviews on popular Amiga websites and forums around the world in the next weeks.

AmigaOS 4.1 Classic is immediately available from your local Amiga dealer or direct from AmigaKit.com’s webstore.   AmigaKit is stocking a number of compatible PCI cards and other accessories to complement your Classic setup.

SATA 4-Port Raid card for Mediator
10Mbps PCI Network Card (Mediator)
Radeon 9250 PCI 128MB Graphics Card
Subway USB

and 128MB Memory modules for Blizzard PPC.

A hardware compatibility list has been started and will be expanded as new hardware is tested.  It can be found here.

 

Hyperion Entertainment and AmigaKit.com wish to thank all users for their support!

 

Note: AmigaOS 4.1 Classic requires an Amiga 1200, 3000(T), or 4000(T) Computer with  a Blizzard PPC or Cyberstorm PPC accelerator.   The use of PCI cards is optional.  PCI cards require either an Elbox Mediator PCI Busboard or Maytay Prometheus PCI Busboard.  Check the hardware compatibility list for further information.

Tales from an AmigaOS 4.1 Developer…

In the words of Dr. Nick, “Hello everybody!”…

I suppose I better start by introducing myself.  My name is Karl Churchill whom you may know as Karlos from one or more of the various Amiga forums.  I’ve been an Amiga enthusiast since I first had a go of a friend’s A500 back in 1988.  I didn’t actually own one until 1992, but from then on, I’ve not been without one.  I’ve been asked to write a few words about my involvement with OS4.1 for classic.  Well, there’s the short version and the long version.  The short version is that I’ve been working as a contributor to add Warp3D support for the Permedia2.  Work began in October last year as an evening project.

The version of the driver in the repository had not been touched in the best part of a decade and whilst it compiled, that was all it did.   Any attempt to launch a 3D application would simply freeze the machine.   The first challenge was to get it to a point where it would at least allow an application to start, even if it didn’t render anything.  Working on low-level code is not without it’s complications.  Thankfully, the kernel provides a debug printing service but I don’t have a serial line debugger (the serial port on that machine is not entirely reliable) so every time there was a crash, I’d have to reboot and run DumpDebugBuffer to see what had blown up.  Progress was slow at first, but eventually I was rewarded with a blank screen and not a DSI.  Over the following months I got all the basic drawing routines up and running, starting with the basic V1-V3 API calls.  Along the way, I found some amusing undocumented bugs in the Permedia2 that were the cause of a lot of head scratching and finally I got up to the point where I could implement the V4 API.  This is where everything changes and is a good time to start the “long” version of the story… as if this one wasn’t long enough already!

Back in 2001 or so, I was developing my own applications that were using Warp3D as an “advanced rasterizer” for 2D.  If you’ve ever used RTG as a developer on OS3.x, you’ll doubtless be as dismayed as I was with the extent of it’s hardware acceleration.   The functions provided by Warp3D were much more capable and efficient for 2D graphics work. Warp3D 4 was released and introduced it’s vertex array functions.  For what I was doing at the time, these were perfect.  I refactored my code to use them and then discovered to my dismay that various chunks of the advertised API just weren’t implemented by the driver, especially line and point rendering.

I badgered Hyperion about this at the time who were busy with other things but responded by giving me access to the source. It’s fair to say that after a few months, I had the only driver that implemented every drawing operation the API specified.  The original V4 functions used templates (i.e. C macros) to generate a drawing function for each possible combination of primitive and supported vertex format.  Conceptually, this is the most efficient way of doing it but in reality it produces a lot of code which is mostly redundant and not cache friendly. After adding the extra primitives, the driver had reached an unprecedented size (well over 1MB) which was clearly too big.  The only thing that actually varied from one format to the next is the way in which the vertex data was fetched.  So, I scrapped the existing code and started a new version that has drawing routines for each primitive, but uses a function pointer to invoke a fetcher that is specific to the format being used.  The code was well within acceptable size again and ran considerably faster despite having to make up to 3 indirect function calls per vertex (one for geometry, one for colour and one for texture/fog).

I went on to fine tune this implementation by adding versions of the fetchers that were not only specific to the vertex format but also the currently selected states.  This moves a lot of state-dependent conditional logic out of the fetch routine and as they represent the innermost level of the code, that’s always a good thing.  Eventually, some of theV4 routines were over 2x faster than the original version, depending on the vertex format and state.  Unfortunately, this driver never found it’s way into the wild.  Mostly because I never considered it finished it due to the constant need to tweak and improve it; there was always some new experiment to try.  DMA FIFO transport is still “the one that got away” but I’ve promised to behave and actually release versions this time.  The vertex fetch idea caught on though and became the standard method used for all later drivers, so at least the work wasn’t entirely wasted.  I was later asked if I’d be interested in making an OS4.0 version of it.  Seeing as this meant I’d get to play with something new on my A1200 (the then upcoming OS4.0 classic), I naturally agreed and having got the beta version on my machine started work on it.  Classic 4.0 was very much in beta at that time and I ran into a lot of issues just running it, development using it was even trickier.  Then life took a series of increasingly difficult turns which ultimately left me out of the scene for many years.  OS4.0 for the classic came and went in the meantime.  I had thought things had hit an inflection point when a close uncle passed away suddenly but things reached a new low in 2007 when my mother was diagnosed with a life-limiting illness and passed away just two short years later in the spring of 2009.  She was not to be the last.  By the end of that year, I felt I needed to get back into my hobbies, doing something, anything, would be therapeutic.

So I bought OS4.1 for the inherited A1 that was sat under my desk for about 4 years unused to see how things had moved on since my early experiences with 4.0 beta for the Classic.  Quite a bit, as it happens.  As I got back into it, I got the SDK and started playing about with some code.  And that’s where the long and the even longer versions of the story recombine. This time I have a nice stable machine to do the actual compilation on, which has helped considerably. The present driver for 4.1 has incorporated all the fundamental changes the unreleased v4 driver had and then some; even the old V1-V3 drawing routines now use a set of vertex fetchers, all designed around W3D_Vertex, but optimised for each state combination that has an effect on their operation. The FIFO code has been completely rewritten, as has the state handling. Finally there is as much support as is feasible for the V5 API. Unique challenges this time around are trying to appease some old applications that did naughty things (like poking the context instead of making the proper API calls) without sacrificing too much performance and trying to track down some really persistent bugs. The latter has led to having to work through the main library and even the RTG driver. It’s a frustrating task a lot of the time; you think you nailed a bug, only to discover the “it works for me” phenomenon is genuinely real and the same bug is still affecting other users.  So, back to the drawing board.  Still, seeing Quake3 run on my 20-year old A1200 was fun enough to make it worthwhile.

So, the Permedia2 driver is still in development and won’t be considered final until the various bugs are ironed out.  In a case of history repeating itself, I also noticed that the R200 driver doesn’t draw everything advertised in the API either. I guess I’ll have to look into that one next… 😉

AmigaOS Wants You Status Update

I have finalized the list of new AmigaOS developers and just need approval from the boss. After that, non-disclosure agreements (NDAs) will be completed and then the successful applicants will be granted access to the Amiga’s source code.http://upload.wikimedia.org/wikipedia/en/0/05/Boingball.png

A huge thanks to everyone for applying! I admit I was a bit overwhelmed by the response and took me some time to filter through them all.

There are 25 years worth of changes to this source code base and the successful candidates may find some of it can be a bit spooky. However, I think it can also be a lot of fun. All the big Amiga names from days gone by are in the AmigaOS source code someplace. I hope to have the full list of credits published later on so keep an eye on this blog.

It took me a lot of time to go through the 40+ applications. I discovered there is some truly unique talent in our community. We have some really experienced individuals out there and I’m keeping the full list handy in case we need more help in the future.

Steven Solie
AmigaOS Development Team Lead

AmigaOS wants you!

Are you are software development professional?http://upload.wikimedia.org/wikipedia/en/0/05/Boingball.png

Are you passionate about software development?

Do you want to contribute to AmigaOS by working directly on its source code?

The AmigaOS software development team could use your help.

If you are serious about helping with AmigaOS software development then please contact me today.

I look forward to discussing how you may be able to contribute.

Steven Solie
AmigaOS Development Team Lead

Open Amiga

We often hear about software developers and eager users wanting to help the Amiga Operating System move forward with new functionality and bug fixes.

One way to get involved is by joining the Open Amiga effort. The Open Amiga web site has plenty of projects which software developers may want to tackle to enhance AmigaOS.

Open Amiga is not just for developers. Users may also contribute. Needed personnel include:

  • Developers and others who can join the main work group
  • Interested parties that provide feedback in the forums
  • People who can write developer guides and guidelines (how to’s, do’s and don’ts)
  • Web developers for building the infrastructure
  • People who gather available developer documentation from the net

Judging from the dates, many of the projects have fallen on hard times. Go ahead and grab one and start going.