Vegz78 / McAirpos

MakeCode Arcade games in RetroPie, Recalbox 7/8 and Batocera, running natively as ELF executables on Raspberry Pi OS/Linux ARM with 1-2 gamepads
https://Vegz78.github.io/McAirpos
MIT License
80 stars 10 forks source link

[RG35xxSP StockOS (H700 series)] Screen goes black when the game ends(Solved by user) #59

Closed game-de-it closed 1 week ago

game-de-it commented 1 month ago

Hello. As the title says, I ran McAirpos on RG35xxSP StockOS.

https://github.com/game-de-it/testrepo/releases/tag/test12

https://x.com/0_game_it/status/1797642803952164993

The procedure I used was "Manual installation for RetroPie/RPi OS".

The game started up successfully and the controller sound seemed fine. When I ended the game, the screen went black and the front-end screen was no longer displayed.

That's why I'm running a command to restart the OS when the game ends.

ROMs can be executed anywhere, but in the script, the ROM files are placed in a folder under "/home/pi/" as per the procedure.

I'm sorry that I can't provide useful information to developers, but I'll report the operation anyway.

Vegz78 commented 1 month ago

Cool, @game-de-it! Nice work and thanks for sharing!

The whole McAirpos project actually started as a way to solve/circumvent the black/freezing screen when a MakeCode Arcade game exited on ARM Linux. The problem proved to be different ioctl modes for the active tty were set on game exec, but not reset on game exit, as solved by this function in the launCharc launcher: https://github.com/Vegz78/McAirpos/blob/master/McAirpos/launCharc/launCharc.c#L86

There might be some subtle differences on a RG35xxSP running StockOS, like for Batocera, where the game has to be run inside another tty than the active one, using ttyecho, to be able to run the game and return to the main Batocera game menu afterwards: https://github.com/Vegz78/McAirpos/blob/bba2f7f2abf3b8016e7472e6a473c5bf4135e26d/McAirpos/Batocera34/configs/emulationstation/es_systems_makecode.cfg#L12

Not sure if this could be helpful for you in any way or whether you actually are asking for some help or if the restart OS command is an ok workaround?

In any case, it would be difficult for me pinpoint exactly or test, since I do not own a RG35xxSP, nor know if running StockOS on other hardware(e.g. RPi) is even possible or provides a relevant test case?

game-de-it commented 1 month ago

Thank you for your advice!

I tried all the things you taught me, but they all failed.

However, as verified in the video below, I was able to successfully finish the game by launching it from retroarch without using the default frontend. https://x.com/0_game_it/status/1798956754619023445

I use the following core to run shell scripts from retroarch. https://github.com/SwedishGojira/libretro-bash-launcher

In the following project, I am trying to use retroarch as a frontend for the RG35xx (H700 series). https://github.com/game-de-it/rg35xx/releases/tag/RetroArchFrontEnd_v5 In other words, by installing this RAFE, you will be able to play McAirpos games. :D


Next Step

Retroarch does not have a function to pass .elf files to a specific shell script.

Also, as it stands now, you have to create a startup script for each game, like "McAirpos_DemoGame_RUN.sh", which is not realistic.

One way to do this is to get a list of files in the directory where the .elf files are stored, and have the user select the game file using the dialog command.

I don't know if I will be able to make this happen, but I am grateful for all the support I have received.

Vegz78 commented 1 month ago

Ok, hope you find a solution that works well inside the default frontend!

As mentioned, since I do not have access to this hardware and setup, it is unfortunately really hard to explore this issue further.

Nice if you would report back here, and on the official MakeCode Arcade forum, your final progress/success, though!

PS: Did you try the 32-bit version of ttyecho (not _ttyechoarm64) and/or play around with different /dev/ttyX_ numbers, by the way? But, anyways, if a restart of the default frontend works and does not take too long, I guess it is good enough a solution!

Also, as it stands now, you have to create a startup script for each game, like "McAirpos_DemoGame_RUN.sh", which is not realistic.

PS2: Wouldn't it be possible to make a more generic script that uses the game in question as an argument?

game-de-it commented 4 weeks ago

Yes, "ttyecho_arm64" didn't work due to a missing library, so I ran "ttyecho" to test it.

The game would not start with /dev/tty1~.

If you log in via SSH, specifying "/dev/pts/0" will make the game screen appear, but this did not solve the problem of the screen going dark when the game ended.

Incidentally, the default frontend starts without using a tty. Retroarch also starts without using a tty, and with it the game ends without any problems and the screen returns. The default frontend is a closed source, vendor-proprietary application, making it extremely difficult to investigate.

I am currently creating a simple front end using the dialog command. :) sc01

game-de-it commented 1 week ago

Hello @Vegz78

Today, I found a solution to run McAirpos on AnbernicRG35xxSP.😄 Please refer to the video below. https://x.com/0_game_it/status/1806223942962782667

I couldn't achieve what I wanted to do in the OS environment until now, so I started the project "DesktopOS" to run RG35xxSP as a home computer. https://github.com/game-de-it/rg35xx/releases/tag/RG35xx_H700_DesktopOS_0.1

Next, I ran the McAirpos front end using the "dialog command". Users can freely select elf files, and by running them, they can control the game with a controller.🎉 After conducting some more operational tests, if there are no problems, we would like to implement this mechanism in "DesktopOS v0.2" and release it.

I would also like to post about this on the "official MakeCode Arcade forum" which you mentioned previously.

Thank you for all your advice!

Vegz78 commented 1 week ago

Nice work and thanks for sharing, @game-de-it! Glad it worked out for you!

if there are no problems, we would like to implement this mechanism in "DesktopOS v0.2" and release it.

I would also like to post about this on the "official MakeCode Arcade forum" which you mentioned previously.

No problem, appreciate anyone who can make good use of McAirpos and no need to ask! I was hoping the MIT license I chose is open enough for whatever need, and that now and then improvements and use cases are reported.

PS: Please share, if possible, the MakeCode Arcade source code of that nice flipper game of yours in the video on the forum, too! ;-)