Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,081
  • Replies Replies 6,048
  • Likes Likes 54
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)
 
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.
 
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.
 
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,
The ! never gave me any problems (It's for alphabetical ordering).
Why I shouldn't put it inside devkitpro?
 
Last edited by JagN9,
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.
 
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
 
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.
 
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.
 
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;
}
 
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