Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,172
  • Replies Replies 6,048
  • Likes Likes 54
Hey,

I need some help on linux with creating something.

The story (short): One of my friends left speaker is broken and he's tired off chaging it everytime from mono to stereo when he's listening with headphones through the system settings. He wants that an option is implemented in the Rosalina menu, where you can change from mono to stereo and vise versa.

I already researched the 11.5.2 SDK and the "config SDK app" and found the files that matters (cfg_Sound.h, config savegame
0x00070001 0x1 0xE sound output mode (mono/stereo/surround)).

It's quite simple what I want to do. Like the config SDK app, I want to implement a simple option chaging the sound output mode. But what exact options should I write to it since the cfg_sound.h isn't clear enough for me and doesn't say that much? Here is the code:
Code:
#ifndef NN_CFG_CTR_CFG_SOUND_H_
#define NN_CFG_CTR_CFG_SOUND_H_

namespace nn {
namespace cfg {
namespace CTR {

/*!
@brief Enumerated type that represents sound output modes.
*/
enum CfgSoundOutputMode
{
    CFG_SOUND_OUTPUT_MODE_MONO,     //!< Mono.
    CFG_SOUND_OUTPUT_MODE_STEREO,   //!< Stereo.
    CFG_SOUND_OUTPUT_MODE_SURROUND  //!< 3D Surround Sound.
};

} // end of namespace CTR
} // end of namespace cfg
} // end of namespace nn

#endif      // NN_CFG_CTR_CFG_SOUND_H_
 
I downloaded Libtremor, but the make command does not work.
Did I make a mistake somewhere?
Exactly wat are you doing? Ar you using the makefile here?

With this one you should type "make tremor" from a unix shell (or from msys on windows) to download and compile the lib.

Than typing "make install" will setup it in your toolchain.

On windows you need to have wget.exe in a folder declared in your PATH enviroment variable, or in the same folder of the makefile.

Hope this helps.
 
Exactly wat are you doing? Ar you using the makefile here?
With this one you should type "make tremor" from a unix shell (or from msys on windows) to download and compile the lib.

Than typing "make install" will setup it in your toolchain.

On windows you need to have wget.exe in a folder declared in your PATH enviroment variable, or in the same folder of the makefile.

Hope this helps.
I was able to use the make command, but I got an error.

Generating configuration files for vorbisidec, please wait....
aclocal -I /c/devkitPro/portlibs/3ds/share/aclocal -I /c/devkitPro/portlibs/armv6k/share/aclocal
aclocal: couldn't open directory `/c/devkitPro/portlibs/3ds/share/aclocal': No such file or directory
 
I was able to use the make command, but I got an error.

Generating configuration files for vorbisidec, please wait....
aclocal -I /c/devkitPro/portlibs/3ds/share/aclocal -I /c/devkitPro/portlibs/armv6k/share/aclocal
aclocal: couldn't open directory `/c/devkitPro/portlibs/3ds/share/aclocal': No such file or directory
If you are on linux maybe you are running make with an user without permissions for creating that folder.

A quick fix could be to create the folder manually (remember to set write permission to the folder).

Setting portlibs for the fist time is always problematic in my experience. I spent a lot of time to setup the VITA toolchain and last week I had problems with the Switch enviroment too (that is just a minimal enviroment at the moment).
 
If you are on linux maybe you are running make with an user without permissions for creating that folder.

A quick fix could be to create the folder manually (remember to set write permission to the folder).

Setting portlibs for the fist time is always problematic in my experience. I spent a lot of time to setup the VITA toolchain and last week I had problems with the Switch enviroment too (that is just a minimal enviroment at the moment).
I am working on windows.
I started Msys with administrator's privileges, but I got an error as well.
 
I was able to use the make command, but I got an error.

Generating configuration files for vorbisidec, please wait....
aclocal -I /c/devkitPro/portlibs/3ds/share/aclocal -I /c/devkitPro/portlibs/armv6k/share/aclocal
aclocal: couldn't open directory `/c/devkitPro/portlibs/3ds/share/aclocal': No such file or directory
You need to manually create the missing folder structure. It does not appear to get used but it wants it there. Appears to be a glitch with the build process, but a harmless one.
 
You need to manually create the missing folder structure. It does not appear to get used but it wants it there. Appears to be a glitch with the build process, but a harmless one.
When I made a folder I seemed to be doing pretty well, but warnings and errors came out.
Is it okay to ignore these?

configure: WARNING: unrecognized options: --disable-oggtest
configure: WARNING: if you wanted to set the --build type, do not use --host.
make: *** [tremor] Error 1


I tried again with MSys instead of command prompt and it worked!
Thank you!
 
Last edited by tgaiu,
Is there a way to now the amount of memory allocated (or availabe) with the c lib?

I know there is't a standard one, I'm asking if there is a custom one in the devkitARM toolchain

I'm debugging the code of my latest port (Zelda3T) trying to find every memory leakage and I vant to show on the 3ds console the available memory left during the game.

Using the ctrulib allocation functions (mappableAlloc and lineasrAlloc) I can get the free memory with the ctrulib functions mappableSpaceFree() and linearSpaceFree().

But allocating memory with the c lib (malloc or the new operator in C++) the ctrulib doesn't trace the allocated memory.
 
Is there a way to now the amount of memory allocated (or availabe) with the c lib?

I know there is't a standard one, I'm asking if there is a custom one in the devkitARM toolchain

I'm debugging the code of my latest port (Zelda3T) trying to find every memory leakage and I vant to show on the 3ds console the available memory left during the game.

Using the ctrulib allocation functions (mappableAlloc and lineasrAlloc) I can get the free memory with the ctrulib functions mappableSpaceFree() and linearSpaceFree().

But allocating memory with the c lib (malloc or the new operator in C++) the ctrulib doesn't trace the allocated memory.
It was displayed as 1051708.
 
It was displayed as 1051708.
Displayed what?

I know the ctrulib returns a value, but allocating memory with malloc doesn't decrease the value. Tryed allocatig several 1Mb blocks till consuming all the available memory and the value of free mem remains the same.
 
Displayed what?

I know the ctrulib returns a value, but allocating memory with malloc doesn't decrease the value. Tryed allocatig several 1Mb blocks till consuming all the available memory and the value of free mem remains the same.
I ran the following code.
printf("%u",linearSpaceFree())
 
I wanted to develop in visual studio, I read the tutorial and download 3DS-VS-Template.
If you try to open the project and build it, you will see that "make can not be found".
What went wrong?
 
I wanted to develop in visual studio, I read the tutorial and download 3DS-VS-Template.
If you try to open the project and build it, you will see that "make can not be found".
What went wrong?

The Makefile of your template doesn't contain the "make" command, maybe you don't need it because the vs template uses buildtools. Does your project build when you build directly from the folder, without vs so the "default" way of building projects? If that doesn't work there is probably nothing wrong with vs but with your makefile / buildtools.

I personally just use the normal template with vs, that works fine for me.
 
The Makefile of your template doesn't contain the "make" command, maybe you don't need it because the vs template uses buildtools. Does your project build when you build directly from the folder, without vs so the "default" way of building projects? If that doesn't work there is probably nothing wrong with vs but with your makefile / buildtools.

I personally just use the normal template with vs, that works fine for me.
I tried to build directly from the folder and got the following error.
/bin/sh: line 1: zip: command not found
What should I do?
 
I tried to build directly from the folder and got the following error.
/bin/sh: line 1: zip: command not found
What should I do?

I think there is something wrong with your Template.vcxproj, you also need to make sure that the path of your project doesn't contain white spaces, which the default location does (../Visual Studio xxxx/..).
 

Site & Scene News

Popular threads in this forum