qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Binary translation (of code)


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] Binary translation (of code)
Date: Sun, 8 May 2011 14:54:49 +0100

On Sun, May 8, 2011 at 2:46 PM, Blue Swirl <address@hidden> wrote:
> On Sun, May 8, 2011 at 4:05 PM, Tarmo Pikaro <address@hidden> wrote:
>>
>>> In general, this is not possible. Consider for example self-modifying
>>> or otherwise dynamically created code, or just code that examines
>>> itself.
>>
>>> In some specific trivial cases it could work, and QEMU could be made
>>> to abort if translation would be needed.
>>
>> I think self-modifying code is kinda rare case - it's made typically for
>> protection againt hackers , and typically on pc side. Nintendo roms probably
>> don't use this kind of
>> protection.
>
> It doesn't have to be protection, for example GCC generates
> trampolines to stack when using nested functions.

An example related to console games is that Gameboy games copy some
routines into RAM and jump into them during one phase of the screen
refresh because of hardware limitations.  I forget the details but I
think you cannot access ROM during some part of the screen refresh,
even for code execution.  This would break if you statically
translated the ROM.  Console games do whacky things.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]