Homebrew Homebrew Development

Kane49

Well-Known Member
Member
Joined
Nov 4, 2013
Messages
446
Trophies
0
Age
36
XP
343
Country
Gambia, The
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 :)
 

Bond697

Dies, died, will die.
Member
Joined
Jun 7, 2009
Messages
350
Trophies
0
Age
39
Location
CT
XP
464
Country
United States
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?
 

Kane49

Well-Known Member
Member
Joined
Nov 4, 2013
Messages
446
Trophies
0
Age
36
XP
343
Country
Gambia, The
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)
 

Bond697

Dies, died, will die.
Member
Joined
Jun 7, 2009
Messages
350
Trophies
0
Age
39
Location
CT
XP
464
Country
United States
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.
 

Kane49

Well-Known Member
Member
Joined
Nov 4, 2013
Messages
446
Trophies
0
Age
36
XP
343
Country
Gambia, The
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.
 

Bond697

Dies, died, will die.
Member
Joined
Jun 7, 2009
Messages
350
Trophies
0
Age
39
Location
CT
XP
464
Country
United States
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.
 

Akdul

Well-Known Member
Member
Joined
Nov 17, 2006
Messages
145
Trophies
1
Location
Mexico City
Website
raulbojalil.com.mx
XP
909
Country
Mexico
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).
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,187
Country
New Zealand
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
 

Slashmolder

Well-Known Member
Newcomer
Joined
Jul 5, 2008
Messages
66
Trophies
0
XP
205
Country
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.
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,187
Country
New Zealand
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?
 

YourNerdyJoe

Active Member
Newcomer
Joined
Jul 18, 2014
Messages
41
Trophies
0
Age
26
Website
yournerdyjoe.github.io
XP
179
Country
United States
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

Akdul

Well-Known Member
Member
Joined
Nov 17, 2006
Messages
145
Trophies
1
Location
Mexico City
Website
raulbojalil.com.mx
XP
909
Country
Mexico
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.
 

klim28

Hunter4Life
Member
Joined
Jul 24, 2010
Messages
662
Trophies
0
Age
41
Location
LocLac village...
XP
362
Country
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    AncientBoi @ AncientBoi: 🫂 +1