OSDev.org

The Place to Start for Operating System Developers
It is currently Mon May 20, 2024 6:47 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Porting from one platform to another
PostPosted: Tue Nov 30, 2004 2:59 pm 
Got a couple of questions 'bout this. I want to port The Newzealand Story to PC (Dos or Windows, depends on what is easiest) and want to know what I need to know to do this, and what is needed to do this. Also, I want to know which platform is easiest to do this from... got the choice out of Atari ST, Amiga, C64 and ZX Spectrum (assuming Nes, Genesis and Sega master System are harder to port)


Top
  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Wed Dec 01, 2004 2:45 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7615
Location: Germany
Existing software uses a given "source" API, which is not available on the target system. So you have to provide a mapping from the "source" API to the "destination" API.

You have to find out what the best "level" to do this is - creating an "emulation lib" outside the app that does the mapping, or modify the application sources to access the other API.

As much as I like the platform, I'd advise against the Amiga sources. The Amiga had a very special hardware, and if the Amiga version was properly adapted to it, it will be next to impossible to port. On the other hand, of the platforms quoted the Amiga has the strongest graphics / sound / multitasking abilities, so the Amiga version might be the "richest".

The C64 was very limited in its features; I don't know the ZX Spectrum, but as for return-on-investment considerations I'd go for the Atari version as source, unless you are an Amiga grok.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Wed Dec 01, 2004 9:18 am 
I'll look into Atari then. What's the difference between creating an "emulation" lib and editing the target API's source itself? I don't want to make an emulator... just want it to run on old Dos computers, so got to make sure that I know what is what ;)


Top
  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Thu Dec 02, 2004 3:50 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7615
Location: Germany
Kon-Tiki wrote:
What's the difference between creating an "emulation" lib and editing the target API's source itself?


Writing an emulation lib will require you to get all the original platform's features right, which is a *lot* of work. But in the end, you can use that emu lib as basis for the next project.

If you edit the application itself, that's probably easier done, but you can't re-use that code in the next project.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Thu Dec 02, 2004 9:03 am 
So an emulation lib is a one-time job, while editing the game itself requires me to do that again and again.

Both will run the game by starting its executable, just like normal Dos-games, right?


Top
  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Fri Dec 03, 2004 4:24 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7615
Location: Germany
If you edit the game itself, of course you end up with a recompiled executable. With the emulation lib, that lib is linked into the recompiled executable, so again you have a single exe.

Note that this is just the big picture. You might end up with incompatible graphics formats, timing problems, and countless other issues. Porting isn't easy, porting games even less as they tended to bang the hardware of those old systems pretty hard.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Fri Dec 03, 2004 10:08 am 
In other words: I'll learn more from it than I first thought ;D

The emulation lib's the easiest way, right? What do I need to learn for that?


Top
  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Sun Dec 05, 2004 5:16 am 
You need a solid understanding of both the original system (i.e. Atari HW / API) and the target (i.e. DOS / Windows API), of course.

I'm still not really sure what you're trying to accomplish, though. You are aware that there are full-fledged emulators available for all the "source" systems you mentioned?

If all you want is playing the game on a PC, UAE et al. are much less work... ?:-)


Top
  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Sun Dec 05, 2004 6:12 am 
I know of the emulators and've worked with them, but it's not for just being able to play these games that I'm trying to do this. It's to get them to be playable for people who don't want to use emulators. That and out of interest, of course.


Top
  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Tue Dec 07, 2004 2:14 pm 
Ok, found some hardware information. Now I'm only novice at electronics, but my bro's able to figure it out and probably'll be able to translate it into comprehensible info for me.

This what I need for hardware info on it?


Top
  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Wed Dec 08, 2004 2:02 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7615
Location: Germany
Erm... that's a page on how to build your own ZX80 / ZX81!?!

What you need is:

* sources for a given platform;
* good knowledge on that platform's API (so you know what "ReadChunkyPixel( int, int, int, int )" actually does);
* good knowledge on the target platform API (so you get the idea that ReadChunkyPixel( int, int, int, int ) could be replaced with "ReadRGB( int, int, int )" after doing foo() on the fourth int value)),

As none of your source platforms includes the ZX80, that website won't be of much help to you.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:Porting from one platform to another
PostPosted: Wed Dec 08, 2004 7:34 am 
Hmmm ZX Spectrum's not ZX80 then? I'll keep on looking.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group