# \[INSTRUCTIONS\]\[v4.2\] How to run dolphin at 480p!

**URL:** <https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327>\
**Category:** Amlogic Devices\
**Created:** [August 2, 2021, 1:00am UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327 "2021-08-02T01:00:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Langerz82](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Langerz82](https://emuelec.discourse.group/u/Langerz82)\
**Post date:** [August 2, 2021, 1:00am UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/1 "2021-08-02T01:00:45Z")

</div>

1. SSH into your home directory (~).
2. Create a file named hdmi.sh in your home directory and give it exec permissions, and open it.

```auto
touch hdmi.sh
chmod +x hdmi.sh
nano hdmi.sh

```

1. Paste contents and save. Make sure you edit the original\_resolution variable to the height of your normal resolution ex: 1080 for 1080p, 720 for 720p etc.

```auto
#!/bin/sh

# This file sets the hdmi output and frame buffer to the argument in pixel width.
# Allowed argument example ./hdmi.sh 720 <-- For width 720 pixels.

# set -x #echo on

original_resolution=720 # <--- Set to your original resolution on your device and emustation.
bpp=32
hz=60

i=$1

if [["$i" -eq ""]]; then
i=$original_resolution
fi

case $i in
    480)
       w=720
       di=$(($i*2))
       w1=$(($w-1))
       i1=$(($i-1))
       fbset -fb /dev/fb0 -g $w $i $w $di $bpp
       fbset -fb /dev/fb1 -g 32 32 32 32 32
       mode=$(echo "${i}p${hz}hz")
       echo $mode > /sys/class/display/mode
       echo 0 > /sys/class/graphics/fb0/free_scale
       echo 1 > /sys/class/graphics/fb0/freescale_mode
       echo 0 0 $w1 $i1 > /sys/class/graphics/fb0/free_scale_axis
       echo 0 0 $w1 $i1 > /sys/class/graphics/fb0/window_axis
       echo 0 > /sys/class/graphics/fb1/free_scale
       ;;
esac

case $i in
    576|720|1080|2160)
       w=$(($i*16/9))
       di=$(($i*2))
       w1=$(($w-1))
       i1=$(($i-1))
       fbset -fb /dev/fb0 -g $w $i $w $di $bpp
       fbset -fb /dev/fb1 -g 32 32 32 32 32
       mode=$(echo "${i}p${hz}hz")
       echo $mode > /sys/class/display/mode
       echo 0 > /sys/class/graphics/fb0/free_scale
       echo 1 > /sys/class/graphics/fb0/freescale_mode
       echo 0 0 $w1 $i1 > /sys/class/graphics/fb0/free_scale_axis
       echo 0 0 $w1 $i1 > /sys/class/graphics/fb0/window_axis
       echo 0 > /sys/class/graphics/fb1/free_scale
       ;;
esac

# Enable framebuffer device
echo 0 > /sys/class/graphics/fb0/blank

# Blank fb1 to prevent static noise
echo 1 > /sys/class/graphics/fb1/blank

```

1. Go too .config/emulationstation and modify es\_systems.cfg

```auto
cd ~/.config/emulationstation
nano es_systems.cfg

```

1. Modify the Nintendo gamecube block by replacing the xml for emulators with:

```auto
        <emulators>
            <emulator name="dolphin">
                <cores>
                    <core default="true">dolphin</core>
                    <core>dolphin480p</core>
                </cores>
            </emulator>
        </emulators>

```

1. This requires modifying a file located in your SYSTEM image.  
Copy the SYSTEM image file from your SD Card to linux.  
Unsquash the SYSTEM image file in terminal with:

```auto
unsquashfs SYSTEM
cd squashfs-root/usr/bin
sudo nano emuelecRunEmu.sh

```

1. Find the line: “wii”|“gamecube”)  
replace its nested contents from:

```auto
	"wii"|"gamecube")
		if ["$EMU" = "dolphin"]; then
            set_kill_keys "dolphin-emu-nogui"
            RUNTHIS='${TBASH} /usr/bin/dolphin.sh "${ROMNAME}"'
		fi
		;;

```

too:

```auto
	"wii"|"gamecube")
		SWITCHED_RES="0"
		if ["$EMU" = "dolphin"]; then
            set_kill_keys "dolphin-emu-nogui"
            RUNTHIS='${TBASH} /usr/bin/dolphin.sh "${ROMNAME}"'
		fi
		if ["$EMU" = "dolphin480p"]; then
			set_kill_keys "dolphin-emu-nogui"
                        source ~/hdmi.sh 480
                        sleep 1
			SWITCHED_RES="1"
			RUNTHIS='${TBASH} /usr/bin/dolphin.sh "${ROMNAME}"'

		fi
		;;

```

1. Find the text:

```auto
if [["$BTENABLED" == "1"]]; then
	# Restart the bluetooth agent
	NPID=$(pgrep -f batocera-bluetooth-agent)
	if [[-z "$NPID"]]; then
	(systemd-run batocera-bluetooth-agent) || :
	fi
fi

```

Below it add the following:

```auto
if [["$SWITCHED_RES" == "1"]]; then
        source ~/hdmi.sh
	sleep 1
fi

```

1. save file and re-squash your SYSTEM image file, and replace it on your SD card.

```auto
sudo mksquashfs squashfs-root SYSTEM

```

Now insert EmuElec SD Card to system and get into emulation station.

Select “Gamecube” and press select on controller and choose emulator at bottom and select dolphin 480p.

Now launch a game it should auto switch to 480p then back to your original resolution on exit.

All the best!!

---

<div class="post-metadata">

**Author:** ![EmuELEC](https://yyz2.discourse-cdn.com/free1/user_avatar/emuelec.discourse.group/emuelec/32/26_2.png) [@EmuELEC](https://emuelec.discourse.group/u/EmuELEC)\
**Post date:** [August 2, 2021, 1:25am UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/2 "2021-08-02T01:25:06Z")

</div>

> [@Langerz82](#):
>
> ```auto
> unsquashfs SYSTEM
> cd squashfs-root/usr/bin
> sudo nano emuelecRunEmu.sh
> 
> ```

This is not needed (or it should not be needed) and **highly NOT recommended** as its a recipe for disaster. Instead just put emuelecRunEmu.sh in `/emuelec/bin`

```auto
cp /usr/bin/emuelecRunEmu.sh /emuelec/bin
nano /emuelec/bin/emuelecRunEmu.sh

```

`/emuelec/bin` and `/emuelec/lib` are priority on the `PATH` although I am not sure all binaries are working like this on v4.2 this might not be enabled yet (it is on 4.3-test)

---

<div class="post-metadata">

**Author:** ![Langerz82](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Langerz82](https://emuelec.discourse.group/u/Langerz82)\
**Post date:** [August 2, 2021, 12:56pm UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/3 "2021-08-02T12:56:06Z")

</div>

@EmuELEC, no worries man, cool cool. I wasn’t aware of the call hierarchy and will update the instructions soon. You’re right messing with images may cause update conflicts.

Oh yeah forgot to add, having 480p on dolphin may work for some of the lower spec chips, like the 905 see if it works ok, cheers.

---

<div class="post-metadata">

**Author:** ![paparansen](https://avatars.discourse-cdn.com/v4/letter/p/35a633/32.png) [@paparansen](https://emuelec.discourse.group/u/paparansen)\
**Post date:** [August 2, 2021, 4:26pm UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/4 "2021-08-02T16:26:20Z")

</div>

why should any1 do this?

---

<div class="post-metadata">

**Author:** ![EmuELEC](https://yyz2.discourse-cdn.com/free1/user_avatar/emuelec.discourse.group/emuelec/32/26_2.png) [@EmuELEC](https://emuelec.discourse.group/u/EmuELEC)\
**Post date:** [August 2, 2021, 4:28pm UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/5 "2021-08-02T16:28:39Z")

</div>

Mostly because lower resolution would yield better performance. In theory…

---

<div class="post-metadata">

**Author:** ![paparansen](https://avatars.discourse-cdn.com/v4/letter/p/35a633/32.png) [@paparansen](https://emuelec.discourse.group/u/paparansen)\
**Post date:** [August 2, 2021, 8:34pm UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/6 "2021-08-02T20:34:04Z")

</div>

the displayresolution/outputresolution has practically  
no impact on performance.

---

<div class="post-metadata">

**Author:** ![EmuELEC](https://yyz2.discourse-cdn.com/free1/user_avatar/emuelec.discourse.group/emuelec/32/26_2.png) [@EmuELEC](https://emuelec.discourse.group/u/EmuELEC)\
**Post date:** [August 2, 2021, 9:16pm UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/7 "2021-08-02T21:16:05Z")

</div>

Hence why I said “In theory”. I have not tested this personally.

---

<div class="post-metadata">

**Author:** ![Langerz82](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Langerz82](https://emuelec.discourse.group/u/Langerz82)\
**Post date:** [August 3, 2021, 8:42am UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/8 "2021-08-03T08:42:53Z")

</div>

Less resolution would mean less memory to copy over so in theory it would be faster. 720p to 480p there would be a significant difference,. The buffers are smaller and the gpu would need to do less work.

---

<div class="post-metadata">

**Author:** ![Langerz82](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Langerz82](https://emuelec.discourse.group/u/Langerz82)\
**Post date:** [August 5, 2021, 2:09pm UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/9 "2021-08-05T14:09:30Z")

</div>

So far I havent noticed much gain in FPS, it could be my dolphin settings though. One game I test Baldurs Gate Dark Alliance the FPS drops down to 6-8 really bad, not sure why yet.

---

<div class="post-metadata">

**Author:** ![Langerz82](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Langerz82](https://emuelec.discourse.group/u/Langerz82)\
**Post date:** [November 5, 2021, 2:51am UTC](https://emuelec.discourse.group/t/instructions-v4-2-how-to-run-dolphin-at-480p/327/10 "2021-11-05T02:51:24Z")

</div>

Instructions outdated. For new proper solution see:

> [@Instructions on getting dolphin working on a lower resolution here!](https://emuelec.discourse.group/t/instructions-on-getting-dolphin-working-on-a-lower-resolution-here/328/3):
>
> These instructions are outdated, and as shantigilbert said can easily cause EmuElec versioning issues. If you use the latest EmuELEC version (4.3 or more) you can do the following: SSH into the device. Find and edit the file: /storage/.config/emulationstation/es\_features.cfg Any Emulator core you wish to have native resolution option: modify the features attribute of the core element of xml like so and add to the values “nativevideo”. For example for N64 from: \<core name="mupen64plus\_next" …
