Hacking TempGBA: NDSGBA revival

Do GBA games make your nono parts happy?


  • Total voters
    429

RupeeClock

Colors 3D Snivy!
Member
Joined
May 15, 2008
Messages
6,497
Trophies
1
Age
34
Website
Visit site
XP
2,956
Country
It's silly, but I'm just pondering how a 360MHz MIPS processor (DSTwo) working in Tandem with a 66Mhz ARM9 and 33Mhz ARM7 processor (NDS) is capable of better emulation than a 533MHz ARM processor overclocked to 800MHz (GP2X Caanoo)

The original GBA is ARM whilst the original gpSP emulator was designed for the PSP, which was MIPS, and has since been ported to Caanoo and DSTwo as TempGBA.
Maybe the Caanoo port was just really sloppy or something.
 

Crossfade

Member
Newcomer
Joined
Apr 20, 2013
Messages
8
Trophies
0
Age
31
XP
92
Country
United States
Okay so this may sound stupid, but how do I get the emulator to work? I followed the installation instructions and put the files where it says to but there's no .nds file to run. I have a DSTwo so I know it should work. Can anyone please help?
 

Boriar

Well-Known Member
Member
Joined
Sep 22, 2008
Messages
316
Trophies
1
Age
52
Location
Spain
XP
695
Country
You must run the emulator from the Plugins menu of EOS (the first when you enter in DS2) because it's a plg file, not a nds
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
It's silly, but I'm just pondering how a 360MHz MIPS processor (DSTwo) working in Tandem with a 66Mhz ARM9 and 33Mhz ARM7 processor (NDS) is capable of better emulation than a 533MHz ARM processor overclocked to 800MHz (GP2X Caanoo)

The original GBA is ARM whilst the original gpSP emulator was designed for the PSP, which was MIPS, and has since been ported to Caanoo and DSTwo as TempGBA.
Maybe the Caanoo port was just really sloppy or something.
It is indeed quite silly to think that a lower-clocked processor can emulate stuff better.

Consider the following:
  • The MIPS processor is pipelined, which in layman's terms means that it reads the next 4 sentences on the page of a book in its head AND starts to extract the adjectives of the first 3 sentences, the nouns of the first 2, and the verbs of the first. That gives it an advantage over ARM, which prefetches but doesn't pipeline. In layman's terms, ARM reads the next 2 sentences on the page in its head, but does absolutely nothing with them.

    The result of this, is that MIPS can process more instructions (sentences) per second because it advances 5 instructions per clock cycle. Major win for MIPS.

  • The MIPS processor has instructions that do very little at once. For example, a single addition, or a single bit shift (of up to 31 bits, but still one bit shift). The ARM processor has instructions that can do many things. On an ARM processor, you can check if two variables are equal, and if so, do a 64-bit addition with carry, in 3 instructions (CMP, ADDEQ, ADCEQ - the C is for Carry). On a MIPS processor, you have to issue a branch if the variables are not equal, then fill the next instruction with something useless, then extract yourself the value of bit 31 of the low word, perform the addition of the low word, perform the addition of the high word, then add the carry to the high word. That's 6 instructions.

    The result of this is a counter-balance of the previous point, but not much, because these complex instructions take much longer than on a MIPS processor to parse. Minor win for ARM.


  • The GBA-to-native compiler has an advantage on ARM because it's ARM-to-ARM. That means the recompiler can be simpler, but! Your GP2X Caanoo will not have the same memory map as the GBA, so while it can rewrite most instructions fairly easily, it has to rewrite memory map references.

    The result of this is a rather major win for ARM.

  • The GBA, like your GP2X Caanoo, is ARM, and both have 16 registers in their register files. In layman's terms, those would be like your active neurons; they're there for quick access to data drawn from your (larger, but much much slower) memory or to process your senses quickly before storing them in your memory. The problem here, is that your GP2X Caanoo cannot give all of its registers to the GBA; it needs some for its own processing, too! So the processor in your GP2X Caanoo ends up putting its registers into memory before executing GBA code, or it gives the GBA less than 16 registers and writes the rest into memory directly.

    The MIPS processor has 32 registers in its register file. It is far easier for a MIPS processor to give the GBA all 16 registers it needs for fast processing.

    The result of this is a rather major win for MIPS.
So you see, it may not be so silly after all!
 
  • Like
Reactions: VatoLoco and Rydian

2ndApex

Well-Known Member
Member
Joined
Jul 12, 2012
Messages
677
Trophies
0
XP
419
Country
United States
It's silly, but I'm just pondering how a 360MHz MIPS processor (DSTwo) working in Tandem with a 66Mhz ARM9 and 33Mhz ARM7 processor (NDS) is capable of better emulation than a 533MHz ARM processor overclocked to 800MHz (GP2X Caanoo)

The original GBA is ARM whilst the original gpSP emulator was designed for the PSP, which was MIPS, and has since been ported to Caanoo and DSTwo as TempGBA.
Maybe the Caanoo port was just really sloppy or something.


Yeah, that and possibly hardware quality. The PSP only has 333Mhz of memory but it runs SNES games at double to triple the frame rate.

Kinda makes me wonder how Daedalus would run on a DSTWO. Frameskip would probably have to be ridiculously high to make it playable but finally having N64 emulation on a DS would still be pretty crazy.
 

RupeeClock

Colors 3D Snivy!
Member
Joined
May 15, 2008
Messages
6,497
Trophies
1
Age
34
Website
Visit site
XP
2,956
Country
It is indeed quite silly to think that a lower-clocked processor can emulate stuff better.

Consider the following:
So you see, it may not be so silly after all!

That's very interesting stuff, quite graspable too.
The GBA-to-native (or ARM to ARM) instruction advantage seems minimal compared to MIPS having access to 32 registers and MIPS performing pipelined instruction processing per cycle, it just seems that MIPS is quite superior to ARM for emulation tasks, and processing in general. :)

Gets me more excited for the GCW Zero I'm waiting on actually, that's a 1GHz MIPS device, it'll be truly wonderful for tasks like GBA emulation.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
That's very interesting stuff, quite graspable too.
The GBA-to-native (or ARM to ARM) instruction advantage seems minimal compared to MIPS having access to 32 registers and MIPS performing pipelined instruction processing per cycle, it just seems that MIPS is quite superior to ARM for emulation tasks, and processing in general. :)

Gets me more excited for the GCW Zero I'm waiting on actually, that's a 1GHz MIPS device, it'll be truly wonderful for tasks like GBA emulation.
Pretty much, yeah. I think it's a major win, if the emulator has a recompiler (like gpSP). Snes9x does not, so it puts the SNES's registers into memory directly. But, all memory access removed, MIPS would still be faster than ARM.

The GCW Zero should be a pretty solid device once it comes out, given how gpSP performs on the 360 MHz JZ4740...

Perhaps the GP2X Caanoo port didn't deal with frame skipping as effectively as TempGBA? I actually don't know what would cause the Caanoo port to be so much slower.
 

RupeeClock

Colors 3D Snivy!
Member
Joined
May 15, 2008
Messages
6,497
Trophies
1
Age
34
Website
Visit site
XP
2,956
Country
Pretty much, yeah. I think it's a major win, if the emulator has a recompiler (like gpSP). Snes9x does not, so it puts the SNES's registers into memory directly. But, all memory access removed, MIPS would still be faster than ARM.

The GCW Zero should be a pretty solid device once it comes out, given how gpSP performs on the 360 MHz JZ4740...

Perhaps the GP2X Caanoo port didn't deal with frame skipping as effectively as TempGBA? I actually don't know what would cause the Caanoo port to be so much slower.

Dynamics recompilers (DynaRec) is a thing of beauty, a Caanoo/Pandora emulator called PCSXreARMed does brilliant things with it.
And yeah ignoring memory access, if MIPS can process 5 instructions per cycle, that's a big advantage over ARM.

Yeah, the GCW Zero being a 1GhZ JZ4770, also sporting a dedicated OpenGL ES2.0 GPU and FPU, stands to be an emulation beast, it may even be capable of N64 emulation.

The Caanoo port seems very half-hearted, like much of the software that was ported from the GP2X Wiz, which may've also been ported from the GP2X F100/F200.
The Caanoo scene didn't flourish at all sadly, I hear developers didn't care to work for it because of a lot of headaches, and bottlenecks that were never resolved from the Wiz (the Caanoo and Wiz have practically identical components).
I have to question if gpSP Caanoo can actually process a solid 60FPS like TempGBA does, whilst TempGBA can't necessarily render 60fps, it can usually process it and then comfortably display 30/60fps, or 20/60fps.
 

nl255

Well-Known Member
Member
Joined
Apr 9, 2004
Messages
3,000
Trophies
2
XP
2,792
Country
Pretty much, yeah. I think it's a major win, if the emulator has a recompiler (like gpSP). Snes9x does not, so it puts the SNES's registers into memory directly. But, all memory access removed, MIPS would still be faster than ARM.

The GCW Zero should be a pretty solid device once it comes out, given how gpSP performs on the 360 MHz JZ4740...

Perhaps the GP2X Caanoo port didn't deal with frame skipping as effectively as TempGBA? I actually don't know what would cause the Caanoo port to be so much slower.

Well one problem with the Caanoo GBA emulator is that it is an emulator. Assuming the Caanoo's ARM processor has a decent MMU then the fastest way to do it would be to cut out the ARM->ARM translator completely. Too bad the DS doesn't have a MMU otherwise Gbaemu4DS would probably kick the crap out of TempGBA in both speed and compatability.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Nut on the hill