Adding DolphinSA for RG353P & RG503

This commit is contained in:
brooksytech 2022-08-05 07:08:26 -07:00
parent c3cffb8188
commit 1f9934af23
No known key found for this signature in database
GPG key ID: 45B78D3C7B40B188
10 changed files with 425 additions and 9 deletions

View file

@ -0,0 +1,148 @@
[General]
LastFilename =
ShowLag = False
ShowFrameCount = False
ISOPaths = 1
RecursiveISOPaths = False
NANDRootPath =
WirelessMac =
[Interface]
ConfirmStop = True
UsePanicHandlers = True
OnScreenDisplayMessages = True
HideCursor = False
AutoHideCursor = False
MainWindowPosX = 403
MainWindowPosY = 148
MainWindowWidth = 800
MainWindowHeight = 600
Language = 0
ShowToolbar = True
ShowStatusbar = True
ShowLogWindow = False
ShowLogConfigWindow = False
ExtendedFPSInfo = False
ThemeName40 = Clean Blue
PauseOnFocusLost = False
[Display]
FullscreenResolution = Auto
Fullscreen = True
RenderToMain = False
RenderWindowXPos = -1
RenderWindowYPos = -1
RenderWindowWidth = 640
RenderWindowHeight = 480
RenderWindowAutoSize = False
KeepWindowOnTop = False
ProgressiveScan = False
PAL60 = True
DisableScreenSaver = True
ForceNTSCJ = False
[GameList]
ListDrives = False
ListWad = True
ListElfDol = True
ListWii = True
ListGC = True
ListJap = True
ListPal = True
ListUsa = True
ListAustralia = True
ListFrance = True
ListGermany = True
ListItaly = True
ListKorea = True
ListNetherlands = True
ListRussia = True
ListSpain = True
ListTaiwan = True
ListWorld = True
ListUnknown = True
ListSort = 3
ListSortSecondary = 0
ColorCompressed = True
ColumnPlatform = True
ColumnBanner = True
ColumnNotes = True
ColumnFileName = False
ColumnID = False
ColumnRegion = True
ColumnSize = True
ColumnState = True
[Core]
HLE_BS2 = False
TimingVariance = 40
CPUCore = 1
Fastmem = True
CPUThread = True
DSPHLE = True
SkipIdle = True
SyncOnSkipIdle = True
SyncGPU = False
SyncGpuMaxDistance = 200000
SyncGpuMinDistance = -200000
SyncGpuOverclock = 1.00000000
FPRF = False
AccurateNaNs = False
DefaultISO =
DVDRoot =
Apploader =
EnableCheats = True
SelectedLanguage = 0
OverrideGCLang = False
DPL2Decoder = False
Latency = 2
MemcardAPath =
MemcardBPath =
AgpCartAPath =
AgpCartBPath =
SlotA = 1
SlotB = 255
SerialPort1 = 255
BBA_MAC =
SIDevice0 = 6
AdapterRumble0 = True
SimulateKonga0 = False
SIDevice1 = 6
AdapterRumble1 = True
SimulateKonga1 = False
SIDevice2 = 0
AdapterRumble2 = True
SimulateKonga2 = False
SIDevice3 = 0
AdapterRumble3 = True
SimulateKonga3 = False
WiiSDCard = False
WiiKeyboard = False
WiimoteContinuousScanning = False
WiimoteEnableSpeaker = False
RunCompareServer = False
RunCompareClient = False
EmulationSpeed = 1.00000000
FrameSkip = 0x00000003
Overclock = 4.00000000
OverclockEnable = False
GFXBackend =
GPUDeterminismMode = auto
PerfMapDir =
[Movie]
PauseMovie = False
Author =
DumpFrames = False
DumpFramesSilent = False
ShowInputDisplay = False
[DSP]
EnableJIT = True
DumpAudio = False
DumpUCode = False
Backend = ALSA
Volume = 100
CaptureLog = False
[Input]
BackgroundInput = False
[FifoPlayer]
LoopReplay = True
[Analytics]
ID = 5082f0c30a7e422b1220107f69d6c108
Enabled = False
PermissionAsked = True

View file

@ -0,0 +1,29 @@
[GCPad1]
Device = evdev/0/retrogame_joypad
Buttons/A = Button 0
Buttons/B = Button 1
Buttons/Start = Button 9
Buttons/X = Button 3
Buttons/Y = Button 2
Buttons/Z = Button 7
Buttons/Hotkey = Button 8
C-Stick/Dead Zone = 25.000000000000000
C-Stick/Down = Axis 3+
C-Stick/Left = Axis 2-
C-Stick/Modifier = Control_L
C-Stick/Modifier/Range = 50.000000000000000
C-Stick/Right = Axis 2+
C-Stick/Up = Axis 3-
D-Pad/Down = Button 14
D-Pad/Left = Button 15
D-Pad/Right = Button 16
D-Pad/Up = Button 13
Main Stick/Dead Zone = 25.000000000000000
Main Stick/Down = Axis 1+
Main Stick/Left = Axis 0-
Main Stick/Modifier = Shift_L
Main Stick/Modifier/Range = 50.000000000000000
Main Stick/Right = Axis 0+
Main Stick/Up = Axis 1-
Triggers/L = Button 4
Triggers/R = Button 5

View file

@ -0,0 +1,55 @@
[Hardware]
VSync = False
Adapter = 0
[Settings]
AspectRatio = 2
Crop = False
wideScreenHack = False
UseXFB = False
UseRealXFB = False
SafeTextureCacheColorSamples = 128
ShowFPS = False
LogRenderTimeToFile = False
OverlayStats = False
OverlayProjStats = False
DumpTextures = False
HiresTextures = False
ConvertHiresTextures = False
CacheHiresTextures = False
DumpEFBTarget = False
FreeLook = False
UseFFV1 = False
EnablePixelLighting = False
FastDepthCalc = True
MSAA = 1
SSAA = False
EFBScale = 2
TexFmtOverlayEnable = False
TexFmtOverlayCenter = False
Wireframe = False
DisableFog = False
EnableShaderDebugging = False
BorderlessFullscreen = False
SWZComploc = True
SWZFreeze = True
SWDumpObjects = False
SWDumpTevStages = False
SWDumpTevTexFetches = False
SWDrawStart = 0
SWDrawEnd = 100000
[Enhancements]
ForceFiltering = False
MaxAnisotropy = 0
PostProcessingShader =
[Stereoscopy]
StereoMode = 0
StereoDepth = 20
StereoConvergencePercentage = 100
StereoSwapEyes = False
[Hacks]
EFBAccessEnable = False
BBoxEnable = False
ForceProgressive = True
EFBToTextureEnable = True
EFBScaledCopy = False
EFBEmulateFormatChanges = False

27
packages/games/emulators/dolphinsa/package.mk Normal file → Executable file
View file

@ -1,3 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
PKG_NAME="dolphinsa"
PKG_VERSION="0b160db48796f727311cea16072174d96b784f80"
PKG_GIT_CLONE_BRANCH="egldrm"
@ -8,15 +11,27 @@ PKG_URL="$PKG_SITE.git"
PKG_DEPENDS_TARGET="toolchain libevdev libdrm"
PKG_LONGDESC="Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements. "
PKG_CMAKE_OPTS_TARGET=" -DENABLE_HEADLESS=ON -DENABLE_EGL=ON -DENABLE_EVDEV=ON -DLINUX_LOCAL_DEV=ON \
-DOpenGL_GL_PREFERENCE=GLVND -DENABLE_TESTS=OFF -DENABLE_LLVM=OFF -DENABLE_ANALYTICS=OFF -DENABLE_X11=OFF -DENABLE_LTO=ON -DENABLE_QT=OFF -DENCODE_FRAMEDUMPS=OFF"
PKG_CMAKE_OPTS_TARGET=" -DENABLE_HEADLESS=ON \
-DENABLE_EGL=ON \
-DENABLE_EVDEV=ON \
-DLINUX_LOCAL_DEV=ON \
-DOpenGL_GL_PREFERENCE=GLVND \
-DENABLE_TESTS=OFF \
-DENABLE_LLVM=OFF \
-DENABLE_ANALYTICS=OFF \
-DENABLE_X11=OFF \
-DENABLE_LTO=ON \
-DENABLE_QT=OFF \
-DENCODE_FRAMEDUMPS=OFF"
makeinstall_target() {
mkdir -p $INSTALL/usr/bin
cp -rf $PKG_BUILD/.${TARGET_NAME}/Binaries/dolphin* $INSTALL/usr/bin
#cp -rf $PKG_DIR/scripts/* $INSTALL/usr/bin
cp -rf $PKG_DIR/scripts/* $INSTALL/usr/bin
mkdir -p $INSTALL/storage/.config/dolphin-emu
cp -rf $PKG_BUILD/Data/Sys/* $INSTALL/storage/.config/dolphin-emu
#cp -rf $PKG_DIR/config/* $INSTALL/usr/config/emuelec/configs/dolphin-emu
chmod +x ${INSTALL}/usr/bin/dolphin.sh
mkdir -p $INSTALL/usr/config/dolphin-emu
cp -rf $PKG_BUILD/Data/Sys/* $INSTALL/usr/config/dolphin-emu
cp -rf $PKG_DIR/config/* $INSTALL/usr/config/dolphin-emu
}

View file

@ -0,0 +1,118 @@
diff --git a/Source/Core/Core/HW/GCPadEmu.cpp b/Source/Core/Core/HW/GCPadEmu.cpp
index c8e7016..fb089c4 100644
--- a/Source/Core/Core/HW/GCPadEmu.cpp
+++ b/Source/Core/Core/HW/GCPadEmu.cpp
@@ -26,6 +26,7 @@ static const u16 button_bitmasks[] = {
PAD_BUTTON_Y,
PAD_TRIGGER_Z,
PAD_BUTTON_START,
+ PAD_BUTTON_HOTKEY,
0 // MIC HAX
};
@@ -37,7 +38,7 @@ static const u16 trigger_bitmasks[] = {
static const u16 dpad_bitmasks[] = {PAD_BUTTON_UP, PAD_BUTTON_DOWN, PAD_BUTTON_LEFT,
PAD_BUTTON_RIGHT};
-static const char* const named_buttons[] = {"A", "B", "X", "Y", "Z", "Start"};
+static const char* const named_buttons[] = {"A", "B", "X", "Y", "Z", "Start", "Hotkey"};
static const char* const named_triggers[] = {
// i18n: The left trigger button (labeled L on real controllers)
diff --git a/Source/Core/DolphinNoGUI/PlatformDRM.cpp b/Source/Core/DolphinNoGUI/PlatformDRM.cpp
index b210cea..77d4e86 100644
--- a/Source/Core/DolphinNoGUI/PlatformDRM.cpp
+++ b/Source/Core/DolphinNoGUI/PlatformDRM.cpp
@@ -11,6 +11,12 @@
#include "Core/Core.h"
#include "Core/State.h"
+#include "Core/HW/GCPad.h"
+#include "InputCommon/GCPadStatus.h"
+#include <fmt/format.h>
+#include "Core/Config/GraphicsSettings.h"
+#include "VideoCommon/VideoConfig.h"
+
#include <climits>
#include <cstdio>
@@ -54,9 +60,67 @@ void PlatformDRM::MainLoop()
{
while (IsRunning())
{
+ static int hotkey = 0;
+ static int slot = 0;
+ static int stereo = 0;
+
UpdateRunningFlag();
Core::HostDispatchJobs();
+ if(Pad::IsInitialized()) {
+ GCPadStatus x = Pad::GetStatus(0);
+
+ if( (x.button & PAD_BUTTON_HOTKEY) == PAD_BUTTON_HOTKEY) { // hotkey pressed
+ if(hotkey == 1) {
+ hotkey = 2;
+ }
+ } else {
+ hotkey = 1; // assure hotkey is released between actions
+ }
+
+ if(hotkey == 2) { // hotkey pressed
+ if( (x.button & PAD_BUTTON_START) == PAD_BUTTON_START) {
+ RequestShutdown();
+ hotkey = 0;
+ }
+
+ if( (x.button & PAD_TRIGGER_L) == PAD_TRIGGER_L) {
+ State::Load(slot);
+ hotkey = 0;
+ }
+ if( (x.button & PAD_TRIGGER_R) == PAD_TRIGGER_R) {
+ State::Save(slot);
+ hotkey = 0;
+ }
+ if( (x.button & PAD_BUTTON_DOWN) == PAD_BUTTON_DOWN) {
+ if(slot > 0) slot--;
+ Core::DisplayMessage(fmt::format("Slot {} selected", slot), 4000);
+ hotkey = 0;
+ }
+ if( (x.button & PAD_BUTTON_UP) == PAD_BUTTON_UP) {
+ if(slot < 10) slot++;
+ Core::DisplayMessage(fmt::format("Slot {} selected", slot), 4000);
+ hotkey = 0;
+ }
+ if( (x.button & PAD_BUTTON_Y) == PAD_BUTTON_Y) {
+ Core::SaveScreenShot();
+ hotkey = 0;
+ }
+ if( (x.button & PAD_BUTTON_X) == PAD_BUTTON_X) {
+ if(stereo == 0) {
+ Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::SBS);
+ stereo = 1;
+ } else {
+ Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::Off);
+ stereo = 0;
+ }
+ hotkey = 0;
+ }
+ }
+
+ }
+ //
+
// TODO: Is this sleep appropriate?
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
diff --git a/Source/Core/InputCommon/GCPadStatus.h b/Source/Core/InputCommon/GCPadStatus.h
index 7da1bbd..57d294d 100644
--- a/Source/Core/InputCommon/GCPadStatus.h
+++ b/Source/Core/InputCommon/GCPadStatus.h
@@ -27,6 +27,7 @@ enum PadButton
PAD_BUTTON_X = 0x0400,
PAD_BUTTON_Y = 0x0800,
PAD_BUTTON_START = 0x1000,
+ PAD_BUTTON_HOTKEY = 0x2000,
};
struct GCPadStatus

View file

@ -0,0 +1,21 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
if [ ! -d "/storage/.config/dolphin-emu" ]; then
mkdir -p "/storage/.config/dolphin-emu"
cp -r "/usr/config/dolphin-emu" "/storage/.config/"
fi
rm -rf /storage/.local/share/dolphin-emu
ln -sfv /storage/.config/dolphin-emu /storage/.local/share/dolphin-emu
performance
/usr/bin/dolphin-emu-nogui -p drm -a HLE -e "${1}"
interactive

View file

@ -282,7 +282,14 @@ then
if [ "$EMU" = "duckstationsa" ]; then
RUNTHIS='${TBASH} /usr/bin/duckstation.sh "${ROMNAME}"'
fi
;;
;;
"gamecube")
jslisten set "dolphinsa"
if [ "$EMU" = "dolphinsa" ]; then
RUNTHIS='${TBASH} /usr/bin/dolphin.sh "${ROMNAME}"'
fi
;;
"mplayer")
jslisten set "mpv"
RUNTHIS='${TBASH} /usr/bin/mpv_video.sh "${ROMNAME}"'

View file

@ -36,6 +36,7 @@ d /storage/roms/ecwolf 0755 root root - -
d /storage/roms/famicom 0755 root root - -
d /storage/roms/fbneo 0755 root root - -
d /storage/roms/fds 0755 root root - -
d /storage/roms/gamecube 0755 root root - -
d /storage/roms/gameandwatch 0755 root root - -
d /storage/roms/gamegear 0755 root root - -
d /storage/roms/gb 0755 root root - -

View file

@ -772,6 +772,25 @@
</emulator>
</emulators>
</system>
<system>
<fullname>Nintendo GameCube</fullname>
<name>gamecube</name>
<manufacturer>Nintendo</manufacturer>
<release>2001</release>
<hardware>console</hardware>
<path>/storage/roms/gamecube</path>
<extension>.gcm .GCM .iso .ISO .gcz .GCZ .ciso .CISO .wbfs .WBFS .rvz .RVZ</extension>
<command>/usr/bin/runemu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%"</command>
<platform>gc</platform>
<theme>gc</theme>
<emulators>
<emulator name="dolphinsa">
<cores>
<core default="true">dolphinsa</core>
</cores>
</emulator>
</emulators>
</system>
<system>
<name>gamegear</name>
<fullname>Game Gear</fullname>

View file

@ -11,7 +11,7 @@ PKG_EMUS="hatarisa openbor hypseus-singe moonlight hypseus-singe pico-8 flycasts
scummvmsa PPSSPPSDL yabasanshiroSA vicesa mupen64plussa-audio-sdl \
mupen64plussa-input-sdl mupen64plussa-ui-console mupen64plussa-video-rice \
mupen64plussa-core mupen64plussa-rsp-hle mupen64plussa-video-glide64mk2 \
lzdoom gzdoom ecwolf amiberry raze drastic dolphinsa"
lzdoom gzdoom ecwolf amiberry raze drastic"
PKG_RETROARCH="retroarch retroarch-overlays retroarch-assets common-shaders glsl-shaders \
libretro-database core-info"
@ -35,7 +35,10 @@ PKG_DEPENDS_TARGET="${PKG_EMUS} ${PKG_RETROARCH} ${LIBRETRO_CORES}"
### Emulators or cores for specific devices
case "${DEVICE}" in
RG552|RG503|RG353P)
RG552)
PKG_DEPENDS_TARGET+=" duckstationsa"
;;
RG503|RG353P)
PKG_DEPENDS_TARGET+=" duckstationsa dolphinsa"
;;
esac