Homebrew Homebrew Development

UltiNaruto

Well-Known Member
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
The main problem is that I don't know what u8* screen refers to. The one I used was referring to GFX_TOP.

EDIT: Nevermind it works fine. Just colors are messed up.
WVNany4.png
 
Last edited by UltiNaruto,

Tjessx

Well-Known Member
Member
Joined
Dec 3, 2014
Messages
1,160
Trophies
0
Age
27
XP
952
Country
Belgium
The main problem is that I don't know what u8* screen refers to. The one I used was referring to GFX_TOP.
Sorry, you can replace that variable since you used this:
u8* fb = gfxGetFramebuffer(screen, GFX_LEFT, NULL, NULL);
instead of screen use fb in the functions
 

UltiNaruto

Well-Known Member
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
Yeah I noticed this :)

--------------------- MERGED ---------------------------

here's the original background :
543okNX.png


400x240x32
and the blocks in are 20x20x32

--------------------- MERGED ---------------------------

I fixed background but blocks are still not good and the blocks renders down when I want to render a block out of screen.

--------------------- MERGED ---------------------------

I can release my game as of now but it has few graphics glitches :P
Tdx7oHW.png


EDIT:
I'm a complete idiot ...
https://gbatemp.net/threads/handy-functions-for-your-3ds-homebrews.376679/
 
Last edited by UltiNaruto,

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
Is there a way to set a video mode with pixels memory location following the X axis instead of the Y axis?

I remember to read something about this on 3dbrew long time ago, but can't find it anymore. Maybe I dreamed about it ... :lol:
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
Well the x and y axis aren't a problem anymore. And same for the PM I sent you.

Sorry, I missed your PM. Reading the forum from my smatphone sometime happens that notification are cleaned without noticing them.

For the x and y swapping, you mean using sf2dlib? I can't use it, I need to write directly on the fb two pixels at a time (using a bidimensional lookup color table) to boost a little the z26 emulator.
 

UltiNaruto

Well-Known Member
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
Well as I said I'll stick with the current drawImage function. But is it possible to get profile name?
I wanna use it for a high score table.
 

UltiNaruto

Well-Known Member
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
Well I'll have to debug it then not sure of how I'll do though. Debugging ARM processor without ARM assembly knowledge is pure suicide xD
I only know x86 assembly... and a bit of x64
 

UltiNaruto

Well-Known Member
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
Thanks for the link I'll try this later I'm updating homebrews on my 3DS.

EDIT: I saw something like that in cfgu.h

EDIT2: This?
Code:
Result CFGU_GetConfigInfoBlk2(u32 size, u32 blkID, u8* outData);

EDIT3: That's the only example I could find.
https://github.com/smealum/ctrulib/blob/master/examples/get_system_language/source/main.c

EDIT4: Here's the function for those who needs this.

Code:
char * getProfileName()
{
    Result res;
    u8 * tempProfileName = (u8*)malloc(0x16);
    char * profileName = (char*)malloc(0x16/2);
    int i;
    for(i=0;i<(0x16/2);i++)
        profileName[i] = 0;
    res = CFGU_GetConfigInfoBlk2(0x1C, 0xA0000, tempProfileName);
    for(i=0;i<(0x16/2);i++)
    {
        profileName[i] = (char)((u16*)tempProfileName)[i];
    }
    return profileName;
}

EDIT5 :

Returns the length of the profile name and takes the profile name as out parameter

Code:
#include <3ds/types.h>

int getProfileName(char * profileName)
{
    Result res;
    u8 tempProfileName[0x16];
    int i;
    
    for(i=0;i<(0x16/2);i++)
        profileName[i] = 0;
    res = CFGU_GetConfigInfoBlk2(0x1C, 0xA0000, tempProfileName);
    if(res != 0)
        return -1;
    for(i=0;i<(0x16/2);i++)
        profileName[i] = (char)(tempProfileName[2*i] | tempProfileName[2*i+1] << 8);
    return strlen(profileName);
}
 
Last edited by UltiNaruto,

Stracker

Well-Known Member
Newcomer
Joined
Sep 7, 2015
Messages
86
Trophies
0
Age
28
XP
167
Country
France
Is there any way to get the current date ?
Can't seem to find a function that would give it

Also, is it normal that svcGetSystemTick() returns 0 ?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BigOnYa @ BigOnYa: Scratch n sniff +1