mirror of
https://github.com/lutris/lutris
synced 2024-09-04 23:13:35 +00:00
Add higan runner.
This commit is contained in:
parent
cae9c54ea7
commit
5a37c1043b
|
@ -7,7 +7,7 @@ __all__ = (
|
|||
# Microsoft based
|
||||
"wine", "winesteam", "dosbox",
|
||||
# Multi-system
|
||||
"mame", "mess", "mednafen", "scummvm", "residualvm", "libretro", "ags",
|
||||
"mame", "mess", "mednafen", "scummvm", "residualvm", "libretro", "ags", "higan",
|
||||
# Commdore
|
||||
"fsuae", "vice",
|
||||
# Atari
|
||||
|
|
94
lutris/runners/higan.py
Normal file
94
lutris/runners/higan.py
Normal file
|
@ -0,0 +1,94 @@
|
|||
from lutris.runners.runner import Runner
|
||||
from os.path import expanduser
|
||||
|
||||
|
||||
class higan(Runner):
|
||||
human_name = "higan"
|
||||
description = ("Multi-system emulator including NES, GB(A), PC Engine "
|
||||
"support.")
|
||||
platforms = [
|
||||
'Nintendo Game Boy (Color)',
|
||||
'Nintendo Game Boy Advance',
|
||||
'Sega Game Gear',
|
||||
'Sega Genesis/Mega Drive',
|
||||
'Sega Master System',
|
||||
'Nintendo NES',
|
||||
'NEC PC Engine TurboGrafx-16',
|
||||
'NEC PC Engine SuperGrafx',
|
||||
'Nintendo SNES',
|
||||
'Bandai WonderSwan',
|
||||
]
|
||||
runner_executable = "higan/bin/higan"
|
||||
game_options = [
|
||||
{
|
||||
"option": "main_dir",
|
||||
"type": "directory_chooser",
|
||||
"label": "ROM directory",
|
||||
'help': ("The game data directory. \n"
|
||||
"higan uses its own \"Game Pak\" system. Gamepaks are "
|
||||
"an attempt to simulate physical Nintendo Game Paks in digital form. "
|
||||
"The idea is that for each game, one folder acts as a gamepak, "
|
||||
"and contains all data that is specific to said game.")
|
||||
},
|
||||
{
|
||||
"option": "subgame1",
|
||||
"type": "directory_chooser",
|
||||
"label": "Secondary ROM directory",
|
||||
"advanced": True,
|
||||
"help": ("The game data directory for the secondary cart slot"
|
||||
"on either the Sufami Turbo, Satellaview or Super Game Boy.")
|
||||
},
|
||||
{
|
||||
"option": "subgame2",
|
||||
"type": "directory_chooser",
|
||||
"label": "Tertiary ROM directory",
|
||||
"advanced": True,
|
||||
"help": "The game data directory for the tertiary cart slot on the Sufami Turbo."
|
||||
}
|
||||
]
|
||||
runner_options = [
|
||||
{
|
||||
"option": "fs",
|
||||
"type": "bool",
|
||||
"label": "Fullscreen",
|
||||
"default": False,
|
||||
},
|
||||
{
|
||||
"option": "region",
|
||||
"type": "choice",
|
||||
"label": "Region",
|
||||
"choices": [('Auto', 'auto'),
|
||||
('NTSC-U', 'NTSC-U'),
|
||||
('PAL', 'PAL'),
|
||||
('NTSC-J', 'NTSC-J')],
|
||||
"default": "auto",
|
||||
"help": "The region of the console."
|
||||
}
|
||||
]
|
||||
|
||||
def play(self):
|
||||
|
||||
rom = self.game_config.get("main_dir") or ''
|
||||
fullscreen = self.runner_config.get("fs") or False
|
||||
region = self.runner_config.get("region") or 'auto'
|
||||
subgame1 = self.game_config.get("subgame1") or ''
|
||||
subgame2 = self.game_config.get("subgame2") or ''
|
||||
|
||||
command = [self.get_executable()]
|
||||
|
||||
if fullscreen:
|
||||
command.append('--fullscreen')
|
||||
|
||||
if region != 'auto':
|
||||
command.append(region + '|' + expanduser(rom))
|
||||
else:
|
||||
command.append(expanduser(rom))
|
||||
|
||||
if subgame1:
|
||||
command.append(expanduser(subgame1))
|
||||
if subgame2:
|
||||
command.append(expanduser(subgame2))
|
||||
|
||||
launch_info = {'command': command}
|
||||
|
||||
return launch_info
|
BIN
share/lutris/media/runner_icons/higan.png
Normal file
BIN
share/lutris/media/runner_icons/higan.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in a new issue