Hacking Ubuntu VM with Pegaswitch Libtransistor and RetroArch PreConfigured

yardie

Banned!
OP
Banned
Joined
Mar 27, 2016
Messages
1,334
Trophies
1
XP
1,549
Country
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
 

Attachments

  • ezretro_v2.zip
    975 bytes · Views: 185
Last edited by yardie,

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,760
Trophies
2
Age
48
Location
Japan
XP
3,657
Country
United States
I am thinking about updating the script to give you a choice between snes , nes and gba retroarch

Do you have the source link for the ace loader?
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,
D

Deleted User

Guest
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 ,

MarcoMartins

Member
Newcomer
Joined
Oct 11, 2017
Messages
17
Trophies
0
Age
38
XP
71
Country
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.
 

Attachments

  • ezretro_v3.zip
    2.2 KB · Views: 176

VashTS

Beat it, son
Member
Joined
Mar 14, 2009
Messages
4,308
Trophies
1
Age
39
Location
Upstate NY
XP
3,750
Country
United States
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,

MarcoMartins

Member
Newcomer
Joined
Oct 11, 2017
Messages
17
Trophies
0
Age
38
XP
71
Country
Portugal
ugh i get this error when using this ezretro v3

View attachment 112444

trying to build snes9x again

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,

DarkOrb

Well-Known Member
Member
Joined
Oct 11, 2013
Messages
290
Trophies
0
Age
31
XP
874
Country
Germany
Good instructions i have question. Is vgmoose retroarch cabable moving joycons attached to portable mode without removing them to unit.

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.
 

untok

Well-Known Member
Member
Joined
Dec 25, 2012
Messages
272
Trophies
1
Age
46
Website
romumaailma.blogspot.com
XP
1,117
Country
Finland
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.


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 :)
 
  • Like
Reactions: MarcoMartins

VashTS

Beat it, son
Member
Joined
Mar 14, 2009
Messages
4,308
Trophies
1
Age
39
Location
Upstate NY
XP
3,750
Country
United States
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.

Thanks for the tip, and now i get this...

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

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    Interesting lol
  • Psionic Roshambo @ Psionic Roshambo:
    I think I watched a video where two games at 4K where eating just over 16GB of RAM and it's the one case where the 7900XT and XTX pulled ahead (minus RTX of course)
  • Psionic Roshambo @ Psionic Roshambo:
    So my opinion is that they could age a bit better in the future, and maybe AMD will continue improving them via drivers like they tend to do. No guarantee there but they have done it in the past. Just a feeling I have.
  • The Real Jdbye @ The Real Jdbye:
    cyberpunk at 4k without DLSS/fidelityfx *might* exceed 12gb
    +1
  • The Real Jdbye @ The Real Jdbye:
    but that game barely runs at native 4k
  • Psionic Roshambo @ Psionic Roshambo:
    I think it was some newer games and probably poorly optimized PS4 or PS5 ports
  • The Real Jdbye @ The Real Jdbye:
    they definitely will age better but i feel dlss might outweigh that since it looks about as good as native resolution and much less demanding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    When I played Cyberpunk on my old 2080 Ti it sucked lol
  • The Real Jdbye @ The Real Jdbye:
    AMD could introduce something comparable to DLSS but nvidia's got a lot more experience with that
  • The Real Jdbye @ The Real Jdbye:
    least amd 7xxx has tensor cores which the previous generations didn't so there is the potential for AI upscaling
  • Psionic Roshambo @ Psionic Roshambo:
    They have FSR or whatever it's called and yeah it's still not great
  • The Real Jdbye @ The Real Jdbye:
    so AMD seem to finally be starting to take AI seriously
  • Psionic Roshambo @ Psionic Roshambo:
    Oh yeah those new 8000 CPUs have AI cores built in that's interesting
  • Psionic Roshambo @ Psionic Roshambo:
    Maybe they plan on offloading to the CPU?
  • Psionic Roshambo @ Psionic Roshambo:
    Would be kinda cool to have the CPU and GPU working in random more
  • Psionic Roshambo @ Psionic Roshambo:
    Tandem even
  • The Real Jdbye @ The Real Jdbye:
    i think i heard of that, it's a good idea, shouldn't need a dedicated GPU just to run a LLM or video upscaling
  • The Real Jdbye @ The Real Jdbye:
    even the nvidia shield tv has AI video upscaling
  • The Real Jdbye @ The Real Jdbye:
    LLMs can be run on cpu anyway but it's quite slow
  • BakerMan @ BakerMan:
    Have you ever been beaten by a wet spaghetti noodle by your girlfriend because she has a twin sister, and you got confused and fucked her dad?
  • Psionic Roshambo @ Psionic Roshambo:
    I had a girlfriend who had a twin sister and they would mess with me constantly.... Until one chipped a tooth then finally I could tell them apart.... Lol
  • Psionic Roshambo @ Psionic Roshambo:
    They would have the same hair style the same clothes everything... Really messed with my head lol
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to maybe close the gap a bit with Nvidia. Plus it would kinda put Nvidia at a future disadvantage since Nvidia can't make X86/64 CPUs? Intel and AMD licensing issues... I wonder how much that has held back innovation.
  • The Real Jdbye @ The Real Jdbye:
    i don't think nvidia wants to get in the x64 cpu market anyways
    The Real Jdbye @ The Real Jdbye: i don't think nvidia wants to get in the x64 cpu market anyways