<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bedrock-js, branch main</title>
<subtitle>Bedrock emulator and assembler for webpages
</subtitle>
<id>https://code.benbridle.com/bedrock-js/atom?h=main</id>
<link rel='self' href='https://code.benbridle.com/bedrock-js/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/'/>
<updated>2025-09-12T19:50:48Z</updated>
<entry>
<title>Update version to 1.1.1</title>
<updated>2025-09-12T19:50:48Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-12T19:50:48Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=c11603d463ab5e5975954ce9342d251abd6c0ca5'/>
<id>urn:sha1:c11603d463ab5e5975954ce9342d251abd6c0ca5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix draw operations failing at the start of a program</title>
<updated>2025-09-12T19:50:11Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-12T19:20:51Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=8de8a05ffbd622810cc23f6ae818c3bd6cfcf8a0'/>
<id>urn:sha1:8de8a05ffbd622810cc23f6ae818c3bd6cfcf8a0</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Implement the FORK and RESET device signals</title>
<updated>2025-09-12T19:50:11Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-12T19:19:05Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=39af042fbcc7cf900493df33f69281a39dee4a51'/>
<id>urn:sha1:39af042fbcc7cf900493df33f69281a39dee4a51</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Zero the cycle counter in WASM core on reset</title>
<updated>2025-09-12T19:50:11Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-12T18:28:59Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=b452cc1a0afdfe863b5dd92b8bd9d05fd9e347a8'/>
<id>urn:sha1:b452cc1a0afdfe863b5dd92b8bd9d05fd9e347a8</id>
<content type='text'>
This was incrementing higher and higher each time the program was
re-run after halting.
</content>
</entry>
<entry>
<title>Update version to 1.1.0</title>
<updated>2025-09-12T05:28:54Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-12T05:28:54Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=60bfb4f0f675ab4cb9b07d6fcd772d46d6b7222a'/>
<id>urn:sha1:60bfb4f0f675ab4cb9b07d6fcd772d46d6b7222a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement a faster core in WebAssembly</title>
<updated>2025-09-12T05:28:44Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-12T05:20:19Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=19c5679b8be4fe879e165576e97f96b85f5b5044'/>
<id>urn:sha1:19c5679b8be4fe879e165576e97f96b85f5b5044</id>
<content type='text'>
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).
</content>
</entry>
<entry>
<title>Measure run performance</title>
<updated>2025-09-07T07:04:41Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-07T07:04:41Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=4c67a10f265dde1c3aa430cb851062a38646d6f2'/>
<id>urn:sha1:4c67a10f265dde1c3aa430cb851062a38646d6f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve transmission rendering performance</title>
<updated>2025-09-07T06:47:51Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-07T06:46:29Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=53fa574c9af4095f07f4883547939a25522f81e6'/>
<id>urn:sha1:53fa574c9af4095f07f4883547939a25522f81e6</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Show assembled bytecode when checking program</title>
<updated>2025-09-07T06:43:07Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-09-07T06:43:07Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=e09013621b3c26945d16d7f2a621bd18f1e814e4'/>
<id>urn:sha1:e09013621b3c26945d16d7f2a621bd18f1e814e4</id>
<content type='text'>
Clicking the CHECK button will open the bytecode panel if the program
assembles successfully, displaying the assembled bytecode.
</content>
</entry>
<entry>
<title>Adjust scale factors used for scroll input</title>
<updated>2025-07-08T05:49:45Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-07-08T05:49:45Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-js/commit/?id=ba13eb2771cbab72a9de8e834536cb957aff38ad'/>
<id>urn:sha1:ba13eb2771cbab72a9de8e834536cb957aff38ad</id>
<content type='text'>
</content>
</entry>
</feed>
