Homebrew CitrAGB - 3DS GBA Emulator (WIP)

kraan

Well-Known Member
Newcomer
Joined
Dec 12, 2014
Messages
84
Trophies
0
Age
33
Location
Merowe
Website
www.matsindia.wordpress.com
XP
85
Country
The main problem right now with Ninjhax is the cache invalidation, and unfortunately there's not a whole lot I can do about that one since smea obfuscated the code under the hb service. What he gave was a generic flush+invalidate function which just invalidates the entire cache. What I need is a function which can flush+invalidate the part in RAM I actually modified, and I can't do that right now with Ninjhax. Although now that I'm actually looking at the SVCs available to the system, I'm not entirely sure if there even *is* a function which can invalidate part of the cache, so I might need to do some looking around.

Is Smealum aware of this and trying to fix, or is it something he chooses to block, and refuses to open?
Thanks for taking the time to explain these things ;)
 

Slushie3DS

Cold Beverage Lover
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
Snipped for space, and thank you for your input.

Of course, I know how tedious the work can get. It is very appreciated for all the work you are doing.

While all the bigger fish are gobbling up the more desirable emulators, I plan on writing an emulator for the Atari 2600, so we can play games from my childhood like Asteroid and Space Invaders. It is the first emulator I will have ever created, but I am excited to get started. The 8080 processor seems to be pretty well documented, sadly not so much the 6502. Hopefully, the timers won't be that hard to hex. She's still such a beauty!

Atari2600a.JPG



Snipped for space, and thank you for your input.

I've noticed Smea is really strange about how he does things. All we can do is wait to see if he fixes it, or until he releases the launcher sauce.
 
  • Like
Reactions: cvskid

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Hmm... So when trying to load a game up, the title screen fades in PAINFULLY slow, and didn't do much else afterwards. So I thought, alright, this game isn't compatible yet, so I turned the 3DS off. When I turned the system off, I could hear the title screen music for about two seconds in perfect speed o.O

Early development emulators are such a tease :lol:
 

Slushie3DS

Cold Beverage Lover
Member
Joined
Jan 9, 2015
Messages
707
Trophies
0
Age
29
XP
420
Country
United States
Snipped for space, and thank you for your input.

It means that we would be able to do things for ourselves, instead of waiting for Smea. The only problem with this is that we'd probably have to make a community based homebrew launcher, as you wouldn't want a million different launchers, all with different things inside of them. It would allow things like the cache problem to be cleared up.
 

Arisotura

rise of melonism
Member
Joined
Dec 5, 2009
Messages
839
Trophies
1
Age
30
Location
center of the Sun
Website
kuribo64.net
XP
2,498
Country
France
shinyquagsire23 I'll leave you this quote, might help with the dynarec issues

[00:43:24] <StapleBt2> a hybrid solution could work though
[00:43:50] <StapleBt2> static rec all the code in ROM (since it's directly read from ROM, it can't be modified), and run an interpreter if you fall across code in RAM

(or replace the interpreter with a dynarec, but the point there is to avoid clearing the whole icache as much as possible)


Slushie3DS what's the point of leaving quote blocks if you constantly snip the contents "for space"? You might as well just tag the user if it's for the notification.



bleh XenForo you piece of shit will you stop eating random parts of my posts when I try to use the tag
 

sj33

Well-Known Member
Member
Joined
Oct 22, 2013
Messages
4,072
Trophies
2
XP
4,728
Country
Japan
A .3ds compile would be useless because it would not support sound (due to no access to the CSND service) and would also be very slow due to .3ds not supporting dynamic recompilation.
 

ody81

Well-Known Member
Member
Joined
Aug 21, 2012
Messages
464
Trophies
0
XP
315
Country
Can someone PLEASE provide a .3ds compile of this? I am helping someone in another thread who can't get ninjhax working for some bizzare reason and he only wants it for this so I'm asking for a .3ds, since he uses gateway.


I think a .cia is what you'd be needing, I think someone posted one earlier on this thread (it'd be outdated by now).
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Can someone PLEASE provide a .3ds compile of this? I am helping someone in another thread who can't get ninjhax working for some bizzare reason and he only wants it for this so I'm asking for a .3ds, since he uses gateway.

This person has Gateway, so they don't need a .3ds version of the emulator - just use a .cia version of Cubic Ninja.

Sj33 has already stated that anything short of a .3dsx version isn't going to support dynamic recompilation, which, in turn, means the emulator isn't going to work. You mention Ninjhax not working, but Ninjhax is absolutely required if you want to enjoy this emulator. To my understanding, Ninjhax won't work with a .3ds/cartridge version of the game in Gateway, so that is likely the issue. I can 100% confirm that Ninjhax works with the .cia version of the game I converted from my own cart. So just set that up and use the .3dsx version.
 
  • Like
Reactions: cvskid

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
This person has Gateway, so they don't need a .3ds version of the emulator - just use a .cia version of Cubic Ninja.

Sj33 has already stated that anything short of a .3dsx version isn't going to support dynamic recompilation, which, in turn, means the emulator isn't going to work. You mention Ninjhax not working, but Ninjhax is absolutely required if you want to enjoy this emulator. To my understanding, Ninjhax won't work with a .3ds/cartridge version of the game in Gateway, so that is likely the issue. I can 100% confirm that Ninjhax works with the .cia version of the game I converted from my own cart. So just set that up and use the .3dsx version.

Actually the issue with running Ninjhax off of Gateway is that you can't use Ninjhax on anything above 9.2, and Gateway also employs a custom kernel image which overrides the one in the emuNAND, the problem being is that this image is based on the 9.4 kernel, so it doesn't work with Ninjhax. I believe older versions of Gateway's launcher.dat work though. The main issue preventing the use of this as a .3ds or .cia at the moment is that I'm still trying to figure out if it's even possible at all, period. It's most likely possible as a .cia, very much doubting .3ds though. At the moment (as far as I have found) you should be able to use SVC 0x70 which allows me to change if memory is executable or not, but I'm still trying to actually figure out how to invalidate the icache.
 

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
Actually the issue with running Ninjhax off of Gateway is that you can't use Ninjhax on anything above 9.2, and Gateway also employs a custom kernel image which overrides the one in the emuNAND, the problem being is that this image is based on the 9.4 kernel, so it doesn't work with Ninjhax. I believe older versions of Gateway's launcher.dat work though. The main issue preventing the use of this as a .3ds or .cia at the moment is that I'm still trying to figure out if it's even possible at all, period. It's most likely possible as a .cia, very much doubting .3ds though. At the moment (as far as I have found) you should be able to use SVC 0x70 which allows me to change if memory is executable or not, but I'm still trying to actually figure out how to invalidate the icache.

I'll be completely honest and say this up-front: I didn't understand most of what you said :L

All I can say is that my emuNAND is on 9.2 and I don't have a reason to update as of yet. I do have my own copy of CN though, so using it Ninjhax in Gateway mode was more of seeing if I could convert my dump and if it would actually work.

But yeah, if you could really dumb that down for me, that'd be super.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,227
Trophies
2
XP
34,565
Country
Mexico
Actually the issue with running Ninjhax off of Gateway is that you can't use Ninjhax on anything above 9.2, and Gateway also employs a custom kernel image which overrides the one in the emuNAND, the problem being is that this image is based on the 9.4 kernel, so it doesn't work with Ninjhax. I believe older versions of Gateway's launcher.dat work though. The main issue preventing the use of this as a .3ds or .cia at the moment is that I'm still trying to figure out if it's even possible at all, period. It's most likely possible as a .cia, very much doubting .3ds though. At the moment (as far as I have found) you should be able to use SVC 0x70 which allows me to change if memory is executable or not, but I'm still trying to actually figure out how to invalidate the icache.
I think a 3DS version is not that necessary.

The CIA on the other hand I think should be the "must" for Gateway users.
Right now there are only 2 ways to run Homebrew:

1) Flashcards (Gateway, Sky3DS, etc).
2) Ninjhax.

In my own personal opinion, I think having a homebrew emulator as CIA is much more convenient due to the fact that it actually can get access to the sound module CSND, and the 3DS versions of the emus are limited by that, meaning .3DS=No Sound, .CIA=Sound and installed app.

Hope you can find a way to make a CIA version of this emu in the future! :)
 
  • Like
Reactions: cvskid

ubergeek77

Post editing world champ.
Member
Joined
Dec 6, 2014
Messages
584
Trophies
0
XP
597
Country
United States
I think a 3DS version is not that necessary.

The CIA on the other hand I think should be the "must" for Gateway users.
Right now there are only 2 ways to run Homebrew:

1) Flashcards (Gateway, Sky3DS, etc).
2) Ninjhax.

In my own personal opinion, I think having a homebrew emulator as CIA is much more convenient due to the fact that it actually can get access to the sound module CSND, and the 3DS versions of the emus are limited by that, meaning .3DS=No Sound, .CIA=Sound and installed app.

Hope you can find a way to make a CIA version of this emu in the future! :)

.-.

https://gbatemp.net/threads/citragb-3ds-gba-emulator-wip.376438/page-10#post-5279495
 
  • Like
Reactions: Slushie3DS

davhuit

Well-Known Member
Member
Joined
Nov 23, 2005
Messages
994
Trophies
0
XP
550
Country
France
Be careful about using Ninjhax on Gateway if you are on emunand 9.4 as it's not supported AND will break everything (http://gbatemp.net/threads/cant-install-ninjhax-on-gw-9-4-0-21.377230/#post-5236986).

So, the only way I see right now for Gateway users (for the one who are up-to-date, at least) is to use a different SD Card for Ninjhax/CitrAGB and create another emunand (which will be on 4.x) on it.

(Though I didn't tried so don't know, maybe the last launcher could break compatibility with ninjhax, but as you need to use another SD Card, you could always put an older launcher on it anyway).

Avoid updating it through a rom because some peoples reported some sysnand updates after doing that on the last launchers (though you could always downgrade, if you can avoid it, it's always better).

I'm excited to see this emulator, but unfortunately my absolute favorite GBA game can't make it past the title screen :cry:

I call for a compatibility list!

Compatibility list for early emulators aren't really useful, as each new thing can break another thing. Better wait until the emulator have full speed/sound and make some games works fine before starting one.
 

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

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://www.kontrolfreek.com/products/south-park-kenny-edition-thumbsticks?utm_source=facebook&ut...