Friday, September 6, 2013

Remove green noise when running emulators in EmulationStation on Raspberry Pi

tl;dr

Type this in after you login as user 'pi'.
sed -i 's/runcommand.sh 1/runcommand.sh 2/' ~/.emulationstation/es_system.cfg

EmulationStation

Couldn't find any solution online for this specific problem, so writing this down.

Running emulators in EmulationStation is a bit different from running the emulator binary directly from the prompt. runcommand.sh script sets up random stuff that you don't necessarily need, especially if you are using a modern day TV and Raspberry Pi connected with an HDMI cable.

The first argument to runcommand.sh specifies what you want to do with the output. "1" sets it as "run in VGA mode or something even if you are using HDMI or DVI". Not sure under which circumstance it makes sense to use such setting. "2" says "just use the current setting." SGTM.

The command above rewrites runcommand.sh 1 to runcommand.sh 2.

Raspberry PiでEmulationStationを使った時の出力の色がおかしいとき

Raspberry Piでゲームコンソールエミュレータをここの手順どおりにインストールする。
An A to Z Beginners Guide to Installing RetroPie on a Raspberry Pi

そのままEmulationStationを起動してエミュレータを起動すると緑色のノイズが入る。
HDMIでつないでるのに何か怪しい緑。ゴーストというにはあまりに盛大に緑が入る。むしろ色を出してない黒に緑が入る。

直し方

コマンド

sed -i 's/runcommand.sh 1/runcommand.sh 2/' ~/.emulationstation/es_system.cfg

解説

ようはruncommand.shの最初の引数の数字が出力をどうするかという設定で、1の場合「HDMIでもDVIでもVGAっぽくだそう」みたいなわけの分からない設定を変えるだけ。2は「今のままで実行しよう」という至極当然のやりかた。これがデフォルトじゃないわけがわからないのですが、これで全部直ります。



これ英語で書いたほうがいい。