Homebrew Homebrew Development

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy

Not latest release but i think this is the latest officially published (and i won't spend any time trying to compile it so...), thank you.

--------------------- MERGED ---------------------------

Looks like it still crashes :/ what can be the problem? (I already stripped the ELF).
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
It works with unstripped elfs now like 3dsxtool does. Though it really shouldn't crash if they're stripped, I'd consider that a bug.

I tried both with unstripped or stripped files and it crashes everytime. File is not huge (3dsx file is 561 kb, stripped elf 627 kb, i definitely compiled bigger homebrews in CIA format like CHMM2) :/
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
  • Like
Reactions: daxtsu

Lectem

Active Member
Newcomer
Joined
Nov 21, 2014
Messages
43
Trophies
0
Age
30
XP
135
Country
France
Aaah, that makes sense, especially with fsUseSession() being initialized to false (so that the SD access still goes to the original handle). I wish somewhere anything would have mentioned that every archive needs its own handle. The great refactor made me think that wasn't needed anymore.

The current approach of overriding the current session feels cludgy. I would have much rather preferred manually providing handles, and allowing that parameter be NULL so that a default is used. That's just my personal taste, though. Thanks for the insight.
Well, it was made that way because ctrulib now has ref counting for services handles.
 

Gelex

Member
Newcomer
Joined
Jan 17, 2016
Messages
14
Trophies
0
XP
78
Country
United States
Well, it was made that way because ctrulib now has ref counting for services handles.
This makes sense if in general there only needs to be a single handle per service, but this doesn't seem to be the case for the Filesystem service. Again, for oot3dhax_installer, I had to use fsUseSession() and its counterpart to be able to get a second handle that could then open an Archive to manage access to OOT's save data.

If you don't mind indulging another question, while porting svdt to ctrulib-1.0 I encountered more Filesystem issues. In particular, svdt reads the title of carts, and I was unable to get any fs:USER handle that wasn't the main one (the reference counted one, returned by fsGetSessionHandle()) to open a file to read from the game cart directly. If I tried to use any other handle, I'd get error 0xD9004676 (3dsbrew says this is essentially a permission denied error). I was forced to use fsEndUseSession() to have the main handle be the one visible to FSUSER_* functions when I wanted to access the game cart, then I had to restore the handle associated with the save file Archive (another call to fsUseSession()) so that future reads and writes to that archive worked.

What exactly is going on with all of these handles? Why are there only some things that the one returned by fsGetSessionHandle() can do? Is there any good documentation about what all of this is? 3dsbrew tries to explain it, but doesn't say what Archives actually are or represent.
 

Gelex

Member
Newcomer
Joined
Jan 17, 2016
Messages
14
Trophies
0
XP
78
Country
United States
I got my answer in the 3dsdev development IRC channel. The answer has to do with permissions. The handle that the homebrew apps use by default originally comes from the Homemenu, and brings with it the permissions of the Homemenu. This is why things HBL can see, like the game cart title information, are accessible to that handle, but the save data for the game is only available once the process is launched, which is why the homemenu handle can't see it. Just thought I'd document my findings (and what I was told in the IRC) in case it helps someone else.
 
D

Deleted User

Guest
Has anyone managed to get NEWS_AddNotification working yet? (for custom notifications). I noticed in news.h of ctrulib that there was a function to add a notification like this, but I'm not sure how to exactly use it:
Code:
Result NEWS_AddNotification(const u16* title, u32 titleLength, const u16* message, u32 messageLength, const void* imageData, u32 imageSize, bool jpeg);
Any ideas?
 

Slashcash

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
338
Trophies
0
XP
611
Country
Italy
Has anyone managed to get NEWS_AddNotification working yet? (for custom notifications). I noticed in news.h of ctrulib that there was a function to add a notification like this, but I'm not sure how to exactly use it:
Code:
Result NEWS_AddNotification(const u16* title, u32 titleLength, const u16* message, u32 messageLength, const void* imageData, u32 imageSize, bool jpeg);
Any ideas?

Didn't check the documentation myself but that signature looks self-explanatory. It takes a 16bit string as a title, an int with the titlelenght, same thing with the actual message. Than a raw pointer to the image data, i suppose you should pass true or false as last parameter depending on if you are pointing to a jpeg image or not. What's the difficulty?
 
D

Deleted User

Guest
Didn't check the documentation myself but that signature looks self-explanatory. It takes a 16bit string as a title, an int with the titlelenght, same thing with the actual message. Than a raw pointer to the image data, i suppose you should pass true or false as last parameter depending on if you are pointing to a jpeg image or not. What's the difficulty?
I've not been doing much coding recently, so things have been a bit confusing for me as I've got back into the coding spirit. Basically, I'm stuck at the usage of the 16-bit strings, and the 32-bit message length thing. I'm not sure exactly what a 16/32-bit string is, but I'm gonna google it now.
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,191
Country
Antarctica
In C code you could probably use it like this (assuming no picture):

Code:
NEWS_AddNotification(L"Hello, Title!", 13, L"Hello, body of message!", 23, NULL, 0, false);

Of course, use proper string length functions and not magic numbers like that, but passing NULL for the image data, zero for the size, and false for the jpeg boolean should suffice. Note that I've not tested this myself, but it should be alright.
 
  • Like
Reactions: Deleted User
D

Deleted User

Guest
In C code you could probably use it like this (assuming no picture):

Code:
NEWS_AddNotification(L"Hello, Title!", 13, L"Hello, body of message!", 23, NULL, 0, false);

Of course, use proper string length functions and not magic numbers like that, but passing NULL for the image data, zero for the size, and false for the jpeg boolean should suffice. Note that I've not tested this myself, but it should be alright.
Thanks, daxtsu. I'll give this a try. Hope it works! (I know I have to initialize the news service first by doing newsInit() first, don't I?)

Edit: Also, don't I have to close it off by putting NewsExit() at the end, as well?
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,191
Country
Antarctica
Thanks, daxtsu. I'll give this a try. Hope it works! (I know I have to initialize the news service first by doing newsInit() first, don't I?)

Edit: Also, don't I have to close it off by putting NewsExit() at the end, as well?

You do, but note that ctrulib will try to get news:u first instead, and only if that fails, will it try news:s. Assuming you're using a CIA for this, you can change the RSF to have access to news:s instead of news:u and it should work straight away. If you're using a 3dsx file, I'm not entirely sure if you get access to that service or not (someone tell me if you do/don't).
 
D

Deleted User

Guest
You do, but note that ctrulib will try to get news:u first instead, and only if that fails, will it try news:s. Assuming you're using a CIA for this, you can change the RSF to have access to news:s instead of news:u and it should work straight away. If you're using a 3dsx file, I'm not entirely sure if you get access to that service or not (someone tell me if you do/don't).
I think *hax 2.5 can get access to the news:u service. (maybe news:s, I'm not sure)
Also, I've been trying to get CIA compilation working over the past few weeks, but steveice10's makerom just isn't working for some reason...
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
  • Like
Reactions: Deleted User

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,191
Country
Antarctica
  • Like
Reactions: Deleted User

suhaib10

Active Member
Newcomer
Joined
Jan 15, 2016
Messages
32
Trophies
0
XP
60
Country
Canada
Hey can someone please help me out, I am trying to compile ninjhax2.x but i keep getting this error.
Code:
Makefile:6: *** "Please set CTRULIB in your environment. export DEVKITARM=<path to>ctrulib/libctru".  Stop.
Currently I am running Linux Mint17.1(ubuntu 14.04) i have devpro setup and its working(compiled reinand fine). I tried placing the ctrulib in the devpro directory and setting the path but it still wont work.
Anyone know how to fix this ?

EDIT: Fixed it. Manually cleaned bashrC (removing duplicates), re added ctrulib and need a REBOOT.
 
Last edited by suhaib10,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Bigonya uses his wiener to mod 360s
    +1
  • Xdqwerty @ Xdqwerty:
    Going to the water park, see ya
  • BigOnYa @ BigOnYa:
    You should update the 360 to newest dash before RGHing it yes. But not a big deal if you don't, you can install new dash/avatar updates after. It's just easier to do it auto online before, instead manual offline after.
  • BigOnYa @ BigOnYa:
    Have fun @Xdqwerty. If you see a chocolate candy bar floating in the water, don't eat it!
  • AncientBoi @ AncientBoi:
    :O:ohnoes: Y didn't U Tell ME that ALSO? @BigOnYa :ohnoes: 🤢🤮
    +1
  • BigOnYa @ BigOnYa:
    Does it taste like... chicken?
    +1
  • S @ salazarcosplay:
    @BigOnYa I wanted to ask you about your experience with seeing south park. Most of the people a bit younger like my younger brother and cousins that are a few younger than me that saw kids found south park funny because of the curse words, kids at school, that seemed like liking the show on a very basic level.

    I could not quite have a in depth discussion of the show.

    How was it for you? As an adult. What did you find the most interesting part about it. Did you relate to the parents of the kids and their situations. Was it satires, the commentary on society. The references on celebrities' and pop culture.
    +1
  • BigOnYa @ BigOnYa:
    I remember seeing the very first episode back in the day, and have watched every episode since. I used to set my VCR to record them even, shows how long ago.
  • BigOnYa @ BigOnYa:
    I just like any comedies really, and cartoons have always been a favorite of mine. Family guy, American Dad, Futurama, Cleveland Show, Simpsons - I like them all.
    +1
  • BigOnYa @ BigOnYa:
    South Park is great cause they always touch on relavent issues going on today, and make something funny out of it.
    +3
  • S @ salazarcosplay:
    @BigOnYa were you always up to date on the current events and issues of the time or were there issues that you first found out thru south park
  • BigOnYa @ BigOnYa:
    Most of the time yea I knew, I watch and read the news regularly, but sometimes the Hollywood BS stuff, like concerning actors slip by me. I don't follow most Hollywood BS (example: the Kardasians)
    +2
  • S @ salazarcosplay:
    @BigOnYa there were relevant issues before south park was made, that's why i think a south park prequel/spinoff would be great. Randy and his friends in their child hood
    +1
  • BigOnYa @ BigOnYa:
    Yea, like them running in high school together, getting into stuff, and how they got hitched and had kids. And how the town of South Park was back then compared to now. That would be cool to see.
  • BakerMan @ BakerMan:
    yeah
  • The Real Jdbye @ The Real Jdbye:
    @salazarcosplay if they made a prequel, it would still be about current issues, cause it doesn't make sense to make it about stuff that happened 30 years ago that nobody cares about anymore
  • The Real Jdbye @ The Real Jdbye:
    it's too late
  • The Real Jdbye @ The Real Jdbye:
    the older south park episodes about particular issues usually age poorly since the topic is no longer relevant
  • The Real Jdbye @ The Real Jdbye:
    an exception is giant douche vs turd sandwich, that's always relevant :P
    +1
  • K3Nv2 @ K3Nv2:
    I was gone for like an hour and none of you thought to write or call pos
  • BigOnYa @ BigOnYa:
    We knew you were going to Sonic to get lunch.
  • K3Nv2 @ K3Nv2:
    Sonics fast I would've been home in 10 mins
  • BigOnYa @ BigOnYa:
    Meet and greet with AncientBoi then?
  • K3Nv2 @ K3Nv2:
    That would've gone slow he's old
    +1
    K3Nv2 @ K3Nv2: That would've gone slow he's old +1