Homebrew Development

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

  1. Kane49

    Kane49 GBAtemp Fan

    Member
    3
    Nov 4, 2013
    Gambia, The

    Has anyone tried using this ?

    Once it gets to a chain of instance method calls within the third call it crashes somewhere and i found it very hard to debug :/

    Only if you supply a valid lowpath though, if you don't it returns an error as it should :)
     
  2. Bond697

    Bond697 Dies, died, will die.

    Member
    4
    Jun 7, 2009
    United States
    CT
    those are identical to the ones we used. they should just work whether you use them in assembly or C/C++. they did on mine on 4.1, slash's on 4.5, and a third 3ds on 4.4. and by just work, i mean literally this:

    ADR R0, payload
    BL FileOpen
    LDR R1, =PAYLOAD_START
    LDR R2, =PAYLOAD_SIZE
    BL FileRead

    is all you need to use them. what does your code look like?
     
  3. Kane49

    Kane49 GBAtemp Fan

    Member
    3
    Nov 4, 2013
    Gambia, The

    Ive simplified it to this:

    http://pastebin.com/Rb2tUFkW

    main just flashes a few colors but it never gets there :/
    The commented BLX is where it crashes (somewhere deep within calling some instance methods)
     
  4. st4rk

    st4rk nah

    Member
    6
    Feb 11, 2014
    Brazil

    Try without 0x7B
     
  5. Bond697

    Bond697 Dies, died, will die.

    Member
    4
    Jun 7, 2009
    United States
    CT
    you can't use it with svc 7b. we actually have a whole separate set of file io stuff for running in supervisor mode.

    wrong.
     
  6. Kane49

    Kane49 GBAtemp Fan

    Member
    3
    Nov 4, 2013
    Gambia, The

    As far as i understand it SVC 0x7B should only run the code at the address i pass it and then return to usermode, maybe im wrong here though.
     
  7. Bond697

    Bond697 Dies, died, will die.

    Member
    4
    Jun 7, 2009
    United States
    CT
    lol, i misread, you're right. yeah, there doesn't seem to be anything in particular wrong with that. try opening the file then calling 7b. not that that should make much of a difference.
     
  8. Akdul

    Akdul GBAtemp Regular

    Member
    5
    Nov 17, 2006
    Mexico
    Mexico City
    Finally got the time to work on a new version of Jezzball3DS :)

    v0.2 changelog:
    • Added stylus and circle pad controls
    • Added highscore saving to SD card
    • Added touch screen keyboard for player name input
    Download v0.2 here.

    I'd like to thank you YourNerdyJoe, your code has helped me a great deal. The game still needs it's banner, when I get the time I am going to install a linux vm as per your suggestion.

    Next things to do are better graphics and uploading of highscores to the Internet (if possible).
     
    YourNerdyJoe, hippy dave and st4rk like this.
  9. Normmatt

    Normmatt Former AKAIO Programmer

    Member
    7
    Dec 14, 2004
    New Zealand

    Thats because your using the svc stack.... I found if I didn't manually set the SP in before using it in the 0x7B code it seemed to hang most of the time. The ARM9 acts drunk via the public exploit a lot of the time so be aware code that "should" work possibly wont :P
     
  10. Bond697

    Bond697 Dies, died, will die.

    Member
    4
    Jun 7, 2009
    United States
    CT
    oh, that's right. completely forgot about that.
     
  11. Slashmolder

    Slashmolder Advanced Member

    Newcomer
    2
    Jul 5, 2008
    United States
    Always a good idea to do
    MSR CPSR_c, #0xDF
    Then you're disabling interrupts and switching to system mode which shares registers with usermode.
    If you're planning on returning to usermode it's probably a good idea to save the CPSR in a register before doing this.

    I've had a lot of issues trying to use the IO functions after returning from 0x7B. It got to the point where I just ripped the assembly from Gateway's payload for their IO functions and just use that in any code that I plan on entering SVC mode with. A lot of stability can be gained by disabling the MPU but then you're going to be a lot slower because then the caches are also disabled.
     
  12. Kane49

    Kane49 GBAtemp Fan

    Member
    3
    Nov 4, 2013
    Gambia, The
    Thanks guys its working now http://pastebin.com/BH6mixyL :)
    Should probably find a better place for the stack though ^^

    Anyone trying this remember to use 2 byte wchars as your environment could be using 4 byte wchars
     
  13. Normmatt

    Normmatt Former AKAIO Programmer

    Member
    7
    Dec 14, 2004
    New Zealand

    Why the fuck are you even changing sp in gain_control when you aren't actually using said new stack at all?
     
  14. Kane49

    Kane49 GBAtemp Fan

    Member
    3
    Nov 4, 2013
    Gambia, The

    Its a remnant from my codebase which set the stack of every mode explicitly ^^
     
  15. YourNerdyJoe

    YourNerdyJoe Member

    Newcomer
    2
    Jul 18, 2014
    United States
    Great job, man. Fun Game!
    How did you get the keyboard to work?
    It looked like the built in ds keyboard so I was wondering if were using that or if was a custom keyboard.
     
    Akdul likes this.
  16. Akdul

    Akdul GBAtemp Regular

    Member
    5
    Nov 17, 2006
    Mexico
    Mexico City

    Thanks!. The keyboard is just an image of the actual built in 3ds keyboard. I wanted to simulate the entire keyboard (animations, keys, etc.) but I could only find an image of the keyboard with lowercase characters, so for this version you can only input lowercase characters (the shift and change-case keys do not work). I plan to improve it in the next version.
     
    mercluke and YourNerdyJoe like this.
  17. klim28

    klim28 Hunter4Life

    Member
    3
    Jul 24, 2010
    LocLac village...
    Wow homebrew :) Tried PlayCoin Setter and the Nes Emulator thing. I hope they make a 3D video player like moonshell on the DS that doesn't cut vids in 10-minute durations. That would be awesome :)
     
  18. masterpad

    masterpad Advanced Member

    Newcomer
    2
    Aug 26, 2008
    Cameroon
  19. Xexyz

    Xexyz GBATemp's™ Official Xexyz

    Member
    5
    Jul 29, 2013
    United States
    沖縄県
    Wow. This stuff makes me regret upgrading. Haha
     
  20. Yeniaul

    Yeniaul Advanced Member

    Newcomer
    2
    Apr 24, 2013
    United States
Loading...