There is an smdhtool.exe in devkitARM/bin. I will keep trying.Do you have the required 3dstools installed? I think the executable is called smdhtool or something along those lines, check your PATH.
There is an smdhtool.exe in devkitARM/bin. I will keep trying.Do you have the required 3dstools installed? I think the executable is called smdhtool or something along those lines, check your PATH.
I "fixed" it by removing all smdh references in the makefile since I can just use a pre-compiled smdh. The .3dsx compiled successfully. Now I need to figure out where to place the gfxSet3D(true);.There is an smdhtool.exe in devkitARM/bin. I will keep trying.
After gfxInit or gfxInitDefault.Now I need to figure out where to place the gfxSet3D(true);.
Thanks. There is only a gfxInit(GSP_BGR8_OES, GSP_BGR8_OES, false); in the main.c. I addedAfter gfxInit or gfxInitDefault.
Get rid of that, it's not needed if gfxInit is already there.Thanks. There is only a gfxInit(GSP_BGR8_OES, GSP_BGR8_OES, false); in the main.c. I added
gfxInitDefault();
gfxSet3D(true);
after it and it enabled 3D mode. But something is off about the picture. While the pixels are now square, the 3D effect is a bit too intense.
Okay, I tried to compile mGBA and blargSNES, and I swear these are the two most uncompilable 3ds projects ever. I'm not a expert on compiling projects, but considering the cmakelists they provided doesn't work without modification, I gave up on mGBA (providing raw2c the makefile will not process the .raw file that it needs still, and the makefiles that cmake generates are not very easy to follow).
Compiling blargSNES requires nihstro which for the life of me I cannot compile either, because it was not meant to be used on newer boost library versions. All of the precompiled versions of nihstro I could find were for windows, and my devkitpro environment was linux, so it was a no-go.
Good luck to you man though, personally I just stick to retroarch.
Any idea how to fix this?e: what you're describing is probably because it's only drawing to one side/eye of the 3d display.
You could modify the screen drawing code to draw to both sides, but it's likely to impact performance.Any idea how to fix this?
Any idea how to fix this?
Thank you very much I will test this later as I'm going to get some sleep. Just one question though. What's the difference between the veryhard and the master branch?I have already applied the changes suggested by DiscostewSM to the "veryhard" branch of blargSnes. So far, it seems the changes didn't break anything. Here's it in case you wanna try it out yourself.
I'll give mGBA a try.
Thank you very much I will test this later as I'm going to get some sleep. Just one question though. What's the difference between the veryhard and the master branch?
This one? https://github.com/StapleButter/blargSnes/tree/veryhardOh, well the repo I checked it still used nihstro. Which source are you referring to?
It works and it looks gorgeous!. Thank you very much. Do you mind sharing your modified source code for this?I have already applied the changes suggested by DiscostewSM to the "veryhard" branch of blargSnes. So far, it seems the changes didn't break anything. Here's it in case you wanna try it out yourself.
GX_DisplayTransfer(gpuOut, 0x019000F0, (u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), 0x019000F0, 0x00001000);
GX_DisplayTransfer(gpuOut, 0x019000F0, (u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), 0x019000F0, 0x00001000);
GX_DisplayTransfer(gpuOut, 0x019000F0, (u32*)gfxGetFramebuffer(GFX_TOP, GFX_RIGHT, NULL, NULL), 0x019000F0, 0x00001000);
static void _drawEnd(void) {
int screen = screenMode < SM_PA_TOP ? GFX_BOTTOM : GFX_TOP;
u16 width = 0, height = 0;
void* outputFramebuffer = gfxGetFramebuffer(screen, GFX_LEFT, &height, &width);
ctrGpuEndFrame(screen, outputFramebuffer, width, height);
if (screen != GFX_BOTTOM) {
if (guiDrawn & (GUI_THIS_FRAME | GUI_ACTIVE)) {
void* outputFramebuffer = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, &height, &width);
ctrGpuEndFrame(GFX_BOTTOM, outputFramebuffer, width, height);
} else if (screenCleanup & SCREEN_CLEANUP_BOTTOM) {
ctrGpuBeginFrame(GFX_BOTTOM);
if (screenCleanup & SCREEN_CLEANUP_BOTTOM_1) {
screenCleanup &= ~SCREEN_CLEANUP_BOTTOM_1;
} else if (screenCleanup & SCREEN_CLEANUP_BOTTOM_2) {
screenCleanup &= ~SCREEN_CLEANUP_BOTTOM_2;
}
void* outputFramebuffer = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, &height, &width);
ctrGpuEndFrame(GFX_BOTTOM, outputFramebuffer, width, height);
}
}
if ((screenCleanup & SCREEN_CLEANUP_TOP) && screen != GFX_TOP) {
ctrGpuBeginFrame(GFX_TOP);
if (screenCleanup & SCREEN_CLEANUP_TOP_1) {
screenCleanup &= ~SCREEN_CLEANUP_TOP_1;
} else if (screenCleanup & SCREEN_CLEANUP_TOP_2) {
screenCleanup &= ~SCREEN_CLEANUP_TOP_2;
}
void* outputFramebuffer = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, &height, &width);
ctrGpuEndFrame(GFX_TOP, outputFramebuffer, width, height);
}
ctrGpuEndDrawing();
}
Actually you can't set GFX_RIGHT for GFX_BOTTOM because GFX_BOTTOM only have 1 screen try modifying this lineI have issues enabling 3D in mgba. I believe this is the section of the code that needs to be changed (main.c):
Code:static void _drawEnd(void) { int screen = screenMode < SM_PA_TOP ? GFX_BOTTOM : GFX_TOP; u16 width = 0, height = 0; void* outputFramebuffer = gfxGetFramebuffer(screen, GFX_LEFT, &height, &width); ctrGpuEndFrame(screen, outputFramebuffer, width, height); if (screen != GFX_BOTTOM) { if (guiDrawn & (GUI_THIS_FRAME | GUI_ACTIVE)) { void* outputFramebuffer = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, &height, &width); ctrGpuEndFrame(GFX_BOTTOM, outputFramebuffer, width, height); } else if (screenCleanup & SCREEN_CLEANUP_BOTTOM) { ctrGpuBeginFrame(GFX_BOTTOM); if (screenCleanup & SCREEN_CLEANUP_BOTTOM_1) { screenCleanup &= ~SCREEN_CLEANUP_BOTTOM_1; } else if (screenCleanup & SCREEN_CLEANUP_BOTTOM_2) { screenCleanup &= ~SCREEN_CLEANUP_BOTTOM_2; } void* outputFramebuffer = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, &height, &width); ctrGpuEndFrame(GFX_BOTTOM, outputFramebuffer, width, height); } } if ((screenCleanup & SCREEN_CLEANUP_TOP) && screen != GFX_TOP) { ctrGpuBeginFrame(GFX_TOP); if (screenCleanup & SCREEN_CLEANUP_TOP_1) { screenCleanup &= ~SCREEN_CLEANUP_TOP_1; } else if (screenCleanup & SCREEN_CLEANUP_TOP_2) { screenCleanup &= ~SCREEN_CLEANUP_TOP_2; } void* outputFramebuffer = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, &height, &width); ctrGpuEndFrame(GFX_TOP, outputFramebuffer, width, height); } ctrGpuEndDrawing(); }
I tried duplicating the lines saying GFX_LEFT and changing GFX_LEFT to GFX_RIGHT, but it didn't compile. Any ideas?
void* outputFramebuffer = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, &height, &width);
void* outputFramebuffer = gfxGetFramebuffer(GFX_TOP, GFX_RIGHT, &height, &width);
So you got 3D to work on blargsnes and mgba? Or does it just make the picture look alittle better and not show the 3D effectsHelp, please? @DarkMatterCore @DiscostewSM