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は「今のままで実行しよう」という至極当然のやりかた。これがデフォルトじゃないわけがわからないのですが、これで全部直ります。



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

Wednesday, August 7, 2013

Raspberry PiにRaspbianを入れる方法

何をしてるかわかってる人には2,3行で十分だろうから先に

Macでやったのでbs=1mやrdiskなどを使ってますが基本ddコマンドで終わりです。(ddを使った場合FSのフォーマットが必要だったか覚えてませんがExFATでおk)
sudo dd bs=1m if=/path/to/raspbian.img of=/dev/rdiskN
以上です。

丁寧な説明

http://d.hatena.ne.jp/haronoid/20130427/1367070105
http://wiki.brewpi.com/index.php/Raspberry_Pi_SD_Card_Setup_via_Mac


Wednesday, July 17, 2013

Android版OpenVPNとDD-WRT

verb <num> 設定をするとログはいろいろ出るけど正直遡るのがめんどくさいし設定したらVPNクライアントから怒られたりするのでクライアントの警告などのメモ

Android OpenVPNクライアントに関してはこれが一番設定変更がしやすい

以下 client.confについて
  1. "Authenticate/Decrypt packet error: packet HMAC authentication failed"
    1. ハッシュ関数がサーバとクライアント側であってることを確認
    2. 自分はSHA256(サーバ)とSHA1(クライアント)だったのでいつまでもこけた
  2. mtuに関していつまでもうるさいので
    1. tun-mtu 1200
    2. TCPを使う
これでVPNに繋がるけどお外につながらないので、つながったらまた書く