Hacking 3DS Homebrew Attempts

  • Thread starter Thread starter BuGgErHAX
  • Start date Start date
  • Views Views 25,334
  • Replies Replies 170
  • Likes Likes 1
Status
Not open for further replies.
Guys! Look! I've managed to get Android 4.2.2 Jelly Bean to run on my 3DS!!! I'm liek 73h most Ub3r 1337 3DS h4x0r l0l0l0l0l!!! 1337 1337!!!

5b9jJfh.jpg
 
well she did.

She included stdio.h library
she used printf, without stdio the small program could've failed.

last, C++ relies on objects, she used \n to skip lines, aand returned 0;

to keep the compiler happy you must return 0 always (end of function on the processor's thread, so program terminates)
Who's "she"?
 
well you're wrong

If you compile that on a C++ environment, and you don't include

Code:
extern "C" {
#include "foo.h"
}

compiler takes for granted, that printf exists on the default system library header file. C++ re-using similar (by names) functions must be summoned, as shown above, so it runs directly from the C debugger (a.k.a C mode).

except, because it's now a C++ function, debugger appends garbage string data at the end of the binary blob at compile time. So the compiler is aware that function derives from C++.

printf's way to be called on C++
Code:
std::printf("I like std::!\n")

which is NOT how she used printf.
-

reference link

http://yosefk.com/c fqa/mixing.html#fqa-32.3

..


TL;DR version: she used C, not C++


Disregarding all the "theory", I just compiled the original code with a C++ compiler and it did indeed ran with no issues.

buo9X7w.jpg


This proves that the original code *could* have been in C++.
 
Disregarding all the "theory", I just compiled the original code with a C++ compiler and it did indeed ran with no issues.

buo9X7w.jpg


This proves that the original code *could* have been in C++.

Why not just make a C/CPP/Programming thread?

My compiler is Bloodshed Dev-C++.
Naw, bro. GCC/G++/MinGW FTW
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum