Homebrew CitrAGB - 3DS GBA Emulator (WIP)

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
EDIT: OK, *used* to run at full speed. Apparently on 4.5 it runs a crapton slower (as in, 50%) for some reason, but I haven't done any code changes so no idea what could cause this regression other than whatever Nintendo was using for mapping memory being slower on 4.5 than on 9.2). Can anyone test the demo on 8.x or 9.x and set a feel for how fast it is on those versions?


I'll try in just a moment. When I tried it before, I tested it on my 4.2 3DS; I had no idea that would change the performance so drastically. I'll test MegaMan Battle Network 3 and see how it runs, and any other game you'd like on my 9.2 3DS.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
OP
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
I'll try in just a moment. When I tried it before, I tested it on my 4.2 3DS; I had no idea that would change the performance so drastically. I'll test MegaMan Battle Network 3 and see how it runs, and any other game you'd like on my 9.2 3DS.

Definitely the demo in the main post, I had that one working full speed before I downgraded to 4.3. I also just downloaded the .3dsx in the main post which is (slightly) dated and is built with an older ctrulib, it's definitely nothing there. And I didn't do anything in the commit after I added sound other than add one line to fix saves and the game_config.txt, so that one is out too. Weird.
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Definitely the demo in the main post, I had that one working full speed before I downgraded to 4.3. I also just downloaded the .3dsx in the main post which is (slightly) dated and is built with an older ctrulib, it's definitely nothing there. And I didn't do anything in the commit after I added sound other than add one line to fix saves and the game_config.txt, so that one is out too. Weird.

Alright, so I just remembered I lent my cartridge copy of Cubic Ninja to a friend since I have Gateway now, but I ran Ninjhax through my .cia version of the game. Correct me if I'm wrong, but I don't think that's very much different than having a legit eShop copy.

Using the .3dsx from the OP, I ran Mega Man Battle Network 3 and I didn't get any better results than I did on my 4.2 3DS :(

It's just as slow as it was - the short 5-second CAPCOM logo when you boot the game up takes ages to get through. The demo runs fine though, so like I said, maybe it's just this game.

Unless, of course, Gateway mode breaks something your emulator relies on. In which case I'll have to see about getting CN back.

EDIT: Sorry, I'm a bit dense. It just occurred to me that you were referring to the demo.gba when you said demo. My bad. What I can tell you is that the demo runs 100% fine at the speed of Rick Astley, in all his glory, on both 4.2 and 9.2. Actual games are where I start seeing issues.
 

console

Elvira fans ❤ :-) I'm rocking Windows 7 for 11 yrs
Member
Joined
Mar 1, 2013
Messages
394
Trophies
1
Location
In heart of Windows XP, 7. I ❤ 👠! 🥰
Website
www.startpage.com
XP
3,396
Country
United States
I try CitraAGB emulator on my red 3DS XL and work fine for me. Message from my 3DS XL said gba_bios.bin is incorrect version. I use different gba_bios.bin from other server and work fine without display incorrect version.

My SD card structures:

H:/3ds/3ds/3ds.3dsx (Before H:/3ds/CitrAGB/3ds.3dsx is not working, have to rename CitrAGB to 3ds to get work)
game_config.txt
gba_bios.bin
demo.gba

and few games like Zelda, Golden Sun, Final Fantasy and Mario games.

All games are run very slow.

I wait for next new version to get improve speed. I'm not in hurry, but I like to test different version of emulators what make different way like improve and not improve in random way.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
OP
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
Alright, so I just remembered I lent my cartridge copy of Cubic Ninja to a friend since I have Gateway now, but I ran Ninjhax through my .cia version of the game. Correct me if I'm wrong, but I don't think that's very much different than having a legit eShop copy.

Using the .3dsx from the OP, I ran Mega Man Battle Network 3 and I didn't get any better results than I did on my 4.2 3DS :(

It's just as slow as it was - the short 5-second CAPCOM logo when you boot the game up takes ages to get through. The demo runs fine though, so like I said, maybe it's just this game.

Unless, of course, Gateway mode breaks something your emulator relies on. In which case I'll have to see about getting CN back.

EDIT: Sorry, I'm a bit dense. It just occurred to me that you were referring to the demo.gba when you said demo. My bad. What I can tell you is that the demo runs 100% fine at the speed of Rick Astley, in all his glory, on both 4.2 and 9.2. Actual games are where I start seeing issues.

Strange, I'm really curious now what's causing it on my own device. Might try a full reboot to see what that might do.
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Strange, I'm really curious now what's causing it on my own device. Might try a full reboot to see what that might do.

Hold on a moment... I'm about to make myself look like an utter fool >.<

I probably tested this before I downgraded my old beat-up 3DS. My sincerest apologies for mixing this up. My old 3DS would have been on 9.2 at the time, and now my head is associating it with 4.2. I blame college. It's rough. I can't brain. I'm quite sorry.

So yeah, if you're still getting slowdowns on 4.x, then it's exactly how you hypothesized it. The only reasonably acceptable way for me to apologize is to offer you this very poor ASCII cookie:

_,--=--._
,' `.
- -
' : : `
: : : :
. ,
. ,
` -=- '

Okay, well, now it's just cookie dough.

EDIT: Fire Red at least works at 70%-ish speed through the intro sequence on my device, so that's nice.
 

themperror

Well-Known Member
Member
Joined
Aug 12, 2009
Messages
181
Trophies
0
XP
367
Country
Netherlands
EDIT: OK, *used* to run at full speed. Apparently on 4.5 it runs a crapton slower (as in, 50%) for some reason, but I haven't done any code changes so no idea what could cause this regression other than whatever Nintendo was using for mapping memory being slower on 4.5 than on 9.2). Can anyone test the demo on 8.x or 9.x and set a feel for how fast it is on those versions?


Maybe
StapleButter
or
DiscostewSM
can help you with this problem?
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Maybe or can help you with this problem?

They could probably be of assistance in pushing this project forward a little faster, but I'm pretty sure they've made it clear that blargSNES takes the priority at the moment.

And I've already tested his demo.gba on my 9.2 3DS, and it runs at full speed. I think we could more diagnose the problem if we had someone capable of running the emulator on a 4.x 3DS. We could then see if it runs slower for everyone on that firmware version, or if it's just an isolated issue. I have a 4.2 3DS, but I don't have my copy of Cubic Ninja at the moment so I can't test that for him right now.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
OP
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
I'm guessing it's just a weird quirk with the function smea used to clear the instruction cache. Nintendo probably optimised it at one point or another before 9.2, the real question is though, what to replace it with. Because obviously having a function which varies drastically in time between versions is no bueno.
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
I'm guessing it's just a weird quirk with the function smea used to clear the instruction cache. Nintendo probably optimised it at one point or another before 9.2, the real question is though, what to replace it with. Because obviously having a function which varies drastically in time between versions is no bueno.
Is this the one problem causing absolutely any game from running at 100%, or is it one of multiple problems?

GPSP was MIPS based, and yet you still managed to get a working port on ARM, so is there nothing in that source you haven't already used that can be of help? What about ARM-specific emulators, such as those on Android or RPi?

I wish I could say more; you obviously have a much higher understanding of this. I'm not bad at programming, but I know close to nothing about virtualization/emulation.
 

sj33

Well-Known Member
Member
Joined
Oct 22, 2013
Messages
4,072
Trophies
2
XP
4,728
Country
Japan
A .3ds or .cia version wouldn't be worth using right now because it wouldn't be able to use dynamic recompilation, which is necessary for any kind of decent speed.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
OP
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
A .3ds or .cia version wouldn't be worth using right now because it wouldn't be able to use dynamic recompilation, which is necessary for any kind of decent speed.

I'm working on getting a .cia version, because I'll definitely be able to get at the system services which smea used to remap memory and do cache invalidation. I think. I'm still kinda figuring it out and seeing how I'm going to keep ninjhax compatability as well (#defines vs ifs or whatever).
 

Intronaut

A star maker
Member
Joined
Nov 18, 2014
Messages
772
Trophies
0
Age
30
XP
1,005
Country
Chile
They could probably be of assistance in pushing this project forward a little faster, but I'm pretty sure they've made it clear that blargSNES takes the priority at the moment.

And I've already tested his demo.gba on my 9.2 3DS, and it runs at full speed. I think we could more diagnose the problem if we had someone capable of running the emulator on a 4.x 3DS. We could then see if it runs slower for everyone on that firmware version, or if it's just an isolated issue. I have a 4.2 3DS, but I don't have my copy of Cubic Ninja at the moment so I can't test that for him right now.


I have a downgraded 3DS in 4.2 and a Cubic Ninja. Where are the files to test?

EDIT: I downloaded the files and the demo.gba plays slow. I tried another games and the same. Anyway, I saw Super Mario Advance runs faster than Metroid Zero Mission, for example.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
OP
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
OK, got my PAL copy of Cubic ninja, did a few small fixes to get it working on my N3DS. So far so good, runs full speed like it did before. I also did a comparison video to demonstrate the slowness issue that's happening with 4.x 3DS's, so now we have video of the exact same build of CitrAGB being played across two 3DS's. It's not scientific or anything since it being an N3DS could be a factor, technically. It does though demonstrate the issue rather well.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,231
Trophies
2
XP
34,611
Country
Mexico
Cool ROM you booted up! XD
One question, does CitrAGB have sound yet?
Or is it in the works?

Also, would the sound implementation be different in a N3DS from a normal 3DS?
 

shinyquagsire23

SALT/Sm4sh Leak Guy
OP
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
Cool ROM you booted up! XD
One question, does CitrAGB have sound yet?
Or is it in the works?

Also, would the sound implementation be different in a N3DS from a normal 3DS?

It has full sound support, but only for the old 3DS. N3DS has no access to CSND. For N3DS we'll need to use dsp, which isn't fully reversed yet.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,231
Trophies
2
XP
34,611
Country
Mexico
It has full sound support, but only for the old 3DS. N3DS has no access to CSND. For N3DS we'll need to use dsp, which isn't fully reversed yet.

Oh so that's what's stopping sound in N3DS.
Thanks for the reply and the heads up, that's what I wanted to know.
This project looks really... REALLY promising! I am always on the lookout for new updates. :)
 

Intronaut

A star maker
Member
Joined
Nov 18, 2014
Messages
772
Trophies
0
Age
30
XP
1,005
Country
Chile
First of all I want to give you thanks for all your work in the scene. I don't want to be a naggy one, but can you compile a CIA version please?. (I have cubic ninja, but my sysnand is in 4.2 and my emuNAND is in 9.5).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: These videos are soooo dry