Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,172
  • Replies Replies 6,048
  • Likes Likes 54
Cool, also I added you on Skype if you want to chat right now to try to get screen saving to SD card. I think the code I posted in your thread should be almost right, but I don't currently have a 3DS to test it out on. D:

Maybe tomorrow.. You're US based, right? It's 21:53 here in 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..
 
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 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.
 
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/
 
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
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?
 
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).
 
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.
 
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! :)
 
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 . . .
 
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
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'
 
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