A question about GBA CPU emulation.

6 views
Skip to first unread message

M.a.W.

unread,
Oct 17, 2009, 6:53:25 AM10/17/09
to EMUL8
Hello

I've got a little question about the way the ARM7 CPU emulation has
been solved on Symbian emulators.

There exists GBA emulation project for Sony Ericsson non-OS(J2ME only)
phones. Since these phones are pretty moddable, it's possible to run
applications written in C, called ELFs, on many models after applying
certain patches to the firmware.

Now to the point, these SE phones use ARM9 CPU (like many S60v3
phones), which I believe is compatible backwards with the ARM7.
Unfortunately, the emulator is a port of Visual Boy Advance for PC,
therefore after being ported it forcibly emulates ARM on ARM (>.<)
losing all the performance(though still being faster than J2ME tries
of porting a gba emu). The port has been made by Marian90 from
CentrumSE.pl and it's not straight port from the PC version, but a
port of another port, however it doesn't really matter =P

The question is nothing more than: Do Symbian emulators do that damned
ARM-on-ARM emulation or do they run GBA games straight on phone's CPU
eventually emulating only some not compatible instructions?


Thanks in advance
MalyAleWielki from CentrumSE.pl

Also if you're curious how it works, some time ago I've recorded some
games running on SE K550 with W610 firmware.
http://www.youtube.com/watch?v=eR3eNo6qQQ4
http://www.youtube.com/watch?v=04RnTqvj-xw

fms

unread,
Oct 17, 2009, 7:25:21 AM10/17/09
to EMUL8


On Oct 17, 2:53 pm, "M.a.W." <prapt...@gmail.com> wrote:
> The question is nothing more than: Do Symbian emulators do that damned
> ARM-on-ARM emulation or do they run GBA games straight on phone's CPU
> eventually emulating only some not compatible instructions?
I cannot say anything about ALL emulators for Symbian OS, but VGBA
uses a specially optimized version of ARM-on-ARM emulator. While it
does not run the code natively on the phone CPU (there are reasons why
it is impossible), it uses phone CPU hardware to optimize things. The
ARM-on-ARM CPU emulation is about 3 times faster than the generic ARM
emulation.

M.a.W.

unread,
Oct 19, 2009, 10:40:20 AM10/19/09
to EMUL8
On 17 Paź, 13:25, fms <luarvi...@gmail.com> wrote:
> I cannot say thinking about ALL emulators for Symbian OS, but VGBA
> uses a specially optimized version of ARM-on-ARM emulator. While it
> does not run the code natively on the phone CPU (there are reasons why
> it is impossible), it uses phone CPU hardware to optimize things. The
> ARM-on-ARM CPU emulation is about 3 times faster than the generic ARM
> emulation.

Hello again

Since your project is a profit one, I believe it's not acceptable for
you to public the ARM-on-ARM for non-profit projects like the EBA
emulator is. And since I'm not even sure if such ready code would fit
into current code, I'd just like to ask for some tips on how to make
ARM-on-ARM optimisation on the VBA CPU emulation code that I believe
was written thinking of PC as target =)

Thanks in advance
MaW (prap...@gmail.com)

M.a.W.

unread,
Oct 19, 2009, 10:41:44 AM10/19/09
to EMUL8

fms

unread,
Oct 19, 2009, 10:51:58 AM10/19/09
to EMUL8


On Oct 19, 6:40 pm, "M.a.W." <prapt...@gmail.com> wrote:
> And since I'm not even sure if such ready code would fit
> into current code, I'd just like to ask for some tips on how to make
> ARM-on-ARM optimisation on the VBA CPU emulation code that I believe
> was written thinking of PC as target =)
It is not very difficult. You need to write each opcode implementation
in ARM assembler, avoiding memory accesses as much as possibly (memory
accesses are very costly on mobile devices) and using host ARM
arithmetic instructions to compute guest ARM flags.
Reply all
Reply to author
Forward
0 new messages