So there is no homebrew that can download multiple files at this point?It's a common issue of httpc service, filfat reported this also on ctrulib repo if i'm not wrong.
So there is no homebrew that can download multiple files at this point?It's a common issue of httpc service, filfat reported this also on ctrulib repo if i'm not wrong.

So there is no homebrew that can download multiple files at this point?

That's pretty weird.
I was working on pictochat3DS, and wanted to use http requests to log in and receive new messages.
logging in was just "visiting a webpage" so i wrote a ping command which never stopped working.
But after a few times, receiving new messages doesn't work anymore.
I'm planning on doing that now.Why using httpc service and not socketing? ( http://3dbrew.org/wiki/Socket_Services )
#include "draw.h"
#include <3ds.h>
#include <stdio.h>
int main (int argc, char **argv) {
gfxInitDefault();
PrintConsole topScreen, bottomScreen;
consoleInit(GFX_TOP,&topScreen);
consoleInit(GFX_BOTTOM,&bottomScreen);
while (aptMainLoop()) {
u8* screenBottom=gfxGetFramebuffer(GFX_BOTTOM, GFX_BOTTOM, NULL, NULL);
hidScanInput();
touchPosition touch;
u32 kDown = hidKeysDown();
hidTouchRead(&touch);
if (kDown & KEY_A) break;
//u32 v=(240-1-touch.py+touch.px*240)*2;
consoleSelect(&topScreen);
printf("\x1b[0;0Hx: %03d",touch.px);
printf("\x1b[1;0Hy: %03d",touch.py);
printf("\x1b[2;0Hv: %06lu",v);
consoleSelect(&bottomScreen);
if (touch.px>0 && touch.py>0) {
drawPixel(screenBottom,touch.px,touch.py,0xFF563F6D);
}
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForVBlank();
}
gfxExit();
return 0;
}
#ifndef DRAW_H
#define DRAW_H
#include <3ds.h>
#include <stdio.h>
/*void drawPixel(u32 v, int r, int g, int b, u8* screen) {
screen[v]=b;
screen[v+1]=g;
screen[v+2]=r;
}*/
void drawPixel (u8* screen, int x, int y, u32 color) {
int idx=(((x)*240) + (239-(y)))*3;
printf("\x1b[0;0Hidx: %06d",idx);
*(u32*)&(screen[idx]) = (((color) & 0x00FFFFFF) | ((*(u32*)&(screen[idx])) & 0xFF000000));
}
#endif // DRAW_H

Yeah, showing my code isnt that bad, isnt it?
main.c
Code:#include "draw.h" #include <3ds.h> #include <stdio.h> int main (int argc, char **argv) { gfxInitDefault(); PrintConsole topScreen, bottomScreen; consoleInit(GFX_TOP,&topScreen); consoleInit(GFX_BOTTOM,&bottomScreen); while (aptMainLoop()) { u8* screenBottom=gfxGetFramebuffer(GFX_BOTTOM, GFX_BOTTOM, NULL, NULL); hidScanInput(); touchPosition touch; u32 kDown = hidKeysDown(); hidTouchRead(&touch); if (kDown & KEY_A) break; //u32 v=(240-1-touch.py+touch.px*240)*2; consoleSelect(&topScreen); printf("\x1b[0;0Hx: %03d",touch.px); printf("\x1b[1;0Hy: %03d",touch.py); printf("\x1b[2;0Hv: %06lu",v); consoleSelect(&bottomScreen); if (touch.px>0 && touch.py>0) { drawPixel(screenBottom,touch.px,touch.py,0xFF563F6D); } gfxFlushBuffers(); gfxSwapBuffers(); gspWaitForVBlank(); } gfxExit(); return 0; }
draw.h
Code:#ifndef DRAW_H #define DRAW_H #include <3ds.h> #include <stdio.h> /*void drawPixel(u32 v, int r, int g, int b, u8* screen) { screen[v]=b; screen[v+1]=g; screen[v+2]=r; }*/ void drawPixel (u8* screen, int x, int y, u32 color) { int idx=(((x)*240) + (239-(y)))*3; printf("\x1b[0;0Hidx: %06d",idx); *(u32*)&(screen[idx]) = (((color) & 0x00FFFFFF) | ((*(u32*)&(screen[idx])) & 0xFF000000)); } #endif // DRAW_H
And now you can hopefully see the error!
P.S: the drawPixel function is the same from Rinnegatamante, except the printf.


It's just as accurate, however as @Rinnegatamante said, it can be a lot harder drawing certain shapes.Hmm... I see what you mean. Only to draw some simple 2D forms using GPU isnt a good idea, because using the GPU is less accurate, right?
I begin to learn
But all in all, the first question is, why does the functions doesnt draw the pixel at the given values?

Hmm, my compiler says it can't find the cosf, sinf and tanf function.
I included the math.h and I read that these functions are only included in the C++ version of the math.h.
Why isnt that included in devkitARM or do I do things wrong?


I don't think so...Just wondering, Is there a way to shutdown/poweroff from homebrew (normal ninjhax homebrew, not arm9 stuff) at all?

Well that sucks.I don't think so...


hey guys.
Does anyone know if there is a way to get available memory in runtime ?
I'm building a C++ engine for my game and I would like to know how much memory it consumes and if there are any memory leaks.
@DiscostewSM
I started with the template that latest ctrulib has and they use gfxSwapBuffers there, so you may have found the right function to use.