Homebrew Development

Discussion in '3DS - Homebrew Development and Emulators' started by aliak11, Jan 16, 2014.

  1. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    7
    Jul 28, 2008
    United States
    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.
     
  2. cynosura

    cynosura GBAtemp Regular

    Member
    2
    Jun 7, 2015
    France
    Bed
    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
     
  3. nop90

    nop90 GBAtemp Advanced Maniac

    Member
    12
    Jan 11, 2014
    Italy
    Rome
    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.
     
  4. TarableCode

    TarableCode GBAtemp Regular

    Member
    3
    Mar 2, 2016
    Canada
    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.
     
  5. MasterFeizz

    MasterFeizz GBAtemp Advanced Fan

    Member
    10
    Oct 15, 2015
    United States
    Use a white font, change the vertex colors.
     
    TarableCode likes this.
  6. TarableCode

    TarableCode GBAtemp Regular

    Member
    3
    Mar 2, 2016
    Canada
    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, Apr 28, 2016
  7. MasterFeizz

    MasterFeizz GBAtemp Advanced Fan

    Member
    10
    Oct 15, 2015
    United States
    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.
     
  8. spinal_cord

    spinal_cord Knows his stuff

    Member
    9
    Jul 21, 2007
    somewhere
    Can someone tell me what happened to APP_STATUS? I hate that they don't leave legacy code in devkitarm.
     
  9. ElyosOfTheAbyss

    ElyosOfTheAbyss GBAtemp Addict

    Member
    8
    Aug 20, 2015
    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?
     
  10. kprovost7314

    kprovost7314 GBAtemp's Official Shota and Bara Master

    Member
    8
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    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.
     
  11. ElyosOfTheAbyss

    ElyosOfTheAbyss GBAtemp Addict

    Member
    8
    Aug 20, 2015
    Oh okay

    Is there atleast a tutorial on how to make a makefile?
     
  12. kprovost7314

    kprovost7314 GBAtemp's Official Shota and Bara Master

    Member
    8
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    There's a 3ds template that is pretty much a basic makefile and you can edit it fo your liking. I can link it if you want.
     
  13. ElyosOfTheAbyss

    ElyosOfTheAbyss GBAtemp Addict

    Member
    8
    Aug 20, 2015
    That would be good
     
  14. kprovost7314

    kprovost7314 GBAtemp's Official Shota and Bara Master

    Member
    8
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    https://mega.nz/#!bIhHHI7S!IoF2TbWHVBOaqT23IKwg5mcZLqxoTzrsqS6BYNq1_A0 You'll need a MEGA account or a PC (to download without account).

    — Posts automatically merged - Please don't double post! —

    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)
     
  15. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    7
    Jul 28, 2008
    United States
    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.
     
  16. ElyosOfTheAbyss

    ElyosOfTheAbyss GBAtemp Addict

    Member
    8
    Aug 20, 2015
    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?
     
  17. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    7
    Jul 28, 2008
    United States
    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?
     
  18. ElyosOfTheAbyss

    ElyosOfTheAbyss GBAtemp Addict

    Member
    8
    Aug 20, 2015
    Can Cmake convert to .o or something? Never heard of it
     
  19. nop90

    nop90 GBAtemp Advanced Maniac

    Member
    12
    Jan 11, 2014
    Italy
    Rome

    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.

    — Posts automatically merged - Please don't double post! —

    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, Apr 30, 2016
  20. ElyosOfTheAbyss

    ElyosOfTheAbyss GBAtemp Addict

    Member
    8
    Aug 20, 2015
    I'm a bit confused here. Don't you need a makefile to compile homebrew?
     
Quick Reply
Draft saved Draft deleted
Loading...