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,576
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
  • No one is chatting at the moment.
  • BakerMan @ BakerMan:
    fuck ubisoft, and fuck activision
    +1
  • realtimesave @ realtimesave:
    Nintendo needs to release a new console, switch is getting such shitty little games lately lol it's pathetic
  • Purple_Heart @ Purple_Heart:
    Lmao a new flashcart... The Unlock Switch... I knew it's not fake xD
    +1
  • NinStar @ NinStar:
    A new consoles won't solve that problem
  • NinStar @ NinStar:
    It will actually make it worse
  • The Real Jdbye @ The Real Jdbye:
    well actually
    a new console won't do anything right now, because the games are still in development, that's why there are few games being released
  • The Real Jdbye @ The Real Jdbye:
    it won't make the games finish any faster
  • Veho @ Veho:
    2/3rds of launch titles for the Switch 2 will just be lazy ports of Switch games anyway.
  • The Real Jdbye @ The Real Jdbye:
    probably
  • The Real Jdbye @ The Real Jdbye:
    maybe mario kart 9 will be a launch title
  • The Real Jdbye @ The Real Jdbye:
    i really want a new mario kart
  • Veho @ Veho:
    What, you mean the endless stream of DLCs doesn't count?
  • Veho @ Veho:
    Why develop a new game when you can just sell season passes forever?
  • Veho @ Veho:
    I'm still on MKDS so I'm not bothered :tpi:
  • The Real Jdbye @ The Real Jdbye:
    i like the dlc tbh, i'd like a new game more
  • ZeroT21 @ ZeroT21:
    but the current version is still selling fine at full price
  • SylverReZ @ SylverReZ:
    Hello
  • ZeroT21 @ ZeroT21:
    sup
    +1
  • SylverReZ @ SylverReZ:
    @realtimesave, You seen the Unlock Switch flashcart yet?
  • K3Nv2 @ K3Nv2:
    I'll see the 19.0 update that blocks use ability to it
    +1
  • K3Nv2 @ K3Nv2:
    Lol newegg+
    Screenshot-20240423-053504-Gmail.jpg
  • S @ salazarcosplay:
    does update 19 really block it
  • SylverReZ @ SylverReZ:
    Update 19 never came out yet. Just the 18.1.
    SylverReZ @ SylverReZ: Update 19 never came out yet. Just the 18.1.