Closed HunterBoy344 closed 1 month ago
Ok, I understand that part, but ideally I’d prefer not to use async. I just included the async bit to show that it does, in fact, load seabios if async is enabled.
When you use async: false
, v86 will load the entire file in a single xhr request, and use the resulting ArrayBuffer as the storage. ArrayBuffers are limited to 2GB in some browsers (https://stackoverflow.com/a/72124984).
We could handle this case transparently (by loading the file in 1GB chunks, or streaming downloads), but it's not clear that this is really useful (loading entire 3GB at once). If you want to improve disk speed, I'd suggest using async: true, use_parts: true, fixed_chunk_size: 1024 * 1024
.
In any case, I will improve the code to print a useful error in this situation.
The async: true
case works fine for me, could use libv86-debug.js
and check if there are any messages in the browser console?
My code:
This results in an endless black screen. I'm hosting it with
python3 -m http.server
in the directory with all the files.In the folder this runs from, there is an index.html, libv86.js, seabios.bin, vgabios.bin, v86.wasm, and of course image.img. The image file is 3 GB total. Uncommenting the lines about async does cause seabios to run, but the python webserver gives an error ending with
ConnectionResetError: [Errno 104] Connection reset by peer
and seabios saysBoot failed: could not read the boot disk
and fails to boot.Notably, my problem is remarkably similar to this one, with the only difference being that he got this result with a large state file and I'm getting it with a large disk image.