Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,474,985
  • Replies Replies 6,048
  • Likes Likes 54
I was bored a bit yesterday and i came across the following two pasties, someone apparently thought it was sufficient to not make these private :P

http://pastebin.com/hfpXrAhY

Obviously i saved them into a new pastie before they could be taken down :)


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 :)
 
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?
 
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?


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

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.
 
you can't use it with svc 7b. we actually have a whole separate set of file io stuff for running in supervisor mode.


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.
 
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.

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


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
 
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.
 
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


Why the fuck are you even changing sp in gain_control when you aren't actually using said new stack at all?
 
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).

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.
 
  • Like
Reactions: Akdul
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.


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.
 
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 :)
 

Site & Scene News

Popular threads in this forum