diff --git a/Config.in b/Config.in index 05c8dbdffcc..f0d909b9d4c 100644 --- a/Config.in +++ b/Config.in @@ -176,6 +176,7 @@ menu "Emulators" endmenu source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/emulators/amiberry/Config.in" + source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/emulators/devilutionx/Config.in" source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/emulators/dolphin-emu/Config.in" source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/emulators/dosbox/Config.in" source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/emulators/dosbox-staging/Config.in" diff --git a/batocera-Changelog b/batocera-Changelog index e89aedf8b29..08e557e463f 100644 --- a/batocera-Changelog +++ b/batocera-Changelog @@ -22,6 +22,7 @@ * add: easy vulkan configuration for retroarch / rpcs3 * add: odroidn2 : jaguar * add: dolphin performances on odroidn2 increased + * add: DevilutionX (Diablo 1) * fix: Odroid Go Advance splash screen * fix: CHD broken support on most systems * fix: netplay (and add "watch mode") diff --git a/package/batocera/core/batocera-configgen/configgen/configgen/emulatorlauncher.py b/package/batocera/core/batocera-configgen/configgen/configgen/emulatorlauncher.py index 10dbfc9de95..0006421bb9a 100644 --- a/package/batocera/core/batocera-configgen/configgen/configgen/emulatorlauncher.py +++ b/package/batocera/core/batocera-configgen/configgen/configgen/emulatorlauncher.py @@ -34,6 +34,7 @@ from generators.rpcs3.rpcs3Generator import Rpcs3Generator from generators.pygame.pygameGenerator import PygameGenerator from generators.mame.mameGenerator import MameGenerator +from generators.devilutionx.devilutionxGenerator import DevilutionXGenerator import controllersConfig as controllers import signal import batoceraFiles @@ -69,7 +70,8 @@ 'melonds' : MelonDSGenerator(), 'rpcs3' : Rpcs3Generator(), 'mame' : MameGenerator(), - 'pygame': PygameGenerator() + 'pygame': PygameGenerator(), + 'devilutionx': DevilutionXGenerator(), } def main(args, maxnbplayers): diff --git a/package/batocera/core/batocera-configgen/configgen/configgen/generators/devilutionx/__init__.py b/package/batocera/core/batocera-configgen/configgen/configgen/generators/devilutionx/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/package/batocera/core/batocera-configgen/configgen/configgen/generators/devilutionx/devilutionxGenerator.py b/package/batocera/core/batocera-configgen/configgen/configgen/generators/devilutionx/devilutionxGenerator.py new file mode 100644 index 00000000000..e7760932502 --- /dev/null +++ b/package/batocera/core/batocera-configgen/configgen/configgen/generators/devilutionx/devilutionxGenerator.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import Command +from generators.Generator import Generator + +class DevilutionXGenerator(Generator): + + def generate(self, system, rom, playersControllers, gameResolution): + commandArray = ["devilutionx", "--data-dir", "/userdata/roms/devilutionx", + "--config-dir", "/userdata/system/config/devilutionx", + "--save-dir", "/userdata/saves/devilutionx"] + if system.isOptSet('showFPS') and system.getOptBoolean('showFPS') == True: + commandArray.append("-f") + return Command.Command(array=commandArray) diff --git a/package/batocera/core/batocera-configgen/configgen/setup.py b/package/batocera/core/batocera-configgen/configgen/setup.py index 89c145790d6..676490262fc 100644 --- a/package/batocera/core/batocera-configgen/configgen/setup.py +++ b/package/batocera/core/batocera-configgen/configgen/setup.py @@ -33,6 +33,7 @@ 'configgen.generators.melonds', 'configgen.generators.pygame', 'configgen.generators.mame', + 'configgen.generators.devilutionx', 'configgen.settings', 'configgen.utils'] ) diff --git a/package/batocera/core/batocera-configgen/configs/configgen-defaults.yml b/package/batocera/core/batocera-configgen/configs/configgen-defaults.yml index ff8edf61d37..54fc92c819f 100644 --- a/package/batocera/core/batocera-configgen/configs/configgen-defaults.yml +++ b/package/batocera/core/batocera-configgen/configs/configgen-defaults.yml @@ -316,3 +316,6 @@ pico8: core: retro8 options: ratio: 1/1 +devilutionx: + emulator: devilutionx + core: devilutionx diff --git a/package/batocera/core/batocera-system/Config.in b/package/batocera/core/batocera-system/Config.in index 949945b94ba..4863817016f 100644 --- a/package/batocera/core/batocera-system/Config.in +++ b/package/batocera/core/batocera-system/Config.in @@ -333,6 +333,8 @@ config BR2_PACKAGE_BATOCERA_ALL_SYSTEMS select BR2_PACKAGE_MOONLIGHT_EMBEDDED if !BR2_PACKAGE_BATOCERA_TARGET_ODROIDGOA # moonlight select BR2_PACKAGE_SCUMMVM # ALL # scummvm + select BR2_PACKAGE_DEVILUTIONX # ALL # DevilutionX (Diablo 1) + select BR2_PACKAGE_DOSBOX # ALL # dos select BR2_PACKAGE_DOSBOX_X if !BR2_PACKAGE_BATOCERA_TARGET_ROCK960 && \ diff --git a/package/batocera/emulationstation/batocera-es-system/es_features.yml b/package/batocera/emulationstation/batocera-es-system/es_features.yml index 1cab0374518..f3aa3dd43d1 100644 --- a/package/batocera/emulationstation/batocera-es-system/es_features.yml +++ b/package/batocera/emulationstation/batocera-es-system/es_features.yml @@ -51,6 +51,8 @@ libretro: "8x": 8 "16x": 16 "32x": 32 + devilutionx: + features: [ ] dolphin: features: [ ] dosbox: diff --git a/package/batocera/emulationstation/batocera-es-system/es_systems.yml b/package/batocera/emulationstation/batocera-es-system/es_systems.yml index faa5f6daad2..e69ffe41c6f 100644 --- a/package/batocera/emulationstation/batocera-es-system/es_systems.yml +++ b/package/batocera/emulationstation/batocera-es-system/es_systems.yml @@ -493,6 +493,23 @@ dos: Les jeux DOS sont disponibles sur myabandonware: http://www.myabandonware.com/browse/platform/dos/ +devilutionx: + name: DevilutionX + manufacturer: Ports + release: + hardware: port + extensions: [mpq] + group: ports + emulators: + devilutionx: + devilutionx: { requireAnyOf: [BR2_PACKAGE_DEVILUTIONX] } + comment_en: | + Diablo 1. + + Place diabdat.mpq (all lowercase) from your CD or GoG installation into: + + /userdata/roms/devilution/ + fbneo: name: Final Burn Neo manufacturer: Arcade diff --git a/package/batocera/emulationstation/batocera-es-system/roms/devilutionx/gamelist.xml b/package/batocera/emulationstation/batocera-es-system/roms/devilutionx/gamelist.xml new file mode 100644 index 00000000000..6563b6524c9 --- /dev/null +++ b/package/batocera/emulationstation/batocera-es-system/roms/devilutionx/gamelist.xml @@ -0,0 +1,11 @@ + + + + ./diabdat.mpq + DevilutionX (Diablo 1) + Classic Hack & Slash Action RPG + ./images/devilutionx-image.png + Action RPG + 1 + + diff --git a/package/batocera/emulationstation/batocera-es-system/roms/devilutionx/images/devilutionx-image.png b/package/batocera/emulationstation/batocera-es-system/roms/devilutionx/images/devilutionx-image.png new file mode 100644 index 00000000000..fbc17e0fd2d Binary files /dev/null and b/package/batocera/emulationstation/batocera-es-system/roms/devilutionx/images/devilutionx-image.png differ diff --git a/package/batocera/emulators/devilutionx/Config.in b/package/batocera/emulators/devilutionx/Config.in new file mode 100644 index 00000000000..4fa78cfc059 --- /dev/null +++ b/package/batocera/emulators/devilutionx/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_DEVILUTIONX + bool "DevilutionX" + select BR2_PACKAGE_SDL2 + select BR2_PACKAGE_SDL2_IMAGE + select BR2_PACKAGE_SDL2_TTF + select BR2_PACKAGE_SDL2_MIXER + select BR2_PACKAGE_LIBSODIUM + help + Diablo 1. + + https://github.com/diasurgical/devilutionX/ diff --git a/package/batocera/emulators/devilutionx/devilutionx.mk b/package/batocera/emulators/devilutionx/devilutionx.mk new file mode 100644 index 00000000000..92ee517c9ac --- /dev/null +++ b/package/batocera/emulators/devilutionx/devilutionx.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# devilutionx +# +################################################################################ + +# The first commit that allows specifying `--config-dir` (24 Nov 2020) +DEVILUTIONX_VERSION = 9c7d6c96 +DEVILUTIONX_SITE = $(call github,diasurgical,devilutionx,$(DEVILUTIONX_VERSION)) +DEVILUTIONX_DEPENDENCIES = sdl2 sdl2_mixer sdl2_image sdl2_ttf libsodium + +# Prefill the player name when creating a new character, in case the device does +# not have a keyboard. +DEVILUTIONX_CONF_OPTS += -DPREFILL_PLAYER_NAME=ON + +# Define VERSION_NUM so that DevilutionX build does not attempt to get it from +# git, to which it doesn't have access here. +# +# VERSION_NUM must match (\d\.)*\d. If the DEVILUTIONX_VERSION does not +# match this pattern (tested by simply looking for a "."), we use a fixed +# version with a commit hash suffix instead. +ifeq ($(findstring .,$(DEVILUTIONX_VERSION)),.) +DEVILUTIONX_CONF_OPTS += -DVERSION_NUM=$(DEVILUTIONX_VERSION) +else +DEVILUTIONX_CONF_OPTS += -DVERSION_NUM=1.1.0 -DVERSION_SUFFIX="-$(DEVILUTIONX_VERSION)" +endif + +$(eval $(cmake-package))