Skip to content

Commit

Permalink
Add widescreen N64 launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
cobaltgit committed Jun 25, 2024
1 parent add07ef commit 7e8b8ac
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Emus/N64/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
{
"name": "Mupen64Plus",
"launch": "mupen64plus.sh"
},
{
"name": "Mupen64Plus 16:9",
"launch": "mupen64plus_wide.sh"
}
]
}
78 changes: 78 additions & 0 deletions Emus/N64/mupen64plus_wide.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/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/N64
cd $RA_DIR/

$EMU_DIR/performance.sh

#disable netplay
NET_PARAM=


# Variable for the path to the Mupen64Plus directory
MUPEN_DIR="/mnt/SDCARD/RetroArch/.retroarch/config/Mupen64Plus GLES2"

# Extract the filename from the full path without the extension
ROM_PATH="$1"
ROM_NAME=$(basename "$ROM_PATH" | sed 's/\.[^.]*$//')

# Paths to the source files
N64_CFG="$MUPEN_DIR/N64.cfg"
N64_OPT="$MUPEN_DIR/Mupen64Plus GLES2.opt"

# Paths to the destination files
ROM_CFG="$MUPEN_DIR/$ROM_NAME.cfg"
ROM_OPT="$MUPEN_DIR/$ROM_NAME.opt"

# Create empty files if the source files do not exist
[ ! -f "$N64_CFG" ] && touch "$N64_CFG"
[ ! -f "$N64_OPT" ] && touch "$N64_OPT"

# Check if the destination files exist
if [ ! -f "$ROM_CFG" ] && [ ! -f "$ROM_OPT" ]; then
# Copy the configuration files with the new name
cp "$N64_CFG" "$N64_CFG"
cp "$N64_OPT" "$ROM_OPT"
echo "Copied $N64_CFG to $ROM_CFG"
echo "Copied $N64_OPT to $ROM_OPT"

# Apply the configuration patches
/mnt/SDCARD/System/usr/trimui/scripts/patch_ra_cfg.sh "$MUPEN_DIR/widescreen.cfg" "$ROM_CFG"
/mnt/SDCARD/System/usr/trimui/scripts/patch_ra_cfg.sh "$MUPEN_DIR/widescreen.opt" "$ROM_OPT"
echo "Patch applied to $ROM_CFG"
echo "Patch applied to $ROM_OPT"
HOME=$RA_DIR/ $RA_DIR/ra64.trimui -v -L $RA_DIR/.retroarch/cores/mupen64plus_libretro.so "$@"
# cleaning
rm "$ROM_CFG"
rm "$ROM_OPT"
else
message="The following files already exist:"
[ -f "$ROM_CFG" ] && message="$message $ROM_CFG"
[ -f "$ROM_OPT" ] && message="$message $ROM_OPT"
echo "$message"
fi





















3 changes: 3 additions & 0 deletions RetroArch/.retroarch/config/Mupen64Plus GLES2/widescreen.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
custom_viewport_width = "1280"
input_overlay_enable = "false"
video_scale_integer = "false"
30 changes: 30 additions & 0 deletions RetroArch/.retroarch/config/Mupen64Plus GLES2/widescreen.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
mupen64plus-169screensize = "640x360"
mupen64plus-43screensize = "640x480"
mupen64plus-aspect = "16:9 adjusted"
mupen64plus-astick-deadzone = "15"
mupen64plus-astick-sensitivity = "100"
mupen64plus-BilinearMode = "standard"
mupen64plus-CorrectTexrectCoords = "Off"
mupen64plus-CountPerOp = "0"
mupen64plus-cpucore = "pure_interpreter"
mupen64plus-CropMode = "Auto"
mupen64plus-d-cbutton = "C3"
mupen64plus-EnableCopyColorToRDRAM = "Off"
mupen64plus-EnableFragmentDepthWrite = "False"
mupen64plus-EnableHWLighting = "False"
mupen64plus-EnableLegacyBlending = "True"
mupen64plus-EnableNativeResTexrects = "False"
mupen64plus-EnableShadersStorage = "True"
mupen64plus-l-cbutton = "C2"
mupen64plus-pak1 = "memory"
mupen64plus-pak2 = "none"
mupen64plus-pak3 = "none"
mupen64plus-pak4 = "none"
mupen64plus-r-cbutton = "C1"
mupen64plus-rspmode = "HLE"
mupen64plus-txEnhancementMode = "None"
mupen64plus-txFilterIgnoreBG = "True"
mupen64plus-txFilterMode = "None"
mupen64plus-txHiresEnable = "False"
mupen64plus-txHiresFullAlphaChannel = "False"
mupen64plus-u-cbutton = "C4"

0 comments on commit 7e8b8ac

Please sign in to comment.