Homebrew Toolbox and tutorial: How to use Ninjhax and make your own homebrews

  • Thread starter xem
  • Start date
  • Views 30,726
  • Replies 90
  • Likes 14

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
Maybe you can add this picture on the same page :
axes10.png
 
  • Like
Reactions: MrElephant

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
It just means that when your program reads user input on the touch screen, the coordinates of the "touch" are not rotated, but when you draw things on the screen, unfortunately the axis are rotated on the left.
 

Sparks43

Well-Known Member
Newcomer
Joined
Jan 1, 2014
Messages
77
Trophies
0
XP
150
Country
make didn't like it for whatever reason when I used #include <functions.h> (and had the functions c file in the source folder along with main) so I just copied and pasted all the functions to the top of my code and that worked just fine. I know I'm doing something wrong but whatever. What would be the command to clear the screen? Because right now I've got a trail thing happening. There's also a weird flickering effect going on if you look closely.

Edit added .zip

Could it be that you have only programmed certain inputs to clear buffers

i have the same issue but when i press right it clears when i press left it trails

Going to try defining inputs over the next few days

Really enjoying this
 

jamieyello

Professional Dumbass
Member
Joined
Mar 11, 2013
Messages
385
Trophies
0
XP
556
Country
United States
Hey xem i wrote a little batch file that goes in the project directory that runs the make clean and make command in cmd for you so copying files to WinSCP (or a different networking program) is more streamlined.

START cmd.exe /k "make clean & make & exit 0"

Trying to get it to actually send the file over to WinSCP after saving it in Notepad++ (or not since saving it first might be intrusive and confusing) for you so it only takes one click to compile and move stuff over. I'm not very good at this, my first attempt sent cmd into an infinite loop and corrupted cmd entirely lol. I fixed that though. I thought you might want to add something like that to the template just to make things easier. (heads up, don't rename it "make.bat" unless you want infinite loops o_o)



I fixed it by having a second sprite as a background behind the other, I know there's a better way but that works for me now.
 

Attachments

  • mke.zip
    277 bytes · Views: 133

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
Hey xem i wrote a little batch file that goes in the project directory that runs the make clean and make command in cmd for you so copying files to WinSCP (or a different networking program) is more streamlined.

Hey, that's great! Ideally, we'd have a little windows executable (.exe / .bat) doing the make, the clean and maybe the ftp upload.

Let's discuss this on this thread: https://gbatemp.net/threads/how-to-test-quickly-a-hb-build-on-the-3ds.375327/#post-5189468
 

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
I looked at the hbmenu code and the Y netcat part wasn't added until after the original release. I compiled the latest hbmenu from github and your instructions worked fine.
You may want to add that if anyone wants to use this feature they'll need to compile the latest hbmenu.

Thanks for your work on this guide.

Hello,
I just tried using netcat for windows but it didn't work as expected.
I started hbmenu, pressed Y, saw the netcat screen, I launched the netcat executable, typed "cat C:\3DS\path\of\my\hb.3dsx | nc 192.168.0.11 9000", and when I pressed enter the netcat dialog box just closed, and nothing happened on the 3DS.
Did I do something wrong? (besides using windows of course ^^)
Thanks!
 

Zanoab

Well-Known Member
Member
Joined
Dec 4, 2009
Messages
127
Trophies
1
XP
617
Country
United States
Hello,
I just tried using netcat for windows but it didn't work as expected.
I started hbmenu, pressed Y, saw the netcat screen, I launched the netcat executable, typed "cat C:\3DS\path\of\my\hb.3dsx | nc 192.168.0.11 9000", and when I pressed enter the netcat dialog box just closed, and nothing happened on the 3DS.
Did I do something wrong? (besides using windows of course ^^)
Thanks!


Using Window is the problem, those are UNIX commands so it only works on Linux and Macs. You can change 'cat' to 'type' but you need to find netcat for Windows. It would probably be easier to write a quick python script to do the job.
 

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
Using Window is the problem, those are UNIX commands so it only works on Linux and Macs. You can change 'cat' to 'type' but you need to find netcat for Windows. It would probably be easier to write a quick python script to do the job.

Re, I finally managed to do it.

- Download netcat for windows (take the version "without -e" if your antivirus yells), place nc.exe in your project's folder
- Open a command line interface in that folder (shift+right click > open a CLI here)
- Launch hbmenu, press y, note the ip and the port (for example 192.168.0.11, 9000)
- Note the name of your 3dsx file (ex: name.3dsx)
- Type this in the CLI: "cat name.3dsx | nc 192.168.0.11 9000", press enter.
- The HB starts on the 3DS!
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
so the website and links with "netcat without -e" is legit?
I'm always suspicious at downloading executables from random websites I just googled.
There are a lot of website providing different versions of netcat.
Edit: I see sources are provided.

I tried to use SendElf in TCP mode but it froze hbmenu right away.

If someone has a python script to send homebrew over TCP, that would be great. something like Wiiload :)
Associate .3dsx to be launched by that program, and just double click it to send to hbmenu.

Xem,
you could probably do
cat "%1" | nc 192.168.0.11 9000

and associate all .3dsx to that bat file.
 

Zanoab

Well-Known Member
Member
Joined
Dec 4, 2009
Messages
127
Trophies
1
XP
617
Country
United States
I have this strange problem. The netloader in the hbmenu I built won't work anymore and instantly give error -22 when I connect to it. Any ideas what the problem could be?

In the meantime, I have a python 2.x script for sending homebrew at: https://pastebin.com/ASW3Ly9i

hbsender.py <file> <address> [port]

Anybody with python 3.x can try it but I can't guarantee it'll work. It provides simple feedback including file name, size, and updates the progress in real-time. The port doesn't need to be provided if you didn't change the default from port 9000. It loads the entire file before sending and if anybody has a problem with that, you can make it buffer in pieces by changing 'bSize' in the script. You can also make a small edit to add your 3ds ip address (and filename too) by default if you want.

Let me know what you think or if you want to help with my problem.
 

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
so the website and links with "netcat without -e" is legit?
I'm always suspicious at downloading executables from random websites I just googled.
There are a lot of website providing different versions of netcat.
Edit: I see sources are provided.

I tried to use SendElf in TCP mode but it froze hbmenu right away.

If someone has a python script to send homebrew over TCP, that would be great. something like Wiiload :)
Associate .3dsx to be launched by that program, and just double click it to send to hbmenu.

Xem,
you could probably do
cat "%1" | nc 192.168.0.11 9000

and associate all .3dsx to that bat file.

Thanks!
Yeah, netcat for windows seems legit. at least, it does the job.
The bat file works fine too. However I don't associate my 3dsx files with it, I prefer drag & dropping files onto the .bat to send them on the 3DS
 

jamieyello

Professional Dumbass
Member
Joined
Mar 11, 2013
Messages
385
Trophies
0
XP
556
Country
United States
Maybe it'd be a good idea to translate the coordinates in sprite drawing functionss1 EDIT <-- well that was a leftover post from a while ago
anyone know the best way to learn C for a beginner? Unfortunately my school doesn't offer any classes in it. :(
http://www.youtube.com/playlist?list=PL2DD6A625AD033D36

I recommend this. The guy is really easy to follow and has videos for pretty much every language. He also replies to pretty much every comment. Much respect.
 
  • Like
Reactions: endoverend

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
thanks to the person who made this thread sticky. The project is not dead, and more programming chapters are coming soon!
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
I did :P
I'm still moving threads to be on their correct sections.
I thought your thread would be good stickied, it contains tutorial to start homebrew development.

The current "homebrew development" thread contains a lot of old information, the first post is not really helpful for the current situation (only some links to ROP homebrew info).
If someone can make a good "first post" for that thread, I'll update it. or a new thread, but it's too bad to lose the current one which has good informations and everyone know. It's already the "place to go" to ask questions to devs.
 
  • Like
Reactions: SLiV3R and tortoise

CalebW

Fellow Temper
Member
Joined
Jun 29, 2012
Messages
638
Trophies
0
Location
Texas
XP
545
Country
United States
thanks to the person who made this thread sticky. The project is not dead, and more programming chapters are coming soon!
Great, could you also explain what all of the functions of libctru provides does and perhaps list examples? Documentation is very scarce...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Metoroid0 @ Metoroid0: im more interested in metroid prime 4