<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bedrock-pc/src/devices, branch v1.0.0-alpha2</title>
<subtitle>Bedrock emulator and assembler for Windows and Linux
</subtitle>
<id>https://code.benbridle.com/bedrock-pc/atom?h=v1.0.0-alpha2</id>
<link rel='self' href='https://code.benbridle.com/bedrock-pc/atom?h=v1.0.0-alpha2'/>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/'/>
<updated>2024-12-16T01:45:21Z</updated>
<entry>
<title>Update phosphor dependency to v3.2.1</title>
<updated>2024-12-16T01:45:21Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-12-16T01:45:21Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=58faa15a909fe849e7e14a26cca85baf40e7598a'/>
<id>urn:sha1:58faa15a909fe849e7e14a26cca85baf40e7598a</id>
<content type='text'>
This includes a fix to prevent the cursor from being marked as inactive
while at least one mouse button is still being held.
</content>
</entry>
<entry>
<title>Update metadata and parser to match current specification</title>
<updated>2024-12-16T00:45:47Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-12-16T00:45:22Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=87f8faba2fde2ac4cfa79dbb1f30907b6e48653c'/>
<id>urn:sha1:87f8faba2fde2ac4cfa79dbb1f30907b6e48653c</id>
<content type='text'>
The metadata specification has changed to use '/' as the separator
between the program name and program version in the name string, and
each author line is now no longer followed by the year in which the
author last contributed to the program.
</content>
</entry>
<entry>
<title>Fix file device cached child issue</title>
<updated>2024-11-24T03:19:46Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-11-24T03:19:46Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=583c961c0158fd44817695225e06d07caa18657e'/>
<id>urn:sha1:583c961c0158fd44817695225e06d07caa18657e</id>
<content type='text'>
When opening the previously-visited directory in the file device, the
directory data is read from a cache, preventing the need to have it
regenerated from scratch. The directory data includes the selected
child, which meant that instead of child 0 being selected as per the
specification, the previously-selected child was selected instead.

To fix this, the child is deselected as the directory data is cached.
</content>
</entry>
<entry>
<title>Increase default page limit in memory device</title>
<updated>2024-11-19T21:43:40Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-11-19T21:43:32Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=b1dbae360b3ed8de5354ffc4677fb3ada1646cfa'/>
<id>urn:sha1:b1dbae360b3ed8de5354ffc4677fb3ada1646cfa</id>
<content type='text'>
This was erroneously set to 0 from before the memory device was
implemented.
</content>
</entry>
<entry>
<title>Cache transformed sprite data</title>
<updated>2024-11-19T21:42:57Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-11-19T21:42:57Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=39dfe987cbd99f42d85ea1a0c7d5df866fe739e5'/>
<id>urn:sha1:39dfe987cbd99f42d85ea1a0c7d5df866fe739e5</id>
<content type='text'>
In programs where the same sprite is drawn many times repeatedly, a lot
of time is saved by caching the transformed sprite data instead of
having to recalculate it for every draw operation. No testing has been
done on the efficiency improvements this offers, but it doesn't seem
like it could have any downsides.
</content>
</entry>
<entry>
<title>Fix file device cached write issue</title>
<updated>2024-11-12T21:55:32Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-11-12T21:55:09Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=2bc38ca471cfb37fb6f65740f7a9f0d374183dce'/>
<id>urn:sha1:2bc38ca471cfb37fb6f65740f7a9f0d374183dce</id>
<content type='text'>
Writing a value to the pointer and length ports wasn't working, because
the cached write was never getting committed.
</content>
</entry>
<entry>
<title>Fix line drawing issue</title>
<updated>2024-11-12T21:54:26Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-11-12T21:53:52Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=5ca376b56c3a495c9772e546995485159da2e664'/>
<id>urn:sha1:5ca376b56c3a495c9772e546995485159da2e664</id>
<content type='text'>
An overflow error was causing the line drawing method to loop forever
any time a line of length 0x4000 (16384) or longer was drawn. The issue
was occurring because both e1 and dx (or dy) would have a value of at
least 0x4000, and so on lines 291/292 the sum would exceed 0x8000, the
maximum value of an i16. The value would then wrap and break the
assumptions of the line drawing algorithm, causing it to loop forever.

This was fixed by increasing the size of the affected types.
</content>
</entry>
<entry>
<title>Fix issue when drawing textured shapes off-screen</title>
<updated>2024-11-04T00:06:41Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-11-04T00:06:36Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=81a6b0da7a507214a01dc3a4513d8b73525e4381'/>
<id>urn:sha1:81a6b0da7a507214a01dc3a4513d8b73525e4381</id>
<content type='text'>
When determining whether or not to draw each pixel of a textured line
or rectangle, the modulo-by-eight operation was being performed on a
signed value, which was returning a negative value when the pixel being
drawn was off-screen. When the negative value was then converted to an
unsigned value, the result was close to usize::MAX, and was causing an
out-of-bounds array access.

To fix this, the value is converted to an unsigned value before taking
the modulo.
</content>
</entry>
<entry>
<title>Suppress errors when flushing file and stream data</title>
<updated>2024-10-31T04:44:28Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-10-31T04:44:28Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=d31a97811b94fa4403939c289eaf98eaca237b0e'/>
<id>urn:sha1:d31a97811b94fa4403939c289eaf98eaca237b0e</id>
<content type='text'>
File and stream data is flushed on drop, and if flushing fails a panic
is thrown, which prints a crash message to the terminal. Since we can't
do anything if the write fails, and because file and stream writes are
approached with a best-effort attitude, we suppress the errors to
prevent the user from seeing them and getting concerned.
</content>
</entry>
<entry>
<title>Don't clear input stream queue when starting transmission</title>
<updated>2024-10-31T03:59:39Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2024-10-31T03:58:11Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/bedrock-pc/commit/?id=043d6dbfb2859d5102e459337329e8eea0a328ae'/>
<id>urn:sha1:043d6dbfb2859d5102e459337329e8eea0a328ae</id>
<content type='text'>
Writing to the input transmission port of the standard input stream no
longer clears the input queue. The only way to clear an input queue is
to write to the associated queue port.
</content>
</entry>
</feed>
