News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Emulation on Linux  (Read 1041 times)

NERV Agent

  • Sr. Member
  • ****
  • Posts: 435
  • Cureable if treated early by meds from Dr. Mario.
    • View Profile
Emulation on Linux
« on: October 22, 2018, 02:24:55 am »
Earlier this year I started using Linux, and it was a steep learning curve.

I managed to get PCSX2, Gens, and Higan to work. The Linux version of ePSXe is a nonfunctional hot fucking mess, but fortunately the Windows version of ePSXe is WINE compatible.

I haven't been gaming (or ROM hacking) much because of my IRL job and stuff, so I haven't had much time to tinker with this.

Now I'm trying to get an N64 emulator to work, and it's quite a throbbing headache. Project64 is Windows only, and not WINE compatible. Mupen64Plus uses a command line interface, and it's front end M64Py doesn't even fucking work.

I've heard of this thing called "RetroArch". I installed it once upon a time, couldn't get it to work, and tried to remove it but traces of it still remain for some reason.

There's got to be a solution to emulation gaming on Linux that doesn't involve a wall of text of command lines.

Linux users, what is the easiest way to emulate on Linux?
« Last Edit: October 23, 2018, 01:35:58 am by danke »
Pen Pen Toblerone Vomit Pooh Cancer is waifu of the year. Fucking Internet....

Goblin Slayer is a heartwarming tale of magical teenage adventurers overcoming adversity with the power of friendship and believing in oneself. Wholesome family entertainment! Watch it now!

Jorpho

  • Hero Member
  • *****
  • Posts: 3895
  • The cat screams with the voice of a man.
    • View Profile
Re: Emulation on Linux
« Reply #1 on: October 22, 2018, 09:30:24 am »
Earlier this year I started using Linux, and it was a steep learning curve.
I don't suppose there'd be much point in suggesting that you give up now and preserve your sanity, because there are surely better uses for your limited time?
« Last Edit: October 23, 2018, 01:36:06 am by danke »
This depresses me. I feel like a goldfish right now...

mziab

  • Sr. Member
  • ****
  • Posts: 272
    • View Profile
    • mteam
Re: Emulation on Linux
« Reply #2 on: October 22, 2018, 10:10:45 am »
Earlier this year I started using Linux, and it was a steep learning curve.

I managed to get PCSX2, Gens, and Higan to work. The Linux version of ePSXe is a nonfunctional hot fucking mess, but fortunately the Windows version of ePSXe is WINE compatible.

I haven't been gaming (or ROM hacking) much because of my IRL job and stuff, so I haven't had much time to tinker with this.

Now I'm trying to get an N64 emulator to work, and it's quite a throbbing headache. Project64 is Windows only, and not WINE compatible. Mupen64Plus uses a command line interface, and it's front end M64Py doesn't even fucking work.

I've heard of this thing called "RetroArch". I installed it once upon a time, couldn't get it to work, and tried to remove it but traces of it still remain for some reason.

There's got to be a solution to emulation gaming on Linux that doesn't involve a wall of text of command lines.

Linux users, what is the easiest way to emulate on Linux?

I haven't used the Linux build of ePSXe in a long time, but even over a decade ago it was already out-dated and you had to jump through hoops to get it working on a modern system. pSX has been working pretty well for me, though it doesn't support plugins and it's closed-source, so there may be some annoyances depending on your distro. The PSX core in Mednafen is pretty great nowadays, as is its libretro fork called beetle-psx.

I can say much about the state of N64 emulation, as I've no need to emulate that particular platform, but AFAIR libretro seems to have at least one N64 core.

RetroArch is actually really neat once you set it up. I use it for most of my emulation needs nowadays. Before that I used to keep around a lot of different emulators: ZSNES, Snes9x, Gens, Kega Fusion, Mednafen etc. But emulating everything from a single launcher reminiscent of Sony's XMB, having unified settings for stuff like shaders, controllers etc. is pretty nice. It also gets bonus points for being able to run on a Raspberry Pi, though not all cores are available or perform as well as on PC. I do agree first setting it up might be tricky, especially if you don't have a controller that's supported out of the box, as the menus are controller-driven. A more traditional GUI has been added recently, though I haven't used it, so I can't say much about it. Anyway, what I'm saying is, if you take the time to configure it correctly, it's a pretty nice option covering most systems. If it doesn't work out for you, well, it's a shame.
« Last Edit: October 23, 2018, 01:36:15 am by danke »

Sliver X

  • Hero Member
  • *****
  • Posts: 1024
  • Master of Ceremonies
    • View Profile
    • Panicus - A Fragment of Memory
Re: Emulation on Linux
« Reply #3 on: October 23, 2018, 08:25:12 pm »
I've been a big fan of "universal" frontends since the 90s.

For Linux I typically use a Python based frontend called Mah!Cade:



I wrote a page about making a dedicated Linux emulation machine here that may be helpful as well?


NERV Agent

  • Sr. Member
  • ****
  • Posts: 435
  • Cureable if treated early by meds from Dr. Mario.
    • View Profile
Re: Emulation on Linux
« Reply #4 on: October 24, 2018, 01:01:51 am »
I don't suppose there'd be much point in suggesting that you give up now and preserve your sanity, because there are surely better uses for your limited time?

Yes, but just like my decision to take up ROM hacking as a hobby, I guess it's just masochism.

I haven't used the Linux build of ePSXe in a long time, but even over a decade ago it was already out-dated and you had to jump through hoops to get it working on a modern system. pSX has been working pretty well for me, though it doesn't support plugins and it's closed-source, so there may be some annoyances depending on your distro. The PSX core in Mednafen is pretty great nowadays, as is its libretro fork called beetle-psx.

I can say much about the state of N64 emulation, as I've no need to emulate that particular platform, but AFAIR libretro seems to have at least one N64 core.

RetroArch is actually really neat once you set it up. I use it for most of my emulation needs nowadays. Before that I used to keep around a lot of different emulators: ZSNES, Snes9x, Gens, Kega Fusion, Mednafen etc. But emulating everything from a single launcher reminiscent of Sony's XMB, having unified settings for stuff like shaders, controllers etc. is pretty nice. It also gets bonus points for being able to run on a Raspberry Pi, though not all cores are available or perform as well as on PC. I do agree first setting it up might be tricky, especially if you don't have a controller that's supported out of the box, as the menus are controller-driven. A more traditional GUI has been added recently, though I haven't used it, so I can't say much about it. Anyway, what I'm saying is, if you take the time to configure it correctly, it's a pretty nice option covering most systems. If it doesn't work out for you, well, it's a shame.

I attempted to use RetroArch when I first got Linux and got confused. Where and how do I setup individual controller configurations for different consoles? I think I was able to get Sonic 3 running in a small window, but couldn't play it because I had no idea on how to setup the controls (or resize the window).

If my understanding is correct, this thing uses "cores", right? Is that comparable to plugins in an emulator, except they emulate an entire system? Does RetroArch support the N64 and Dreamcast?

I guess I might as well give it another shot, since it seems I cannot remove it from my system anyway.
Pen Pen Toblerone Vomit Pooh Cancer is waifu of the year. Fucking Internet....

Goblin Slayer is a heartwarming tale of magical teenage adventurers overcoming adversity with the power of friendship and believing in oneself. Wholesome family entertainment! Watch it now!

mziab

  • Sr. Member
  • ****
  • Posts: 272
    • View Profile
    • mteam
Re: Emulation on Linux
« Reply #5 on: October 24, 2018, 07:39:00 am »
I attempted to use RetroArch when I first got Linux and got confused. Where and how do I setup individual controller configurations for different consoles? I think I was able to get Sonic 3 running in a small window, but couldn't play it because I had no idea on how to setup the controls (or resize the window).

Well, I configured mine a long time ago before it even had an actual menu and only tweaked the config since then, so I'm not clear on current best practices, but here is the official howto. Just to make sure, what do you see when you run RetroArch with no arguments? Is it something like this? What controller are you using? There might be an autoconfig profile for your device. As for going fullscreen, you just need to press F. Here is an overview of the keyboard controls, if you want to know more.

The main idea is that you have a main profile for your controller(s) and remap controls for the core or game if needed. To remap you go into the menu (by pressing F1, which is the default menu button) after loading a game and scroll down to Controls, then change the controls and pick Save Remap File. This is all for the XMB-like menu, mind you.

Quote
If my understanding is correct, this thing uses "cores", right? Is that comparable to plugins in an emulator, except they emulate an entire system? Does RetroArch support the N64 and Dreamcast?

Yeah, cores are basically whole emulators stripped down and made into plugins. There is a mupen64plus core for N64 and reicast for Dreamcast, though I haven't used either.
« Last Edit: October 24, 2018, 08:59:44 am by mziab »

NERV Agent

  • Sr. Member
  • ****
  • Posts: 435
  • Cureable if treated early by meds from Dr. Mario.
    • View Profile
Re: Emulation on Linux
« Reply #6 on: October 28, 2018, 09:43:52 pm »
M'kay, so I followed the "howto" and....it doesn't even detect my controller. I am using a PS2 controller with this:

https://www.amazon.com/Trenro-Dual-PlayStation-Controller-Adapter-2/dp/B000F6BGXY/ref=sr_1_10?ie=UTF8&qid=1530610323&sr=8-10&keywords=ps2+controller+to+usb+adapter

My controller works on regular Mupen64Plus (I had to dick around with some config files, not very user friendly), so I know that is not the issue.

I even plugged the controller onto the other "free port" on that USB adapter, still nothing.

I am really hoping I can use this RetroArch thing to emulate everything from old 16-bit games to N64 and Dreamcast. Otherwise, it's just crap installed that's taking up space. How would I remove it? The following directions DO NOT WORK:

http://installion.co.uk/ubuntu/yakkety/universe/r/retroarch/uninstall/index.html

https://www.thelinuxfaq.com/ubuntu/ubuntu-17-04-zesty-zapus/retroarch?type=uninstall

So far, it's been my experience that there is a lot of misleading crap pertaining to Linux instructions on the Internet.
Pen Pen Toblerone Vomit Pooh Cancer is waifu of the year. Fucking Internet....

Goblin Slayer is a heartwarming tale of magical teenage adventurers overcoming adversity with the power of friendship and believing in oneself. Wholesome family entertainment! Watch it now!

Jorpho

  • Hero Member
  • *****
  • Posts: 3895
  • The cat screams with the voice of a man.
    • View Profile
Re: Emulation on Linux
« Reply #7 on: October 28, 2018, 11:37:40 pm »
The following directions DO NOT WORK:
The obvious question is, do you get some kind of error message? Or otherwise, what indication do you get that the instructions haven't worked?
This depresses me. I feel like a goldfish right now...

NERV Agent

  • Sr. Member
  • ****
  • Posts: 435
  • Cureable if treated early by meds from Dr. Mario.
    • View Profile
Re: Emulation on Linux
« Reply #8 on: October 29, 2018, 01:56:02 am »
When I type in "RetroArch" in the "Search your computer" box, it still pops up, and the program "launches" although with weird black boxes everywhere.

Otherwise, I got through playing Star Fox 64 on regular Mupen64Plus, and I noticed graphical glitches that weren't present in Project 64 on Windows. Is there a fix for this?
Pen Pen Toblerone Vomit Pooh Cancer is waifu of the year. Fucking Internet....

Goblin Slayer is a heartwarming tale of magical teenage adventurers overcoming adversity with the power of friendship and believing in oneself. Wholesome family entertainment! Watch it now!

Starscream

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
Re: Emulation on Linux
« Reply #9 on: October 29, 2018, 06:51:43 am »
Perhaps you have more luck with a dedicated live distro first, e.g. Lakka is based on Retroarch.

mziab

  • Sr. Member
  • ****
  • Posts: 272
    • View Profile
    • mteam
Re: Emulation on Linux
« Reply #10 on: October 29, 2018, 08:33:31 am »
M'kay, so I followed the "howto" and....it doesn't even detect my controller. I am using a PS2 controller with this:

https://www.amazon.com/Trenro-Dual-PlayStation-Controller-Adapter-2/dp/B000F6BGXY/ref=sr_1_10?ie=UTF8&qid=1530610323&sr=8-10&keywords=ps2+controller+to+usb+adapter

My controller works on regular Mupen64Plus (I had to dick around with some config files, not very user friendly), so I know that is not the issue.

I even plugged the controller onto the other "free port" on that USB adapter, still nothing.

What distro are you running? This may just be a permission issue. If you try to run RetroArch as root (sudo retroarch) does it detect your controller? It would be easier to diagnose if I had your RetroArch config (~/.config/retroarch/retroarch.cfg) and the output of the lsusb command. The output of "retroarch -v" from the terminal would also be useful.

I am really hoping I can use this RetroArch thing to emulate everything from old 16-bit games to N64 and Dreamcast. Otherwise, it's just crap installed that's taking up space. How would I remove it? The following directions DO NOT WORK:

Those instructions look fine if you're running a flavor of Ubuntu and installed RetroArch from a repository. It won't do anything if you built your own and installed it. So the question is, how did you install it? What does the "which retroarch" command show?

Oh, and just in case this isn't obvious, all of the commands I mentioned in this post need to be run from the terminal.

Lastly, I have to agree with the person above. Running Lakka from an usb stick might be a good way to get your feet wet and eliminate many possible problems which stem from your current install. You seem to be having a lot of problems, so a tailor-made solution might be better.

NERV Agent

  • Sr. Member
  • ****
  • Posts: 435
  • Cureable if treated early by meds from Dr. Mario.
    • View Profile
Re: Emulation on Linux
« Reply #11 on: October 30, 2018, 09:59:33 pm »
What distro are you running? This may just be a permission issue. If you try to run RetroArch as root (sudo retroarch) does it detect your controller? It would be easier to diagnose if I had your RetroArch config (~/.config/retroarch/retroarch.cfg) and the output of the lsusb command. The output of "retroarch -v" from the terminal would also be useful.

Those instructions look fine if you're running a flavor of Ubuntu and installed RetroArch from a repository. It won't do anything if you built your own and installed it. So the question is, how did you install it? What does the "which retroarch" command show?

Oh, and just in case this isn't obvious, all of the commands I mentioned in this post need to be run from the terminal.

Lastly, I have to agree with the person above. Running Lakka from an usb stick might be a good way to get your feet wet and eliminate many possible problems which stem from your current install. You seem to be having a lot of problems, so a tailor-made solution might be better.

I am using Ubuntu 16.04 LTS built into a Dell Precision 7520 laptop. I initially installed RetroArch through the Ubuntu Software Center when it was available. However, it was taken off the Ubuntu Software Center, so when I wanted to uninstall it using that, I couldn't.

The most recent RetroArch I got from here:

Code: [Select]
sudo add-apt-repository ppa:libretro/stable && sudo apt-get update && sudo apt-get install retroarch libretro-*
Here are the contents of "retroarch.cfg":

https://pastebin.com/KsTJC6MF

And here is the console output of "retroarch -v":

Code: [Select]
retroarch -v
[INFO] RetroArch 1.7.5 (Git c9c6c5a)
[INFO] === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX AES
Built: Oct  2 2018
[INFO] Version: 1.7.5
[INFO] Git: c9c6c5a
[INFO] =================================================
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 960x720
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_OML_sync_control and GLX_MESA_swap_control supported, using better swap control method...
[INFO] [GL]: Found GL context: x
[INFO] [GL]: Detecting screen resolution 1920x1080.
[INFO] [GLX]: Window manager is Compiz.
[INFO] [GLX]: X = 0, Y = 0, W = 960, H = 720.
[INFO] [GLX]: Found swap function: glXSwapIntervalMESA.
[INFO] [GLX]: glXSwapInterval(1)
[INFO] [GL]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2) .
[INFO] [GL]: Version: 3.0 Mesa 18.0.5.
[INFO] [GL]: Using resolution 960x720
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Setting up menu pipeline shaders for XMB ...
[INFO] [GLSL]: Compiling ribbon shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling simple ribbon shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling snow shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling modern snow shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling bokeh shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling snowflake shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Resetting shader to defaults ...
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
[INFO] [Video]: Found display server: x11
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Menu]: Found menu display driver: "menu_display_gl".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [LED]: LED driver = 'null' 0x556ec4296aa0
[INFO] [MIDI]: Initializing ...
[INFO] [MIDI]: Input disabled.
[INFO] [MIDI]: Output disabled.
[INFO] [MIDI]: Initialized "null" driver.
[INFO] SRAM will not be saved.
[INFO] Loading history file: [/home/[my admin name here, you don't need to know it]/.config/retroarch/content_history.lpl].
[INFO] Loading history file: [/home/[my admin name here, you don't need to know it]/.config/retroarch/content_favorites.lpl].
[INFO] Loading history file: [/home/[my admin name here, you don't need to know it]/.config/retroarch/content_music_history.lpl].
[INFO] Loading history file: [/home/[my admin name here, you don't need to know it]/.config/retroarch/content_video_history.lpl].
[INFO] Loading history file: [/home/[my admin name here, you don't need to know it]/.config/retroarch/content_image_history.lpl].
[INFO] [GL]: VSync => on
[INFO] [GLX]: glXSwapInterval(1)
[INFO] [PulseAudio]: Unpausing.
[INFO] [GL]: VSync => on
[INFO] [GLX]: glXSwapInterval(1)
[INFO] [PulseAudio]: Pausing.
Pen Pen Toblerone Vomit Pooh Cancer is waifu of the year. Fucking Internet....

Goblin Slayer is a heartwarming tale of magical teenage adventurers overcoming adversity with the power of friendship and believing in oneself. Wholesome family entertainment! Watch it now!

mziab

  • Sr. Member
  • ****
  • Posts: 272
    • View Profile
    • mteam
Re: Emulation on Linux
« Reply #12 on: October 31, 2018, 04:47:24 am »
I am using Ubuntu 16.04 LTS built into a Dell Precision 7520 laptop. I initially installed RetroArch through the Ubuntu Software Center when it was available. However, it was taken off the Ubuntu Software Center, so when I wanted to uninstall it using that, I couldn't.

The most recent RetroArch I got from here:

Code: [Select]
sudo add-apt-repository ppa:libretro/stable && sudo apt-get update && sudo apt-get install retroarch libretro-*

Well, if you're using Ubuntu, you can just use Synaptic instead of those commands. It should be present by default. It's kind of like Ubuntu Software Center, but more advanced. Uninstalling should be as simple as searching for the package you want, right-clicking and choosing the right option from the context menu, then clicking apply from the toolbar.

Here are the contents of "retroarch.cfg":

https://pastebin.com/KsTJC6MF

And here is the console output of "retroarch -v":

The config paths in retroarch.cfg look fine and from the log I see it's using the udev driver for input, so that's also good. However, it doesn't show any detected controllers, so my "permission problem" hypothesis seems very likely. This can be fixed, but I'll need more data:
1) the output of lsusb
2) the output of cat /proc/bus/input/devices
3) the output of ls -l /dev/input/*

You could try "sudo retroarch" from the terminal to force running as root. If it detects your pad, this proves it's just permissions that need fixing.