GithubHelp home page GithubHelp logo

emscripten_load_state missing about halfix HOT 4 CLOSED

pgodwin avatar pgodwin commented on May 22, 2024
emscripten_load_state missing

from halfix.

Comments (4)

pgodwin avatar pgodwin commented on May 22, 2024

I quickly added in

EMSCRIPTEN_KEEPALIVE
void emscripten_load_state(void){
    state_read_from_file("");
}

Which seems to load state correctly. However, loading it with a drive image specified (http://localhost:8080/?hda=os2&savestate=states/os2) causes the XHR paths to be corrupted for subsequent disk access. Ie http://localhost:8080/%C2%88%7F%01%C2%88%7F%01%10/blk0000000b.bin.gz which obviously don't work

Using it without savestate= works, with the expected XHR URLS (Eg http://localhost:8080/os2/blk00000000.bin.gz). So I suspect something is getting overriden when state is loaded, but unsure where.

from halfix.

pgodwin avatar pgodwin commented on May 22, 2024

after an embarrassing amount of time trying to work this out, uncommenting this line fixed it.

//state_field(obj, 4, "path_count", &this->path_count);

from halfix.

nepx avatar nepx commented on May 22, 2024

Savestates were primarily used for debugging (shorten boot times) and added to the browser version as an afterthought. That's the reason behind the (currently unused) jszip.min.js dependency in index.html. Theoretically, they should work, but I've run into some problems regarding them. I tried it with Windows XP a few months ago and the whole system BSOD'ed on me after a few seconds, likely due to hard drive problems.

They work like a charm on the native version, provided that all settings are identical, but at the moment, they're not very "user-friendly," requiring you to comment/uncomment a preprocessor macro. Browser support has historically been much more flaky, but I'm also interested in getting savestates to work to speed up boot times.

from halfix.

pgodwin avatar pgodwin commented on May 22, 2024

They're quite handy :)

Here's OS2 2.0 which seems to work with Halfix. https://labs.obsoletemadness.com/labs/halfix/index.html?hda=os2&savestate=states/os2

from halfix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.