Homebrew [3DS] mGBA Alpha 1v Released

mGBA/CitrAGB/Reroarch gPSP, What do you like.


  • Total voters
    337

Xulin

Member
Newcomer
Joined
Aug 8, 2015
Messages
20
Trophies
0
Age
38
XP
71
Country
United States
Except none of the emulators (or even any homebrew) being used so far are designed for multiprocessing

mGBA is, that's why you see the performance boost.

Has it really been confirmed there were 4 cores running? It would seem more logical that they kept the 2x core architecture (one for kernel loaded from firmware + one for application code) since it does not require devs writing applications designed for multi-processing, and simply doubled the clock speed of each core.

Yes, it has 4 cores. Same speed. Why wouldn't devs want to write multi-processed code? It's the standard. They already write multi-threaded code for every other platform - vita, smartphones, ps4, xbone, pc, etc. You're talking as if multi-threaded code is something devs want to avoid.
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
And that will only happen on CIAs when it's fully supported by ctrulib.

You keep saying that but I don't think that's true.
Ctrulib is only a library of services usable in user mode, the difference you got between CIA and 3DSX are much likely related to the loader and the running application permission.
 

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,233
Country
Brazil
You keep saying that but I don't think that's true.
Ctrulib is only a library of services usable in user mode, the difference you got between CIA and 3DSX are much likely related to the loader and the running application permission.
Of course it's possible. Ninjhax has very nice control over the memory (remember CitraAGB has dynarec on it, but not as a native 3DS executable). Only some of these functions have still not been been fully implemented on ctrulib.
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
mGBA is, that's why you see the performance boost.

I didn't knew about mGBA
But see the retroarch thread: all the cores used are single-threaded but still run 2x faster on n3ds.
How do you explain that?


Yes, it has 4 cores. Same speed.

May I ask how it was verified / confirmed ?


Why wouldn't devs want to write multi-processed code? It's the standard. They already write multi-threaded code for every other platform - vita, smartphones, ps4, xbone, pc, etc. You're talking as if multi-threaded code is something devs want to avoid.

You can have multiple threads on a single processor core. My point was that having to choose which processor to use for each thread (which also could introduce some limitations since threads are generally supposed to run in a single process, with shared context area) was more complicated than having one core running the kernel / scheduler and another running application (with eventually its threads).
 

xdarkmario

Philosopher
Member
Joined
Dec 30, 2010
Messages
1,635
Trophies
1
Location
Mushroom Kingdom
XP
2,578
Country
United States
i refuse devolve and use the 3dsx ver.
so until its fixed ill be siting here patiently like the patient spy. lol
Confess.png
 

Xulin

Member
Newcomer
Joined
Aug 8, 2015
Messages
20
Trophies
0
Age
38
XP
71
Country
United States
Once again, none of the ported emulators use multi-threading: they are all designed to run in a single-threaded application and none of them were modified to use 3DS threading services. The fact they are running faster on n3ds seems to indicate cores were actually overclocked, not duplicated.

Have you looked at the code to determine what it is designed for? How would you even be able to recognize threaded code if you're not a coder?

Just because an app happens to run on single-threaded hardware doesn't mean it was designed for it. You can write some random dummy java file in 2 minutes that would run much quicker on a dual core cpu over a single core, but it would still run on the single core, just slower. That's whats happening with mGBA.
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
Have you looked at the code to determine what it is designed for? How would you even be able to recognize threaded code if you're not a coder?

Just because an app happens to run on single-threaded hardware doesn't mean it was designed for it. You can write some random dummy java file in 2 minutes that would run much quicker on a dual core cpu over a single core, but it would still run on the single core, just slower. That's whats happening with mGBA.

I actually can read the code of those emus and do not see them making use of threads while mGBA indeed uses POSIX threads and has some layer in the 3ds port to translate them into 3DS threading services.
https://github.com/mgba-emu/mgba/blob/master/src/platform/3ds/threading.h
 

Xulin

Member
Newcomer
Joined
Aug 8, 2015
Messages
20
Trophies
0
Age
38
XP
71
Country
United States
I'm not sure what you're arguing anymore. You just said 1 page ago that none of these emus were designed for multi-threading and that the fact that they run faster must be due to faster clockspeeds. We know the clockspeeds on N3DS aren't faster, and we know n3DS has 2 extra cores. So in this case the only option for something being faster on one system over the other is multi-threading. There literally isn't any other possibility.
 

doctorgoat

Well-Known Member
Member
Joined
Jun 3, 2015
Messages
694
Trophies
0
Age
35
XP
560
Country
United States
Does mGBA use any of the features NinjHAX 2/OoTHax/Ironhax don't have? That'd account for it.

I haven't see any definite data with framerates on games at all though between systems, which is why the speedup thing bugs me so much.
 

Jim_e

Well-Known Member
Newcomer
Joined
Nov 13, 2007
Messages
79
Trophies
0
XP
267
Country
United States
I'm not sure what you're arguing anymore. You just said 1 page ago that none of these emus were designed for multi-threading and that the fact that they run faster must be due to faster clockspeeds. We know the clockspeeds on N3DS aren't faster, and we know n3DS has 2 extra cores. So in this case the only option for something being faster on one system over the other is multi-threading. There literally isn't any other possibility.
That's not entirely true.
We had a similar conversation somewhere in the Gameyob thread. I have both a n3ds and o3ds, I wrote and tested single threaded code(brute math, each iteration dependent on the previous iteration). My findings were that the n3ds ran the code something like 2.3x faster than the o3ds. I also wrote code that checked the cpu ticks in relation to the system clock. Both the n3ds and o3ds returned the same value.

So that was odd in my opinion. Someone suggested that system services have been moved to another core, thus freeing up more CPU time on the main core. Plausible but that suggests that the OS uses more than 50% of the cpu time for it's own purpose, even though it has a dedicated core.

No matter the case, the n3ds effectively has double the CPU time for single threaded code, even if the cpu clock appears to be the same.
 
  • Like
Reactions: Jacobeian

Jim_e

Well-Known Member
Newcomer
Joined
Nov 13, 2007
Messages
79
Trophies
0
XP
267
Country
United States
Why wouldn't devs want to write multi-processed code?
Just noticed this post. It adds complexity, significantly. I've seen poorly implemented mutexes in my time. Online tutorials by people that don't know how IPCs work nor when it's safe to access data in a lock. It's a shame that it's easy to get miss informed.

Fact is, threaded code is hard. It's hard to catch corner cases, it's hard to debug, and there's always some bit of code(or worse a lib) that doesn't like threads. But most of the time, solutions to problems are simply more obvious in a single thread mindset.

More over, emulators are not so easily threadable. Basically it breaks down to an emulation thread and a render thread. This is impossible for older systems where cpu clock is tightly tied to the ppu and single instructions timing means the difference between correctly render or not. It's even harder on the 3DS since we lack render hardware capable of rendering from palate requiring CPU intervention.

There was something that made it so only <=9.2 could use dynarec. Was that active on both the O3DS/N3DS in those tests?
Are you asking me? Dynarec only applies to emulation. It doesn't apply to these test.
 
  • Like
Reactions: Jacobeian

doctorgoat

Well-Known Member
Member
Joined
Jun 3, 2015
Messages
694
Trophies
0
Age
35
XP
560
Country
United States
Are you asking me? Dynarec only applies to emulation. It doesn't apply to these test.

... I meant whatever it was that was allowing dynarec. I don't know what capabilities are removed from the user if they're using a usermode exploit instead of a kernelmode exploit in the context of homebrew.

Dynarec's the only major performance difference I know of, and I didn't know if the capabilities that were allowing it allowed anything else remotely relevant for brute force testing.
 

Jim_e

Well-Known Member
Newcomer
Joined
Nov 13, 2007
Messages
79
Trophies
0
XP
267
Country
United States
... I meant whatever it was that was allowing dynarec. I don't know what capabilities are removed from the user if they're using a usermode exploit instead of a kernelmode exploit in the context of homebrew.

Dynarec's the only major performance difference I know of, and I didn't know if the capabilities that were allowing it allowed anything else remotely relevant for brute force testing.
No, the issue lies with user code not being allowed to set memory execution privileges. Only the kernal can do that, or an exploit that grant that privileges. Lacking that privilege should have no impact on performance.
 
  • Like
Reactions: Jacobeian

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    I had one it was fun lol
  • K3Nv2 @ K3Nv2:
    I think I did then it broke a few months later
  • Psionic Roshambo @ Psionic Roshambo:
    Used it as a web cam for a day for fun, sooo shitty it was hilarious
  • Psionic Roshambo @ Psionic Roshambo:
    I had two Ken one regular black one and a silver special edition one lol
  • K3Nv2 @ K3Nv2:
    Speaking of old stuff those green og Logitech Xbox controllers still being listed around $100
  • The Real Jdbye @ The Real Jdbye:
    eyetoy was fun yeah
  • The Real Jdbye @ The Real Jdbye:
    super basic, but the minigames were well designed
  • The Real Jdbye @ The Real Jdbye:
    i'm sure there's at least 1 emulator out there that works with it
  • Psionic Roshambo @ Psionic Roshambo:
    I had the PS3 one too and The Eye of Judgement game lol was ass
  • The Real Jdbye @ The Real Jdbye:
    i had eye toy play on ps2
  • K3Nv2 @ K3Nv2:
    Microsoft ruined it with kinect
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, PCSX2 works with any web cam and emulates the EyeToy with it
  • K3Nv2 @ K3Nv2:
    I remember mic support for the n64 being janky
  • K3Nv2 @ K3Nv2:
    Emulation wise
  • Psionic Roshambo @ Psionic Roshambo:
    I had a kinnect.... It blew rotting goat balls
  • Psionic Roshambo @ Psionic Roshambo:
    Ken amazingly DraStic microphone support works better than real hardware lol
  • Psionic Roshambo @ Psionic Roshambo:
    On a phone of course
  • Psionic Roshambo @ Psionic Roshambo:
    Also touch is better.... Well at least better than the launch DS, the lite one improved that a ton
  • K3Nv2 @ K3Nv2:
    Touch
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I really need to dig out my USB Wii sensor bar and experiment with Wii emulation and synching Wii remotes with BT lol
  • Psionic Roshambo @ Psionic Roshambo:
    Sort of redundant since I have a Wii lol
  • Psionic Roshambo @ Psionic Roshambo:
    With HDMI lol
  • K3Nv2 @ K3Nv2:
    I also have a Wii
  • K3Nv2 @ K3Nv2:
    Tomorrow be may 4th
  • Psionic Roshambo @ Psionic Roshambo:
    Getting Wiid from Street Pharmacist Mario?
    Psionic Roshambo @ Psionic Roshambo: Getting Wiid from Street Pharmacist Mario?