From: Stefan Hajnoczi <stefanha@gmail.com>
To: Tarmo Pikaro <tapika@yahoo.com>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Binary translation (of code)
Date: Sun, 8 May 2011 14:54:49 +0100 [thread overview]
Message-ID: <BANLkTimCLFba4Z+PS=HN2761ftpC1MR-7w@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinnB_a0CDD8iGk_g8WVaFH-bQT62Q@mail.gmail.com>
On Sun, May 8, 2011 at 2:46 PM, Blue Swirl <blauwirbel@gmail.com> wrote:
> On Sun, May 8, 2011 at 4:05 PM, Tarmo Pikaro <tapika@yahoo.com> 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
next prev parent reply other threads:[~2011-05-08 13:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-07 11:26 [Qemu-devel] Binary translation (of code) Tarmo Pikaro
2011-05-08 8:40 ` Mulyadi Santosa
2011-05-08 10:22 ` Blue Swirl
2011-05-08 13:05 ` Tarmo Pikaro
2011-05-08 13:46 ` Blue Swirl
2011-05-08 13:54 ` Stefan Hajnoczi [this message]
2011-05-08 19:02 ` Tarmo Pikaro
2011-05-08 19:41 ` Lluís
-- strict thread matches above, loose matches on Subject: below --
2011-05-10 18:13 Tarmo Pikaro
2011-05-10 19:46 ` Richard Henderson
2011-05-10 20:02 ` Lluís
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTimCLFba4Z+PS=HN2761ftpC1MR-7w@mail.gmail.com' \
--to=stefanha@gmail.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=tapika@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).