pdjstone / arculator-wasm Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sarah-walker-pcem/arculator
Arculator
Home Page: http://b-em.bbcmicro.com/arculator
License: GNU General Public License v2.0
This project forked from sarah-walker-pcem/arculator
Arculator
Home Page: http://b-em.bbcmicro.com/arculator
License: GNU General Public License v2.0
The mouse latency in particular could be a lot better. Need to investigate why the lag occurs - whether it's due to the Emscripten/SDL or how Arculator is using SDL. Arculator running on native SDL has much better latency.
My understanding of how the main loop works when running in the browser wrt mouse:
In theory, we should be seeing 1 or 2 get_mickeys calls per frame because each browser frame is 16ms and get_mickeys is being called every 10 emulated ms. There should be new mouse event data every frame (i.e. before every call to arcloop)
But we need to verify this.
One change I've already made from upstream Arculator is to change the order of calls in arc_run from:
execarm();
joystick_poll_host();
mouse_poll_host();
keyboard_poll_host();
to:
joystick_poll_host();
mouse_poll_host();
keyboard_poll_host();
execarm();
This should mean that mouse events get processed before the next frame is rendered, improving latency by one frame.
Profiling shows that a significant time of each frame is current spent in iir_l
and iir_r
in sound.c
which perform the low-pass audio filtering. I'm not sure why these are so slow, but I suspect it would be more performant to do the filtering using WebAudio, which has an IIR filter built in . Currently audio is done using SDL audio which is translated by Emscripten into WebAudio calls.
Bypassing SDL/Emscripten altogether would hopefully be a performance win, especially if we can use an AudioWorklet to do the work in a separate thread from the main emulation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.