Homebrew Homebrew Development

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Yeah that's correct. :D

I will try to work on it tonight and submit a pull request if I get it working. :)
Removing gfxFlushBuffers(); gives me a weird graphical glitch, so i think it's needed:
a791679859736eec8c4919715211e5f2.jpg


filfat I'm looking at your code..
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
filfat I found a thing. There's no trace of CTRULIB!!
Here's your draw.h:
Code:
#ifndef DRAW_H
#define DRAW_H
 
#define TOP_ASPECT_X 0x5
#define TOP_ASPECT_Y 0x3
#define TOP_HEIGHT 240
#define TOP_WIDTH 400
#define BOTTOM_HEIGHT 240
#define BOTTOM_WIDTH 320
 
#include <3ds/types.h>
#include <3ds/gfx.h>
 
void clearScreen(u8* screen,gfxScreen_t screenPos);
void drawPixel(int x, int y, char r, char g, char b, u8* screen);
void drawChar(char letter,int x,int y, char r, char g, char b, u8* screen);
void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfxScreen_t screenPos);
void drawLine( int x1, int y1, int x2, int y2, char r, char g, char b, u8* screen);
void drawRect( int x1, int y1, int x2, int y2, char r, char g, char b, u8* screen);
void drawFillRect( int x1, int y1, int x2, int y2, char r, char g, char b, u8* screen);
void drawCircle(int x, int y, int radius, char r, char g, char b, u8* screen);
void drawFillCircle(int x, int y, int radius, char r , char g, char b, u8* screen);
void drawCircleCircum(int xc, int yc, int x, int y, char r, char g, char b, u8* screen);
#endif

Where's 3ds/gfx.h? there isn't any "3ds" folder! It seems that many files are missing. I think you should start with downloading Relys template (Link) and copy libctru and resources folders directly to DownloadMii folder. Or i can do it if you want... :)
 

filfat

CTO @ Nordcom Group Inc.
Member
Joined
Nov 24, 2012
Messages
1,261
Trophies
1
Location
Gothenburg, Sweden
Website
www.sweetsideofsweden.com
XP
1,749
Country
Sweden
filfat I found a thing. There's no trace of CTRULIB!!
Here's your draw.h:
Code:
#ifndef DRAW_H
#define DRAW_H
 
#define TOP_ASPECT_X 0x5
#define TOP_ASPECT_Y 0x3
#define TOP_HEIGHT 240
#define TOP_WIDTH 400
#define BOTTOM_HEIGHT 240
#define BOTTOM_WIDTH 320
 
#include <3ds/types.h>
#include <3ds/gfx.h>
 
void clearScreen(u8* screen,gfxScreen_t screenPos);
void drawPixel(int x, int y, char r, char g, char b, u8* screen);
void drawChar(char letter,int x,int y, char r, char g, char b, u8* screen);
void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfxScreen_t screenPos);
void drawLine( int x1, int y1, int x2, int y2, char r, char g, char b, u8* screen);
void drawRect( int x1, int y1, int x2, int y2, char r, char g, char b, u8* screen);
void drawFillRect( int x1, int y1, int x2, int y2, char r, char g, char b, u8* screen);
void drawCircle(int x, int y, int radius, char r, char g, char b, u8* screen);
void drawFillCircle(int x, int y, int radius, char r , char g, char b, u8* screen);
void drawCircleCircum(int xc, int yc, int x, int y, char r, char g, char b, u8* screen);
#endif

Where's 3ds/gfx.h? there isn't any "3ds" folder! It seems that many files are missing. I think you should start with downloading Relys template (Link) and copy libctru and resources folders directly to DownloadMii folder. Or i can do it if you want... :)
Um that's C++ 101... <class.h> means that's its a available in all projects, "class.h" means it local.
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
filfat I found a thing. There's no trace of CTRULIB!!
Here's your draw.h:
Code:
[USER=62374]Relys[/USER] template ([URL='https://www.sendspace.com/file/o0l19n']Link[/URL]) and copy libctru and resources folders directly to DownloadMii folder. Or i can do it if you want... :)[/quote]

Heh, which reminds me. We should probably update to latest ctrulib from git lol XD

Oh, we need to update devkitARM too!

http://mtheall.com/~fincs/3dsdkA/
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Also, libctru shouldn't be local in every project! You define the path as a system environment variable. ;)

That's true. I defined it in both path and local way. Just to be sure! If it isn't the cause, idk which one could be. Everything seems fine, at least the code seems fine!

Relys I'm already using new DevKit ARM, but a CTRULIB update would be nice!
 
  • Like
Reactions: filfat

filfat

CTO @ Nordcom Group Inc.
Member
Joined
Nov 24, 2012
Messages
1,261
Trophies
1
Location
Gothenburg, Sweden
Website
www.sweetsideofsweden.com
XP
1,749
Country
Sweden
That's true. I defined it in both path and local way. Just to be sure! If it isn't the cause, idk which one could be. Everything seems fine, at least the code seems fine!

Relys I'm already using new DevKit ARM, but a CTRULIB update would be nice!
Maybe a newer ctrulib update breaks it?
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
I don't think so... But i need Relys 's template to be sure ;)


I updated and submitted a pull request. The only file I had to change was main.c since a few functions were depreciated. Let me know if it works (I can't test the app suspending functions right now).
 

m2300

Member
Newcomer
Joined
Oct 16, 2013
Messages
13
Trophies
0
Age
34
XP
81
Country
Saudi Arabia
anyway the unexpected thing is this : release is not going to be on the 22nd, NINJHAX will be released tonight, on the 20th !


That was smealum tweet just now.

the exploit will be released tonight.
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
anyway the unexpected thing is this : release is not going to be on the 22nd, NINJHAX will be released tonight, on the 20th !


That was smealum tweet just now.

the exploit will be released tonight.


Nice! :)
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
I updated and submitted a pull request. The only file I had to change was main.c since a few functions were depreciated. Let me know if it works (I can't test the app suspending functions right now).


Code:
3DS_Paint
draw.c
arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/Projects/3DS/3DS_Paint/build/draw.d
-g -Wall -O2 -mword-relocations -save-temps -fomit-frame-pointer -ffast-math -mf
loat-abi=softfp -march=armv6k -mtune=mpcore -I/c/devkitPro/Projects/3DS/3DS_Pain
t/include -IC:\devkitPro\libctru/include -I/c/devkitPro/Projects/3DS/3DS_Paint/b
uild -DARM11 -D_3DS -c /c/devkitPro/Projects/3DS/3DS_Paint/source/draw.c -o draw
.o
main.c
arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/Projects/3DS/3DS_Paint/build/main.d
-g -Wall -O2 -mword-relocations -save-temps -fomit-frame-pointer -ffast-math -mf
loat-abi=softfp -march=armv6k -mtune=mpcore -I/c/devkitPro/Projects/3DS/3DS_Pain
t/include -IC:\devkitPro\libctru/include -I/c/devkitPro/Projects/3DS/3DS_Paint/b
uild -DARM11 -D_3DS -c /c/devkitPro/Projects/3DS/3DS_Paint/source/main.c -o main
.o
c:/devkitPro/Projects/3DS/3DS_Paint/source/main.c: In function 'main':
c:/devkitPro/Projects/3DS/3DS_Paint/source/main.c:21:2: warning: implicit declar
ation of function 'aptMainLoop' [-Wimplicit-function-declaration]
  while(aptMainLoop()) //This is how they do main loop in examples.
  ^
program.c
arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/Projects/3DS/3DS_Paint/build/program
.d -g -Wall -O2 -mword-relocations -save-temps -fomit-frame-pointer -ffast-math
-mfloat-abi=softfp -march=armv6k -mtune=mpcore -I/c/devkitPro/Projects/3DS/3DS_P
aint/include -IC:\devkitPro\libctru/include -I/c/devkitPro/Projects/3DS/3DS_Pain
t/build -DARM11 -D_3DS -c /c/devkitPro/Projects/3DS/3DS_Paint/source/program.c -
o program.o
linking 3DS_Paint.elf
main.o: In function `main':
c:/devkitPro/Projects/3DS/3DS_Paint/source/main.c:21: undefined reference to `ap
tMainLoop'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/devkitPro/Projects/3DS/3DS_Paint/3DS_Paint.elf] Error 1
make: *** [build] Error 2
arm-none-eabi-strip: '3DS_Paint.elf': No such file
[NCCH ERROR] Failed to open elf file '3DS_Paint.elf'
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile
[NCCH ERROR] Failed to open elf file '3DS_Paint.elf'
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile
Premere un tasto per continuare . . .
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
Code:
3DS_Paint
draw.c
arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/Projects/3DS/3DS_Paint/build/draw.d
-g -Wall -O2 -mword-relocations -save-temps -fomit-frame-pointer -ffast-math -mf
loat-abi=softfp -march=armv6k -mtune=mpcore -I/c/devkitPro/Projects/3DS/3DS_Pain
t/include -IC:\devkitPro\libctru/include -I/c/devkitPro/Projects/3DS/3DS_Paint/b
uild -DARM11 -D_3DS -c /c/devkitPro/Projects/3DS/3DS_Paint/source/draw.c -o draw
.o
main.c
arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/Projects/3DS/3DS_Paint/build/main.d
-g -Wall -O2 -mword-relocations -save-temps -fomit-frame-pointer -ffast-math -mf
loat-abi=softfp -march=armv6k -mtune=mpcore -I/c/devkitPro/Projects/3DS/3DS_Pain
t/include -IC:\devkitPro\libctru/include -I/c/devkitPro/Projects/3DS/3DS_Paint/b
uild -DARM11 -D_3DS -c /c/devkitPro/Projects/3DS/3DS_Paint/source/main.c -o main
.o
c:/devkitPro/Projects/3DS/3DS_Paint/source/main.c: In function 'main':
c:/devkitPro/Projects/3DS/3DS_Paint/source/main.c:21:2: warning: implicit declar
ation of function 'aptMainLoop' [-Wimplicit-function-declaration]
  while(aptMainLoop()) //This is how they do main loop in examples.
  ^
program.c
arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/Projects/3DS/3DS_Paint/build/program
.d -g -Wall -O2 -mword-relocations -save-temps -fomit-frame-pointer -ffast-math
-mfloat-abi=softfp -march=armv6k -mtune=mpcore -I/c/devkitPro/Projects/3DS/3DS_P
aint/include -IC:\devkitPro\libctru/include -I/c/devkitPro/Projects/3DS/3DS_Pain
t/build -DARM11 -D_3DS -c /c/devkitPro/Projects/3DS/3DS_Paint/source/program.c -
o program.o
linking 3DS_Paint.elf
main.o: In function `main':
c:/devkitPro/Projects/3DS/3DS_Paint/source/main.c:21: undefined reference to `ap
tMainLoop'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/devkitPro/Projects/3DS/3DS_Paint/3DS_Paint.elf] Error 1
make: *** [build] Error 2
arm-none-eabi-strip: '3DS_Paint.elf': No such file
[NCCH ERROR] Failed to open elf file '3DS_Paint.elf'
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile
[NCCH ERROR] Failed to open elf file '3DS_Paint.elf'
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile
Premere un tasto per continuare . . .


Uhhh, you need to update libctru to wherever you specify it in your path environment variable. :P Also, you shouldn't merge pull requests until after you test them.
 
  • Like
Reactions: filfat

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Uhhh, you need to update libctru to wherever you specify it in your path environment variable. :P Also, you shouldn't merge pull requests until after you test them.

I made a backup ;)

I updated the libctru folder, still getting c:/devkitPro/Projects/3DS/3DS_Paint/source/main.c:21: undefined reference to `aptMainLoop'
 

minexew

ayy lmao
Member
Joined
Mar 16, 2013
Messages
228
Trophies
1
XP
295
Country
If 3dsxtool keeps giving me
Code:
191628 relSymAddr=001FA274 relSrcAddr=001D1E74 topAddr=001DF000
Relocation to invalid address!
does it mean my program is just too big or is it a bug in the toolchain?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.icecream.com/us/en/brands/drumstick/products/king-size-slurpee-cone