1. st4rk

    st4rk nah
    Member

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    Brazil
  2. intermet

    intermet GBAtemp Regular
    Member

    Joined:
    Jul 19, 2012
    Messages:
    152
    Country:
    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

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    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

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    Brazil
    Someone tried a way to list all files in folder with ctrulib ?
     
  5. intermet

    intermet GBAtemp Regular
    Member

    Joined:
    Jul 19, 2012
    Messages:
    152
    Country:
    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

    Joined:
    Feb 13, 2014
    Messages:
    90
    Country:
    awesome :wacko:
     
  7. st4rk

    st4rk nah
    Member

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    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

    Joined:
    Jul 19, 2012
    Messages:
    152
    Country:
    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

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    Brazil

    I use ARM9 code, try it.
     
  10. zecoxao

    zecoxao GBAtemp Fan
    Member

    Joined:
    Dec 25, 2013
    Messages:
    354
    Country:
    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 Show
  12. Bond697

    Bond697 Dies, died, will die.
    Member

    Joined:
    Jun 7, 2009
    Messages:
    353
    Country:
    United States
    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

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    Brazil

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

    smealum growing up sucks.
    Member

    Joined:
    May 1, 2006
    Messages:
    635
    Country:
    United States
    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

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    Brazil

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

    Kane49 GBAtemp Fan
    Member

    Joined:
    Nov 4, 2013
    Messages:
    450
    Country:
    Gambia, The

    but why XD ?
     
  17. st4rk

    st4rk nah
    Member

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    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
    Former Staff

    Joined:
    Oct 27, 2002
    Messages:
    23,147
    Country:
    France
    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

    Joined:
    Feb 11, 2014
    Messages:
    545
    Country:
    Brazil

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

    ernilos GBAtemp Regular
    Member

    Joined:
    Aug 28, 2013
    Messages:
    152
    Country:
    United States
    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
    [​IMG]
    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

    Joined:
    Feb 13, 2014
    Messages:
    90
    Country:
    Can u upload also binary files?
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Development, Homebrew,