Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAME (Or probably more)] - Can't load files that are more than 2 GBs #3953

Open
danylopez123 opened this issue Jun 18, 2024 · 1 comment
Open
Labels
App: EmuHawk Relating to EmuHawk frontend Core: MAME Multi-system core for thousands of arcade cabinets and "vintage" computers

Comments

@danylopez123
Copy link

danylopez123 commented Jun 18, 2024

Summary

So i've tried to launch Time Traveler with BizHawk but throws an error saying that "this operation is actually limited to compatibility files with a filesize lower than 2 gygabytes."

Repro

  1. Prepare timetrv.zip and timetrv.chd with the Multi-disk Bundler and be sure the System is set to Arcade
  2. Save and Run
  3. Throws the following error in the Output part

Output

(Sorry if you see Spanish text, my PC is Spanish, should be still understandable)

---------------------------
GBL load error
---------------------------
System.InvalidOperationException: System.Exception: Couldn't load XMLGame LoadAsset "..\timetrv\timetrv.chd" ---> System.IO.IOException: El archivo es demasiado largo. Esta operación está actualmente limitada a archivos de compatibilidad con un tamaño inferior a 2 gigabytes.

   en System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)

   en BizHawk.Client.Common.XmlGame.Create(HawkFile f) en /_/src/BizHawk.Client.Common/XmlGame.cs:línea 93

   --- Fin del seguimiento de la pila de la excepción interna ---

   en BizHawk.Client.Common.XmlGame.Create(HawkFile f) en /_/src/BizHawk.Client.Common/XmlGame.cs:línea 100

   en BizHawk.Client.Common.XmlGame.Create(HawkFile f) en /_/src/BizHawk.Client.Common/XmlGame.cs:línea 127

   en BizHawk.Client.Common.RomLoader.LoadXML(String path, CoreComm nextComm, HawkFile file, String forcedCoreName, IEmulator& nextEmulator, RomGame& rom, GameInfo& game) en /_/src/BizHawk.Client.Common/RomLoader.cs:línea 581

Host env.

  • BizHawk 2.9.1 (No DEV build); Win10 Pro 22H2; NVIDIA
@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Jun 18, 2024

This is due to the "ROMs" being sent in byte arrays, which have a 2GiB limit. This is kind of a limit which isn't really easy to bypass, besides having a ton of extra handling for CHDs (which would probably be wanted anyways), but that involves changing a bit of internal MAME code here and not trivial.

In general this is a non-issue anyways, CDs (which would be the typical "large file" case here) don't get sent directly, rather they have wrappers to handle them and the core doesn't interact with some memory bound byte buffer with them (instead just grabbing them from disk if needed via these wrappers), and the only other core which has potentially large files is Encore (3DS roms can be greater than 2GiBs), which just gets sent the file path without ever loading into memory (sort of a hack but eh).

@YoshiRulz YoshiRulz added App: EmuHawk Relating to EmuHawk frontend Core: MAME Multi-system core for thousands of arcade cabinets and "vintage" computers labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: EmuHawk Relating to EmuHawk frontend Core: MAME Multi-system core for thousands of arcade cabinets and "vintage" computers
Projects
None yet
Development

No branches or pull requests

3 participants