Welcome, Guest. Please login or register.

Author Topic: What platform should I target code for?  (Read 2810 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: What platform should I target code for?
« on: March 25, 2004, 02:40:04 PM »
The answer is simple, although the implementation takes some thinking about.

Modularise your code properly. Build a codebase for your graphics, sound, IO, etc. and incoporate them into link libraries. These can be modified (which shouldn't take much if your code follows the common OS guidelines shared by all amiga os incarnations), to suit each specific implementation.

You can then use your codebase to abstract away the slight differences between the systems and focus on actually developing your applications.

Making a single build for all 3.x PPC / OS4 / MOS is basically limiting yourself  to the minimum intersection of all three. Specific benefits brought in since OS4/MOS will not be available to you if you follow this rule.

Abstract, make use of each systems strengths to implement your own codebase interface, and be happy :-D
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: What platform should I target code for?
« Reply #1 on: March 25, 2004, 04:04:44 PM »
Quote

mjg59 wrote:

Heh. All the complicated code is cross-platform anyway - we're only talking about ~2000 lines of Amiga code. I'm not sure that there are really any new features that would be terribly useful to me, but is there any documentation on API additions in MorphOS or 4.0?


For a single project, managing 2000 lines of system dependent code is not much of a problem problem, agreed. I suggested the codebase approach so you never have to worry about doing the same 2000 (or more) lines for each project in the future.

As for features supported by these systems, I'm thinking forwards. For instance, the graphics.library, in the 3.x compatible sense. What a truly awful thing it is. Pen based and no real RGB colour model independent support. Morphos, AROS and OS4.0 are keen to leave this anachronism behind.

The same is likely true for many other legacy APIs. Already OS4, for instance, has introduced a new library mechanism and new APIs using it. Without doubt, MorphOS has its own special enhancements too.

There are no guarentees that OS4 / MOS / AROS equivalent future updates will do these things in the same way. Without a single reference API to work from, you can see that abstracting these differing things behind your own code makes sense.

Hint : C++ is ideal for such strategies ;-)

I haven't used a line of amiga os (or other system) dependent code in most of my own stuff for months ;-)

For documentation, I suggest you join developer lists - they can point you in the right direction.
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: What platform should I target code for?
« Reply #2 on: March 25, 2004, 06:26:55 PM »
Quote

Kronos wrote:

[nitpick]

MorphOS (and afaik AROS too) have allready left that anachronism behind.

[/nitpick]


You missed my point in your eagerness to take a cheap shot at OS4 ;-). Morphos and AROS may have left it behind, offering RGB proper graphivs, but if people who just want to use 3.x level compatiblity keep using graphics.library, with its anachronistic pen model, you'll never get away from having to support it.
int p; // A