Mushihimesama

Mushihimesama

Not enough ratings
Howto play Mushihimesama on its original display : a CRT TV
By Amador
This guide will help you (I hope !) to come closer to the arcade roots of Mushihimesama.
The goal is to use a CRT to display the game in its "almost" native resolution and take full advantage from the natural scanlines.
   
Award
Favorite
Favorited
Unfavorite
Prerequisites
Hardware :

- GPU card with VGA output (preferably and old AMD/ATI Radeon)
- LCD monitor (can be plugged to a different GPU card)
- CRT TV (in 4:3) plugged to the VGA output with :
- VGA-to-RGBscart cable (preferably with composite sync forced). Other connectors might work, I chose the best connector for european TVs. I heard "component" is good for US CRT, but you will need a transcoder)

Software :

The guide explains how to install and configure everything (except the OS and steam !)

- Ubuntu (if you use Windows, it might work but you have to find another guide)
- Wayland (if you use X you can skip step 3 and you have to replace gnome-randr.py with xrandr in step 4. In theory latency is a bit better with Wayland. And X's sleep mode might be disturbed by your CRT). To activate Wayland on Ubuntu see : https://linuxconfig.org/how-to-enable-disable-wayland-on-ubuntu-20-04-desktop
- Valve's Proton (embedded in steam) for running windows games
- Valve's Gamescope : https://github.com/Plagman/gamescope to display and scale in arbitrary resolutions, with minimum latency
- gnome-randr.py : https://gitlab.com/Oschowa/gnome-randr to handle displays (turn on, turn off)
- edid-generator : https://github.com/akatrevorjay/edid-generator to "configure" the CRT TV in 320x240
Step 1 : install edid-generator and configure output as 320x240 for CRT TV
$ mkdir ~/scripts $ cd ~/scripts $ git clone https://github.com/akatrevorjay/edid-generator $ cd edid-generator $ sudo apt install zsh edid-decode $ ./modeline2edid - <<< 'Modeline "320x240" 6.452 320 344 376 408 240 242 245 264 -HSync -VSync ratio=4:3'

-- beginning of optional part. I have done it but I'm not sure if it's really needed --
$ nano 320x240.S
put 0 polarity value in theses 2 lines :
#define HSYNC_POL 0 #define VSYNC_POL 0
-- end of optional part --

$ make $ sudo cp 320x240.bin /lib/firmware/edid/ $ sudo nano /etc/default/grub && sudo update-grub
change this line as :
GRUB_CMDLINE_LINUX_DEFAULT="quiet audit=0 drm.edid_firmware=VGA-1:edid/320x240.bin"

save with Control-O, exit with Control-X, and wait update-grub to finish its job.
Step 2 : install gamescope
$ cd ~/scripts $ git clone https://github.com/Plagman/gamescope $ cd gamescope $ sudo apt install build-essential git meson cmake libx11-dev libxdamage-dev libxcomposite-dev libxrender-dev libxxf86vm-dev libxtst-dev libpixman-1-dev libdrm-dev libvulkan-dev libwayland-dev wayland-protocols libinput-dev libxkbcommon-dev libcap-dev libsdl2-dev libgbm-dev glslang-tools libxcb-composite0-dev libxcb-icccm4-dev libx11-xcb-dev libxcb-xinput-dev libsystemd-dev $ meson build/ $ ninja -C build/
Step 3 : install gnome-randr (skippable if you don't use Wayland)
$ cd ~/scripts $ wget https://gitlab.com/Oschowa/gnome-randr/-/raw/master/gnome-randr.py $ chmod +x gnome-randr.py
Step 4 : create "steam" script to launch game
$ nano ~/scripts/CRTmushi.sh
put this in the script :
#!/bin/bash #switch off LCD and activate TV used for game. LCD monitor is connected to Displayport n°2 (DP-2). CRT TV is on VGA # if you don't use Wayland, replace ~/scripts/gnome-randr.py with xrandr ~/scripts/gnome-randr.py --output VGA-1 --auto --primary ~/scripts/gnome-randr.py --output DP-2 --off #launch game with gamescope in its "native" 640x480 resolution, scaled to CRT 320x240 ~/scripts/gamescope/build/gamescope -f -w 640 -h 480 -W 320 -H 240 -- "$@" # Mushihimesama is a special case. In arcade, its native resolution is fully 240p, but the Steam port had sprites redone in 480p (not backgrounds sadly). So if you have a CRT PC monitor that can handle 640x480, just use ~/scripts/gamescope/build/gamescope -f -w 640 -h 480 -- "$@" # For other steam ports in 240p (example : Dragon Blaze), you might try ~/scripts/gamescope/build/gamescope -f -w 320 -h 240 -W 320 -H 240 -- "$@" # Shovel Knight is fantastic on CRT. You might use ~/scripts/gamescope/build/gamescope -f -w 400 -h 240 -W 400 -H 240 -- "$@" # After game has ended, return to normal setup : switch off TV ~/scripts/gnome-randr.py --output DP-2 --auto --primary --left-of VGA-1 --output VGA-1 --off
Step 5 : connect steam to the launch script
In steam Library view, right-clic on Mushihimesama, Properties, General tab, Launch Flags :
~/scripts/CRTmushi.sh %command%
Step 6 : finishing touch
Launch you game normally with steam and enjoy !
Pro-tip : for more "authentic arcade fun" : rotate your TV and set Mushihimesama in tate mode accordingly.
2 Comments
Amador  [author] Nov 27, 2021 @ 9:33am 
Thanks, lucky boy !
y4k ;; lucky doG Nov 26, 2021 @ 6:13pm 
This is so neat. Thanks for the guide. I'd love to actually get myself a setup like this too, but first I have to find a decent CRT :O
Cheers!