Homebrew Planning to learn how to code for 3DS homebrew. What do I need to know, guys?

  • Thread starter Deleted User
  • Start date
  • Views 6,390
  • Replies 72

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,324
Country
United States
D

Deleted User

Guest
OP
Reset environment variables.
Project seems to be building fine.
Linking example.elf...

Couldn't open SMDH.
Error.

What gives?

Never mind. Got it working now.

.
 
Last edited by ,
D

Deleted User

Guest
OP
Hey, does anyone know where I can find a 3D example (one that uses two pictures merged together)?
 
Last edited by ,
D

Deleted User

Guest
OP
Also, can someone send me an example of how to change an image by pressing a button?

Thanks in advance!
 
D

Deleted User

Guest
OP
Code:
hidScanInput();
u32 kDown = hidKeysDown();
if (kDown & KEY_A){
// Load image 1
} else {
// Load image 2
}
Thanks, but how do I load the picture, and how do I render it to appear on screen when I press the A button? Example download?
 
D

Deleted User

Guest
OP
There you have the example, to compile it you need to have sf2dlib and sfillib installed
Sorry I took so long to respond; My computer fatal errored and I was stuck waiting for half an hour!
Do you have them pre-built for me? I'm having trouble compiling both projects.
Thanks
 
D

Deleted User

Guest
OP
What errors are you having?
I'm not compiling the actual project. I'm trying to build the sf2dlib and that other one...
It just returns this error:

> "make"
shader.vsh
make[1]: nihstro-assemble: Command not found
make[1]: *** [shader.vsh.o] Error 127
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:02

All I need though is these built libs. Could you attach them for me, please?
 
D

Deleted User

Guest
OP
You need to get nihistro from here http://4dsdev.org/thread.php?pid=342#342 and put the exe's in /devkitPro/devkitARM/bin and you should be fine to compile.
got nihistro; this happened...

> "make"
shader.vsh
sf2d.c
arm-none-eabi-gcc -MMD -MP -MF /c/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/build/sf2d.d -g -Wall -O2 -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/c/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/include -I/c/devkitPro/libctru/include -I/c/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/build -DARM11 -D_3DS -c /c/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c -o sf2d.o
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:36:8: error: unknown type name 'aptHookCookie'
static aptHookCookie apt_hook_cookie;
^
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c: In function 'sf2d_init_advanced':
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:79:2: warning: implicit declaration of function 'aptHook' [-Wimplicit-function-declaration]
aptHook(&apt_hook_cookie, apt_hook_func, NULL);
^
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c: In function 'sf2d_fini':
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:104:2: warning: implicit declaration of function 'aptUnhook' [-Wimplicit-function-declaration]
aptUnhook(&apt_hook_cookie);
^
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c: In function 'sf2d_start_frame':
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:154:19: error: 'GPU_STENCIL_KEEP' undeclared (first use in this function)
GPU_SetStencilOp(GPU_STENCIL_KEEP, GPU_STENCIL_KEEP, GPU_STENCIL_KEEP);
^
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:154:19: note: each undeclared identifier is reported only once for each function it appears in
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c: In function 'apt_hook_func':
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:284:14: error: 'APTHOOK_ONRESTORE' undeclared (first use in this function)
if (hook == APTHOOK_ONRESTORE) {
^
make[1]: *** [sf2d.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:10
 

Garcia98

Hey! Listen!
Member
Joined
Sep 8, 2015
Messages
361
Trophies
0
Location
Salamanca
Website
github.com
XP
257
Country
got nihistro; this happened...

> "make"
shader.vsh
sf2d.c
arm-none-eabi-gcc -MMD -MP -MF /c/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/build/sf2d.d -g -Wall -O2 -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/c/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/include -I/c/devkitPro/libctru/include -I/c/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/build -DARM11 -D_3DS -c /c/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c -o sf2d.o
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:36:8: error: unknown type name 'aptHookCookie'
static aptHookCookie apt_hook_cookie;
^
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c: In function 'sf2d_init_advanced':
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:79:2: warning: implicit declaration of function 'aptHook' [-Wimplicit-function-declaration]
aptHook(&apt_hook_cookie, apt_hook_func, NULL);
^
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c: In function 'sf2d_fini':
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:104:2: warning: implicit declaration of function 'aptUnhook' [-Wimplicit-function-declaration]
aptUnhook(&apt_hook_cookie);
^
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c: In function 'sf2d_start_frame':
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:154:19: error: 'GPU_STENCIL_KEEP' undeclared (first use in this function)
GPU_SetStencilOp(GPU_STENCIL_KEEP, GPU_STENCIL_KEEP, GPU_STENCIL_KEEP);
^
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:154:19: note: each undeclared identifier is reported only once for each function it appears in
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c: In function 'apt_hook_func':
c:/Users/User/Downloads/CTR_HB/sf2dlib-master/sf2dlib-master/libsf2d/source/sf2d.c:284:14: error: 'APTHOOK_ONRESTORE' undeclared (first use in this function)
if (hook == APTHOOK_ONRESTORE) {
^
make[1]: *** [sf2d.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:10

Update your ctrulib
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • JuanMena @ JuanMena:
    Will you give me mouth to mouth oxygen if my throat closes?
  • K3N1 @ K3N1:
    Nah the air can do that
  • K3N1 @ K3N1:
    Ask @x65943 he's trained for that stuff
  • JuanMena @ JuanMena:
    Kissing random dudes choking in celery? Really? Need to study for that?
  • K3N1 @ K3N1:
    Yes it requires a degree
  • K3N1 @ K3N1:
    I could also yank out the rest of my teeth but theirs professionals for that
  • x65943 @ x65943:
    If your throat closes, putting oxygen in your mouth will not solve anything - as you will be introducing oxygen prior to the area of obstruction
  • JuanMena @ JuanMena:
    Just kiss me Kyle.
  • x65943 @ x65943:
    You either need to be intubated to bypass obstruction or create a stoma inferior to the the area of obstruction to survive
  • x65943 @ x65943:
    "Just kiss me Kyle." And I thought all the godreborn gay stuff was a smear campaign
  • JuanMena @ JuanMena:
    If I die, tell my momma I won't be carrying Baby Jesus this christmas :sad::cry:
  • K3N1 @ K3N1:
    Smear campaigns are in The political section now?
  • JuanMena @ JuanMena:
    Chary! Chary! Chary, Chary, Chary!
  • Sonic Angel Knight @ Sonic Angel Knight:
    Pork Provolone :P
  • Psionic Roshambo @ Psionic Roshambo:
    Sounds yummy
  • K3N1 @ K3N1:
    Sweet found my Wii u PSU right after I ordered a new one :tpi:
  • JuanMena @ JuanMena:
    It was waiting for you to order another one.
    Seems like, your PSU was waiting for a partner.
  • JuanMena @ JuanMena:
    Keep them both
    separated or you'll have more PSUs each year.
  • K3N1 @ K3N1:
    Well one you insert one PSU into the other one you get power
  • JuanMena @ JuanMena:
    It literally turns it on.
  • K3N1 @ K3N1:
    Yeah power supplies are filthy perverts
  • K3N1 @ K3N1:
    @Psionic Roshambo has a new friend
    +1
  • JuanMena @ JuanMena:
    It's Kyle, the guy that went to school to be a Certified man Kisser.
  • Psionic Roshambo @ Psionic Roshambo:
    Cartmans hand has taco flavored kisses
  • A @ abraarukuk:
    hi guys
    A @ abraarukuk: hi guys