Search the web
Sign In
New User? Sign Up
staticrecompilers · Static Binary Translation
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Greetings   Message List  
Reply | Forward Message #303 of 326 |
Re: [staticrecompilers] Greetings

On 10/25/07, Ed <emandy@...> wrote:
> I'd say at this point I'm just gathering information. RACE! is not
> currently my main project, but my main project (http://
> cfc2english.blogspot.com/) ties into the desire to have a good,
> portable, NGPC emulator.
>
> Anyway, I was pointed toward this group by a friend, so I figured I'd
> join and soak up some knowledge.

You're very welcome, and as a fellow GP32/GP2X (and arcade game)
enthusiast, it'll be good to have someone who is interested in the
same areas to bounce ideas around with.

First big point to clarify - you won't be able to write a general
purpose emulator using any of the SBT techniques we can suggest. What
you will be able to do is take your existing emulator and a specific
game or two, and generate binaries corresponding to those specific
games. If your host platform (the NGPC which I'm not familiar with)
is not just bare metal, you might also be able to translate the
operating system roms to native code as well.

The project you pointed to in your blog - one specific game, and you
want to tweak some of the strings in that game - on the other hand is
a perfect application for static translation. You've probably
disassembled most of it already and have a good idea of the control
flow.

But if you really need a faster 'traditional' emulator that can run
arbitrary binaries, then you should look at dynamic binary translation
(also known as dynamic recompiling), which to some extent is a
different set of solutions. However in my opinion the best emulation
will come from a combination of dynamic and static translation, in
particular from doing an initial pre-translation at startup time, with
a fall-back dynarec for code which could not be translated before
startup. Also some sort of long-term memory for games to feed back
things like code addresses and jump targets can migrate code over time
from primarily dynamic to primarily pre-compiled. The big win from
this is that the more you can pre-compile, the better optimisations
you can apply.

If you haven't already seen it, there's a "Howto" document you might
find worth a read just to get an initial introduction to the subject
(www.gtoal.com/sbt); and there's also a fairly well developed (but not
completed) project on the go to produce a multi-target translator.
However before getting into that project (mostly written by Neil
Bradley; it's called Orion) I woud recommend that you have a go at it
yourself using the Howto and your existing emulator. Once you've got
a basic translation working using code you're familiar with, you might
then want to consider working with us on Orion in order to consolidate
effort. Orion attempts to perform several optimizations in a portable
way which you would be unlikely to put in your own code first time
round.

However even relatively unoptimised translated code can be *much*
faster than emulated code - for a specific GP32 example (and this is
*not* heavily optimised, it was my first ever attempt at a translation
while I was still teaching myself the basics) have a look at
Tailgunner for the gp32: http://www.gtoal.com/athome/tailgunner/gp32/

(By the way, the strange breaking of the switch statement into several
files was not a GP32 thing; it came from having attempted a port to a
68000 platform - PalmOS - which has a 32K limit on procedures. And
no, the Palm wasn't fast enough, at least at the time. Probably
current ones would be.)

regards

Graham



Thu Oct 25, 2007 7:26 pm

graham_toal
Offline Offline
Send Email Send Email

Forward
Message #303 of 326 |
Expand Messages Author Sort by Date

Hi guys. I just joined the group and thought I should say hi and introduce myself. I'm mostly interested in handheld game console development (GB, NGPC, GBA,...
Ed
theflav
Online Now Send Email
Oct 25, 2007
6:26 pm

... You're very welcome, and as a fellow GP32/GP2X (and arcade game) enthusiast, it'll be good to have someone who is interested in the same areas to bounce...
Graham Toal
graham_toal
Offline Send Email
Oct 25, 2007
7:26 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help