TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.2k stars 385 forks source link

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

Open danylopez123 opened 5 months ago

danylopez123 commented 5 months ago

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.

CasualPokePlayer commented 5 months ago

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).