Homebrew Homebrew Development

astrohoff

Active Member
Newcomer
Joined
Jan 18, 2017
Messages
25
Trophies
0
XP
66
Country
United States
You need to declare the romfs data directory in the rsf too for cia format
Thanks, that fixed it!
For the benefit of anyone else in this situation: I had to add this small block to the rsf:
Code:
RomFs:
  RootPath: pathReletiveToMakefile/romfs
 

astrohoff

Active Member
Newcomer
Joined
Jan 18, 2017
Messages
25
Trophies
0
XP
66
Country
United States
New unrelated problem: I can't get the libctru software keyboard to leave the top screen visible. Calling swkbdSetFeatures() with the SWKBD_DARKEN_TOP_SCREEN bit cleared doesn't seem to change the behavior. Anyone know what might cause this?
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,036
Country
Italy
New unrelated problem: I can't get the libctru software keyboard to leave the top screen visible. Calling swkbdSetFeatures() with the SWKBD_DARKEN_TOP_SCREEN bit cleared doesn't seem to change the behavior. Anyone know what might cause this?
Same to me
 

umbjolt

Wild jolteon
Member
Joined
Sep 15, 2016
Messages
558
Trophies
0
Age
27
Location
Magnolia, Fiore
XP
316
Country
Quick C++ question:

What is better?
a) Clear a vector and use a while to fill it again
b) Find what I want to delete inside the vector and delete it without scanning all matching files

Thanks :P
 

yerWizard

Active Member
Newcomer
Joined
Oct 21, 2016
Messages
32
Trophies
0
Age
25
XP
225
Country
Im trying to compile OpenAL-Soft for the 3ds and im getting these errors at compilation:

Code:
[  2%] Building C object CMakeFiles/OpenAL.dir/common/rwlock.c.obj
In file included from /home/sdk/openal-soft/common/rwlock.c:8:0:
/home/sdk/openal-soft/common/threads.h:122:9: error: unknown type name 'pthread_t'
 typedef pthread_t althrd_t;
         ^~~~~~~~~
/home/sdk/openal-soft/common/threads.h:123:9: error: unknown type name 'pthread_mutex_t'
 typedef pthread_mutex_t almtx_t;
         ^~~~~~~~~~~~~~~
/home/sdk/openal-soft/common/threads.h:124:9: error: unknown type name 'pthread_cond_t'
 typedef pthread_cond_t alcnd_t;
         ^~~~~~~~~~~~~~
/home/sdk/openal-soft/common/threads.h:125:9: error: unknown type name 'pthread_key_t'
 typedef pthread_key_t altss_t;
         ^~~~~~~~~~~~~
/home/sdk/openal-soft/common/threads.h:126:9: error: unknown type name 'pthread_once_t'
 typedef pthread_once_t alonce_flag;

In the cmake process prior the file pthreads.h had been found but not some functions of pthreads.h which is strange.
Code:
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc
-- Check for working C compiler: /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++
-- Check for working CXX compiler: /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Performing Test HAVE_STD_C11
-- Performing Test HAVE_STD_C11 - Success
-- Performing Test HAVE_STD_CXX11
-- Performing Test HAVE_STD_CXX11 - Success
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Checking _FILE_OFFSET_BITS for large files
-- Checking _FILE_OFFSET_BITS for large files - not needed
-- Performing Test INLINE_IS_C99
-- Performing Test INLINE_IS_C99 - Success
-- Performing Test HAVE_STRUCT_TIMESPEC
-- Performing Test HAVE_STRUCT_TIMESPEC - Success
-- Performing Test HAVE_LIBATOMIC
-- Performing Test HAVE_LIBATOMIC - Failed
-- Looking for __android_log_print in log
-- Looking for __android_log_print in log - not found
-- Performing Test HAVE_C99_VLA
-- Performing Test HAVE_C99_VLA - Success
-- Performing Test HAVE_C99_BOOL
-- Performing Test HAVE_C99_BOOL - Success
-- Performing Test HAVE_C11_STATIC_ASSERT
-- Performing Test HAVE_C11_STATIC_ASSERT - Success
-- Performing Test HAVE_C11_ALIGNAS
-- Performing Test HAVE_C11_ALIGNAS - Success
-- Performing Test HAVE_C11_ATOMIC
-- Performing Test HAVE_C11_ATOMIC - Success
-- Performing Test HAVE_W_EXTRA
-- Performing Test HAVE_W_EXTRA - Success
-- Performing Test HAVE_FNO_MATH_ERRNO
-- Performing Test HAVE_FNO_MATH_ERRNO - Success
-- Performing Test HAVE_GCC_DESTRUCTOR
-- Performing Test HAVE_GCC_DESTRUCTOR - Success
-- Performing Test HAVE_GCC_PROTECTED_VISIBILITY
-- Performing Test HAVE_GCC_PROTECTED_VISIBILITY - Success
-- Performing Test HAVE_VISIBILITY_HIDDEN_SWITCH
-- Performing Test HAVE_VISIBILITY_HIDDEN_SWITCH - Success
-- Performing Test HAVE_ATTRIBUTE_ALIGNED
-- Performing Test HAVE_ATTRIBUTE_ALIGNED - Success
-- Performing Test HAVE___BUILTIN_ASSUME_ALIGNED
-- Performing Test HAVE___BUILTIN_ASSUME_ALIGNED - Success
-- Performing Test HAVE_MSSE_SWITCH
-- Performing Test HAVE_MSSE_SWITCH - Failed
-- Performing Test HAVE_MSSE2_SWITCH
-- Performing Test HAVE_MSSE2_SWITCH - Failed
-- Performing Test HAVE_MSSE3_SWITCH
-- Performing Test HAVE_MSSE3_SWITCH - Failed
-- Performing Test HAVE_MSSE4_1_SWITCH
-- Performing Test HAVE_MSSE4_1_SWITCH - Failed
-- Performing Test HAVE_MFPU_NEON_SWITCH
-- Performing Test HAVE_MFPU_NEON_SWITCH - Success
-- Performing Test HAVE_GCC_FORMAT
-- Performing Test HAVE_GCC_FORMAT - Success
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Looking for stdalign.h
-- Looking for stdalign.h - found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for cpuid.h
-- Looking for cpuid.h - not found
-- Looking for prueba.txt
-- Looking for prueba.txt - found
-- Looking for intrin.h
-- Looking for intrin.h - not found
-- Looking for sys/sysconf.h
-- Looking for sys/sysconf.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - not found
-- Looking for float.h
-- Looking for float.h - found
-- Looking for ieeefp.h
-- Looking for ieeefp.h - found
-- Looking for guiddef.h
-- Looking for guiddef.h - not found
-- Looking for initguid.h
-- Looking for initguid.h - not found
-- Looking for pow in m
-- Looking for pow in m - found
-- Looking for aligned_alloc
-- Looking for aligned_alloc - not found
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - not found
-- Looking for lrintf
-- Looking for lrintf - found
-- Looking for modff
-- Looking for modff - found
-- Looking for _controlfp
-- Looking for _controlfp - not found
-- Looking for __control87_2
-- Looking for __control87_2 - not found
-- Looking for stat
-- Looking for stat - found
-- Looking for strtof
-- Looking for strtof - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for strnlen
-- Looking for strnlen - not found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for isfinite
-- Looking for isfinite - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for nanosleep
-- Looking for nanosleep - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for include files pthread.h, pthread_np.h
-- Looking for include files pthread.h, pthread_np.h - not found
-- Performing Test HAVE_PTHREAD
-- Performing Test HAVE_PTHREAD - Failed
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Looking for pthread_setschedparam
-- Looking for pthread_setschedparam - not found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - not found
-- Looking for pthread_set_name_np
-- Looking for pthread_set_name_np - not found
-- Looking for pthread_mutexattr_setkind_np
-- Looking for pthread_mutexattr_setkind_np - not found
-- Looking for pthread_mutex_timedlock
-- Looking for pthread_mutex_timedlock - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Looking for xmmintrin.h
-- Looking for xmmintrin.h - not found
-- Looking for emmintrin.h
-- Looking for emmintrin.h - not found
-- Looking for pmmintrin.h
-- Looking for pmmintrin.h - not found
-- Looking for smmintrin.h
-- Looking for smmintrin.h - not found
-- Looking for arm_neon.h
-- Looking for arm_neon.h - found
-- Could NOT find ALSA (missing:  ALSA_LIBRARY ALSA_INCLUDE_DIR)
-- Could NOT find OSS (missing:  OSS_INCLUDE_DIR)
-- Could NOT find AudioIO (missing:  AUDIOIO_INCLUDE_DIR)
-- Could NOT find SoundIO (missing:  SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)
-- Could NOT find QSA (missing:  QSA_LIBRARY QSA_INCLUDE_DIR)
-- Could NOT find PortAudio (missing:  PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR)
-- Could NOT find PulseAudio (missing:  PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR)
-- Could NOT find JACK (missing:  JACK_LIBRARY JACK_INCLUDE_DIR)
-- Looking for include files SLES/OpenSLES.h, SLES/OpenSLES_Android.h
-- Looking for include files SLES/OpenSLES.h, SLES/OpenSLES_Android.h - not found
-- Found Git: /usr/bin/git (found version "1.9.1")
--
-- Building OpenAL with support for the following backends:
--      WaveFile, Null
--
-- Building with support for CPU extensions:
--     Default, Neon
--
-- Installing sample configuration
--
-- Installing HRTF definitions
--
-- Installing AmbDec presets
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sdk/openal-soft/build
 
Last edited by yerWizard,

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,030
Country
United States
Im trying to compile OpenAL-Soft for the 3ds and im getting these errors at compilation:

Code:
[  2%] Building C object CMakeFiles/OpenAL.dir/common/rwlock.c.obj
In file included from /home/sdk/openal-soft/common/rwlock.c:8:0:
/home/sdk/openal-soft/common/threads.h:122:9: error: unknown type name 'pthread_t'
 typedef pthread_t althrd_t;
         ^~~~~~~~~
/home/sdk/openal-soft/common/threads.h:123:9: error: unknown type name 'pthread_mutex_t'
 typedef pthread_mutex_t almtx_t;
         ^~~~~~~~~~~~~~~
/home/sdk/openal-soft/common/threads.h:124:9: error: unknown type name 'pthread_cond_t'
 typedef pthread_cond_t alcnd_t;
         ^~~~~~~~~~~~~~
/home/sdk/openal-soft/common/threads.h:125:9: error: unknown type name 'pthread_key_t'
 typedef pthread_key_t altss_t;
         ^~~~~~~~~~~~~
/home/sdk/openal-soft/common/threads.h:126:9: error: unknown type name 'pthread_once_t'
 typedef pthread_once_t alonce_flag;

In the cmake process prior the file pthreads.h had been found but not some functions of pthreads.h which is strange.
Code:
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc
-- Check for working C compiler: /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++
-- Check for working CXX compiler: /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Performing Test HAVE_STD_C11
-- Performing Test HAVE_STD_C11 - Success
-- Performing Test HAVE_STD_CXX11
-- Performing Test HAVE_STD_CXX11 - Success
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Checking _FILE_OFFSET_BITS for large files
-- Checking _FILE_OFFSET_BITS for large files - not needed
-- Performing Test INLINE_IS_C99
-- Performing Test INLINE_IS_C99 - Success
-- Performing Test HAVE_STRUCT_TIMESPEC
-- Performing Test HAVE_STRUCT_TIMESPEC - Success
-- Performing Test HAVE_LIBATOMIC
-- Performing Test HAVE_LIBATOMIC - Failed
-- Looking for __android_log_print in log
-- Looking for __android_log_print in log - not found
-- Performing Test HAVE_C99_VLA
-- Performing Test HAVE_C99_VLA - Success
-- Performing Test HAVE_C99_BOOL
-- Performing Test HAVE_C99_BOOL - Success
-- Performing Test HAVE_C11_STATIC_ASSERT
-- Performing Test HAVE_C11_STATIC_ASSERT - Success
-- Performing Test HAVE_C11_ALIGNAS
-- Performing Test HAVE_C11_ALIGNAS - Success
-- Performing Test HAVE_C11_ATOMIC
-- Performing Test HAVE_C11_ATOMIC - Success
-- Performing Test HAVE_W_EXTRA
-- Performing Test HAVE_W_EXTRA - Success
-- Performing Test HAVE_FNO_MATH_ERRNO
-- Performing Test HAVE_FNO_MATH_ERRNO - Success
-- Performing Test HAVE_GCC_DESTRUCTOR
-- Performing Test HAVE_GCC_DESTRUCTOR - Success
-- Performing Test HAVE_GCC_PROTECTED_VISIBILITY
-- Performing Test HAVE_GCC_PROTECTED_VISIBILITY - Success
-- Performing Test HAVE_VISIBILITY_HIDDEN_SWITCH
-- Performing Test HAVE_VISIBILITY_HIDDEN_SWITCH - Success
-- Performing Test HAVE_ATTRIBUTE_ALIGNED
-- Performing Test HAVE_ATTRIBUTE_ALIGNED - Success
-- Performing Test HAVE___BUILTIN_ASSUME_ALIGNED
-- Performing Test HAVE___BUILTIN_ASSUME_ALIGNED - Success
-- Performing Test HAVE_MSSE_SWITCH
-- Performing Test HAVE_MSSE_SWITCH - Failed
-- Performing Test HAVE_MSSE2_SWITCH
-- Performing Test HAVE_MSSE2_SWITCH - Failed
-- Performing Test HAVE_MSSE3_SWITCH
-- Performing Test HAVE_MSSE3_SWITCH - Failed
-- Performing Test HAVE_MSSE4_1_SWITCH
-- Performing Test HAVE_MSSE4_1_SWITCH - Failed
-- Performing Test HAVE_MFPU_NEON_SWITCH
-- Performing Test HAVE_MFPU_NEON_SWITCH - Success
-- Performing Test HAVE_GCC_FORMAT
-- Performing Test HAVE_GCC_FORMAT - Success
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Looking for stdalign.h
-- Looking for stdalign.h - found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for cpuid.h
-- Looking for cpuid.h - not found
-- Looking for prueba.txt
-- Looking for prueba.txt - found
-- Looking for intrin.h
-- Looking for intrin.h - not found
-- Looking for sys/sysconf.h
-- Looking for sys/sysconf.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - not found
-- Looking for float.h
-- Looking for float.h - found
-- Looking for ieeefp.h
-- Looking for ieeefp.h - found
-- Looking for guiddef.h
-- Looking for guiddef.h - not found
-- Looking for initguid.h
-- Looking for initguid.h - not found
-- Looking for pow in m
-- Looking for pow in m - found
-- Looking for aligned_alloc
-- Looking for aligned_alloc - not found
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - not found
-- Looking for lrintf
-- Looking for lrintf - found
-- Looking for modff
-- Looking for modff - found
-- Looking for _controlfp
-- Looking for _controlfp - not found
-- Looking for __control87_2
-- Looking for __control87_2 - not found
-- Looking for stat
-- Looking for stat - found
-- Looking for strtof
-- Looking for strtof - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for strnlen
-- Looking for strnlen - not found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for isfinite
-- Looking for isfinite - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for nanosleep
-- Looking for nanosleep - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for include files pthread.h, pthread_np.h
-- Looking for include files pthread.h, pthread_np.h - not found
-- Performing Test HAVE_PTHREAD
-- Performing Test HAVE_PTHREAD - Failed
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Looking for pthread_setschedparam
-- Looking for pthread_setschedparam - not found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - not found
-- Looking for pthread_set_name_np
-- Looking for pthread_set_name_np - not found
-- Looking for pthread_mutexattr_setkind_np
-- Looking for pthread_mutexattr_setkind_np - not found
-- Looking for pthread_mutex_timedlock
-- Looking for pthread_mutex_timedlock - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Looking for xmmintrin.h
-- Looking for xmmintrin.h - not found
-- Looking for emmintrin.h
-- Looking for emmintrin.h - not found
-- Looking for pmmintrin.h
-- Looking for pmmintrin.h - not found
-- Looking for smmintrin.h
-- Looking for smmintrin.h - not found
-- Looking for arm_neon.h
-- Looking for arm_neon.h - found
-- Could NOT find ALSA (missing:  ALSA_LIBRARY ALSA_INCLUDE_DIR)
-- Could NOT find OSS (missing:  OSS_INCLUDE_DIR)
-- Could NOT find AudioIO (missing:  AUDIOIO_INCLUDE_DIR)
-- Could NOT find SoundIO (missing:  SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)
-- Could NOT find QSA (missing:  QSA_LIBRARY QSA_INCLUDE_DIR)
-- Could NOT find PortAudio (missing:  PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR)
-- Could NOT find PulseAudio (missing:  PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR)
-- Could NOT find JACK (missing:  JACK_LIBRARY JACK_INCLUDE_DIR)
-- Looking for include files SLES/OpenSLES.h, SLES/OpenSLES_Android.h
-- Looking for include files SLES/OpenSLES.h, SLES/OpenSLES_Android.h - not found
-- Found Git: /usr/bin/git (found version "1.9.1")
--
-- Building OpenAL with support for the following backends:
--      WaveFile, Null
--
-- Building with support for CPU extensions:
--     Default, Neon
--
-- Installing sample configuration
--
-- Installing HRTF definitions
--
-- Installing AmbDec presets
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sdk/openal-soft/build
Thread support is somewhat limited on the 3ds. It requires cooperative multitasking - or you end up with hung threads. So, most threaded apps/libraries are not going to work without quite a bit of effort and modification.
 

yerWizard

Active Member
Newcomer
Joined
Oct 21, 2016
Messages
32
Trophies
0
Age
25
XP
225
Country
Thread support is somewhat limited on the 3ds. It requires cooperative multitasking - or you end up with hung threads. So, most threaded apps/libraries are not going to work without quite a bit of effort and modification.

I see.
This is going to be harder than i'd hoped :P.
Thanks.
 

erman1337

Well-Known Member
Member
Joined
Sep 27, 2015
Messages
1,211
Trophies
0
Location
Brussels
XP
983
Country
Belgium
Last edited by erman1337,

MRJPGames

Pretty great guy
Member
Joined
Aug 17, 2013
Messages
1,199
Trophies
1
Location
The Netherlands
Website
fizazy.com
XP
1,674
Country
Netherlands
Thanks for the reply. However this doesn't work for me at all... The code I have to try to load this is this:
Code:
    cfguInit();
    u8 username;
    CFGU_GetConfigInfoBlk2(0xC1, 0x000A0000, &username);
    string user(test, 0xC1);
    name[0]=user;
    cfguExit();
I also tried using the FRD:U service, which did give me results better than this method which on emulator gives nothing and on real hardware just a bunch of Á's. The FRD service method gave me Cta on emulator and Jse on console, where they should've been Citra and Jasper respectively. If anyone know either how to use the cfgu method properly or how to use the frd method help would be much appreciated!
 
Last edited by MRJPGames,

Kartik

Well-Known Member
Member
Joined
Jun 6, 2015
Messages
653
Trophies
0
Location
github
XP
2,747
Country
India
Thanks for the reply. However this doesn't work for me at all... The code I have to try to load this is this:
Code:
    cfguInit();
    u8 username;
    CFGU_GetConfigInfoBlk2(0xC1, 0x000A0000, &username);
    string user(test, 0xC1);
    name[0]=user;
    cfguExit();
I also tried using the FRD:U service, which did give me results better than this method which on emulator gives nothing and on real hardware just a bunch of Á's. The FRD service method gave me Cta on emulator and Jse on console, where they should've been Citra and Jasper respectively. If anyone know either how to use the cfgu method properly or how to use the frd method help would be much appreciated!
The username returned is actually utf16, so you need to convert it to ut8:-
Code:
 cfguInit();
 u8 * outdata = malloc(0x1C);
 u8 * outdata2 = malloc(0x1C);
 CFGU_GetConfigInfoBlk2 (0x1C, 0x000A0000, outdata);
 utf16_to_utf8(outdata2,(u16*)outdata,0x1C);
 printf("Username:%s",(char*)outdata2);
 cfguExit();
 
Last edited by Kartik,
  • Like
Reactions: MRJPGames

erman1337

Well-Known Member
Member
Joined
Sep 27, 2015
Messages
1,211
Trophies
0
Location
Brussels
XP
983
Country
Belgium
The username returned is actually utf16, so you need to convert it to ut8:-
Code:
 cfguInit();
 u8 * outdata = malloc(0x1C);
 u8 * outdata2 = malloc(0x1C);
 CFGU_GetConfigInfoBlk2 (0x1C, 0x000A0000, outdata);
 utf16_to_utf8(outdata2,(u16*)outdata,0x1C);
 printf("Username:%s",(char*)outdata2);
 cfguExit();
Don't you need to put an \0 terminator at the end because the utf16_to_utf8 output isn't terminated
 

MRJPGames

Pretty great guy
Member
Joined
Aug 17, 2013
Messages
1,199
Trophies
1
Location
The Netherlands
Website
fizazy.com
XP
1,674
Country
Netherlands
The username returned is actually utf16, so you need to convert it to ut8:-
Code:
 cfguInit();
 u8 * outdata = malloc(0x1C);
 u8 * outdata2 = malloc(0x1C);
 CFGU_GetConfigInfoBlk2 (0x1C, 0x000A0000, outdata);
 utf16_to_utf8(outdata2,(u16*)outdata,0x1C);
 printf("Username:%s",(char*)outdata2);
 cfguExit();
Thanks! This works!

For anyone wondering this is the code I ended up using (as my project is c++ and wants string output):
Code:
    cfguInit();
    u8 * outdata = (u8*)malloc(0x1C);
    u8 * outdata2 = (u8*)malloc(0x1C);
    CFGU_GetConfigInfoBlk2 (0x1C, 0x000A0000, outdata);
    utf16_to_utf8(outdata2,(u16*)outdata,0x1C);
    string str((char*)outdata2, 0x1C);
    name[0] = str;
    cfguExit();
 
  • Like
Reactions: renhei

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/3eGAHfC5P-Y?si=Fo3iEl1pZ4D_O6dp +1