Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,890
  • Replies Replies 6,048
  • Likes Likes 54
About sftdlib, I can compile sample without problems, it runs on citra, but when I try to lauch it via HBL on 9.6 o3ds, it just freeze with a red bottom screen and a "colored" top screen.
Note that I can boot it using 3dslink!
I am using the latest version of sftd, tested with both libctru 1.0 & 1.1 .
Can anyone try to help me ?
Is your source code somewhere I can look at it? GitHub or the like would be best - don't have access to a computer at the moment - just my phone.

As a note citra is super forgiving with access violations and other things that will cause real hardware to lock-up.
 
Is your source code somewhere I can look at it? GitHub or the like would be best - don't have access to a computer at the moment - just my phone.

As a note citra is super forgiving with access violations and other things that will cause real hardware to lock-up.
I'm on my phone too, basically I can compile the sample, run it on citra AND on my 3ds by using 3dslink, but got a red screen when trying to launch it in normal way via HBL. All is here https://github.com/xerpi/sftdlib?files=1
 
Trying to packing a 3dsx with the --romfs option, 3dsxtool crashes. My ctrulib is updated to the latest version.

Does someone else experienced the same problem?

PS: I have a windows 64bit OS.
 
For the 3d engine wizards:
I got my font rendering working using the 3D engine, but suppose if I want to invert the colours of the text like a selected object?

My lazy ass goto would be to have a 2nd font source with the colours inverted but I was wondering if there was an existing way to do this with the 3D engine.
 
For the 3d engine wizards:
I got my font rendering working using the 3D engine, but suppose if I want to invert the colours of the text like a selected object?

My lazy ass goto would be to have a 2nd font source with the colours inverted but I was wondering if there was an existing way to do this with the 3D engine.
Use a white font, change the vertex colors.
 
  • Like
Reactions: TarableCode
Use a white font, change the vertex colors.

So this requires me to:

Modify the shader to accept an input colour.
Add another AttrInfo loader for the input colour.
Add another call to C3D_SendImmAttrib after the tex coords with the colour values.
?

That's what I've done so far and it's ignoring the colour values I send.
If I remove the calls to send the vertex colour the text will not show up at all, I've even temporarily modified the shader to put a constant value into outclr.

It's quite possible that again I'm still blindly fiddling my way through 3D land and It's something really dumb I'm missing.

Edit:
I was missing the TexEnv stuff, all solved now and sorry for bothering :)

Edit 2:
Spoke too soon lol, the colour constant works but the colours I'm sending via C3D_SendImmAttrib are being ignored.
 
Last edited by TarableCode,
So this requires me to:

Modify the shader to accept an input colour.
Add another AttrInfo loader for the input colour.
Add another call to C3D_SendImmAttrib after the tex coords with the colour values.
?

That's what I've done so far and it's ignoring the colour values I send.
If I remove the calls to send the vertex colour the text will not show up at all, I've even temporarily modified the shader to put a constant value into outclr.

It's quite possible that again I'm still blindly fiddling my way through 3D land and It's something really dumb I'm missing.

Edit:
I was missing the TexEnv stuff, all solved now and sorry for bothering :)

Edit 2:
Spoke too soon lol, the colour constant works but the colours I'm sending via C3D_SendImmAttrib are being ignored.
I've never used citro3d, but the steps you wrote above seems right. Basically pass the color attribute to the shader and set the texEnv correctly.
 
I decided I would attempt to port this so I made this github repo.
But then I realized I have no Idea what I'm doing.
so is there any tutorial anywhere that can teach me to make 3ds homebrew so that I can learn to port this?
There's not much tutorials out there. And even those only cover the bare minimum. I guess I can start making one once I get a little more knowledge in C.
 
https://mega.nz/#!bIhHHI7S!IoF2TbWHVBOaqT23IKwg5mcZLqxoTzrsqS6BYNq1_A0 You'll need a MEGA account or a PC (to download without account).

--------------------- MERGED ---------------------------

How does one port a game? Is it a specific way for 3ds or is it like other systems? (I know the source code has to be available)
Basically the same as other systems. Replace or remove the platform specific parts with something that will work on the 3ds. This is typically input, sound, and display. The display can be as simple as pointing the code at the 3ds frame buffer or all the way up to replacing 3D hardware calls with 3ds equivalents. Sometimes you may need to replace win32/dos io calls with either stdio equivalents or native 3ds.
 
Quick question:
Code:
C:\Users\adrian\Documents\GitHub\Super-Tux-3DS>make
make[1]: *** No rule to make target `credits.txt.o', needed by `/c/Users/adrian/
Documents/GitHub/Super-Tux-3DS/Super-Tux-3DS.elf'.  Stop.
make: *** [build] Error 2

C:\Users\adrian\Documents\GitHub\Super-Tux-3DS>
I have no clue on what this means. Does anyone know?
 
Quick question:
Code:
C:\Users\adrian\Documents\GitHub\Super-Tux-3DS>make
make[1]: *** No rule to make target `credits.txt.o', needed by `/c/Users/adrian/
Documents/GitHub/Super-Tux-3DS/Super-Tux-3DS.elf'.  Stop.
make: *** [build] Error 2

C:\Users\adrian\Documents\GitHub\Super-Tux-3DS>
I have no clue on what this means. Does anyone know?
It looks like it is trying to compile the credits.txt file which is in the data directory. The template makefile assumes everything in the data directory needs to be converted to a .o file and included as raw data. This is generally not done with text files so there is no rule to convert them. the template makefile is not going to work with this project without extensive modifications. Are you not able to build the project using cmake?
 
It looks like it is trying to compile the credits.txt file which is in the data directory. The template makefile assumes everything in the data directory needs to be converted to a .o file and included as raw data. This is generally not done with text files so there is no rule to convert them. the template makefile is not going to work with this project without extensive modifications. Are you not able to build the project using cmake?
Can Cmake convert to .o or something? Never heard of it
 
I decided I would attempt to port this so I made this github repo.
But then I realized I have no Idea what I'm doing.
so is there any tutorial anywhere that can teach me to make 3ds homebrew so that I can learn to port this?


Tutorial on coding c: there are a lot on internet

Tutorial on coding c on 3ds: no, but there are the ctrulib examples (a beginners has to study them very weel) and a lot of simple homebrew to analyze

Tutorial to porting a graphical PC game on a small fixed size screen, with low cpu resources, no default libraries like SDL and a lot of low lwvwl calls to OS to know: forget it :)

I defined some code patterns to port the sdl calls (key input, graphics and sound) that I'm using on my ports of emulators and on the port of syobon action: you can look at my code on github.

But I sugest to start with a simpler game to port, superTux is too complex for a first project.

You could start with SDL pacman or something similar, with some exerience it's possible to have a first basic port of such a game in a day of work, but there ar always small problems to fix using all your ingenuity.

With a small project I could give you some hints, if you leave me time to answer when I can.

--------------------- MERGED ---------------------------

Can Cmake convert to .o or something? Never heard of it

bin2c convert a generic binary file to an aray that the code can read without loading from file. 3ds uses a simpler way, romfs (that I started using only few days ago :D).

and don't waste time with that makefile, it miss a lot of things (first libararies declarations). It will never work
 
Last edited by nop90,
bin2c convert a generic binary file to an aray that the code can read without loading from file. 3ds uses a simpler way, romfs (that I started using only few days ago :D).

and don't waste time with that makefile, it miss a lot of things (first libararies declarations). It will never work
I'm a bit confused here. Don't you need a makefile to compile homebrew?
 

Site & Scene News

Popular threads in this forum