yerricde wrote:
>dir /s /b \visualboyadvance.exe
>
Heh ;-)
>Oh, you mean you want the GBA program to detect which GBA model
>or emulator it's running on. In other words, you seek emulation
>inaccuracies visible to the running program. I can think of two
>reasons why you'd want to do this:
>1. to present a simplified display to compensate for slow
> computers or inaccurate but popular emulators, or
>2. to discourage unauthorized redistribution of proprietary
> game software.
>
Nah, if I wanted #2 I wouldn't be discussing it in a public forum. ;-)
Actually our code can compensate for the (horribly flawed) gamma
on the real GameBoy, but we want it to also look right in the
emulator. There are many other subtle bugs/differences which
could be compensated for during development.
>Theoretically, it should be impossible for game console software
>to determine whether it's running on Nintendo brand hardware or
>Gateway brand hardware. As emulators mature, the simple tricks
>used to distinguish environments begin to fail. For example, in
>the early days of NES emulation, four lines of 6502 code could
>distinguish the popular emulators from the Nintendo hardware (see
>http://everything2.com/?node=nesticle). But now, as NES emulators
>have matured, it's much harder for NES code to tell where it's
>running.
>
Well, e.g. consider this quote from the VisualBoy Advance FAQ:
5. You have to fix it because "XXX" doesn't work?
If you really want to play "XXX", buy yourself a GBA and "XXX"
and play it. The emulator may never emulate the GBA perfectly,
so some stuff may never work.
This suggests that some hardware features are currently very difficult.
Maybe they could be used to detect the emulator. My first idea was
to time the number of cycles in a loop with different wait-state
settings, maybe that would be slightly different?
>Also try looking at initial values of readable registers that
>may be set differently by the Nintendo release BIOS vs. the
>clone BIOS built into an emulator.
>
Yeah I thought of that also, but unfortunately we use a real BIOS
image with our emulator. (What would be nice, is if the emulators
could provide a standard way to detect them. Of course, it could
be switched off as an option.)
I guess what I'm really looking for is some code that someone
else wrote, so I don't have to reinvent a wheel, but... maybe it
has not been invented yet? :-)
Thanks for your input!
Cheers,
-Pete