libretro / mame2003-plus-libretro

Updated 2018 version of MAME (0.78) for libretro. with added game support plus many fixes and improvements
Other
196 stars 110 forks source link

switch black screen after loading rom 1.9.1-1.9.3 #1054

Closed lencil closed 3 years ago

lencil commented 3 years ago

on switch, 1.9.3 will black screen. work fine on 1.8.9

mahoneyt944 commented 3 years ago

Post a debug level log to analyze.

ckeisc commented 3 years ago

If you wait for 5-10 minutes, does it work? @lencil Possibly related to https://github.com/libretro/mame2003-plus-libretro/issues/894#issuecomment-843517405

also observed on 3ds (similar tool chain?)

markwkidd commented 3 years ago

Other than wondering if this is a frontend problem, there have been some updates to the libretro common file functions during the last year: https://github.com/libretro/libretro-common/commits/master/file/archive_file.c

mahoneyt944 commented 3 years ago

@ckeisc can you confirm if using retroarch 1.8.9 with our current commit of mame2003-plus works or not? This will help us determine if the issue is within the core or retroarch

ckeisc commented 3 years ago

@mahoneyt944 I only have access to a 3DS build which is statically compiled - the core contains the whole frontend, so can’t try separate combination of core and frontend.

mahoneyt944 commented 3 years ago

@ckeisc I've seen reports that the initialization process is running extremely slow for some 3ds and switch builds. Seems like a change in the frontend not local to the core. Do you see any improvements with the lastest 1.9.11 build? If you monitor the log you may be able to see it executing slower than normal.

ghost commented 3 years ago

There are two issues that will make a 3ds slow one is having a cheat file and the second is enabling debug logging. Since the Cheat option was ripped form the core there is no way to disable it other than renaming it or deleting it.

mahoneyt944 commented 3 years ago

Here's a video one user reported https://www.reddit.com/r/RetroArch/comments/pfd69e/mame_2003plus_on_retroarch_3ds_takes_forever_to/?utm_source=share&utm_medium=mweb

This user was logging at info level, and it's slow even before the cheat file is loaded. I'm sure the cheat file and hiscore file aren't helping though.

mahoneyt944 commented 3 years ago

Infact based on the video it seems to be hung up after "Preparing emulated CPUs for execution." Which is the hiscore.dat loading. The cheat file is loaded just before this. Here's a log of my Android during this section in debug

[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_history.lpl].
[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_music_history.lpl].
[Playlist]: Loading history file: [/storage/emulated/0/Android/data/com.retroarch/files/content_image_history.lpl].
[Playlist]: Loading favorites file: [/storage/emulated/0/Android/data/com.retroarch/files/content_favorites.lpl].
[Playlist]: Written to playlist file: /storage/emulated/0/Android/data/com.retroarch/files/content_history.lpl
[MAME 2003+] Entering retro_run() for the first time.
(generic_fopen) (pathtype:13, gamename:(null), filename:cheat.dat, extension:(null), flags:1)
[MAME 2003+] Trying 
[MAME 2003+] (generic_fopen) directory exists: 
[MAME 2003+]  (generic_fopen) using osd_fopen cheat.dat
[MAME 2003+] osd_get_path() return path=  /storage/emulated/0/RetroArch/system/mame2003-plus
(osd_fopen) opened the file:  /storage/emulated/0/RetroArch/system/mame2003-plus/cheat.dat
[MAME 2003+] Preparing emulated CPUs for execution.
(generic_fopen) (pathtype:9, gamename:(null), filename:hiscore.dat, extension:(null), flags:1)
[MAME 2003+] Trying 
[MAME 2003+] (generic_fopen) directory exists: 
[MAME 2003+]  (generic_fopen) using osd_fopen hiscore.dat
[MAME 2003+] osd_get_path() return path=  /storage/emulated/0/RetroArch/system/mame2003-plus
(osd_fopen) opened the file:  /storage/emulated/0/RetroArch/system/mame2003-plus/hiscore.dat
(generic_fopen) (pathtype:9, gamename:(null), filename:hiscore.dat, extension:(null), flags:1)
[MAME 2003+] Trying 
[MAME 2003+] (generic_fopen) directory exists: 
[MAME 2003+]  (generic_fopen) using osd_fopen hiscore.dat
[MAME 2003+] osd_get_path() return path=  /storage/emulated/0/RetroArch/system/mame2003-plus
(osd_fopen) opened the file:  /storage/emulated/0/RetroArch/system/mame2003-plus/hiscore.dat
[MAME 2003+] helifire hiscore memory map found in hiscore.dat!
ghost commented 3 years ago

fopen isint a file read its a file handle open youll need to log when the cheats actually reading to get that info. Dont want to really debate this is simple enough for someone to confirm it still happens we had a issue with a classics and it turns out they had debug logging on or you can trace the code. You would need to log all file access to be 100% sure or just try it. There really should be an option do disable cheat loading slower systems crawl with it because of its size and some have slow file access

mahoneyt944 commented 3 years ago

It's always testing that's makes these issues a pain, if one of us just had these platforms it would be solved in minutes most likely haha.

I think if we can get a user to record their screen while logging at info level like in the video I linked above but with up to date commits of RA and the core, we could pin point it now.

mahoneyt944 commented 3 years ago

@ckeisc can you confirm if by using commit 1fd30e3 with the new autosave hiscore core option set to disabled (located under system options) makes any improvements on your load time? Thank you.

mahoneyt944 commented 3 years ago

@grant2258 I believe that if the cheat.dat file is not placed in the system dir by the user then that functionality should be disabled so to speak by the core. We do not pre-compile the cheat file or generate it like we do the hiscore file. We just open it if it's there. Besides the RetroPie script which does download the cheat file, this would be a manually installed file by the user.

We could pre-compile it though in a similar way and add a core option to control loading it if that seems reasonable.

mahoneyt944 commented 3 years ago

After confirming to be improved by this user https://www.reddit.com/r/RetroArch/comments/pfd69e/mame_2003plus_on_retroarch_3ds_takes_forever_to/?utm_source=share&utm_medium=mweb I'm going to close this issue. It's recommended to change the core option "autosave hiscore" to disabled.

mahoneyt944 commented 2 years ago

3ds and switch should be fixed now with or without using cheat.dat. please use the latest commit at the time of this post.