PDA

View Full Version : How to port emulator to the PSP ...



zx-81
December 19th, 2006, 08:08
Someone (he wants to stay anonymous) just send me a mp about emulator porting on the PSP.
His question is interesting and might help other coders who want to begin to port something to PSP.

If you have any comment or question, please feel free to ask on this topic :)


I heard that a good place to start with emulation is Chip 8, and seeing as though the PSP needs one, why not eh?

Well i found C++ Chip 8, Super Chip 8 and Chip 8x emu called Fish N chips, in your own time could you give me some pointers on what to do, i know it needs a file browser first as it doesn't have one but i wouldn't imagine it would be to hard to implement, heres the source, i dont need a speedy reply, just whenever you can.

Here be the LINK (http://home.planet.nl/~haps/fishnchips_src.zip) youll be needing.

BTW, Those links weren't bad, they gave me structure in wich what i need to brush up on.

Peace out Brotha'

Chip 8 is a good start. You should first of all be able to re-compile the emu on the good OS (i'm using linux, so i port only emulator running on linux).

Then, when you're able to compile and run the emulator on your PC, then you can start to port it to PSP (using cygwin etc ...).

The first task is to write a makefile, and comment out all no-psp code inside the source (such a graphical part, sound part etc ...). At the end of this first step you should have a non-working emulator, but a first prototype that you can compile for the PSP.

Then you add the main() function using PSP stuff (see ps2dev for details) to create user thread etc ... and to call the old_main function of the chip 8 emulator.

Then you will have to replace all the source code you've commented out, and rewrite the sound and graphical port (using SDL for example).

Hope that helps ...

gunntims0103
December 19th, 2006, 11:59
great tutorial zx-81 maybe a little more in def and we have a stickie :D. really this helps alot....

Zion
December 19th, 2006, 18:37
great tutorial zx-81 maybe a little more in def and we have a stickie :D. really this helps alot....

lol he could sticky it himself, hes a moderator of his forum...lol :rofl:

gunntims0103
December 19th, 2006, 21:41
zx-81 would you be so kind as to maybe in the future be able to talk to me on a chat like msn or aim if you have and run run how to port a quick and very basic game to the psp. I already have a compiler and know just a little c++. could you possible teach me just a little :D. I know your a busy guy. I just have trouble understanding some parts of the code and how to port....

gunntims0103
January 19th, 2007, 21:03
a little request zx-81 :)

Will it be possible if you could provide me with a before and after source. What i mean is, a source thats hasnt been changed to fit the psp then the same source that has been changed to work on the psp.

For example-

a C/C++ source of colecovision
a C/C++ source of coleco vision ported to the psp

Mind you the same source just changed to fit the psp, much like a before and after.

I ask for this as i want to try and interpret codes that go into creating a emu and even so try with the methods you use try and port a similar emu.

Thanks!

zx-81
January 25th, 2007, 09:12
a little request zx-81 :)

Will it be possible if you could provide me with a before and after source. What i mean is, a source thats hasnt been changed to fit the psp then the same source that has been changed to work on the psp.

For example-

a C/C++ source of colecovision
a C/C++ source of coleco vision ported to the psp

Mind you the same source just changed to fit the psp, much like a before and after.

I ask for this as i want to try and interpret codes that go into creating a emu and even so try with the methods you use try and port a similar emu.

Thanks!

You can do it with any of my emulator port ...

Let's say psp7800, here is the original version :
http://home.comcast.net/~gscottstanton/source/ProSystem_1_1_Src.zip

:)

usokz
June 18th, 2007, 16:58
Hey ZX-81...

Any try by you at porting the MAME emulator over to PSP?

You would be a god to a lot of people...this would blow the Atari, Coleco any other emulator you have ported so far...

4000+ games...all on the PSP! :thumbup:

acn010
June 18th, 2007, 17:05
i know it was zion

usokz
July 16th, 2007, 22:52
I choose the red pill...so how about ZX-81?

Any likelihood of porting MAME32 to PSP?

yaustar
July 17th, 2007, 00:19
Mame32 is a monster to port. Generally speaking, porting the latest version is not possible due to a variety of reasons such as memory and CPU constraints (and the code is know to be bloated trying to emulate so many different arcade architectures)

Porting an older version such as 0.36 is doable since the code base hasn't been bloated by trying to emulate any arcade machine under the sun and the games are not as demanding.

zx-81
July 17th, 2007, 09:04
I choose the red pill...so how about ZX-81?

Any likelihood of porting MAME32 to PSP?

I'm working on other kind of homebrew now. I don't think i will port another emulator (i'm a bit fed up lol)