Ubuntu VM with Pegaswitch Libtransistor and RetroArch PreConfigured

Discussion in 'Switch - Hacking & Homebrew' started by yardie, Nov 19, 2017.

  1. yardie
    OP

    yardie GBAtemp Maniac

    Member
    1,070
    1,113
    Mar 27, 2016
    United States
    New scripts updated to include NES, GBA emulators
    Easily select the option you want to start building. Remember to put your roms in the RetroArch/fs folder before running the buildretro script

    The first script:
    • removes and rebuilds libtransistor, snes9x, vba-next and fceumm from their github sources
    • creates fs directory
    The second script:
    • make-cleans the retroarch folder
    • prompts you to select which emulator you want to build for
    • copies the respective libretro_switch.a to the RetroArch folder and builds the emulator .nro file
     

    Attached Files:

    Last edited by yardie, Jan 13, 2018
    Greg956 and seanp2500 like this.
  2. urherenow

    urherenow GBAtemp Psycho!

    Member
    3,087
    938
    Mar 8, 2009
    United States
    Japan
    umm... it's already part of libtransistor? If you need to update it:

    cd /path/to/libtransistor/projects/ace_loader
    git pull origin master
    make clean && make LLVM_POSTFIX=-5.0

    If you want half of a clue how this stuff is set up, I suggest you read here: https://reswitchedweekly.github.io/Building-RetroArch/ and here: https://reswitchedweekly.github.io/Development-Setup/

    And if you want to also set up the image for 3ds stuff, I HIGHLY recommend you start by using the perl script, then update ctrulib (when installing, use sudo -H make install, that goes for installing python stuff as well (sudo -H pip install pycryptodome, "sudo -H pip install git+https://github.com/TuxSH/firmtool.git", etc)). Perl script is here: https://github.com/devkitPro/installer
     
    Last edited by urherenow, Jan 14, 2018
  3. seanp2500

    seanp2500 GBAtemp Fan

    Member
    356
    123
    Jun 2, 2010
    United States
    yardie you a lifesaver tried running script and got error about recipe for target fs.squashfs failed?

    thanks urherenow i will try build ace.nro this way i had tried just typing make
     
    Last edited by seanp2500, Jan 14, 2018
  4. MarcoMartins

    MarcoMartins Member

    Newcomer
    16
    9
    Oct 11, 2017
    Portugal
    Not sure if anyone still uses this, but when I downloaded the VM and run the scripts they were no longer working. So I have updated them to fetch the missing dependencies (only for this machine it will not work on a vanilla machine, although if requested maybe I can do that) and instead of always download the repositories, just do that once and next time, update with latest changes. Also, now ace.nro being compiled on scripts.
    So the steps are:
    1. Unzip the files wherever you want and give them running permissions
    2. Open a terminal and run ./buildenv.sh
    3. Add the roms to ~/RetroArch/fs/ as said before with lowercase characters with no space
    4. In the terminal run ./buildretro.sh and choose the library accordingly to the roms added before
    5. At this point, if there was no error, the ~/pegaswitch/nros dir have both the ace.nro and retroarch.nro files resultant of the compilation
    6. Now on the terminal write pegaswith and the pegaswitch window will be visible.
    7. Insert the DNS IP shown in that window to Switch network DNS configuration.
    8. Now try to connect the Switch to pegaswith by attempting to connect to internet. Retry this step until connected to pegaswitch with success (could take more than one try)
    9. Open another terminal and enter nc -v -l -p 2991
    10. Now back to pegaswitch window, in there enter runnro ./nros/ace.nro
    11. On the previous terminal window now there should be some action. If there is not something like this on the terminal:
      - starting push server ...
      - IP is 192.168.1.110

      but this:
      searching for webkit ...
      - ready to exit

      Press X on the Switch once and that should do the trick.
    12. Now for the final step open another terminal and go to ~/pegaswitch/nros dir and do ncat --send-only switchip 2991 < retroarch.nro note that 'switchip' must be the IP shown in the other terminal, in my case ncat --send-only 192.168.1.110 2991 < retroarch.nro
    13. Look at the Switch, it should be running the RetroArch now.
    P.S. If wanted to try another core emulator or another roms, just run the second script (start in step 4 and continue).

    Thanks yardie for the initiation on this.
     

    Attached Files:

    Greg956, KeyZiro and yardie like this.
  5. VashTS

    VashTS Beat it, son

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

    Our Patreon
    3,986
    750
    Mar 14, 2009
    United States
    Upstate NY
    ugh i get this error when using this ezretro v3

    upload_2018-1-29_8-4-39.png

    trying to build snes9x again
     
    Last edited by VashTS, Jan 29, 2018
  6. yardie
    OP

    yardie GBAtemp Maniac

    Member
    1,070
    1,113
    Mar 27, 2016
    United States
    Create the folder manually. Maybe the script doesn't create it
     
  7. VashTS

    VashTS Beat it, son

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

    Our Patreon
    3,986
    750
    Mar 14, 2009
    United States
    Upstate NY
    now i get this error - i really suck at linux but damn at least i could compile previously :(

    upload_2018-1-29_8-26-48.png
     
  8. yardie
    OP

    yardie GBAtemp Maniac

    Member
    1,070
    1,113
    Mar 27, 2016
    United States
    I'll update my script to include the updated stuff
    I dunno what his script does
     
    VashTS likes this.
  9. VashTS

    VashTS Beat it, son

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

    Our Patreon
    3,986
    750
    Mar 14, 2009
    United States
    Upstate NY
    this error was with your v2 script
     
  10. yardie
    OP

    yardie GBAtemp Maniac

    Member
    1,070
    1,113
    Mar 27, 2016
    United States
    Script needs updating
    Gonna work on it later tonight
     
    VashTS likes this.
  11. MarcoMartins

    MarcoMartins Member

    Newcomer
    16
    9
    Oct 11, 2017
    Portugal
    Strange, in line 27 the code is similar to the one yardie had.

    Code:
    read emu
    if [ "$emu" == "1" ] #line 27 
    It should replace the "$emu" by "1" but instead replaced it by ": 1:"
    I will try to search for more info on this.

    Edit: Ok after reading more on this, I think I found the cause on StackOverflow.
    You are executing the scripts with sh which has a less extensive syntax, so, open terminal and run with ./buildenv.sh and ./buildretro.sh instead.
     
    Last edited by MarcoMartins, Jan 29, 2018
  12. untok

    untok GBAtemp Regular

    Member
    175
    13
    Dec 25, 2012
    Finland
    Good instructions i have question. Is vgmoose retroarch cabable moving joycons attached to portable mode without removing them to unit.
     
  13. DarkOrb

    DarkOrb GBAtemp Regular

    Member
    134
    154
    Oct 11, 2013
    Gambia, The
    Yes, with vgmoose's build you can use the joycons while attached.

    Btw, anybody knows how I can use other cores? I found several compiled cores (f.e. GearBoy) here:

    https://drive.google.com/drive/folders/1L5r_OhnMeFK0fE9gQiGIWTEPJTn11l9y

    But whenever I rename them to libretro_switch.a and replace the original one with it, I get an error (something along the line, that retroarch_switch.a could not be created). If I rename it to snes9x2010_libretro_switch.a and replace the original one with it, I can create a retroarch_switch.a and can run it, but it still uses the snes core and the Super Mario World Rom (even though I placed a Gameboy-Rom in the FS-Folder). I could need some help.
     
  14. untok

    untok GBAtemp Regular

    Member
    175
    13
    Dec 25, 2012
    Finland

    i dunno if this help but found this tuto. https://gbatemp.net/threads/how-to-build-vbanext-only-for-people-with-ra-and-pega.493795/

    mv the libretro_switch.a to the RetroArch folder and insert the Rom of your Choice into the Fs Folder

    and build with that command make LLVM_POSTFIX=-5.0 -f Makefile.switch (only for non arch systems)

    dont forget to delete bevor each build the fs.squashfs (not the one which ends with .o or .c) this line im thinkin its maybe some kind of cache to earlier build and need to del. But always try if it works :)
     
    MarcoMartins likes this.
  15. punderino

    punderino aka Big-Dick Swinger

    Member
    1,031
    568
    Jan 5, 2016
    United States
    Kansas City, Missouri
    Just read the error, you need to install elftools.
     
  16. VashTS

    VashTS Beat it, son

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

    Our Patreon
    3,986
    750
    Mar 14, 2009
    United States
    Upstate NY
    emphasis on the "i really suck at linux" part ;)
     
  17. untok

    untok GBAtemp Regular

    Member
    175
    13
    Dec 25, 2012
    Finland
    Hello i tried to compile vgmoose retroach and get cannot compile fs.squasfile cannot found
    . I heard this must be delete on original retroarch .

    i hope launcer release is this week.
     
  18. untok

    untok GBAtemp Regular

    Member
    175
    13
    Dec 25, 2012
    Finland
    Edit fixed it its my typo on fs folder naming named it to ls instead of fs. Now its compiled to nro. :yaypsp:
     
  19. MlSTERT

    MlSTERT Newbie

    Newcomer
    4
    1
    Feb 12, 2018
    Brazil
    Brazil
    If I want to create a nro file to be emulated by yuzu/ryujix it will work?

    (something like a gb/genesis rom)
     
    Last edited by MlSTERT, Feb 14, 2018
  20. VashTS

    VashTS Beat it, son

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

    Our Patreon
    3,986
    750
    Mar 14, 2009
    United States
    Upstate NY
    Thanks for the tip, and now i get this...

    upload_2018-2-18_21-49-47.png