News for hackers. Stuff that matters.

kev_emu

You could try BoxedWine. It is enough of a PC emulator to run an unmodified 32-bit version of Wine. Runs on Windows, Mac, linux and in a web browser.

- https://github.com/danoon2/Boxedwine

- https://www.boxedwine.org/

Another twist on self hosted web apps is peergos. Uses a capability based system for access and sharing. End-to-end encrypted and P2P.

App Examples - github.com/peergos/example-apps

API Docs - book.peergos.org/features/apps.html

Disclaimer: I work on the project.

Re:Blink virtual machine now supports running GUI programs on Friday February 03, 2023 @02:05PM (#34646294)
That already exists. boxedwine.org
Another example is the sandbox we have built for Peergos[1] for user apps Combination of double iframe, service worker and writable streams. Not without issue due to browser behaviour. Chrome (...annoyances), Firefox (...feature not necessarily available), Safari (...blocking bugs) [1] https://peergos.org/posts/a-better-web
I would be interested in your thoughts on using PochiVM as a means to add a dynamic re-compiling core for emulators. The emulator would identify hot code blocks, generate C like constructs (or ideally the AST) and use the 'Copy-and-Patch Compilation' algorithm to generate and execute the relevant machine code. The ability to call back to host methods, handle exception semantics and all the while being totally oblivious to the platform architecture that the machine code is produced for seems ideal for an emulator designed to run on multiple platforms.
The WASM build uses the 'normal' CPU core. In this core the CPU emulator is a collection of indirect calls that performs poorly in WASM due the runtime checks to verify the number of parameters and their types. For other builds there is a dynamic code generator. A similar approach would work wonders. Assistance gratefully accepted! - see source folders under emulation/cpu for armv7, armv8 & x32 for the 30 odd method implementations. To get native like performance a binary translator like that used for the x64 core is required
BoxedWine does OpenGL passthrough on platforms where available. This does not extend to the WASM/WebGL, but I really tried! I was able to get it working for some simple OpenGL applications with help from gl4es, but was unable to make it work with textures beyond one example [1]. I would appreciate some assistance if anyone has the required skills.

[1] - https://kevodwyer.github.io/boxedwine-examples/v1/boxedwine....

I worked on the emscripten/wasm build of boxedwine. I can answer some questions. The project has been around in some form for 9 years. It was originally in java, then straight c, now c++. Main author previously worked on jdosbox. I previously ported jdosbox to become jsdosbox (via GWT) a decade ago.