Hardware Is the 3DS' NDS-Mode really an NDS Emulator?

damedus

Well-Known Member
Member
Joined
Jun 11, 2007
Messages
220
Trophies
0
Age
43
Location
Puerto Rico
XP
268
Country
United States
Tested Tales of Innocence patched, Rhythm Heaven, Scum and a few other homebrew on my dstwo and my acekard on the 3ds
Acekard - All work fine no input problems nor lag
DSTWO - scum worked fine in non scaled mode touch input probs on scaled, rhythm heaven was fine and tales of Innocence works just fine. some homebrew has input issues with scaled.
 

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
I'm 99.99% confident that the 3DS at least contains the DS 3D graphics hardware and isn't emulating it. This hardware has a very particular low-level characteristics that make it different from pretty much any other 3D hardware I've seen. I've been doing low level tests on 3DS and can confirm that the 3D in DS mode contains all of these quirks. A lot of this comes from limitations or at least unconventional ways of doing 3D, and you wouldn't be able to make it work the same way with a different 3D chip. There's also no way that there's enough CPU power to emulate the DS 3D in software, even if both ARM11s did nothing but this. The DS 2D is probably also handled natively - it also has some quirks that make it difficult to emulate accurately with other graphics hardware (like the way it handles blending) and it's pretty tightly coupled with the 3D functionality.

Chances are good that it's also using a separate ARM9 for directly running DS code. They can't be virtualized via hardware because ARM11 doesn't have virtualization support. The CPUs would probably not be fast enough to support more conventional emulation, even with an efficient dynamic recompiler. I haven't done thorough timing tests but DS code at least feels about the same performance level as on an original DS. This would be very expensive to even come close to emulating accurately in software.

It's possible that some other components are shared between DS and 3DS mode or altered from the original DS implementation. For instance, the DS's VRAM and internal buffers may be implemented using embedded RAM blocks in the 3DS SoC. This is similar to how the DS's VRAM is used to emulate the GBA's EWRAM in GBA mode. And the 3DS's system RAM is probably used to emulate the DS's system RAM. This can be done with some cheap hardware translation.

If they were going to emulate something I would have expected the ARM7 part to be executed with HLE, where an ARM11 runs high level library routines matching the limited amount of ARM7 code Nintendo officially allowed on DS games, along with emulating the IPC to allow communication between an ARM11 as if it were an ARM7. This however can't be the case since homebrew, which uses arbitrarily ARM7 code, runs fine. While I don't think it's likely that one of the ARM11s could be emulating the ARM9 emulating the ARM7 is at least feasible, moreso since the official code typically just uses a small amount of the CPU time. Replacing the ARM7 itself buys you little since it's so tiny, but this would let you abstract a lot of other hardware, since on DS a lot of the peripherals can only be accessed through the ARM7.

All in all there isn't really that much logic in a DS chip. It was pretty limited even for its time. ARM9 cores are very tiny, and the 2D, 3D, and audio engines are fairly simple. We could be talking under 1 million transistors. 3DS has about 6 years of process maturity over DS, so the DS logic after a shrink would be much smaller. The cost of including the chip minus memory plus a little bit of hardware glue isn't that high.

EDIT: Derp, I misread the timestamp, thought it was for THIS year ;P Oh well, maybe someone will still find this interesting.. pardon the necroposting >_
 

epicCreations.or

Well-Known Member
Member
Joined
Mar 13, 2010
Messages
356
Trophies
0
Location
Austin, TX
Website
whalecakes.com
XP
79
Country
United States
*cool stuff snip*

EDIT: Derp, I misread the timestamp, thought it was for THIS year ;P Oh well, maybe someone will still find this interesting.. pardon the necroposting >_<
I found it cool and interesting! So what you're saying is that an ARM9 is probably in the 3DS and they are using the ARM11 to emulate the ARM7?

EDIT: I think this might also explain some of the huge slow downs in certain games. If the ARM7 is indeed emulated, then perhaps some games overwork it to an extent that the emulation can't handle well thus creating slowdowns.
 

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
! found it cool and interesting! So what you're saying is that an ARM9 is probably in the 3DS and they are using the ARM11 to emulate the ARM7?

More like, I think that using an ARM11 to emulate the ARM7 is possible, but I don't have any evidence that that's actually happening. Knowing Nintendo it seems more likely that they'd go for as complete hardware compatibility as they could.

EDIT: I think this might also explain some of the huge slow downs in certain games. If the ARM7 is indeed emulated, then perhaps some games overwork it to an extent that the emulation can't handle well thus creating slowdowns.

Could you tell me more about the nature of these slowdowns? Have you confirmed that they don't happen on a real DS?

I should do some performance tests for DS code on ARM9 and ARM7 at some point. If ARM7 is emulated it probably won't be that accurate timing-wise, but it takes a lot less overhead to get close to accurate than it would for the ARM9.
 

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
Wasn't it already stated that the ARM11 CPU can natively run ARM9 and ARM7 code, as the ARM11 CPU is compatible with all previous generation ARM processors?

http://www.arm.com/p...arm11/index.php

Being instruction compatible is not the same as being capable of virtualization. There are much more strict requirements. x86 processors, for instance, have always been backwards compatible but have only recently gained virtualization support. And I can guarantee you no ARM11 will have this capability (it has only been added with Cortex-A15).

But even the classical criteria for virtualization don't include being able to simulate timing. So if the timing really is the same on 3DS it's a pretty sure bet that it's because it has a real ARM9.
 
General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Lol