EmulationStation icon indicating copy to clipboard operation
EmulationStation copied to clipboard

2gb Image limitation for gamelists

Open PittStone opened this issue 6 years ago • 11 comments

The limitation of the image files is the real problem. Images over 2gb are not showing in Emulationstation with Infos, Pictures and Videos. Only the file itself is showing and the game starts normaly, but without the Infos from the gamelist.

PittStone avatar May 14 '18 20:05 PittStone

I have the same problem with roms/isos over 2GB

eduyano avatar May 24 '18 19:05 eduyano

During the initialization when parsing the gamelist these roms are ignored

eduyano avatar May 24 '18 19:05 eduyano

Just ran into this bug today. Can confirm it seems to happen only with roms over 2gb. For example, most of my PS2 collection.

einsteinx2 avatar Jun 02 '18 17:06 einsteinx2

Looking into this now. The bug appears to be with the call to Utils::FileSystem::exists() in es-app/src/Gamelist.cpp line 115. The actual method is located in es-core/src/utils/FileSystemUtil.cpp line 553.

The actual bug appears to be the use of stat to get the file info. Surprise surprise, stat only supports files up to 2GB. There's another call, stat64, that supports larger files!

I found an answer here that indicates that it should be trivial to replace and will work in Windows: https://stackoverflow.com/a/18574629/299262

I assume no one has noticed this in RetroPie as it's less common to emulate anything newer than the original playstation, maybe a little N64 if you overclock.

I'm going to try the fix now and will make a PR if it works.

einsteinx2 avatar Jun 02 '18 17:06 einsteinx2

So it took me about 5 minutes to try out the fix and compile on Linux...and the rest of the day to try and get compiling working on Windows FML. I think I'm almost there though. Hoping to have a PR in today. There's no real reason this solution won't fix the problem, the only potential issues could be incompatibilities with Windows, because Windows is "special", but even that shouldn't be insurmountable.

einsteinx2 avatar Jun 02 '18 23:06 einsteinx2

Fixed it! Took all of 10 minutes to fix, then 8 hours getting EmulationStation compiling on Windows haha. But having it work perfectly the first compile and seeing all of the metadata for my PS2 games was worth the pain!

Pull request here: https://github.com/jrassa/EmulationStation/pull/14

einsteinx2 avatar Jun 03 '18 04:06 einsteinx2

Looking forward to contributing more now that the painful "just get it to build" phase is over.

einsteinx2 avatar Jun 03 '18 04:06 einsteinx2

well, issues or requests from this release, will never get commited.... just from retropie

eduyano avatar Jun 15 '18 11:06 eduyano

@eduyano good to know, in that case I'll fork RetroPie and submit the PR there.

einsteinx2 avatar Jun 19 '18 02:06 einsteinx2

@einsteinx2 sorry I didn't notice this or #14 earlier. I didn't have notifications enabled as I didn't expect anyone to create tickets or PRs here. This fork is primarily my working repo and all work I do is added to the RetroPie repo. Please create a PR in RetroPie and it will get reviewed there.

jrassa avatar Jun 25 '18 02:06 jrassa

@einsteinx2 Do you have any windows compiled version? Im not a c++ dev , and is a terrible pain to try to compile by myself..... could you help me?

Is there any Windows version Fixed with the 2gb problem? I cannot find any binary , and I dont know anything about compile......

I saw the code, using stat64 as fix, but i dont know how to compile....

Do you have any compiled version? Thanks a lot!!!

goyetus avatar Jul 30 '18 00:07 goyetus