summaryrefslogtreecommitdiff
path: root/src/devices/screen_device.rs
Commit message (Collapse)AuthorAge
* Fix line drawing issueBen Bridle2024-11-13
| | | | | | | | | | | 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.
* Fix issue when drawing textured shapes off-screenBen Bridle2024-11-04
| | | | | | | | | | | | 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.
* Rewrite emulatorv1.0.0-alpha1Ben Bridle2024-10-28
This is a complete rewrite and restructure of the entire emulator project, as part of the effort in locking down the Bedrock specification and in creating much better tooling for creating and using Bedrock programs. This commit adds a command-line argument scheme, an embedded assembler, a headless emulator for use in non-graphical environments, deferred window creation for programs that do not access the screen device, and new versions of phosphor and bedrock-core. The new version of phosphor supports multi-window programs, which will make it possible to implement program forking in the system device later on, and the new version of bedrock-core implements the final core specification.