Homebrew Homebrew Development

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
Why am I not able to compile the 24bit-color example? I can compile other examples, just not this one. It always fails to compile with:

brew.png
Invalid Parameter - /Users
make[1]: *** [brew.bgr] Error 4
make: *** [build] Error 2

Why is that?
Is there possibly a space in the path somewhere and you haven't enclosed it in quotes "C:/path/blah blah" ? Spaces don't play nice. :P
I had to change the makefile a tiny bit to get it to build properly too...
Under main targets..

Changed From...
Code:
ifeq ($(strip $(NO_SMDH)),)
.PHONY: all
all    :    $(OUTPUT).3dsx $(OUTPUT).smdh
endif
$(OUTPUT).3dsx    :    $(OUTPUT).elf
$(OUTPUT).elf    :    $(OFILES)

Changed To...
Code:
ifeq ($(strip $(NO_SMDH)),)
$(OUTPUT).3dsx    :    $(OUTPUT).elf $(OUTPUT).smdh
else
$(OUTPUT).3dsx    :    $(OUTPUT).elf
endif
$(OUTPUT).elf    :    $(OFILES)
 

Salamencizer

Cute Hot Whatever
Member
Joined
Oct 3, 2015
Messages
802
Trophies
0
Age
24
Location
In your heart
Website
gbatemp.net
XP
738
Country
India
Some badges in can load a specific software title, so it seems that they have a shortcut address in them to load the title. Is it possible to hack the Badge, and make it launch the homebrew launcher? Would be good if happens.
 

JagN9

Well-Known Member
Newcomer
Joined
Jul 16, 2015
Messages
53
Trophies
0
Age
29
XP
107
Country
I have a little program going on. I decided to add a font library (https://github.com/xerpi/sftdlib) and after installing al dependencies and library, I get this:

Code:
c:/devkitPro/!unPlugged/source/main.c:57: undefined reference to `sftd_init'
c:/devkitPro/!unPlugged/source/main.c:62: undefined reference to `sftd_load_font_mem'
c:/devkitPro/!unPlugged/source/main.c:120: undefined reference to `sftd_draw_textf'
c:/devkitPro/!unPlugged/source/main.c:166: undefined reference to `sftd_free_font'

I don't know what do next.
 

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
I have a little program going on. I decided to add a font library (https://github.com/xerpi/sftdlib) and after installing al dependencies and library, I get this:

Code:
c:/devkitPro/!unPlugged/source/main.c:57: undefined reference to `sftd_init'
c:/devkitPro/!unPlugged/source/main.c:62: undefined reference to `sftd_load_font_mem'
c:/devkitPro/!unPlugged/source/main.c:120: undefined reference to `sftd_draw_textf'
c:/devkitPro/!unPlugged/source/main.c:166: undefined reference to `sftd_free_font'

I don't know what do next.
You should get rid of that ! in your filepath. Don't know if that will fix it but it's a good idea anyway.
And don't put your homebrew repos inside devkitpro.
 
Last edited by zoogie,

JagN9

Well-Known Member
Newcomer
Joined
Jul 16, 2015
Messages
53
Trophies
0
Age
29
XP
107
Country
The ! never gave me any problems (It's for alphabetical ordering).
Why I shouldn't put it inside devkitpro?
 
Last edited by JagN9,

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,035
Country
United States
The ! never gave me any problems (It's for alphabetical ordering).
Why I shouldn't put it inside devkitpro?
It is not recommended by devkitpro. There are situations where your code can be deleted during updates to devkitpro toolchains and libraries.
 

JagN9

Well-Known Member
Newcomer
Joined
Jul 16, 2015
Messages
53
Trophies
0
Age
29
XP
107
Country
Ok, now I get

Code:
linking unplugged.elf
arm-none-eabi-gcc.exe: error: c:/myprograms/unPlugged/unplugged.elf: No such file or directory
make[1]: *** [/c/myprograms/unPlugged/unplugged.elf] Error 1
make: *** [build] Error 2
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,509
Country
United States
Question.

Just how much does the GPU Scissor Test affect performance? I'd draw a rotating quad with a texture on the screen, getting 60fps easily, but when I decide to split the screen into scanlines via the Scissor Test, and draw the same polygon multiple times, the performance decreases quite harshly. Not to 30fps, but even lower to 10-15fps. Doesn't seem to matter the size of the texture used to render to the polygon either, as they all have about the same performance hit. The texture and destination color buffer are in VRAM.
 

neobrain

-
Member
Joined
Apr 25, 2014
Messages
306
Trophies
0
XP
730
Country
Question.

Just how much does the GPU Scissor Test affect performance? I'd draw a rotating quad with a texture on the screen, getting 60fps easily, but when I decide to split the screen into scanlines via the Scissor Test, and draw the same polygon multiple times, the performance decreases quite harshly. Not to 30fps, but even lower to 10-15fps. Doesn't seem to matter the size of the texture used to render to the polygon either, as they all have about the same performance hit. The texture and destination color buffer are in VRAM.

Yeah, don't do that. Primitives which cover only few pixels are terrible for GPU performance, and repeatedly drawing tiny batches of data with state changes inbetween makes it even worse.

If all you really try to do is rendering every second line of a picture, use the stencil buffer instead to make the proper lines out.
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,858
Country
Italy
Hello everyone,

i'm trying to update microphone support in my interpreter to latest ctrulib (great-refactor).
When i try to execute a sample which uses this function, i get a system freeze (so probably homebrew never exit from while loop). Does someone know where i'm wrong?

Code:
static int lua_regsound(lua_State *L)
{
  int argc = lua_gettop(L);
   #ifndef SKIP_ERROR_HANDLING
     if (argc != 2) return luaL_error(L, "wrong number of arguments");
   #endif
   u32 time = luaL_checkinteger(L, 1);
   u32 samplerate = luaL_checkinteger(L, 2);
   MICU_SampleRate smplrt;
   if (samplerate <= 8200){
     smplrt = MICU_SAMPLE_RATE_8180;
     samplerate = 8180;
   }else if (samplerate <= 12000){
     smplrt = MICU_SAMPLE_RATE_10910;
     samplerate = 10910;
   }else if (samplerate <= 18000){
     smplrt = MICU_SAMPLE_RATE_16360;
     samplerate = 16360;
   }else{
     smplrt = MICU_SAMPLE_RATE_32730;
     samplerate = 32730;    
   }
   u32 micbuf_pos = 0;
   u32* micbuf = (u32*)memalign(0x1000, 0x30000);
   micInit((u8*)micbuf, 0x30000);
   u32 micbuf_datasize = micGetSampleDataSize();
   u32 audiobuf_size = time * samplerate;
   u8* audiobuf = (u8*)linearAlloc(audiobuf_size);
   u32 audiobuf_pos = 0;  
   MICU_StartSampling(MICU_ENCODING_PCM16_SIGNED, smplrt, 0, micbuf_datasize, true);
   while (audiobuf_pos < audiobuf_size){
     u32 micbuf_readpos = micbuf_pos;
     micbuf_pos = micGetLastSampleOffset();
     while (audiobuf_pos < audiobuf_size && micbuf_readpos != micbuf_pos){
       audiobuf[audiobuf_pos] = micbuf[micbuf_readpos];
       audiobuf_pos++;
       micbuf_readpos = (micbuf_readpos + 1) % micbuf_datasize;
     }
   }
   MICU_StopSampling();
   micExit();
   free(micbuf);  
   Music* songFile = (Music*)malloc(sizeof(Music));
   songFile->audiobuf = audiobuf;
   songFile->audiobuf2 = NULL;
   songFile->big_endian = false;
   songFile->mem_size = 0;
   songFile->size = audiobuf_size;
   songFile->samplerate = samplerate;
   strcpy(songFile->author,"");
   strcpy(songFile->title,"");
   songFile->isPlaying = false;
   songFile->bytepersample = 2;
   songFile->magic = 0x4C534E44;
   lua_pushinteger(L,(u32)songFile);
   return 1;
}
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,509
Country
United States
Yeah, don't do that. Primitives which cover only few pixels are terrible for GPU performance, and repeatedly drawing tiny batches of data with state changes inbetween makes it even worse.

If all you really try to do is rendering every second line of a picture, use the stencil buffer instead to make the proper lines out.

What I'm trying to do is take a polygon pair, and adjust it every scanline. Basically......create a Mode 7 effect.

Hmm, thinking about it now, maybe there's another way to achieve what I want. Numerous polygon pairs (up to 240), placed on each scanline (or spans a number of scanlines if data doesn't change among them), and then just adjust the texture coordinates for each. No scissoring required. What do you think?

This is for help with blargSNES.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/LM0Y6RWvcr8?si=RjMLNrx1TEX301g1 Already has cfw lol