Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,172
  • Replies Replies 6,048
  • Likes Likes 54
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.
 
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;
}
 
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.
 
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
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

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 ;)
 
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