Guess What? A Port Of Gpsp (gba) To The Gp2x...


zodttd

Solving your premature emulation since the Tapwave
Joined
Dec 2, 2005
Messages
1,167
Website
www.zodttd.com
Hi everyone,

I figure if there's something that is impossible to do on the GP2X, that can be ported and run fullspeed with the least amount of work and concern, it's the gpSP GBA emulator.

Exophase and I are talking and he has given me some great direction on handling a port of his gpSP GBA emulator he designed for the PSP. It seems fairly straightforward to get it working on ARM platforms, such as the GP2X, which is my start.

So I'm beginning work on it, as it's been discussed, and he has expressed he supports this port. Source is here and within an hour or so I'll begin.

There are some compatibility concerns with gpSP, and I think it will be fun and helpful to Exophase to help assist in debugging them. Not to mention Exophase is an extremely talented programmer who understands dynarec's more than anyone else I spoke to. So I have some comfort in getting an ARM -> ARM (sounds weird, yes) dynarec working. I have some research to do on obtaining a virtual address space, and working out callbacks, but at first I'm just going to see how long it will take me to get a quick and dirty port of gpSP up and running with it's interpreter. It gives me a feel for things to expect for a more proper approach.

It will also honor the GPL, weird huh! :)
Anyone want to retract their positions on GBA being not playable on the GP2X? ;P

This should be fun stuff while sorting out other projects that are still in an early state.
 

Dimension

Still Fresh
Joined
Oct 29, 2006
Messages
36
Cool !can't wait to see your progress on this as your psx4all emulator was nothing less than awesome! Don't let anyone tell you different your hard work is much appreciated!
 

Mudi

You're pushing your luck little man
Joined
Jan 25, 2006
Messages
815
Website
mudiweb.com
If you need any help with the project or anything related, I'm willing to help :)
 

gaterooze

Coltrane Sundia
Joined
Aug 7, 2004
Messages
2,723
Website
Visit site
Good on ya zodttd :)

I have a GBA+Supercard so this won't benefit me, but I know a LOT of people will absolutely love seeing a fullspeed GBA emu. It's fun watching the progress of the 3(?) different ones currently being developed.
 

Tobriand

Very Active Member
Joined
Dec 27, 2002
Messages
4,071
Age
34
Location
Croydon (UK)
Website
Visit site
Best of luck, Zodttd :) - I'll look forward avidly to seeing what happens with this, as ever! You've done some fantastic stuff already, and it'll be cool to see another project on the go :)
 

zodttd

Solving your premature emulation since the Tapwave
Joined
Dec 2, 2005
Messages
1,167
Website
www.zodttd.com
Well I must say Exophase did the difficult job of writing the GBA emulator from scratch. As most people who do ports of projects probably feel, but often don't admit, they get the easy end of things and usually land up with more credit than the original author.

So to really learn from this port, and contribute to the entire project, I plan on not only getting this port done, and done well...I will try to help get the tedious work of debugging done as well and keep Exophase updated with changes made.

I don't think that the SNES PocketSNES emulator for the GBA will run well on gpSP on the GP2X though. Not impossible, it just won't be up to "DC FULLSPEED V2.5 Spec" standards. ;)

Thanks for the support everyone! :)
 

DaveC

Internal Development
Joined
Mar 4, 2004
Messages
9,208
Sounds cool, especially if you get the ARM code running natively.

I hope for the best.
 

zodttd

Solving your premature emulation since the Tapwave
Joined
Dec 2, 2005
Messages
1,167
Website
www.zodttd.com
If by "ARM code running natively" you mean it will run a ROM through virtualization, it will not use that technique. Just had to clarify that. All applications on the GP2X run ARM code natively though, since it's the only arch's machine code it can understand. That's the purpose of a compiler.

The emulation of the CPU will use a dynamic recompiler when it is completed. It will have the benefit of translating from an ARM arch...to an ARM arch. There are still things other than the CPU instruction set that must be handled, which is what stops someone from being able to execute a GBA game on a GP2X. The hardware other than the CPU is different. And when that occurs, and you need emulation you must deal with CPU flags and etc.

The methods of running the emulator in the best suited way for the GP2X have been outlined by Exophase, and I'm currently researching if they are available options. It's pretty elegant way of going about things, but it might be just gibberish if the GP2X Linux distro restricts it for instance.
 

Exophase

Nothing good will ever come of Exophase.
Joined
Sep 21, 2006
Messages
10,308
Age
36
Location
Cleveland OH
If Linux can't give us what we want, I say we throw it out. I mean, just by taking over the interrupt/exception handler then restoring it when we're done this might be enough. It'd destroy all other multitasking going on in the background but I think that's a price people can be willing to pay for this (it's not like their GP2X is part of a compile farm while they play GBA games)

With what I'm thinking of we might want full control of the page fault handler anyway. It's a bit daunting stuff but nothing anyone with a little kernel writing experience can't tackle *_*

But that's assuming the interrupt vectors are not in ROM. In GBA they are, is this common on ARM handhelds? I wonder :/

It's all kinda daydreaming at this point though ^_- Not like I have a GP2X or anything.
 
Top