Hi, I'm new to c++ as well as 3ds development, I set up a test Image to stay loaded on 3ds screen until forced exit. I get a 3ds exception. So my first question is why won't this run :
I would also like to know how to set up the gdp debugger for my 3ds(I'm working in VS Code)? I have the launch.json set up like this:
Is there a specific process I have to open while using the rosalina debugger? or am I not totally set up properly?
my .cpp
my .hpp
Code:
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iostream>
#include <3ds.h>
#include <citro3d.h>
#include <citro2d.h>
#include "main.hpp"
#include "intro.h"
C3D_RenderTarget* top, *bot;
static C2D_SpriteSheet introSheet;
static C2D_Image Img1;
int main(int argc, char **argv)
{
gfxInitDefault();
C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);
C2D_Init(C2D_DEFAULT_MAX_OBJECTS);
C2D_Prepare();
top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT);
bot = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT);
introSheet = C2D_SpriteSheetLoad("graphics:/gfx/intro.t3x");
if (!introSheet)
svcBreak(USERBREAK_PANIC);
u32 clrClear = C2D_Color32(0, 0, 0, 255);
Img1 = GetImage(introSheet, 0);
while (aptMainLoop())
{
hidScanInput();
u32 kDown = hidKeysDown();
if (kDown & KEY_START) break; // break in order to return to hbmenu
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
C2D_TargetClear(top, clrClear);
C2D_SceneBegin(top);
C2D_DrawImageAt(Img1, 20, 0, 0);
C3D_FrameEnd(0);
}
C2D_SpriteSheetFree(introSheet);
C2D_Fini();
C3D_Fini();
gfxExit();
return 0;
}
my .hpp
Code:
#include <iostream>
#include <3ds.h>
#include <citro3d.h>
#include <citro2d.h>
extern void DrawTexture(C2D_Image image, float x, float y, float rotation, C2D_ImageTint* tint, float scaleX, float scaleY);
extern void DrawTexture(C2D_Image image, float x, float y, float scaleX, float scaleY);
extern void DrawTexture(C2D_Image image, float x, float y);
#define TOP_SCREEN_WIDTH 400
#define BOTTOM_SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240
#define GetImage C2D_SpriteSheetGetImage
#define GetSprite C2D_SpriteFromSheet
#define SetCentreSpr C2D_SpriteSetCenter
#define SetPosSpr C2D_SpriteSetPos
I would also like to know how to set up the gdp debugger for my 3ds(I'm working in VS Code)? I have the launch.json set up like this:
Code:
"configurations":
[
{
"name": "Debug",
"type": "gdb",
"request": "attach",
"gdbpath": "/opt/devkitPro/devkitARM/bin/arm-none-eabi-gdb",
"executable": "./test.elf",
"target": "{3ds ip}:{3ds port}",
"cwd": "${workspaceRoot}",
"remote": true,
"valuesFormatting": "parseText",
}
]
Is there a specific process I have to open while using the rosalina debugger? or am I not totally set up properly?






