How to make ports from source codes?

Discussion in '3DS - Homebrew Development and Emulators' started by 101239, Dec 30, 2015.

  1. 101239
    OP

    101239 GBATemp Irregular

    Banned
    312
    158
    Oct 25, 2015
    United States
    Maybe Somewhere near you? ( ͡° ͜ʖ ͡°)
    Title. Do I have to poke around with it in devkitarm or do i just use the makefile?
     
  2. MasterFeizz

    MasterFeizz GBAtemp Advanced Fan

    Member
    888
    827
    Oct 15, 2015
    United States
    Do you have programming experience? You have to take the code and adapt it to the target platform, so you have to modify the source code and the makefile. Sometimes you may have to modify the assets too
     
  3. Spankpanky

    Spankpanky Member

    Newcomer
    38
    3
    Nov 27, 2015
    use hex
     
  4. MasterFeizz

    MasterFeizz GBAtemp Advanced Fan

    Member
    888
    827
    Oct 15, 2015
    United States
    No, just no.
     
  5. Lilith Valentine

    Lilith Valentine GBATemp's Wolfdog™ Cuddle lesbian derp

    Member
    20,069
    21,175
    Sep 13, 2009
    Antarctica
    Between insane and insecure
    You need to modify the code to work on the new platform, then compile it to run the hardware.
     
  6. Rinnegatamante

    Rinnegatamante GBAtemp Psycho!

    Member
    3,127
    3,267
    Nov 24, 2014
    Italy
    Bologna
    It depends on the target platform and the starting platform, dependencies and others.

    If you're "lucky", you'll need to re-write only rendering, input and (optional) audio system code.
    If you're "not so lucky", you'll have to modify also CPU related code (ASM calls for examples) and everything that could cause issues related to the hardware (for example, enums dimension, vars definition (on ARM architecture, chars are unsigned, on MIPS architecture, they're signed for example), GPU directives...).
    If you're "unlucky", you'll also need to optimize code to make it run on the target platform at a decent framerate (looks for example to DaedalusX64 emulator for PSP).

    There are also a lot of source ports which are using libraries currently not available (or not completely available) on 3DS (openGL, SDL, SDL2 for example). In that cases, you'll also have to write a proper wrapper for these libraries.
     
    JunTheBobOmbAce likes this.
  7. Author

    Author ****NEWS**FLASH**** 1 /̵͇̿̿/'̿-̅-̅-̅''

    Member
    458
    419
    Aug 30, 2014
    GBAtemp
    facepalm

    rewrite it
     
  8. GalladeGuy

    GalladeGuy Freeze Kirby :3

    Member
    2,582
    2,641
    Oct 28, 2015
    United States
    You don't have to re-write it. You just need to go through the code, and fix all the things to work on the 3DS. I know I'm making it sound a lot easier than it really is, but I'm just trying to give a simple answer.
     
  9. Author

    Author ****NEWS**FLASH**** 1 /̵͇̿̿/'̿-̅-̅-̅''

    Member
    458
    419
    Aug 30, 2014
    GBAtemp
    basically re-writing it
    ???
     
  10. RainCode

    RainCode The Temper that Tampers

    Member
    162
    57
    Sep 29, 2015
    /dev/null
    You wouldn't be re-writing it entirely.
     
  11. Author

    Author ****NEWS**FLASH**** 1 /̵͇̿̿/'̿-̅-̅-̅''

    Member
    458
    419
    Aug 30, 2014
    GBAtemp
    i never said how much yo would have to re-write, just that you would have to
    ?? ?????? this forum??? filled with people that really want to be better than another user
     
  12. RainCode

    RainCode The Temper that Tampers

    Member
    162
    57
    Sep 29, 2015
    /dev/null
    It's always a good idea to be more specific. ;)
     
  13. Author

    Author ****NEWS**FLASH**** 1 /̵͇̿̿/'̿-̅-̅-̅''

    Member
    458
    419
    Aug 30, 2014
    GBAtemp
    okay then