Skip to content

Commit

Permalink
[Emus] Add standalone Flycast emulator (#79)
Browse files Browse the repository at this point in the history
* Add standalone Flycast emulator, significant performance improvement compared to libretro core
Credit to tomato6333 from RGH Discord for compilation
* Add libretro label to flycast 16:9
* Update flycast binary
Flycast data and config dirs are now defined by environment variables $FLYCAST_DATA_DIR and $FLYCAST_CONFIG_DIR
* OpenGL support!
* Add config and data dirs
* Change atomiswave cpufreq name
* Change performance profile
Ondemand governor causes framedrops due to flycast being cpu-heavy
* Add jump pack support and use bios folder
* Fix missing leading slash
* Add emu.cfg
  • Loading branch information
cobaltgit authored Jul 14, 2024
1 parent 07a6ab0 commit 1c6ae03
Show file tree
Hide file tree
Showing 49 changed files with 217 additions and 14 deletions.
12 changes: 11 additions & 1 deletion Emus/ATOMISWAVE/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,15 @@
"imgpath": "../../Imgs/ATOMISWAVE",
"useswap": 1,
"shortname": 0,
"hidebios": 1
"hidebios": 1,
"launchlist": [
{
"name": "Flycast (Libretro)",
"launch": "launch.sh"
},
{
"name": "Flycast (Standalone)",
"launch": "launch_standalone.sh"
}
]
}
2 changes: 1 addition & 1 deletion Emus/DC/performance.sh → Emus/ATOMISWAVE/cpufreq.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1416000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3 changes: 2 additions & 1 deletion Emus/ATOMISWAVE/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ source /mnt/SDCARD/System/usr/trimui/scripts/FolderOverrideFinder.sh
RA_DIR=/mnt/SDCARD/RetroArch
EMU_DIR=/mnt/SDCARD/Emus/ATOMISWAVE

$EMU_DIR/performance.sh
$EMU_DIR/cpufreq.sh
$EMU_DIR/effect.sh

cd $RA_DIR/

Expand Down
17 changes: 17 additions & 0 deletions Emus/ATOMISWAVE/launch_standalone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
echo $0 $*
source /mnt/SDCARD/System/usr/trimui/scripts/FolderOverrideFinder.sh
EMU_DIR=/mnt/SDCARD/Emus/ATOMISWAVE
FLYCAST_DIR=/mnt/SDCARD/Emus/DC/flycast

$EMU_DIR/cpufreq.sh
$EMU_DIR/effect.sh

cd "$FLYCAST_DIR"

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:lib
export FLYCAST_BIOS_DIR="/mnt/SDCARD/BIOS/dc/"
export FLYCAST_DATA_DIR=$FLYCAST_BIOS_DIR
export FLYCAST_CONFIG_DIR="$FLYCAST_DIR/config/"

./flycast "$@"
8 changes: 6 additions & 2 deletions Emus/DC/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@
"hidebios": 1,
"launchlist": [
{
"name": "flycast",
"name": "Flycast (Libretro)",
"launch": "flycast.sh"
},
{
"name": "flycast 16:9",
"name": "Flycast (Libretro) (16:9)",
"launch": "flycast_wide.sh"
},
{
"name": "Flycast (Standalone)",
"launch": "flycast_standalone.sh"
}
]
}
3 changes: 2 additions & 1 deletion Emus/ATOMISWAVE/performance.sh → Emus/DC/cpufreq.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
echo 1608000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#!/bin/sh
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
2 changes: 1 addition & 1 deletion Emus/DC/flycast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source /mnt/SDCARD/System/usr/trimui/scripts/FolderOverrideFinder.sh
RA_DIR=/mnt/SDCARD/RetroArch
EMU_DIR=/mnt/SDCARD/Emus/DC

$EMU_DIR/performance.sh
$EMU_DIR/cpufreq.sh
$EMU_DIR/effect.sh

cd $RA_DIR/
Expand Down
127 changes: 127 additions & 0 deletions Emus/DC/flycast/config/emu.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
[achievements]
Enabled = no
HardcoreMode = no
Token =
UserName =

[audio]
VmuSound = no
backend = sdl2

[config]
BoxartDisplayMode = yes
Debug.GDBEnabled = no
Debug.GDBPort = 3263
Debug.GDBWaitForConnection = no
Debug.SerialConsoleEnabled = no
Debug.SerialPTY = no
DiscordPresence = yes
Dreamcast.AutoLoadState = no
Dreamcast.AutoSaveState = no
Dreamcast.Broadcast = 0
Dreamcast.Cable = 3
Dreamcast.ContentPath =
Dreamcast.HideLegacyNaomiRoms = yes
Dreamcast.Language = 1
Dreamcast.RamMod32MB = no
Dreamcast.Region = 1
Dreamcast.SavestateSlot = 0
Dynarec.Enabled = yes
FastGDRomLoad = no
FetchBoxart = yes
ForceFreePlay = yes
PerGameVmu = no
Profiler.DrawGUI = no
Profiler.Enabled = no
Profiler.FrameWarningTime = 0.018182
Profiler.OutputTTY = no
Sh4Clock = 200
UIScaling = 100
UploadCrashLogs = yes
UseReios = no
aica.AutoLatency = no
aica.BufferSize = 5468
aica.DSPEnabled = no
aica.Volume = 100
pvr.AutoSkipFrame = 2
pvr.MaxThreads = 3
pvr.rend = 0
rend.AnisotropicFiltering = 1
rend.CrossHairColor1 = 0
rend.CrossHairColor2 = 0
rend.CrossHairColor3 = 0
rend.CrossHairColor4 = 0
rend.CrosshairSize = 40
rend.CustomGpuDriver = no
rend.CustomTextures = no
rend.DelayFrameSwapping = yes
rend.DumpTextures = no
rend.DupeFrames = no
rend.EmulateFramebuffer = no
rend.ExtraDepthScale = 1.000000
rend.FixUpscaleBleedingEdge = yes
rend.FloatVMUs = no
rend.Fog = yes
rend.MaxFilteredTextureSize = 256
rend.ModifierVolumes = yes
rend.NativeDepthInterpolation = no
rend.PerPixelLayers = 32
rend.PerStripSorting = yes
rend.PixelBufferSize = 536870912
rend.RenderToTextureBuffer = no
rend.Resolution = 480
rend.Rotate90 = no
rend.ScreenStretching = 100
rend.ShowFPS = yes
rend.SuperWideScreen = no
rend.TextureFiltering = 0
rend.TextureUpscale = 1
rend.ThreadedRendering = yes
rend.TranslucentPolygonDepthMask = no
rend.UseMipmaps = yes
rend.WideScreen = no
rend.WidescreenGameHacks = no
rend.vsync = yes
ta.skip = 0

[input]
MouseSensitivity = 100
VirtualGamepadVibration = 20
device1 = 0
device1.1 = 1
device1.2 = 1
device2 = 10
device2.1 = 10
device2.2 = 10
device3 = 10
device3.1 = 10
device3.2 = 10
device4 = 10
device4.1 = 10
device4.2 = 10
maple_sdl_joystick_0 = 0
maple_sdl_keyboard = 0
maple_sdl_mouse = 0

[network]
ActAsServer = no
BattleCable = no
DNS = 46.101.91.123
EmulateBBA = no
Enable = no
EnableUPnP = yes
GGPO = no
GGPOAnalogAxes = 0
GGPOChat = yes
GGPOChatTimeout = 10
GGPOChatTimeoutToggle = yes
GGPODelay = 0
LocalPort = 37391
MultiboardSlaves = 1
NetworkOutput = no
Stats = yes
server =

[validate]
OpenGlChecks = no

Empty file added Emus/DC/flycast/data/.gitkeep
Empty file.
Binary file added Emus/DC/flycast/flycast
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libasn1.so.8
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libasound.so.2
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libbrotlicommon.so.1
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libbrotlidec.so.1
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libcom_err.so.2
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libcrypt.so.1
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libcrypto.so.1.1
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libcurl.so.4
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libgssapi.so.3
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libgssapi_krb5.so.2
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libhcrypto.so.4
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libheimbase.so.1
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libheimntlm.so.0
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libhogweed.so.5
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libhx509.so.5
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libidn2.so.0
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libk5crypto.so.3
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libkeyutils.so.1
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libkrb5.so.26
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libkrb5.so.3
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libkrb5support.so.0
Binary file not shown.
Binary file added Emus/DC/flycast/lib/liblber-2.4.so.2
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libldap_r-2.4.so.2
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libnettle.so.7
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libpsl.so.5
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libroken.so.18
Binary file not shown.
Binary file added Emus/DC/flycast/lib/librtmp.so.1
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libsasl2.so.2
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libssh.so.4
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libssl.so.1.1
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libunistring.so.2
Binary file not shown.
Binary file added Emus/DC/flycast/lib/libwind.so.0
Binary file not shown.
16 changes: 16 additions & 0 deletions Emus/DC/flycast_standalone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
echo $0 $*
source /mnt/SDCARD/System/usr/trimui/scripts/FolderOverrideFinder.sh
EMU_DIR=/mnt/SDCARD/Emus/DC

$EMU_DIR/cpufreq.sh
$EMU_DIR/effect.sh

cd "$EMU_DIR/flycast"

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:lib
export FLYCAST_BIOS_DIR="/mnt/SDCARD/BIOS/dc/"
export FLYCAST_DATA_DIR=$FLYCAST_BIOS_DIR
export FLYCAST_CONFIG_DIR="$FLYCAST_DIR/config/"

./flycast "$@"
4 changes: 1 addition & 3 deletions Emus/DC/flycast_wide.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/sh
echo $0 $*
#!/bin/sh
echo $0 $*
source /mnt/SDCARD/System/usr/trimui/scripts/FolderOverrideFinder.sh
RA_DIR=/mnt/SDCARD/RetroArch
EMU_DIR=/mnt/SDCARD/Emus/DC
cd $RA_DIR/

$EMU_DIR/performance.sh
$EMU_DIR/cpufreq.sh

#disable netplay
NET_PARAM=
Expand Down
12 changes: 11 additions & 1 deletion Emus/NAOMI/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,15 @@
"imgpath": "../../Imgs/NAOMI",
"useswap": 1,
"shortname": 0,
"hidebios": 1
"hidebios": 1,
"launchlist": [
{
"name": "Flycast (Libretro)",
"launch": "launch.sh"
},
{
"name": "Flycast (Standalone)",
"launch": "launch_standalone.sh"
}
]
}
3 changes: 3 additions & 0 deletions Emus/NAOMI/cpufreq.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3 changes: 2 additions & 1 deletion Emus/NAOMI/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ source /mnt/SDCARD/System/usr/trimui/scripts/FolderOverrideFinder.sh
RA_DIR=/mnt/SDCARD/RetroArch
EMU_DIR=/mnt/SDCARD/Emus/NAOMI

$EMU_DIR/performance.sh
$EMU_DIR/cpufreq.sh
$EMU_DIR/effect.sh

cd $RA_DIR/

Expand Down
17 changes: 17 additions & 0 deletions Emus/NAOMI/launch_standalone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
echo $0 $*
source /mnt/SDCARD/System/usr/trimui/scripts/FolderOverrideFinder.sh
EMU_DIR=/mnt/SDCARD/Emus/NAOMI
FLYCAST_DIR=/mnt/SDCARD/Emus/DC/flycast

$EMU_DIR/cpufreq.sh
$EMU_DIR/effect.sh

cd "$FLYCAST_DIR"

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:lib
export FLYCAST_BIOS_DIR="/mnt/SDCARD/BIOS/dc/"
export FLYCAST_DATA_DIR=$FLYCAST_BIOS_DIR
export FLYCAST_CONFIG_DIR="$FLYCAST_DIR/config/"

./flycast "$@"
2 changes: 0 additions & 2 deletions Emus/NAOMI/performance.sh

This file was deleted.

0 comments on commit 1c6ae03

Please sign in to comment.