Homebrew Homebrew Development

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,964
Country
United States
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_
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
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.
 

tgaiu

Active Member
Newcomer
Joined
Sep 10, 2017
Messages
33
Trophies
0
XP
75
Country
Japan
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
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
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).
 

tgaiu

Active Member
Newcomer
Joined
Sep 10, 2017
Messages
33
Trophies
0
XP
75
Country
Japan
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.
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,034
Country
United States
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.
 

tgaiu

Active Member
Newcomer
Joined
Sep 10, 2017
Messages
33
Trophies
0
XP
75
Country
Japan
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,

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 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.
 

tgaiu

Active Member
Newcomer
Joined
Sep 10, 2017
Messages
33
Trophies
0
XP
75
Country
Japan
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.
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
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.
 

tgaiu

Active Member
Newcomer
Joined
Sep 10, 2017
Messages
33
Trophies
0
XP
75
Country
Japan
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())
 

tgaiu

Active Member
Newcomer
Joined
Sep 10, 2017
Messages
33
Trophies
0
XP
75
Country
Japan
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?
 

bee395

Member
Newcomer
Joined
Jun 26, 2016
Messages
16
Trophies
0
Age
25
XP
94
Country
Netherlands
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.
 

tgaiu

Active Member
Newcomer
Joined
Sep 10, 2017
Messages
33
Trophies
0
XP
75
Country
Japan
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?
 

bee395

Member
Newcomer
Joined
Jun 26, 2016
Messages
16
Trophies
0
Age
25
XP
94
Country
Netherlands
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

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BigOnYa @ BigOnYa:
    Biomutant looks cool tho, may have to try that
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
    K3Nv2 @ K3Nv2: @BigOnYa...