Just how do they do it??

Discussion in 'General Off-Topic Chat' started by Voxel, Dec 9, 2015.

  1. Voxel
    OP

    Voxel Fable Junkie

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,195
    5,884
    Jun 27, 2015
    United Kingdom
    England, UK
    How does one go about porting an emulator to other consoles? Like gPSP was ported to 3DS, and I think a PS1 emulator got an unofficial port, too. Any professionals in the room? :huh:
     


  2. CIAwesome526

    CIAwesome526 Im ugly and im proud

    Member
    1,242
    2,254
    Mar 25, 2014
    United States
    The Lake, Kalos Region
    They use their skills.
     
  3. Voxel
    OP

    Voxel Fable Junkie

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,195
    5,884
    Jun 27, 2015
    United Kingdom
    England, UK
    [​IMG]
     
  4. Seriel

    Seriel Worshipper of Skiddos

    Member
    2,704
    4,780
    Aug 18, 2015
    United Kingdom
    UK
    My guess is that its written in a programming language thats universal and then compiled to all the different formats.
     
    Voxel likes this.
  5. Voxel
    OP

    Voxel Fable Junkie

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,195
    5,884
    Jun 27, 2015
    United Kingdom
    England, UK
    Is Dolphin written in a universal language? From what I'm seeing in the source, it's written in C++, C, and Header files, along with some other libs like libpng and zlib.
     
  6. Seriel

    Seriel Worshipper of Skiddos

    Member
    2,704
    4,780
    Aug 18, 2015
    United Kingdom
    UK
    If that's true, it should be port-able. It would need adgjusting though.
     
    Voxel likes this.
  7. MichiS97

    MichiS97 "Leftist snowflake milennial"

    Member
    GBAtemp Patron
    MichiS97 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    1,305
    734
    Jun 14, 2011
    Gambia, The
    Bavaria
    Don't even think about trying to run Dolphin on a 3DS
     
    TotalInsanity4 likes this.
  8. zoogie

    zoogie simple pimp tool

    Member
    6,321
    7,993
    Nov 30, 2014
    United States
    They rewrite the platform specific functions like for control input and visual output while leaving the core emulation logic largely untouched. But it depends on if the target system has lower specs. If that is the case, then the core will need some tuning as well.
     
    Last edited by zoogie, Dec 10, 2015
    Games&Stuff and Voxel like this.
  9. Voxel
    OP

    Voxel Fable Junkie

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,195
    5,884
    Jun 27, 2015
    United Kingdom
    England, UK
    lolno.

    I want to try and make a port to the PS Vita (perhaps as rejuvenate homebrew)
     
  10. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,546
    3,952
    Jun 9, 2007
    Antarctica
    Broadly speaking, you recompile it (meaning you rebuild the source code for the platform/system you're targeting, for example, the 3DS), and then adapt the output of the emulator (sound, graphics) accordingly, so that you can see and hear the game, while also giving the emulator the things it needs (controller inputs, ROM/ISO), so you can actually play the game. How much work that involves depends on the emulator in question, how different the platform you're targeting is from the platform(s) the emulator usually runs on, if there are other emulators on that same platform you can use code from to save reproducing work that's already done, etc.

    Looks like @zoogie beat me to the condensed version, but yeah.
     
    Games&Stuff and Voxel like this.
  11. mashers

    mashers Stubborn ape

    Member
    3,837
    5,155
    Jun 10, 2015
    Kongo Jungle
    Are you sure it's that simple? The emulator core maps hardware functions from the system being emulated to the host platform's hardware or API. So porting an emulator written for one platform (lets say x86) to another (say, ARM) would surely require a rewrite of the emulator core.
     
  12. Voxel
    OP

    Voxel Fable Junkie

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,195
    5,884
    Jun 27, 2015
    United Kingdom
    England, UK
    I don't have a team with me, or anything at the moment. However, would people want to actually do it? Are they familiar with the PSP2 SDK? I think the Vita (being a quad-core console) would do a reasonably good job emulating a Wii/GC game, if you get the coding and stability right.
     
  13. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,546
    3,952
    Jun 9, 2007
    Antarctica
    Not always. If it's written in a neutral language like C and not assembly, as well as refraining from bringing in platform-specific stuff into the core, then it should build just fine. Loading games, handling input/output, etc., should always be abstracted away from the core emulation into front-ends/higher layers.
     
    Games&Stuff and Voxel like this.
  14. boomario

    boomario Nothing to say here.

    Member
    412
    135
    Oct 31, 2012
    Brazil
    It's not that easy port a emulator to another platform, example: In specific case of dolphin there is many things they use in windows version that in not available in android like DirectX (obviously) and Some OpenGL Features only available in certain devices at android, not to count if he is capable of running at acceptable speeds.
    If the emulator is complex, complex will be to port.
     
    Voxel likes this.
  15. Varia

    Varia GBAtemp Fan

    Member
    453
    117
    Nov 19, 2010
    This is 10% luck, 20% skill, 15% concentrated power of will...





    Sorry, topic title demanded this.
     
    Voxel likes this.
  16. mashers

    mashers Stubborn ape

    Member
    3,837
    5,155
    Jun 10, 2015
    Kongo Jungle
    So do you mean using something like SDL as an intermediary library between the emulator core and the host OS?
     
  17. keven3477

    keven3477 Fresh Prince of Lemonade

    Member
    880
    1,362
    Jul 12, 2012
    United States
    Somwhere you can never find.
    Wait, is there a psp emulator that works on 3ds?
     
    Voxel likes this.
  18. night_hawk

    night_hawk GBAtemp Fan

    Member
    489
    186
    Dec 3, 2014
    Italy
    gPSP is a GBA emulator
     
    keven3477 likes this.
  19. Voxel
    OP

    Voxel Fable Junkie

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,195
    5,884
    Jun 27, 2015
    United Kingdom
    England, UK
    No, I think that's a GBA emulator
     
    keven3477 likes this.
  20. keven3477

    keven3477 Fresh Prince of Lemonade

    Member
    880
    1,362
    Jul 12, 2012
    United States
    Somwhere you can never find.
    I just searched, darn it would be nice to have a psp emulator on 3ds though.
     
    Voxel likes this.