Closed ghost closed 1 month ago
Wow. That is a very interesting issue ;)
The error occurs basically because the GPU is running out of memory. It’s seems that is not freeing the gpu memory :?
It could even be an error in the OpenGL ES driver. I have tested many more than 25 games on my phone that has an Adreno GPU and that error definitely does not happen.
When I tested on the shield, that Tegra GPU was a headache because the shaders didn't work well and I had many incompatibilities with the shader language…
What rendering engine are you using in MAME4droid settings? OpenGL ES 3.2 with shaders or OpenGL ES 1.1 (the good old no shader’s one )...
I suspect that you are having some shader problem. Are you using a specific shader? If you use another shader or better none, do you have that problem?
Google is quite annoying with application updates on Android TV. They rejected my last update with strange anrguments and I had to make appeal to get the update approved. I suspect that in a ridiculous way they want that platform to have a better reputation and they put a lot of problems in those applications that they do not understand like an emulator which you have to put roms on it to get it working… :))
Another question… How many ROMs have you?
Because of security restrictions of scoped storage, the ROMs have to be cached at the start of the application and that consumes a lot of memory and the shield is already old and has very little ram memory for today's standards. It is possible that you have many roms in your nvme and the shield is very tight on memory and you get that error because you literally do not have enough memory to cache so many roms. could this be the problem?
OpenGL ES 1.1
Default resolutions for both emulation and front end
Absolutely no shaders
I'm not interested in bells and whistles, so things like shaders, retroachievements and overwhelming quantities of preferences get ignored by me (Retroarch is on my 'avoid unless there is no choice' list due to the sheer number of preferences). I start an emulator, select the game I want and begin playing.
(I stopped using artwork until I finish my entertainment room and get a 65" or larger TV so I don't have to compromise between cropped artwork or a mini game "display".)
I have the full MAME (split) set of over 40,000 games but even a micro set of less than 25 games has the same issue if they are started and quit in the manner I described.
I should point out that I am notorious for pushing the limits of my devices. I have (intentionally) run both of the remade Star Wars Battlefront games on Surface Pro Tablets as far back as the Pro 4 and put my (at the time) newly released M1 Macbook Pro to the test answering the gamers' question of "Can it run Crisis" by successfully playing the original windows version using the intel version of Crossover with all settings maxed out to prove the value of the new chip to my coworkers (and to some of the Dolphin team when Deleoth was not interested in supporting it).
I have a full split MAME set of over 40,000 games but even a micro set of less than 25 games has the same issue if they are started and quit in the manner I described.
From what I have seen in the photos that you have attached, that microset is really a filter…
The important thing is that when you start mame4droid it points to a directory with 40,000 files even though you only see 25...
Is that correct? Are you configuring the directory with the complete romset in mame4droid?
I've done it both ways, full set on the external drive and a custom made set of 25 games on the internal storage.
The micro set was just made as a test and I didn't keep it. Rather than recreating it and changing locations today, It was quicker to use the favorites filter I made of classic games I grew up with.
Like I said, this is an edge case issue. Most people probably won't do what I was doing. The only reason I even was starting and stopping so many games was to find a specific one I played in the 80s and couldn't recall the name.... Since so many games at that time were copycats of others, I needed a quick way to find it.
okay. then the problem must lie elsewhere.
In any case, it seems incredible to me that it works on devices as old as the shield with so little memory.
The library build when compiling the full set of Mame exceeds several hundred megabytes uncompressed. It is a real madness that should put devices with little RAM to the limit. That's why I limited this version to modern devices and a modern SDK as well. The only exception is the shield because I have one and I love it because Nvidia gave it to me time ago so I could develop with it.
In any case, I'll give it a try to see if I can think of anything, but it's difficult if it works correctly on the rest of the devices I have. :(
It could be that even though I got mine in November of last year, it might be a hardware defect occuring. I'm planning on getting another one soon to replace my Series X as a video player in a different room but I am waiting for them to go on sale again.
I suppose I could replace the ram with larger ones..... But that would require me to be extremely bored.
I should ask, which model is yours? It could be caused by some "minor" difference between X1 and X1+ chip sets.
Unlike most Shield owners, I don't think we will see a new version released. Even if Nintendo does release a new Switch model there isn't any guarantee that it'll be a nVidia based system this time, and even if it is that doesn't mean that nVidia will bother making anything else for home use.
No. I think is a problem with all shield devices probably related to a gpu driver bug or particularities and that this mame is very demanding in terms of memory and hardware. Not a problem with your shield.
As I mentioned before, I have already seen other types of problems with the shield and this version of Mame wiphen I tested shaders.
When I said that it didn't fail to me with my other devices, I wasn't referring to the shield. I'm sure (and I'll try it when I have a some time) that the problem you mentioned happens to me too because, as you say, I haven't launched more than 25 roms in a row on the shield, but on the phone.
Could you try enabling the opengl es 3.2 rendering. It’s using not power of two textures. You don’t need to enable any shader. I would like to know if fails with the same number of ROMs in a row.
Okay, here is where I am at.
1) Using OpenGL ES 3.2, the full set still has memory issues. Took longer to get the glitches to start (about 45 games) but it is quicker to outright fail (about 3 more games later). When it does fail, the game that was being run remains on screen with the error message overlaid before switching to the blank/black screen
2) Using OpenGL ES 3.2, a microset of approximately 50 games has no issues - even after going through the list twice for an approximation of 100 games.
3) I never thought to pay attention before but now that I am doing so, I do not notice any appreciable difference in the time it takes to cache 50 games vs 40,000+ games
4) Compared to an emulator like Dolphin, I don't find M4D 2024 to be as demanding on memory or hardware. In fact when comparing 1.10.3 to 1.9.6, the performance has increased a great deal. I was honestly surprised at it. Mortal Kombat 4 is a good example of this. It used to visually stutter a lot. But in the latest version it is smoother and enjoyable without using speed hacks. The only real issue is that I never know if it is going to run properly or if it is going to crash immediately after Raiden says "banish Shinnok" during the opening fmv (only happens with M4D 2024) as well as how long it will keep running or how long it will keep crashing at that exact spot. Of course, I do acknowledge that games that use chds could perform worse as they are more complicated and advanced games, but I don't have any of those, so it is a non issue for me.
Hi.
I have been testing it extensively with my shield and I have not been able to get it to fail. It's super strange because when something fails it's for something.
As I already told you at the time, this application consumes a lot of memory as it reads many files in memory because I create a virtual file system instead of managing file URLs as other emulators can do for different technical reasons. That is why it takes longer to boot and consumes more memory the more ROMs you have.
It is very strange that it takes you the same time to read 50 as 40,000 files since SAF is very slow. Someone is in the middle is caching so many files and that may be why you have less available memory.
When the application runs out of memory is when the things you mention happen.
OpenGL ES 3.2 may alleviate the problem somewhat because it uses less memory than 1.1.
That occurs to me is that for some reason that I don't fully understand, you have less memory available and there is probably some memory leak in some pattern that you make and I don't.
The first thing I thought was that we were not using the same version but that does not seem to be the case. :??
I have tested it with a default installation without configuring anything and only pointing to my test romset of 3900 files.
I have inspected app's memory usage a with Memory Profiler and i dont see any important memory leak :(
I think it might have something to do with file or folder location. Like I said earlier, I don't just keep my games on the external drive - I also keep samples, cfg, nvram and UI there to reduce the possibility of data loss due to a crash corrupting things or forgetting to backup before uninstalling. For mame to see them, I set their locations as follows:
1) /storage/{drive name}/games/mame/roms 2) /storage/{drive name}/games/mame/samples 3) /storage/{drive name}/games/mame/cfg 4) /storage/{drive name}/games/mame/nvram 5) /storage/{drive name}/games/mame/ui
I have noticed with this setup I see .cfg files, my favorites file and even samples zips displayed as being cached even though they are not in the game directory. Could that be part of the issue?
I won't be able to do it today due to the holiday, but I can try testing loading multiple games consecutively using the default installation and see what happens.
could be. It is definitely not a configuration that many people use and by caching all the files more memory is used and it must be somewhat tight in the shield….
What is interesting is that on an unmodified default setup, if you look in mame game settings at the folders section, it will list the artwork, samples and software folders as being located in the folder chosen for the game location as well as ./{folder name}. I could understand them being cached in that setup.
That's something I did on purpose. Apart from the default mame artworks directory, I add one hanging from the ROMs directory that the user configures in the external storage (not the internal ROMs folder) That way a user can put artworks in the external storage directory without having to access the internal data directory, which is very difficult to access without a PC.
In any case, I think that most people should not put in a complete full set. Maybe in the shield it may make a little more sense but it pi’s a little dated
I'll still test with the default (tomorrow probably) and let you know what happens.
There is also another Android TV device I'm tempted to get and try that has a lot more recent specs. I'm just not convinced the CPU/GPU are better than the shields; definitely a lot more ram and storage space though.
Okay.... Now this is different.
I just tried start/stopping games, running off a clean install with only the folders I keep my roms in configured and filled. Caching went a lot faster than it did in the past, and I couldn't crash the app (at least not in the quick 50 games I tried.
Thanks for the tests. There are definitely so many possible combinations and in an application as large as this the casuistics of each one are difficult to cover.
The other day a person contacted me who had a latest generation Samsung and he did not see the data files but he did see them on the rest of the devices he has. However, they were there because he downloaded the images and everything worked correctly.
The first thing I thought was that Samsung wants to be the Apple of Android and its ecosystem is very invasive and knowing what Samsung had done with the access haha
I still have no idea what is happening to Samsung phones.
Hey David,
I just saw a PR over on the retroarch GitHub that will change that project over to scoped storage also, maybe you can help with how to still grant access to external storage if they make the switch.
Thanks for the tests. There are definitely so many possible combinations and in an application as large as this the casuistics of each one are difficult to cover.
The other day a person contacted me who had a latest generation Samsung and he did not see the data files but he did see them on the rest of the devices he has. However, they were there because he downloaded the images and everything worked correctly.
The first thing I thought was that Samsung wants to be the Apple of Android and its ecosystem is very invasive and knowing what Samsung had done with the access haha
I still have no idea what is happening to Samsung phones.
The latest OneUI versions block access to the data folder. They would need to use a program like Shizuku and a compatible file manager like X-Plore or FV File Manager.
Shizuku also works on the Shield TV, not sure about other android TV devices though. Supposedly, this also is faster than SAF caching. Their website gives information on what code to add to an app to make it compatible.
Doesn't like. It's uses app specific storage. All roms will be deleted if you uninstall the app. My approach is better if you have the right hardware. Ants it's more flexible because you can store you roms wherever you want.
El sáb, 29 jun 2024, 18:47, StLouisCPhT @.***> escribió:
Hey David,
I just saw a PR over on the retroarch GitHub that will change that project over to scoped storage also, maybe you can help out with that.
libretro/RetroArch#16393 https://github.com/libretro/RetroArch/pull/16393
— Reply to this email directly, view it on GitHub https://github.com/seleuco/MAME4droid-2024/issues/30#issuecomment-2198258714, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQGONEAEYJAOJOVZCLBRNDZJ3QKPAVCNFSM6AAAAABJY7VY7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGI2TQNZRGQ . You are receiving this because you commented.Message ID: @.***>
Doesn't like. It's uses app specific storage. All roms will be deleted if you uninstall the app. My approach is better if you have the right hardware. Ants it's more flexible because you can store you roms wherever you want. El sáb, 29 jun 2024, 18:47, StLouisCPhT @.> escribió: … Hey David, I just saw a PR over on the retroarch GitHub that will change that project over to scoped storage also, maybe you can help out with that. libretro/RetroArch#16393 <libretro/RetroArch#16393> — Reply to this email directly, view it on GitHub <#30 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQGONEAEYJAOJOVZCLBRNDZJ3QKPAVCNFSM6AAAAABJY7VY7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGI2TQNZRGQ . You are receiving this because you commented.Message ID: @.>
Agreed, and I told them as much :) so now they are trying to figure out what to do.
Going back to my original error about textures, it is not as prone to happening if I work with the merged romset instead of split or non-merged. Maybe add a note to the initial setup that merged is recommended for devices containing less than 8GB of ram?
I'm really tired of Android tv. When I updated to version 0.267 google rejected the update due to some meaningless Android TV policy.
The funny thing about the case is that it was not updating the Android TV channel, only the mobile channel. In the end I decided to deactivate support for Android TV because I had already had another previous rejection with Android TV that made no sense and after appealing they accepted the update but it causes me a lot of frustration and waste of time.
Google is trying to destroy Android TV with totally stupid reviews trying to improve Android TV, but what they find is that we developers are fed up with the platform.
It will continue updating the mobile one and I'm going to forget about android tv.
With a powerful smartphone there is no problem managing multiple roms merged or not merged with ufs. Android tv devices are obsolete at the hardware level and it is not worth it.
Here is the funny rejection. thank you very much for such great help :) an issue with app screenshot 👎 I have no idea what it refers to..
Issue found: App installation issues
During testing we experienced installation issues with your app and were unable to successfully evaluate it for Android TV. Please ensure your app can install successfully on Android TV devices and resubmit.
Issue details
We found an issue in the following area(s):
App screenshot
In light of the decision to remove Android TV support and the fact that I was able to get my hands on a ROG Ally system for emulation use (among other gaming uses), I am going to close this issue.
Granted, this is probably an edge case regarding the triggering of the error. But it is one that I have noticed and reproduced several times and could be indicative of an issue elsewhere as well.
If you load approximately 25 games in a row without closing Mame4Droid 2024, the main menu will begin to show graphical issues such as random artifacts and incorrect resolutions as well as begin to load slower. Eventually, after about 40 games you will trigger the error message: "Not enough memory to create texture" and the screen will go black, forcing you to return to the home screen and close the mame4droid app.
You do not have to actually play the games, just loading them and then quitting and loading a new game is sufficient. Most of the games I prefer to play are from the '70s and '80s, but presumably newer games would also trigger the issue and potentially even faster as they would require more resources to even just start the games. While I encountered the issue on a Shield TV, it is probable that this issue would occur on other Android TV devices as well
2019 Shield TV Pro nVidia Software 9.1.1 / Android 11 Not running any other apps in the background (other than whatever is used by the OS without user interaction) Games are installed on an external Sabrent enclosure containing a Samsung 970 nvme drive (also tested using the Shield's internal emmc memory)