Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline mjg59Topic starter

  • Newbie
  • *
  • Join Date: Jan 2004
  • Posts: 32
    • Show only replies by mjg59
What platform should I target code for?
« on: March 25, 2004, 02:15:20 PM »
I'm planning on porting Dasher (http://www.inference.phy.cam.ac.uk/dasher) to Amiga-like OSs. I'd like it to run on as wide a range of machines as possible, which presumably means compiling it for 68k. However, there's a chance that the performance from that won't be sufficient, in which case I'll need to build PPC code. Ideally a single build will run on 3.x machines with PPC cards, MorphOS and AOS 4. What should I be targetting?
 

Offline NightShade737

  • Sr. Member
  • ****
  • Join Date: May 2003
  • Posts: 328
    • Show only replies by NightShade737
    • http://atomnet.co.uk
Re: What platform should I target code for?
« Reply #1 on: March 25, 2004, 02:18:08 PM »
I would say WarpUP as then it will run on Amigas with PPCs, as then, as you said, it should work on AOS4 and MOS too.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: What platform should I target code for?
« Reply #2 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 itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: What platform should I target code for?
« Reply #3 on: March 25, 2004, 02:48:21 PM »
Supporting only 68k is the easiest. MOS & OS4 have JIT which can run even demanding code at decent speed. If it is still too slow you can consider PPC native binary (WarpUp or PowerUp) but it is not absolutely necessary right now.
My Amigas: A500, Mac Mini and PowerBook
 

Offline mjg59Topic starter

  • Newbie
  • *
  • Join Date: Jan 2004
  • Posts: 32
    • Show only replies by mjg59
Re: What platform should I target code for?
« Reply #4 on: March 25, 2004, 03:50:23 PM »
Quote

Karlos wrote:
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


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?
 

Offline realstar

  • Jr. Member
  • **
  • Join Date: Apr 2003
  • Posts: 93
    • Show only replies by realstar
    • http://members.shaw.ca/realstar
Re: What platform should I target code for?
« Reply #5 on: March 25, 2004, 03:50:33 PM »
If you want to support multiple platforms you might
want to have a look at VBCC.  It allows compiling of
MorphOS, 68k, PowerUP and WarpOS executables.  A pure
68k version should run fine on machines with a JIT
emulation available too.
 

  • Guest
Re: What platform should I target code for?
« Reply #6 on: March 25, 2004, 03:52:54 PM »
Simply stated, you should target whatever OS you think will make you money or reach the largest market.  Right now by default, that's MorphOS, but in a while when AmigaOS is released (by whomever) that might change drastically.  

Best advice, keep your options open.

Wayne
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: What platform should I target code for?
« Reply #7 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 Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: What platform should I target code for?
« Reply #8 on: March 25, 2004, 05:56:27 PM »
Quote

Wayne wrote:
Simply stated, you should target whatever OS you think will make you money or reach the largest market.  Right now by default, that's MorphOS, but in a while when AmigaOS is released (by whomever) that might change drastically.  


And if that's your goal, then I would say target Intel systems running Windows XP. ;-)

The GUI toolkit will probably be the only non-portable part (unless you're using a portable toolkit). Scratch that. It looks like you'll also be writing a speech interface, a pen interface, and an eyetracking interface. :-) I would do a modular 68k port, for the same reasons noted above.

Regardless, don't forget to have fun (and since Dasher is GNU code, don't foget to release your source).

Trev
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show only replies by Kronos
    • http://www.SteamDraw.de
Re: What platform should I target code for?
« Reply #9 on: March 25, 2004, 06:00:37 PM »
Quote

Karlos wrote:
Quote

mjg59 wrote:

 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.


[nitpick]

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

[/nitpick]
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline rayt

  • Sr. Member
  • ****
  • Join Date: Dec 2002
  • Posts: 322
    • Show only replies by rayt
Re: What platform should I target code for?
« Reply #10 on: March 25, 2004, 06:01:26 PM »
Im no programmer and it may sound a bit stupid, but why dont you just support the platform you like/use and release the source code together with the programm on aminet? So you have not so much work, and I think there sure will be someone to port it to other amiga like systems (it shouldnt be so hard as they have the same origin) if theres a demand.
 

Offline Crumb

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1786
  • Country: 00
    • Show only replies by Crumb
    • http://cuaz.sourceforge.net
Re: What platform should I target code for?
« Reply #11 on: March 25, 2004, 06:14:55 PM »
Use GCC. It's available for 68k, WarpOS, PowerUP, MorphOS, AmigaOS4, AROS, etc...

About the platform... use the CybergraphX 3 API so it runs in AROS, MorphOS, 68k, P96 etc...

Do NOT use CGX4 functions!

For the GUI the best advice would be to use MUI (although I personally prefer Reaction) because it's available for OS3.x, AROS, MorphOS and OS4.

And simply use makefiles. Start with a 68k makefile and when everything works make some copies and modify them to compile ppc code...
The only spanish amiga news web page/club: Club de Usuarios de Amiga de Zaragoza (CUAZ)
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: What platform should I target code for?
« Reply #12 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