Port An Emulator?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
ScienceOfThePS3
Posts: 2
Joined: Tue Aug 12, 2008 11:47 pm
Location: Somewhere...
Contact:

Port An Emulator?

Post by ScienceOfThePS3 »

OK, so I have MinGW and MSYS installed as well as the needed toolchain, and I have the source code of the emulator that I want to port, but I would like to know how and where I should start from.

Let me just tell everyone that I am a total noob at this, but I do have the time and patience to do this. I just need someone to point me in the right direction, and I should be able to go from that.
LBGSHI
Posts: 136
Joined: Mon Aug 07, 2006 5:56 am
Contact:

Post by LBGSHI »

Do you know how to program in C (or C++, if the emulator was written in that)?
I may be lazy, but I can...zzzZZZzzzZZZzzz...
ScienceOfThePS3
Posts: 2
Joined: Tue Aug 12, 2008 11:47 pm
Location: Somewhere...
Contact:

Post by ScienceOfThePS3 »

Yes, I have experience in C++.
LBGSHI
Posts: 136
Joined: Mon Aug 07, 2006 5:56 am
Contact:

Post by LBGSHI »

Ah, great. To be honest, I don't know nearly enough to port an emulator from another platform to PS2; I was merely going to point out that, if you weren't comfortable with C/C++ quite yet, you might not want to start developing by porting an emu, heh.

Hopefully someone with a bit more experience (specifically in porting emulators) will be of assistance...
I may be lazy, but I can...zzzZZZzzzZZZzzz...
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Porting an app is EASY - just find all the parts that DON'T work on the target platform and change them into code that does. See? Easy! If you need more help than that, you aren't ready to be porting. Learn more about the target platform by studying apps. Look for apps that do things the port will need to see how those tasks are done. If the app has been ported to a number of platforms, compare the code for the ports to see how it was done for other platforms.
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

J.F. wrote:Porting an app is EASY - just find all the parts that DON'T work on the target platform and change them into code that does. See? Easy! If you need more help than that, you aren't ready to be porting. Learn more about the target platform by studying apps. Look for apps that do things the port will need to see how those tasks are done. If the app has been ported to a number of platforms, compare the code for the ports to see how it was done for other platforms.
JF... As usual on the spot, saying the right things but using slightly acid words ;)

@ScienceOfThePS3, good that you have enough free time. As JF said, look how things are done, namely how to display bitmaps and playing sounds. Get familiar with the sdk and how the hardware works. This could take a lot of time :S

BTW : if you like to program in C++, consider the gslib graphics library as an alternative to the gsKit (see http://forums.ps2dev.org/viewtopic.php?t=10320). gsKit could be seen as the standard for current sdk but personally I hate the high resolution modes with interlaced video is features for TV output... Which is non-sense if one only need a 320x240 display.

-----------------------
I was ptek in a previous encarnation, until I asked for a nick refactoring
Wraggster
Posts: 121
Joined: Fri Aug 26, 2005 7:40 am
Contact:

Post by Wraggster »

would porting some SDL games be a good base to learn, im no coder but it does seem that a lot of people port SDL apps or games to break in first.

theres always a chip 8 emulator, supposedly the easiest to port to any system, although not being a coder i wouldnt know personally :)
Webmaster of http://www.dcemu.co.uk

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Theoretically, yes. Much of the work is already done by SDL. If the SDL port for the platform in question has some limitations, that would be about all you have to concern yourself with. A prime example is the inputs - the PS2 will be more limited than a PC with a keyboard and mouse, so you may have to change how the app handles that.
Post Reply