Homebrew Homebrew Development

UltiNaruto

Well-Known Member
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
30
XP
203
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
30
XP
203
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
30
XP
203
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
30
XP
203
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
30
XP
203
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
  • No one is chatting at the moment.
  • Psionic Roshambo @ Psionic Roshambo:
    But my 3DS is loaded with emulators and 3DS games and DS games and GBA games probably thousands of games in total lol
  • Xdqwerty @ Xdqwerty:
    Brb going with my dad
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, are most of those games shovelware?
    +1
  • K3Nv2 @ K3Nv2:
    Nah gotta buy 3 1tb SD cards for 3ds the entire libraries need archived in my home
    +1
  • SylverReZ @ SylverReZ:
    >buys x3 1TB SD cards
    >stores the entire 3DS library on them
    >installs CFW
    >realised why I wasted loads of money and resources
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol no I clean my sets
  • K3Nv2 @ K3Nv2:
    Cause it's in my home ready to go
  • K3Nv2 @ K3Nv2:
    Like uremum
  • Psionic Roshambo @ Psionic Roshambo:
    But 100 games on SNES and Genesis and GBA then TG16 and NES and GB and GBC then all the other random systems and arcade games it all adds up lol
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Virtual Boy alone has probably 5 games!!! Lol
    +1
  • K3Nv2 @ K3Nv2:
    I won't mention any names in chat but some of us wastes $300 on preloaded hdds :tpi:
    +1
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, The PS5 had none.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol I spent more than that on a stuffed 4TB drive lol
  • K3Nv2 @ K3Nv2:
    Honestly I've yet to fill the 1tb internal drive on my ps5
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, 1) except final fantasy 16. 2) why would I have a console's whole catalogue if most of the games are either shovelware or terrible games?
  • Psionic Roshambo @ Psionic Roshambo:
    Kind of a waste, but the allure of all those games over 100,000
  • Psionic Roshambo @ Psionic Roshambo:
    Some shovel ware with low ratings you might enjoy more than the ratings would sugest
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Cruisn on the Wii is one of my personal examples of that, it's considered one of the worst games of all time, I loved it and completed it several times.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The trick for me was to go into the settings and crank up the Wiimote sensitivity to the max and it gets twitchy but you can win that way lol
  • Psionic Roshambo @ Psionic Roshambo:
    Lots of other games I enjoyed that reviews would say otherwise lol
  • btei @ btei:
    lethal company servers are down rn
  • btei @ btei:
    my pocket pikachu is going crazy rn
  • Psionic Roshambo @ Psionic Roshambo:
    Pocket Pikachu sounds dirty lol
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, Penischu, I choose you.
    SylverReZ @ SylverReZ: Lol