Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulation #103

Open
Hedronmx opened this issue Oct 20, 2018 · 44 comments
Open

Emulation #103

Hedronmx opened this issue Oct 20, 2018 · 44 comments
Labels
enhancement New feature or request needs testing

Comments

@Hedronmx
Copy link

Could you add support for emulators?

@tkashkin
Copy link
Owner

Right now it's possible to add custom game with + button in headerbar.
How do you think emulator support should be added?

  • One source per emulator.
  • One source for all emulated games.
  • Use existing compatibility layers system.

@Hedronmx
Copy link
Author

You could use libretro for this, use it as a source. Then the user could select which "Core" to use (A core is a game emulator, like snes9x or dolphin) and select the rom.
Maybe you could use a core as a source but I believe that could be too cumbersome.

What do you think??

@tkashkin
Copy link
Owner

tkashkin commented Oct 21, 2018

RetroArch is now supported as a compatibility layer.

Add game ROM as a custom game, force compatibility mode in its properties and select RetroArch as a compatibility layer. Then select appropriate core and run.

image

I plan to add other (not RetroArch) emulator support, emulated games source and possibly recursive game scan.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@tkashkin

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@neuromancer

This comment has been minimized.

@Hedronmx

This comment has been minimized.

@tkashkin

This comment has been minimized.

@Hedronmx

This comment has been minimized.

tkashkin added a commit that referenced this issue Oct 26, 2018
Download only mode (#107)
@tkashkin
Copy link
Owner

It's now possible to add custom emulators. Emulators can be launched with compat tools, just like regular games.

image

To use this you need to add emulator in settings, add custom game and force "Custom emulator" as a compatibility tool for this game. Then select emulator and run.

image

tkashkin added a commit that referenced this issue Jun 9, 2019
@tkashkin tkashkin added enhancement New feature or request needs testing labels Jun 9, 2019
@tkashkin
Copy link
Owner

tkashkin commented Jun 9, 2019

f5b3ad0 adds emulated games import.
image
image

GameHub parses RetroArch cores info for supported file extensions and scans directory with find. (Some cores should probably be blacklisted as they are not that useful)

Custom emulators now can have a game file pattern.
image

tkashkin added a commit that referenced this issue Jun 13, 2019
Images and icon patterns for custom emulators
Added button to download all missing images for games
Added data providers page to settings
@hlechner
Copy link

hlechner commented Jun 20, 2019

I was looking to find a way to filter my console game (emulated) from the rest of the games without needing to use tags, so, here my idea:

By creating a new platform filter: Linux, Windows, Mac and Emulators.

In this idea, everything that uses retroarch or custom emulator would receive the "Emulator" platform and loses the "Linux" platform.

Not sure if it's the best approach but at least it would be possible to filter the console games and also technically it's not native from Linux/Windows/Mac would make sense to not display as native from these platforms.

tkashkin added a commit that referenced this issue Jun 20, 2019
Improved image scaling
Fix images downloader popup being cut off in some cases (#249)
@tkashkin
Copy link
Owner

I have added Emulated platform. You'll need to reimport emulated games to apply it.

@hlechner
Copy link

Awesome, working perfectly here

@CorporalQuesadilla
Copy link

CorporalQuesadilla commented Jun 22, 2019

Everything works perfectly! Only thing I've noticed is that Retroarch does not have a custom pattern option (at least, that I could find). As a result, .zip and .7z (among some other formats) are not picked up. So far these are the only two formats that are missing from my library, I'll keep you updated if I find more.

I'm not sure if the solution is just to add these missing extensions as found or to let the user have total control over which extensions are searched for.

I should mention that when it comes to file extraction, Retroarch already takes care of this on its own - there's no need to extract using GameHub and pass the result in - Retroarch can easily take in a zip (or in some (core-specific?) cases, 7z) and load only the appropriate file for its core.

@tkashkin
Copy link
Owner

@CorporalQuesadilla currently some cores and file extensions are ignored to not spam imported games list with possibly unrelated files:

private const string[] LIBRETRO_IGNORED_CORES = { "3dengine", "ffmpeg", "dosbox", "dosbox_svn", "dosbox_svn_glide" };
private const string[] LIBRETRO_IGNORED_FILES = { "bin", "dat", "exe", "zip", "7z", "gz" };

Maybe it should be configurable.

@CorporalQuesadilla
Copy link

CorporalQuesadilla commented Jun 22, 2019

That's fair, I can definitely see the benefits of having a blacklist, especially for .bin, which causes a lot of issues for users who should be using .cue in the first place. I think Genesis/MD sometimes use .bin for some ROMs, but overall the No-Intro standard is .md. Virtual Boy and DS also use .bin sometimes. Still, bin is more likely to cause issues than not.

I've also noticed that PSX cores do accept .exe - an unlikely circumstance, though. I think that most Dosbox users would likely be using a standalone build instead of the libretro core, and agree that including exe by default would likely cause more clutter.

If we're going with the blacklist approach, perhaps there could be checkboxes for each so the user becomes aware of which extensions are ignored.

If we're going with a whitelist approach, I think all extensions should appear in a comma separated textbox, alongside a list of defaults (or a reset to default button).

Personally, I prefer the whitelist approach, as a complete blacklist would be rather difficult, and somewhat less useful since Linux users often have tons of files without extensions at all while ROMs are almost always packaged with some form of semi-unique extension.

For reference, here are the extensions recognized by most major cores:
"smc", "sfc", "swc", "fig", "bs", "vb", "vboy", "gd3", "gd7", "dx2", "bsx", "gb", "gbc", "bml", "rom", "st", "min", "nds", "n64", "v64", "z64", "u1", "ndd", "3ds", "3dsx", "elf", "axf", "cci", "cxi", "app", "nes", "fds", "unf", "unif", "iso", "gcm", "dol", "tgc", "wbfs", "ciso", "gcz", "wad", "gba", "agb", "dmg", "sgb", "cgb", "fd", "sap", "k7", "m7", "m5", "ri", "mx1", "mx2", "col", "dsk", "cas", "sg", "sc", "m3u", "cue", "toc", "ccd", "pbp", "chd", "img", "mdf", "cbn", "cso", "prx", "tzx", "tap", "z80", "rzx", "scl", "trd", "p", "t81", "dim", "img", "d88", "88d", "hdm", "dup", "2hd", "xdf", "hdf", "cmd", "vms", "dci", "smd", "32x", "sms", "68k", "mdx", "gen", "gg", "sg", "md", "cdi", "gdi", "game", "88", "ngp", "ngc", "d98", "98d", "fdi", "fdd", "tfd", "hdi", "thd", "nhd", "hdd", "hdn", "pce", "sgx", "int", "vec", "ws", "wsc", "pc2", "a26", "a78", "xfd", "atr", "atx", "cdm", "a52", "xex", "j64", "jag", "abs", "cof", "prg", "lnx", "st", "msa", "stx", "dim", "ipf", "sna", "tap", "cdt", "voc", "kcr"

There may be a few duplicates, but I went through every core and manually typed only the ones I felt worth including. No idea if it's any use to you, but I've been meaning to do this for my own personal projects anways. I did choose to leave out any archive formats (mostly zip and 7z) as well as anything associated with dosbox or otherwise super common formats.

@tkashkin
Copy link
Owner

Now blacklists are configurable in Settings/Emulators/RetroArch. Both lists should be separated by |.

@hlechner
Copy link

hlechner commented Jul 2, 2019

Question about the dosbox support: it should be displayed on Compatibility Layer?
image

@tkashkin
Copy link
Owner

tkashkin commented Jul 2, 2019

@hlechner yes, DOSBox is displayed as compatibility layer if there is dosbox executable somewhere in $PATH and there are .conf files in game directory.

@hlechner
Copy link

hlechner commented Jul 2, 2019

I was running the games directly calling the dosbox without a dosbox.conf per game but using a global one on ~/.dosbox/dosbox.conf. That's why DOSBox didn't show on the compatibility layer.

Maybe would be a good idea to document it then? I can create a wiki page if you want.

Based on Arch Linux Wiki to create a file you need to run the command (inside the DOSBox):
config -wc dosbox.conf

And then you can manually edit the dosbox.conf to launch the game by adding the lines to execute the game on [autoexec] section, here the example of the game Pizza Tycoon:

MOUNT C "."
C:
PT.EXE

@tkashkin
Copy link
Owner

tkashkin commented Jul 2, 2019

@hlechner

I don't think there's anything to improve here. Most DOSBox games have configs and GameHub should detect them.

Documentation would be nice though. I have created an issue for it.
Feel free to edit wiki pages if you want. Ask me if you have any questions.

@Sixdd6
Copy link

Sixdd6 commented Oct 5, 2019

I've just found GameHub today and tried to import a Cemu game. I have set up Cemu as a custom emulator but when I go to import the game (Breath of the Wild) it fails to find the game. My folder structure is (Emulation/Games/Nintendo - WiiU/DECRYPTED/The Legend of Zelda Breath of the Wild [ALZE0101]/code/U-King.rpx) but no matter what folder I point GameHub to it just doesn't find the game at all. Also when try to add the rpx file directly it is greyed out and not selectable. So how would I go about importing exactly?

@tkashkin
Copy link
Owner

tkashkin commented Oct 5, 2019

@Sixdd6 Have you configured Cemu as a custom emulator? To do this:

  • Open Settings > Emulators
  • Add an emulator, set its executable, directory and compatibility options.
  • Set emulator arguments.
    For Cemu it should be something like -g $file $game_args.
    Add -f to emulator or game arguments to launch it in fullscreen.
  • Set game file patterns:
    • Executable - primary file that needs to be passed to the emulator.
      For Cemu it should be something like ./code/*.rpx|*.wud|*.wux
    • Image, Icon - GameHub can import images and icons if game bundles them in separate files somewhere in its directory.
      For Cemu you can use ./meta/bootTvTex.tga as image and ./meta/iconTex.tga as icon.

After you've configured an emulator, click + button in main window and Import emulated games.

@Sixdd6
Copy link

Sixdd6 commented Oct 5, 2019

After checking through your instructions, yes the emulator is set up just fine. The problem is that GameHub does not detect the game properly, I click the + button and browse to where the .rpx file is at but the game is not detected. I have already tried running the game through Cemu through Wine and it works fine, GameHub simply does not detect the game.

@Sixdd6
Copy link

Sixdd6 commented Oct 5, 2019

I found the problem, the values for executable and images were autofilled but not actually filled, they were slightly grey. Maybe a proper autofill for those values would be good since they disappear as soon as you click to input the exact same thing anyway.

@telanus
Copy link

telanus commented Nov 12, 2019

When importing a few billion roms Gamehub seems to hang, as there is no indication that GameHub is importing anything. would be way more user friendly if there is any indication that GameHub is importing/working, since the current behaviour it looks a lot like nothing is happening and that GH has crashed

Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Download only mode (tkashkin#107)


Former-commit-id: 4150ba2
Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Images and icon patterns for custom emulators
Added button to download all missing images for games
Added data providers page to settings


Former-commit-id: e4486e7
Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Improved image scaling
Fix images downloader popup being cut off in some cases (tkashkin#249)


Former-commit-id: 1543581
Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs testing
Projects
None yet
Development

No branches or pull requests

7 participants