| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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.
|