Some advices for those interested in trying this:
Network configuration:- This requires a Gigabit ethernet card, lower speeds won't work.
- Ideally, you want to set this up with a direct wired connection, PC <---> MiSTer. This requires that both MiSTer and PC have a static ip so they can see each other.
On the MiSTer side, you have to edit
/etc/dhcpd.conf, and add this two lines at the end, replacing the ip address with the one you want to use, e.g. mine is set as 192.168.18.35:
interface eth0
static ip_address=192.168.18.35/24
On the PC, you'll need to configure your network card to use a static ip. At this point you should be able to ping the MiSTer and receive an answer.
Of course you could just use dhcp on both sides if you're simply connecting through a router, wired or wireless. We're just not recommending that by now because we're aiming at the lowest latency and greatest stability.
GroovyMAME configuration:GroovyMAME works exactly the same, regarding Switchres and modelines, so you can keep using your existing presets.
This will select the new "mister" video backend, which basically does software rendering and streams the RGB data through the network:
video mister
These are the new "mister"-specific options:
mister_ip 192.168.18.35
mister_compression none
mister_window 0
mister_fd_margin 1.5
A brief explanation:
- mister_ip: MiSTer's ip address.
- mister_compression: [none | lz4]. Allows saving bandwidth by compressing RGB data. Use none to send raw data, or lz4 compression. The later is required for higher resolutions (typically, 31 kHz). Notice that lz4 can be used in all cases with almost no latency penalty.
- mister_window: enables a mirror window on the client's screen (PC). Windows only.
- mister_fd_margin: specify a security margin for automatic frame delay, in ms. A lowest value provides less latency at the cost of glitches caused by erratic emulation times.
Also, we need to force the aspect ratio as 4:3, otherwise MAME will guess the aspect from our desktop's resolution (badly):
aspect 4:3
Finally, these
synchronization options must be set exactly like this in order to get things running fluently:
autosync 0
throttle 0
syncrefresh 1
sleep 0
This is because all timing is handled by the video module, otherwise perfect synchronization wouldn't be possible.
Automatic frame delay:This new video backend implements automatic frame delay. This setting is selected by default, through value "0" in either the
framedelay option or its corresponding slider.
framedelay 0
When automatic frame delay is enabled, GM will try to apply the highest possible setting, adjusting dynamically to fluctuations in emulation times. Depending on the game, you might find the default setting too agressive, causing glitches on the upper portion of the screen. You can mitigate this by increasing the
mister_fd_margin setting, or by switching to manual frame delay.
Manual frame delay works as usual, by setting a value different to "0" through the in-game slider. You can also fine-tune a given value with the
vsync_offset option. Notice that, in the particular case of "video mister", vsync_offset increases the computed sync line by the number of lines specified, instead of decreasing it.