Homebrew Homebrew Development

D

Deleted User

Guest
Is there some special trick to getting AM_DeleteAppTitle to work? I'm running it via a CIA with access to am:u. I get a title ID using AM_GetTitleList and use AM_DeleteAppTitle(mediatype_SDMC, titleId), but it fails. I've verified that the correct title id is being passed to it, so I don't know what went wrong.
 
D

Deleted User

Guest
Personally, i pass both DeleteTitle and DeleteAppTitle for the uninstall call in Big Red Menu. Try to see its src.


Didn't seem to work... here's the source for my list and delete functions:

Listing:
u64* app_list(MediaType mediaType, u32* count) {
if(!app_prepare()) { // app_prepare just calls amInit if it hasn't already been called.
return NULL;
}

u32 titleCount;
AM_GetTitleCount(app_mediatype_to_byte(mediaType), &titleCount);
if(count != NULL) {
*count = titleCount;
}

u64* titles = (u64*) malloc(titleCount * sizeof(u64));
AM_GetTitleList(app_mediatype_to_byte(mediaType), titleCount, titles);
return titles;
}

bool app_delete(MediaType mediaType, u64 titleId) {
if(!app_prepare()) { // app_prepare just calls amInit if it hasn't already been called.
return false;
}

// Tried this:
return AM_DeleteAppTitle(app_mediatype_to_byte(mediaType), titleId) == 0;
// ...and this:
AM_DeleteAppTitle(app_mediatype_to_byte(mediaType), titleId);
return AM_DeleteTitle(app_mediatype_to_byte(mediaType), titleId) == 0;
}
 

DEElekgolo

Well-Known Member
Newcomer
Joined
Apr 7, 2009
Messages
75
Trophies
0
Age
29
Website
Visit site
XP
262
Country
United States
Still cant manage to find an efficient way to render stuff like sprites and such to screen. The GPU code seems very messy right now for anything graphical like that to be done.
Also is there a way yet to have internal file systems for the 3dsx file or does everything have to be made into a byte array in a header file. Otherwise I'll probably just have a data folder that has to be put next to the 3dsx file on the sd card.
 

YourNerdyJoe

Active Member
Newcomer
Joined
Jul 18, 2014
Messages
41
Trophies
0
Age
26
Website
yournerdyjoe.github.io
XP
179
Country
United States
Still cant manage to find an efficient way to render stuff like sprites and such to screen. The GPU code seems very messy right now for anything graphical like that to be done.
Also is there a way yet to have internal file systems for the 3dsx file or does everything have to be made into a byte array in a header file. Otherwise I'll probably just have a data folder that has to be put next to the 3dsx file on the sd card.

Someone over at 4dsdev.org said you could append a zip to the 3dsx file
Code:
copy /B program.3dsx + files.zip programwithzip.3dsx
I haven't tried this so I'm not sure how you would access this in code (maybe there's something like __rom_end__ or use fs?).
Otherwise you could use gbfs and compile it with your program.
 
  • Like
Reactions: filfat

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,724
Trophies
2
XP
8,500
Country
Tuvalu
Hope this help's someone, it creates Launcher.dat files what works perfectly with ROP GO Loader.
http://pastebin.com/szJp5dR6

now i can dump my launcher.dat files from my 9.x 3ds without downgrading :D
thank you (i hope)

-edit. with some little changes i got the code to compile on osx
here is a mac version if anyone is interested, it works for me on yosemite. (not tested the output though)


Compiled .s files

so i give this all my compiled .s files? the project i have has .c files too.
so this will not work for me?
 

Attachments

  • gateway_3.0_launcher_creator.zip
    1.5 KB · Views: 215

filfat

CTO @ Nordcom Group Inc.
Member
Joined
Nov 24, 2012
Messages
1,261
Trophies
1
Location
Gothenburg, Sweden
Website
www.sweetsideofsweden.com
XP
1,749
Country
Sweden
Someone over at 4dsdev.org said you could append a zip to the 3dsx file
Code:
copy /B program.3dsx + files.zip programwithzip.3dsx
I haven't tried this so I'm not sure how you would access this in code (maybe there's something like __rom_end__ or use fs?).
Otherwise you could use gbfs and compile it with your program.

this would be a way better way to distribute appdata ;)
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
Guys do you know if there's a Power Off related function inside libctru? I mean, a function that when called, turns off the 3ds, just like if i hold down the power button for 3 seconds...


Not in libctru, but I saw on 3DBrew that the 3DS can be shut down if you write a value of 8 to one of the I2C registers on device 3.

http://3dbrew.org/wiki/I2C_Registers#Device_3

http://3dbrew.org/wiki/I2C_Services

I'm really new to 3DS programming, so I wouldn't have a clue how you'd talk to the MCU service though. *Begins digging, out of curiosity.*
 
  • Like
Reactions: AlbertoSONIC

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    ButterScott101 @ ButterScott101: +1