I get screen tearing in any scrolling Pico 8 game that I tried, even when navigating the splore menu. A retro console shouldn't have screen tearing.
Is there any way to enable VSYNC and get rid of screen tearing in Pico 8?
If this is not possible currently, can Vsync be added in the future?
The reason is probably that pico8 doesn’t have that because it is not needed. Sometimes games in the browser have some tearing, but with the real console it doesn’t happen. As we discussed on discord, if you have the right driver and config for your screen, then pico8 doesn’t have anything more to do.
Maybe it is because I am using the version on my Pi 400? I tried all the different graphics drivers though. There's always screen tearing. Maybe the RPi version is just not advanced enough yet. Or maybe the gfx drivers on Pi 400 are not good enough yet. I cannot find any Vsync option for the gfx driver on Pi 400. I think other platforms have options to enforce vsync in the gfx drivers.
R-type in splore - favorites. You might have to play a minute or two to see it tear.
I am pretty sure this is an issue specifically with the Raspberry Pi 4 graphics drivers. They seem to be broken and maybe they will be fixed in some future release of Raspberry Pi OS. Previous RPi versions (RPi 2 and 3) had working drivers with no screen tearing.
Switching from fkms to kms (beta, unstable) drivers and re-compiling sdl2 to use kms fixes the screen tearing but then audio over hdmi stops working for me.
Many people have screen tearing on Pi 4: https://retropie.org.uk/forum/topic/27632/fixing-screen-tearing-issues-on-rpi4/41
I will give it another year or two until hopefully the RPi devs can finally fix their broken gfx drivers.
I got it to work on my Pi 400 and Pi 3 without screen tearing. I had to do a LOT of things.
to get the latest bleeding edge beta version of the OS
2) switch gfx driver to latest bleeding edge kms version by editing config.txt:
sudo nano /boot/config.txt
On Pi4, change dtoverlay setting to dtoverlay=vc4-kms-v3d-pi4
On Pi3, change dtoverlay setting to dtoverlay=vc4-kms-v3d
Then, press CTRL-X to save the edited file. Reboot.
3) build my own SDL2 library with the new kms gfx driver enabled, by executing this set of commands from here: http://mydedibox.fr/rpi4-sdl2-kms-drm-compilation-no-x/
The commands to build SDL2 are the following:
sudo apt install -y build-essential git libasound2-dev libsamplerate0-dev libibus-1.0-dev libdbus-1-dev libudev-dev libgles2-mesa-dev libdrm-dev libgbm-dev git clone https://github.com/spurious/SDL-mirror.git cd SDL-mirror CFLAGS='-mfpu=neon -mtune=cortex-a72 -march=armv8-a' ./configure --prefix=/usr --disable-video-x11 --disable-video-wayland --disable-video-rpi --enable-video-kmsdrm --enable-arm-neon make -j4 sudo make install
4) Force pico8 to use the new SDL2 library by making a shell script in the pico-8 folder via "nano start.sh" with following contents
CTRL-X to save.
chmod 777 start.sh
to allow me to execute the script
6) Exit Desktop via CTRL-ALT-F6, login again into the bare shell, and start pico8 via
No more tearing and 300 fps!!!
Update: I just tried and I had do to exactly the same steps to disable the screen-tearing in Pico 8 on my Raspberry Pi 3 as well. The only difference was to use dtoverlay=vc4-kms-v3d without the -pi4 suffix.
[Please log in to post a comment]