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

  • Thread starter Deleted User
  • Start date
  • Views 7,205
  • 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,339
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
267
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
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://www.acepcs.com/products/wizbox-g-mini-pc-amd-r7-7735hs lol wizbox +1