libretro-mirrors / beetle-saturn-libretro

Standalone port of Mednafen Saturn to the libretro API.
GNU General Public License v2.0
62 stars 42 forks source link

[Android] Beetle Saturn crashes after 5 seconds on any game #159

Open Cinibonswirl26 opened 4 years ago

Cinibonswirl26 commented 4 years ago

Beetle Saturn always crashes 5 seconds after launching a game. Have tried multiple games, always crashes app. It appears that it's able to launch the game as it does not display a "Failed to Load Content" error

ner00 commented 4 years ago

@Cinibonswirl26 Have you enabled logging with debug level to try and see if something shows the reason why this happens? Also, what system are you on? If you're on Windows, go to the Event Viewer > Applications and try to see if there is a log at the time of error that references RetroArch or Beetle core.

Cinibonswirl26 commented 4 years ago

RetroArch 1.8.4 (Git f425d8d) === Build ======================================= Capabilities: ASIMD [INFO] Built: Jan 16 2020 [INFO] Version: 1.8.4 [INFO] Git: f425d8d [INFO] ================================================= Environ: SET_PIXEL_FORMAT: RGB565. Redirecting save file to "/storage/emulated/0/RetroArch/saves/.srm". Redirecting savestate to "/storage/emulated/0/RetroArch/states/.state". Version of libretro API: 1 [INFO] Compiled against API: 1 [Audio]: Set audio input rate to: 30000.00 Hz. [Video]: Video @ 960x720 [Video]: Starting threaded video driver ... Android EGL: GLES version = 2. [EGL] Falling back to eglGetDisplay [EGL]: EGL version: 1.5 [GL]: Found GL context: android [GL]: Detecting screen resolution 0x0. [EGL]: Current context: 0x7a56e50f80. [GL]: Vendor: Qualcomm, Renderer: Adreno (TM) 630. [GL]: Version: OpenGL ES 3.2 V@415.0 (GIT@2b9feb8, I58d155b2d1, 1575493064) (Date:12/04/19). [GL]: Using resolution 720x1480 [GL]: Default shader backend found: glsl. [Shader driver]: Using GLSL shader backend. [GL]: Stock GLSL shaders will be used. [GLSL]: Found GLSL vertex shader. [GLSL]: Found GLSL fragment shader. [GLSL]: Linking GLSL program. [GLSL]: Found GLSL vertex shader. [GLSL]: Found GLSL fragment shader. [GLSL]: Linking GLSL program. [GLSL]: Found GLSL vertex shader. [GLSL]: Found GLSL fragment shader. [GLSL]: Linking GLSL program. [GL]: Using 4 textures. [GL]: Loaded 1 program(s). [Joypad]: Found joypad driver: "android". sdk version: 29 Set engine_handle_dpad to 'Get Axis Value' (for reading extra analog sticks)[Font]: Using font rendering backend: stb-unicode. [Video]: Found display server: android [OpenSL]: Requested audio latency: 128 ms.[OpenSL]: Setting audio latency: Block size = 768, Blocks = 32, Total = 24576 ... [Menu]: Found menu display driver: "gl". [Font]: Using font rendering backend: stb-unicode. [Font]: Using font rendering backend: stb-unicode. [Menu]: Found menu display driver: "gl". [Font]: Using font rendering backend: stb-unicode. [Font]: Using font rendering backend: stb-unicode. [Font]: Using font rendering backend: stb-unicode. [LED]: LED driver = 'null' 0x79f68a9db0 [MIDI]: Initializing ... [MIDI]: Input disabled. [MIDI]: Output disabled. [MIDI]: Initialized "null" driver. SRAM will not be saved. Loading history file: [/data/user/0/com.retroarch/content_history.lpl]. Loading history file: [/data/user/0/com.retroarch/content_music_history.lpl]. Loading history file: [/data/user/0/com.retroarch/content_image_history.lpl]. Loading favorites file: [/data/user/0/com.retroarch/content_favorites.lpl]. [Font]: Using font rendering backend: stb-unicode. [Font]: Using font rendering backend: stb-unicode. [Font]: Using font rendering backend: stb-unicode. Using content: /storage/emulated/0/Download/ROMS/CD Games/Virtua Fighter 2 (USA).cue. arg #0: retroarch arg #1: /storage/emulated/0/Download/ROMS/CD Games/Virtua Fighter 2 (USA).cue arg #2: -s arg #3: /storage/emulated/0/RetroArch/saves arg #4: -S arg #5: /storage/emulated/0/RetroArch/states arg #6: -c arg #7: /storage/emulated/0/Android/data/com.retroarch/files/retroarch.cfg arg #8: -v Content ran for a total of: 00 hours, 00 minutes, 00 seconds. Unloading game.. Unloading core.. Unloading core symbols.. Threaded video stats: Frames pushed: 574, Frames dropped: 0. Set config file to : /storage/emulated/0/Android/data/com.retroarch/files/retroarch.cfg RetroArch 1.8.4 (Git f425d8d) Redirecting save file to "/storage/emulated/0/RetroArch/saves/Virtua Fighter 2 (USA).srm". Redirecting savestate to "/storage/emulated/0/RetroArch/states/Virtua Fighter 2 (USA).state". === Build ======================================= Capabilities: ASIMD [INFO] Built: Jan 16 2020 [INFO] Version: 1.8.4 [INFO] Git: f425d8d [INFO] ================================================= jni_thread_destruct() Loading dynamic libretro core from: "/data/data/com.retroarch/cores/mednafen_saturn_libretro_android.so" [Overrides] no core-specific overrides found at /storage/emulated/0/RetroArch/config/Beetle Saturn/Beetle Saturn.cfg. [Overrides] no content-dir-specific overrides found at /storage/emulated/0/RetroArch/config/Beetle Saturn/CD Games.cfg. [Overrides] no game-specific overrides found at /storage/emulated/0/RetroArch/config/Beetle Saturn/Virtua Fighter 2 (USA).cfg. Environ: GET_LANGUAGE: "0".

Core requested VFS version >= v1, providing v3

Controller port: 1 Control Pad (ID: 1) 3D Control Pad (ID: 261) Arcade Racer (ID: 517) Mission Stick (ID: 773) Mouse (ID: 258) Stunner (ID: 516) Twin-Stick (ID: 1285) Virtua Gun (ID: 260) Dual Mission Sticks (ID: 1029) (null) (ID: 0) Controller port: 2 Control Pad (ID: 1) 3D Control Pad (ID: 261) Arcade Racer (ID: 517) Mission Stick (ID: 773) Mouse (ID: 258) Stunner (ID: 516) Twin-Stick (ID: 1285) Virtua Gun (ID: 260) Dual Mission Sticks (ID: 1029) (null) (ID: 0) [Remaps]: remap directory: /storage/emulated/0/RetroArch/config/remaps Redirecting save file to "/storage/emulated/0/RetroArch/saves/Virtua Fighter 2 (USA).srm". Redirecting savestate to "/storage/emulated/0/RetroArch/states/Virtua Fighter 2 (USA).state".

Environ: SYSTEM_DIRECTORY: "/storage/emulated/0/RetroArch/system". Environ: UNSUPPORTED (#57).

Environ: PERFORMANCE_LEVEL: 15. Content loading skipped. Implementation will load it on its own.

RetroPad, Port 1, Button "B (bottom)" => "A Button"
RetroPad, Port 1, Button "Y (left)" => "X Button"
RetroPad, Port 1, Button "Select" => "Mode Switch"
RetroPad, Port 1, Button "Start" => "Start Button"
RetroPad, Port 1, Button "D-Pad Up" => "D-Pad Up"
RetroPad, Port 1, Button "D-Pad Down" => "D-Pad Down"
RetroPad, Port 1, Button "D-Pad Left" => "D-Pad Left"
RetroPad, Port 1, Button "D-Pad Right" => "D-Pad Right"
RetroPad, Port 1, Button "A (right)" => "B Button"
RetroPad, Port 1, Button "X (up)" => "Y Button"
RetroPad, Port 1, Button "L" => "Z Button"
RetroPad, Port 1, Button "R" => "C Button"
RetroPad, Port 1, Button "L2" => "L Button"
RetroPad, Port 1, Button "R2" => "R Button"
RetroPad, Port 2, Button "B (bottom)" => "A Button"
RetroPad, Port 2, Button "Y (left)" => "X Button"
RetroPad, Port 2, Button "Select" => "Mode Switch"
RetroPad, Port 2, Button "Start" => "Start Button"
RetroPad, Port 2, Button "D-Pad Up" => "D-Pad Up"
RetroPad, Port 2, Button "D-Pad Down" => "D-Pad Down"
RetroPad, Port 2, Button "D-Pad Left" => "D-Pad Left"
RetroPad, Port 2, Button "D-Pad Right" => "D-Pad Right"
RetroPad, Port 2, Button "A (right)" => "B Button"
RetroPad, Port 2, Button "X (up)" => "Y Button"
RetroPad, Port 2, Button "L" => "Z Button"
RetroPad, Port 2, Button "R" => "C Button"
RetroPad, Port 2, Button "L2" => "L Button"
RetroPad, Port 2, Button "R2" => "R Button"
RetroPad, Port 3, Button "B (bottom)" => "A Button"
RetroPad, Port 3, Button "Y (left)" => "X Button"
RetroPad, Port 3, Button "Select" => "Mode Switch"
RetroPad, Port 3, Button "Start" => "Start Button"
RetroPad, Port 3, Button "D-Pad Up" => "D-Pad Up"
RetroPad, Port 3, Button "D-Pad Down" => "D-Pad Down"
RetroPad, Port 3, Button "D-Pad Left" => "D-Pad Left"
RetroPad, Port 3, Button "D-Pad Right" => "D-Pad Right"
RetroPad, Port 3, Button "A (right)" => "B Button"
RetroPad, Port 3, Button "X (up)" => "Y Button"
RetroPad, Port 3, Button "L" => "Z Button"
RetroPad, Port 3, Button "R" => "C Button"
RetroPad, Port 3, Button "L2" => "L Button"
RetroPad, Port 3, Button "R2" => "R Button"
RetroPad, Port 4, Button "B (bottom)" => "A Button"
RetroPad, Port 4, Button "Y (left)" => "X Button"
RetroPad, Port 4, Button "Select" => "Mode Switch"
RetroPad, Port 4, Button "Start" => "Start Button"
RetroPad, Port 4, Button "D-Pad Up" => "D-Pad Up"
RetroPad, Port 4, Button "D-Pad Down" => "D-Pad Down"
RetroPad, Port 4, Button "D-Pad Left" => "D-Pad Left"
RetroPad, Port 4, Button "D-Pad Right" => "D-Pad Right"
RetroPad, Port 4, Button "A (right)" => "B Button"
RetroPad, Port 4, Button "X (up)" => "Y Button"
RetroPad, Port 4, Button "L" => "Z Button"
RetroPad, Port 4, Button "R" => "C Button"
RetroPad, Port 4, Button "L2" => "L Button"
RetroPad, Port 4, Button "R2" => "R Button"
RetroPad, Port 5, Button "B (bottom)" => "A Button"
RetroPad, Port 5, Button "Y (left)" => "X Button"
RetroPad, Port 5, Button "Select" => "Mode Switch"
RetroPad, Port 5, Button "Start" => "Start Button"
RetroPad, Port 5, Button "D-Pad Up" => "D-Pad Up"
RetroPad, Port 5, Button "D-Pad Down" => "D-Pad Down"
RetroPad, Port 5, Button "D-Pad Left" => "D-Pad Left"
RetroPad, Port 5, Button "D-Pad Right" => "D-Pad Right"
RetroPad, Port 5, Button "A (right)" => "B Button"
RetroPad, Port 5, Button "X (up)" => "Y Button"
RetroPad, Port 5, Button "L" => "Z Button"
RetroPad, Port 5, Button "R" => "C Button"
RetroPad, Port 5, Button "L2" => "L Button"
RetroPad, Port 5, Button "R2" => "R Button"

Environ: SET_PIXEL_FORMAT: XRGB8888. Environ: GET_VARIABLE beetle_saturn_region: Auto Detect Environ: GET_VARIABLE beetle_saturn_cart: Auto Detect Environ: GET_VARIABLE beetle_saturn_multitap_port1: disabled

Controller port: 1 Control Pad (ID: 1) 3D Control Pad (ID: 261) Arcade Racer (ID: 517) Mission Stick (ID: 773) Mouse (ID: 258) Stunner (ID: 516) Twin-Stick (ID: 1285) Virtua Gun (ID: 260) Dual Mission Sticks (ID: 1029) (null) (ID: 0) Controller port: 2 Control Pad (ID: 1) 3D Control Pad (ID: 261) Arcade Racer (ID: 517) Mission Stick (ID: 773) Mouse (ID: 258) Stunner (ID: 516) Twin-Stick (ID: 1285) Virtua Gun (ID: 260) Dual Mission Sticks (ID: 1029) (null) (ID: 0) Environ: GET_VARIABLE beetle_saturn_multitap_port2: disabled

Controller port: 1 Control Pad (ID: 1) 3D Control Pad (ID: 261) Arcade Racer (ID: 517) Mission Stick (ID: 773) Mouse (ID: 258) Stunner (ID: 516) Twin-Stick (ID: 1285) Virtua Gun (ID: 260) Dual Mission Sticks (ID: 1029) (null) (ID: 0) Controller port: 2 Control Pad (ID: 1) 3D Control Pad (ID: 261) Arcade Racer (ID: 517) Mission Stick (ID: 773) Mouse (ID: 258) Stunner (ID: 516) Twin-Stick (ID: 1285) Virtua Gun (ID: 260) Dual Mission Sticks (ID: 1029) (null) (ID: 0) Environ: GET_VARIABLE beetle_saturn_cdimagecache: disabled Environ: GET_VARIABLE beetle_saturn_midsync: disabled Environ: GET_VARIABLE beetle_saturn_autortc: enabled Environ: GET_VARIABLE beetle_saturn_autortc_lang: english Environ: GET_VARIABLE beetle_saturn_horizontal_overscan: 0 Environ: GET_VARIABLE beetle_saturn_initial_scanline: 0 Environ: GET_VARIABLE beetle_saturn_last_scanline: 239 Environ: GET_VARIABLE beetle_saturn_initial_scanline_pal: 0 Environ: GET_VARIABLE beetle_saturn_last_scanline_pal: 271 Environ: GET_VARIABLE beetle_saturn_horizontal_blend: disabled Environ: GET_VARIABLE beetle_saturn_analog_stick_deadzone: 15 Environ: GET_VARIABLE beetle_saturn_trigger_deadzone: 15 Environ: GET_VARIABLE beetle_saturn_mouse_sensitivity: 100 Environ: GET_VARIABLE beetle_saturn_virtuagun_crosshair: Cross Environ: GET_VARIABLE beetle_saturn_virtuagun_input: Lightgun Loading "/storage/emulated/0/Download/ROMS/CD Games/Virtua Fighter 2 (USA).cue" Unsupported CUE sheet directive: "CATALOG". Loading SBI file "/storage/emulated/0/Download/ROMS/CD Games/Virtua Fighter 2 (USA).sbi"... Disc 1

Cinibonswirl26 commented 4 years ago

Here's a video to go along with it

https://youtu.be/XG3osspRHB4

paulo-fernando-silva commented 4 years ago

Same problem here on Shield arm 64 bit. Didn't try arm 32 bit. Could this be the same as bug #157 [Core not working on NVIDIA Shield TV after lastest update to Retroarch 1.7.8]?

victante commented 4 years ago

Also happens to my Android device, every game I tested gives me a black screen for ~3 seconds and crash RA. If I'm fast enough I can call the Quick Menu, but when resuming it crashes. Couldn't find any error in log. Saturn bios files are correct.

HunterAhlquist commented 3 years ago

Same problem.

negativeExponent commented 3 years ago

RetroArch 1.8.4 (Git f425d8d)

can you try at least latest core and retroarch? if still the same, enable DEBUG level for both frontend and core log levels and send logs again.

yuanye8425 commented 3 years ago

Also happens to my Android device, every game I tested gives me a black screen for ~3 seconds and crash RA. If I'm fast enough I can call the Quick Menu, but when resuming it crashes. Couldn't find any error in log. Saturn bios files are correct.

Interesting...😆 You know what pal, you said that you could call the quick menu out, this is very important, It craches when you resume, of course it craches, because nothing has been changed. But I changed something and it works. It's pretty simple. After calling the quick menu, go to "disc control", select "eject disc", then "resume", surprisingly it didn't crash, we are in the SEGA SATURN's Bios. So we successfully bypassed that "crash point", it's running and stable, and next what you want to do is just to call quick menu again, go to "disc control", select "insert disc", then "resume", like on a real machine. It will read the disc first, after it recognized the game, launch it, you will see that beautiful SEGA logo, and enjoy your game.

I don't know what's going on exactly, but from how this core behaves, I guess it's the Saturn's Bios animation that caused this issue, because it works if we could bypass that animation. I don't know... may be I'm totally wrong, but at least it's working now, and it runs very well. all my favorite games run with full speed without any issue so far.

By the way my phone is SONY xperia 1. Retroarch 1.9.0 the latest, this problem only happened on android version, no problem at all on Windows 10. Screenshot_20201206-044241 Screenshot_20201206-044216 Screenshot_20201206-045221 Screenshot_20201206-045229 Screenshot_20201206-045253 Screenshot_20201206-045327

victante commented 3 years ago

But I changed something and it works. It's pretty simple. After calling the quick menu, go to "disc control", select "eject disc", then "resume", surprisingly it didn't crash, we are in the SEGA SATURN's Bios. So we successfully bypassed that "crash point", it's running and stable, and next what you want to do is just to call quick menu again, go to "disc control", select "insert disc", then "resume", like on a real machine. It will read the disc first, after it recognized the game, launch it, you will see that beautiful SEGA logo, and enjoy your game.

@yuanye8425 Mate, that's awesome! Tried on my phone and it really works (though now I discovered that my Samsung runs Guardian Heroes like sh*t lol, but still, it works!)

can you try at least latest core and retroarch? if still the same, enable DEBUG level for both frontend and core log levels and send logs again

@negativeExponent thanks for the instructions! Without using yuanye's workaround, I did the test and it seems the problem still persists. I know I'm not OP, but I think it will help, since it's the same issue. Here are my logs with RA 1.9.0 and latest core (not sure if it changes anything, but I made one using gl and one with vulkan).

with_gl.log with_vulkan.log

Phone's a Samsung A51.

yuanye8425 commented 3 years ago

But I changed something and it works. It's pretty simple. After calling the quick menu, go to "disc control", select "eject disc", then "resume", surprisingly it didn't crash, we are in the SEGA SATURN's Bios. So we successfully bypassed that "crash point", it's running and stable, and next what you want to do is just to call quick menu again, go to "disc control", select "insert disc", then "resume", like on a real machine. It will read the disc first, after it recognized the game, launch it, you will see that beautiful SEGA logo, and enjoy your game.

@yuanye8425 Mate, that's awesome! Tried on my phone and it really works (though now I discovered that my Samsung runs Guardian Heroes like sh*t lol, but still, it works!)

can you try at least latest core and retroarch? if still the same, enable DEBUG level for both frontend and core log levels and send logs again

@negativeExponent thanks for the instructions! Without using yuanye's workaround, I did the test and it seems the problem still persists. I know I'm not OP, but I think it will help, since it's the same issue. Here are my logs with RA 1.9.0 and latest core (not sure if it changes anything, but I made one using gl and one with vulkan).

with_gl.log with_vulkan.log

Phone's a Samsung A51.

If you didn't say that you can still call quick menu before crash. I wouldn't be able to figure it out with this workaround. 😏. That was very very important. Because I thought that this core is not running at all...

Guardian Heroes runs at 60fps and it's stable here. What's the processor of your phone? In my experience. Saturn's emulation needs a powerful processor, at least snapdragon 845, even 835 was not enough. My previous phone is Samsung note 8 with 835, Saturn's emulation runs not bad on it but not good enough. After I have changed to SONY xperia 1 with snapdragon 855. I can feel its power.😆 damn good. I tried dophin immediately, threw some game cube and wii games in. It runs very well. xenoblade chronicles full speed on a phone! Damn extraordinary job! Those emu devs are just amazing. They brought us something we can't even imagine before. They are so lovely.

Screenshot_20201207-020446

victante commented 3 years ago

That SD 855 sure packs a punch 😄 Unfortunately my phone is much humbler, rocking a mid-range Exynos 9611 and 4GB of RAM. As for Guardian Heroes, I discovered it runs quite well with the standalone Yaba Sanshiro emulator on Android, but I'm aware that Beetle/Mednafen is way more accurate and demanding, so I'm not exactly surprised.

Also, I agree with you, emulators are a godsend and their devs are amazing!

yuanye8425 commented 3 years ago

That SD 855 sure packs a punch 😄 Unfortunately my phone is much humbler, rocking a mid-range Exynos 9611 and 4GB of RAM. As for Guardian Heroes, I discovered it runs quite well with the standalone Yaba Sanshiro emulator on Android, but I'm aware that Beetle/Mednafen is way more accurate and demanding, so I'm not exactly surprised.

Also, I agree with you, emulators are a godsend and their devs are amazing!

Exactly. Anyway I'm happy that could help a little bit. See ya around.

negativeExponent commented 3 years ago

Anyone have any insight into what remains to be done to fix this?

last post is last Dec 2020. A lot has changed since then, both core and retroarch. You are adding nothing "new" to the discussion but a senseless post (necromancy in this case), considering this is a new account...

@hunterk

TideGear commented 3 years ago

Anyone have any insight into what remains to be done to fix this?

last post is last Dec 2020. A lot has changed since then, both core and retroarch. You are adding nothing "new" to the discussion but a senseless post (necromancy in this case), considering this is a new account...

@hunterk

I'll delete my previous reply and give more info then. This issue still exists, and it's independent of the CHD problem. It crashes with CUEs/BINs too. The ejecting and inserting disc trick still works, but is not ideal, obviously. This trick is not necessary when using the 32-bit build of Beetle Saturn, but that build doesn't run Beetle Saturn as well. I'm using a Galaxy s20 Ultra on Android 11.

GtrevizeG commented 3 years ago

Anyone have any insight into what remains to be done to fix this?

last post is last Dec 2020. A lot has changed since then, both core and retroarch. You are adding nothing "new" to the discussion but a senseless post (necromancy in this case), considering this is a new account... @hunterk

I'll delete my previous reply and give more info then. This issue still exists, and it's independent of the CHD problem. It crashes with CUEs/BINs too. The ejecting and inserting disc trick still works, but is not ideal, obviously. This trick is not necessary when using the 32-bit build of Beetle Saturn, but that build doesn't run Beetle Saturn as well. I'm using a Galaxy s20 Ultra on Android 11.

I'm hving the same issue here with my Poco F3 Pro. so it is still not fixed :( thanks for the hard work !

matause commented 3 years ago

Also happens to my Android device, every game I tested gives me a black screen for ~3 seconds and crash RA. If I'm fast enough I can call the Quick Menu, but when resuming it crashes. Couldn't find any error in log. Saturn bios files are correct.

Interesting...😆 You know what pal, you said that you could call the quick menu out, this is very important, It craches when you resume, of course it craches, because nothing has been changed. But I changed something and it works. It's pretty simple. After calling the quick menu, go to "disc control", select "eject disc", then "resume", surprisingly it didn't crash, we are in the SEGA SATURN's Bios. So we successfully bypassed that "crash point", it's running and stable, and next what you want to do is just to call quick menu again, go to "disc control", select "insert disc", then "resume", like on a real machine. It will read the disc first, after it recognized the game, launch it, you will see that beautiful SEGA logo, and enjoy your game.

I don't know what's going on exactly, but from how this core behaves, I guess it's the Saturn's Bios animation that caused this issue, because it works if we could bypass that animation. I don't know... may be I'm totally wrong, but at least it's working now, and it runs very well. all my favorite games run with full speed without any issue so far.

By the way my phone is SONY xperia 1. Retroarch 1.9.0 the latest, this problem only happened on android version, no problem at all on Windows 10. Screenshot_20201206-044241 Screenshot_20201206-044216 Screenshot_20201206-045221 Screenshot_20201206-045229 Screenshot_20201206-045253 Screenshot_20201206-045327

still having the same issue. Your workaround works on my phone.

Game: V Goal' 97 (this game has display problem on Yabause. So it must be run in Beetle) Retroarch version: 1.9.9 Aarach64 Android 10 Snapdragon 690 8GB Memory