Homebrew Development

Discussion in '3DS - Homebrew Development and Emulators' started by aliak11, Jan 16, 2014.

  1. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil
  2. intermet

    intermet GBAtemp Regular

    Member
    2
    Jul 19, 2012
    France
    WORD w;
    FRESULT res;
    FATFS fs;
    pf_mount(&fs);
    res=pf_open("file");
    res=pf_write("z",1,&w);
    res = pf_write(0,0,&w);

    I get a grey screen with this code but it seems to run if a comment the last line (but of course the data wont be writed).
    Why?
    Thank you ! :lol:
     
  3. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil
    Have a lot of problem with fatFS, you will need edit the "ffconf.h" to use f_write, after it, a good sample how use f_write:
    Code:
            FATFS FatFs;
    FIL fil;
    DIR dir;
    FRESULT fr;
            UINT br = 5;
            u32 br_abs = 0;
            u32 cont = 0;
     
     
            p("Mount");
            fr = f_mount(&FatFs, "", 0);
    ps((u32)fr);
     
     
    p("File Open");
    fr = f_open(&fil, "DUMP.BIN", FA_CREATE_ALWAYS | FA_WRITE);
    ps((u32)fr);
    UINT bw;
    p("LALALA DUMP");
     
     
    for(;;){
    print_u32(cont, 250, 100, 0xFF,0x0,0xFF);
    fr = f_write(&fil,  ((unsigned char*)0x0LALALA000000 + cont), 0x00100000, &bw);
     
            }
    
     
  4. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil
    Someone tried a way to list all files in folder with ctrulib ?
     
  5. intermet

    intermet GBAtemp Regular

    Member
    2
    Jul 19, 2012
    France
    I tested this code :

    FATFS fs;
    FIL fil;
    FRESULT res;

    res=f_mount(&fs,"",0);
    p("Mounted");
    res =f_open(&fil,"file",FA_CREATE_ALWAYS);
    p("Opened");

    but it freeze at res =f_open(&fil,"file",FA_CREATE_ALWAYS);
     
  6. jocopoco

    jocopoco Advanced Member

    Newcomer
    1
    Feb 13, 2014
    awesome :wacko:
     
  7. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil

    f_open(&fil,"file",FA_CREATE_ALWAYS)

    Change
    f_open(&fil,"file",FA_CREATE_ALWAYS | FA_WRITE);

    Try now.


    smealum

    can you explain more how the Audio work ? Thanks.
     
  8. intermet

    intermet GBAtemp Regular

    Member
    2
    Jul 19, 2012
    France
    it freeze too, perhaps because i use run the code in arm11 ( compiled with s0.dat etc ) ?

    thanks for your help
     
  9. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil

    I use ARM9 code, try it.
     
  10. zecoxao

    zecoxao GBAtemp Fan

    Member
    7
    Dec 25, 2013
    off topic here, but nice set of dumps you posted on twitter a couple of hours ago :) looks like really cool shit :D
     
  11. st4rk
    This message by st4rk has been removed from public view by Cyan, Jul 10, 2014, Reason: posting illegal files.
    Jul 10, 2014
  12. Bond697

    Bond697 Dies, died, will die.

    Member
    4
    Jun 7, 2009
    United States
    CT
    wow, i told you what arm9 functions to use to open, read, and write files, the exact arguments for all 3 functions, how to get access to the memory you want to dump, how to make other areas available to yourself, what exactly to do with all of them, i even spent time answering ridiculous question after ridiculous question because you didn't know what to do even after being handed literally everything, and this is what you do with it? try to get yourself some attention by posting (illegal, by the way) stuff that's been posted before here and on twitter? what a damn waste.
     
  13. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil

    i use fatFS not your Process9 fopen/fread/fwrite.
     
  14. smealum

    smealum growing up sucks.

    Member
    11
    May 1, 2006
    United States
    SF
    as you should be able to tell from my link, that code was written by yellows8, not me. I have never used any of these commands so he should definitely be the one you ask for help

    this should help : https://gist.github.com/smealum/249b0e5598409f78b5eb
    it's part of the source of a very old/crappy/buggy ftp server i wrote for ctrulib. no guarantee it'll compile on latest version, but it should show how to use FSUSER_OpenDirectory as that hasn't changed. and as a bonus there's some SOC code in there too.
     
    mercluke and st4rk like this.
  15. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil

    Very nice, i will see it, i need to complete my little 3DNES :P
     
  16. Kane49

    Kane49 GBAtemp Fan

    Member
    3
    Nov 4, 2013
    Gambia, The

    but why XD ?
     
  17. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil
    always freeze on the last bx on fopen, i use with backdoor and without backdoor, never work, so i tried use fatFS and work fine.

    Cyan
    So, why you don't delete other post with dumps too ?
     
  18. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    I probably missed them. If I find them I'll do the same.
    if you tell me the post number, I'll do it too.

    users have to dump their own files.
     
    st4rk likes this.
  19. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil

    I understand, no problem, thank you and sorry for post the dump.
     
  20. ernilos

    ernilos GBAtemp Regular

    Member
    3
    Aug 28, 2013
    United States
    CAT
    Loooong time I didn't played with 3DS, I done a little 3DS file explorer (thank's to smea gist)

    Control's:
    -Key Up & key down move current menu position
    -A Handle different event if its an directory, file or just is trying to go back
    -B It goes to the previous path
    Warning: Spoilers inside!
    I post the source code for if someone is interested on it:
    https://mega.co.nz/#!tR1XhZwL!FHVm6TPD_Y39CM5epoAWEb0kXc_TrxPUuqHxnooVO0k
    It would be cool list first directorys and after sort files by name but I'm too lazy for search/done algorythms xD
     
  21. jocopoco

    jocopoco Advanced Member

    Newcomer
    1
    Feb 13, 2014
    Can u upload also binary files?
     
Loading...