Page 1 of 1
Port An Emulator?
Posted: Tue Aug 12, 2008 11:55 pm
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.
Posted: Wed Aug 13, 2008 12:05 am
by LBGSHI
Do you know how to program in C (or C++, if the emulator was written in that)?
Posted: Wed Aug 13, 2008 12:45 am
by ScienceOfThePS3
Yes, I have experience in C++.
Posted: Wed Aug 13, 2008 1:06 am
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...
Posted: Wed Aug 13, 2008 4:22 am
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.
Posted: Wed Aug 13, 2008 8:04 am
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
Posted: Wed Aug 13, 2008 8:04 am
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 :)
Posted: Wed Aug 13, 2008 12:12 pm
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.