summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix draw operations failing at the start of a programBen Bridle2025-09-13
| | | | | | | | | | | | | | | The emulator screen panel is designed to stay hidden until it's needed, so that headless programs don't have a large black canvas taking up space on the page. The issue was that the screen content won't be rendered to the canvas if the screen isn't 'dirty', and the screen will only be marked dirty if there's been a draw operation in-bounds, and the size of the canvas determines what counts as in-bounds, and the size of the canvas remains zero until the layout engine has a chance to resize it during the next browser render tick. This is all fixed by breaking the current evaluation loop, yielding control back to the browser, and having the updateScreenSize function queued up to act on the newly-resized canvas element. Evaluation will then continue as normal.
* Implement the FORK and RESET device signalsBen Bridle2025-09-13
| | | | | | | | These were implemented before version 1.1.0, but I hadn't gotten around to implementing them again during the big restructure in commit 19c5679. The main change here is that the existing `reset` method was renamed to `end`, and a new `reset` method was created that only affects the core and devices.
* Zero the cycle counter in WASM core on resetBen Bridle2025-09-13
| | | | | This was incrementing higher and higher each time the program was re-run after halting.
* Update version to 1.1.0v1.1.0Ben Bridle2025-09-12
|
* Implement a faster core in WebAssemblyBen Bridle2025-09-12
| | | | | | | | | | | | This is a massive commit that restructures a lot of the library. The primary change is the implementation of a second Bedrock core using WebAssembly, which performs much better than the existing JavaScript core. The JavaScript core has been retained as a fallback for browsers that don't support WebAssembly. Benchmarking both cores using the numbers benchmark and with all of the devices stubbed out in the emulator demonstrates a 40x speedup for the WebAssembly implementation (going from 4800ms to 120ms).
* Measure run performanceBen Bridle2025-09-07
|
* Improve transmission rendering performanceBen Bridle2025-09-07
| | | | | | | | | | | Previously, the DOM would be updated every time a complete character was pushed to the transmission parser by the stream device. This caused frequent re-renders of the transmission panel and massively slowed down the emulator. To fix this, the contents of the transmission parser are now only flushed to the transmission panel when the state panel updates, which is currently every 10_000 cycles.
* Show assembled bytecode when checking programBen Bridle2025-09-07
| | | | | Clicking the CHECK button will open the bytecode panel if the program assembles successfully, displaying the assembled bytecode.
* Adjust scale factors used for scroll inputBen Bridle2025-07-08
|
* Update version to 1.0.1v1.0.1Ben Bridle2025-07-05
|
* Support touchscreen devicesBen Bridle2025-07-05
| | | | | | | Click events on touchscreen devices are handled by the touchstart and touchend events. These events will now enable and disable the pointer device, move the pointer position, and press and release the primary pointer button.
* Add a nocursor attribute to the <bedrock> elementBen Bridle2025-07-04
| | | | This attribute hides the mouse cursor on the program canvas.
* Force a render if a frame takes longer than half a second to runBen Bridle2025-07-04
|
* Add wake methods to stream and clipboard deviceBen Bridle2025-07-04
| | | | | This prevents an error from being raised when a program marks these devices as being allowed to wake the system from sleep.
* Fix error with wide mode conditional jump instructionsBen Bridle2025-07-03
| | | | | Wide-mode conditional jump instructions were reading t as a byte value instead of as a double value.
* Prevent error when stack overflowsBen Bridle2025-07-03
| | | | | | Previously, the stack overflowing would cause the stack pointer to point outside of the stack, which would cause an error in the stack printing code.
* Update version to 1.0.0v1.0.0Ben Bridle2025-07-03
|
* Initial commitBen Bridle2025-07-03