pcsx-rearmed keep crashing on Raspberry Pi Zero with DPI display
I have tried to run pcsx-rearmed emulator on Raspberry Pi Zero because I have performance issues with lr-pcsx-rearmed, also on RetroPie wiki is mentioned to use this emulator on Rpi 0 or 1 for better performance. I am using Rpi Zero with DPI display with 320x240 fixed resolution (GameBoy Zero with SAIO board). Detailed description of this problem and also more useful information can be obtained in the support thread for this board but the problem will be probably the same for any DPI display connected.. I can confirm that emulator is running well with HDMI display. Can somebody help or suggest what to check, where to dig?
I have also opened the bug #112 on Github
Thank you for any help
Ok, I have some progress here... I can run the emulator from a console and play a game on SAIO :) (rpi zero 320x240 DPI display)
I can also confirm that game and sound are both without any performance issues which is really great, compared to lr-pcsx-rearmed.
I tried Worms World party and Worms Armageddon earlier today...
The main problem is in this line
ret = plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 1);
which needs to be commented (// at the start of this line) for the emulator to start correctly.
I have done many experiments with the rest of the code to achieve the best menu resolution - 320x240 and it was working somehow (some segfaults, sometimes did not work with -cdfile cmd option, and so on, I can also run the emulator with 640x480 with not so much problems but then the menu is not usable. I have seen the menu in some edge conditions nicely in 320x240 and the game was also perfect but the other problems like segfaults raised with this).
The problem is with my knowledge of C and SDL. It should be really fast for someone who has some insight into it. Is here somebody interested who can help me with this? I can provide my patches to show what is working and how but I think I am nearly at the end with everything that I can do here.
Also the problem is not directly in pcsx-rearmed but in libpicofe library, corresponding bug has been opened here:
Today, I have some great news :) The emulator is now fully functional. The only thing you need to do is to update git repository line in RetroPie-Setup/scriptmodules/emulators/pcsx-rearmed.sh
gitPullOrClone "$md_build" https://github.com/notaz/pcsx_rearmed.git
gitPullOrClone "$md_build" https://github.com/timemaster5/pcsx_rearmed.git saio
and then run update pcsx-rearmed from source in retropie-setup script
Then you will be able to run this emulator without performance issues but only with USB keyboard. I am now struggling with key bindings, I am not able to bind UP/DOWN/LEFT/RIGHT buttons of GBZ SAIO.. probably because they are not buttons but hat... I don't know now.
Another issue is with the mouse cursor being visible in some games, but this could be hopefully easily fixable.
And for the record, the main problem has been caused by one commit to libpicofe adds SDL_DOUBLEBUF flag.