This is an emulated 286 IBM PC compatible running Windows 3.0. Its a port of Hampa Hugs excellent PCE emulator, put together by James Friend. PCE.js runs classic computers in the browser.This website lets you run Mac OS System 7, released in 1991, on a simulated Macintosh Plus, a computer introduced in 1986. You can even use LambdaTest Tunnel feature to test your locally hosted or privately hosted.The emulator is in black and white rather than color, and you can’t save any changes, but you can use the mouse cursor and run the earliest Windows programs, like Reversi, Notepad, and Paint. Try it out.With LambdaTest cross browser testing cloud, you can now ditch your inhouse Android browser emulators and iOS simulators online, and test iOS simulator and Android mobile browser emulator online. More Demos: IBM PC - Wolf3d, Civ, Monkey Island Mac Plus Mac Plus - apps + gamesBasilisk II Classic Macintosh emulator in the browser.The Basilisk II port is the culmination of both of these things. Since then browser technologies have advanced, and I've learned a lot more about emulation (in part by making a simulated computer of my own). I've been hoping to get it running for some time, and previously made an attempt back in 2013, before switching to focus on the PCE emulator. This was long before the appearance of the 1991 Apple IIe Card for the Mac LC.I recently ported the Basilisk II Classic Macintosh emulator to run in a web browser. Initially it could run Apple II+ programs, but later evolved to include IIc and IIe software. The emulator ran on a 512K Mac and was released in November 1985.Emscripten provides an implementation of SDL for the browser, but this implementation isn't designed to run in a web worker, so I've hacked the emulator's video output code to write to the SharedArrayBuffer instead of calling SDL APIs. VideoThe original emulator codebase makes use of SDL (a cross-platform set of video/audio/input APIs). This allows the simulation to be more smooth, as the emulator thread can just focus on simulating the Macintosh computer, and leave the tasks of displaying the contents of the video framebuffer and playing audio up to the main (browser) thread. Communication with the main thread happens by reading and writing data in SharedArrayBuffers which are shared between the main browser thread and the worker, allowing the emulator's main loop to run continuously without ever yielding to the event loop. How it worksThe emulator code is compiled with Emscripten and run in a Web Worker.
InputMouse and keyboard input are communicated via another SharedArrayBuffer here in the UI thread JS, then read in the worker thread JS here, when requested from the C code here. We could improve on this by using a circular queue of framebuffers for alternating frames (multiple buffering), which would allow locking (with less contention), but in practice this is okay. Even if the UI thread reads a frame from the video framebuffer while it is currently in the middle of being written to from the emulator worker, it's not really noticable, because in the shared memory the new frame contents is just being written directly over the old one at the same position, so visually it just presents as a bit of 'tearing' (showing part of the old frame, part of the new frame). However, we don't really need it. I experimented with locking the video surface when reading and writing, but this hurt performance due to lock contention. This shared memory is read from the main thread here and output onto a Canvas. Browser Full And ReadyWhen the emulator is built natively, audio has a dedicated thread to avoid slowness on the emulator thread affecting playback, but to make things simpler I've just hacked in a call to output audio directly into the emulator's main loop here. The emulator thread will ensure that there are several buffers of audio queued up, to avoid gaps in playback in the case of a slowdown. AudioThe implementation of audio uses a queue of buffers in shared memory, which each have a flag signifying whether they are full and ready to be consumed by the UI thread, or empty and ready to be written by the emulator thread. Instead of creating SharedArrayBuffers to communicate video, audio, and input, Emscripten's pthreads mode makes the entire C heap memory space a SharedArrayBuffer, with each spawned thread running in a web worker. In this scenario the emulator code would start up, spawn a thread to run the emulator main loop, and then yield back to the browser. Potential ImprovementsIn future this implementation could be improved by moving all of the shared memory communication to C code by leveraging Emscripten's pthreads support. Anime final approach sub indo mp4This would also unblock using threads in the emulator code (currently not easy due to Chrome's lack of support for web workers spawning other web workers).
0 Comments
Leave a Reply. |
AuthorElizabeth ArchivesCategories |