Closed koorogi closed 1 year ago
I agree that the behavior of scroll-up
in lores
mode was incorrect. Always scrolling in empty pixels is simple and consistent. Please verify the above patch.
For the record, I have also examined c-octo, and its emulator does not exhibit the mistake this issue identifies; it already appears to correctly scroll in empty pixels.
Yes, this patch fixes it for me. Thanks!
Excellent. Thank you for reporting this issue!
If there are pixels set near the bottom of the screen and they are scrolled off the bottom with
scroll-down
, a laterscroll-up
instruction can scroll those set pixels back onto the screen.The XO-Chip specification does not describe how
scroll-up
behaves in this case, so it seemed reasonable to assume that it behaves consistently with the otherscroll-*
instructions, which always scroll in blank pixels.It looks like
scroll-up
andscroll-down
always scroll the entire framebuffer, but ifthis.enableXO
istrue
andthis.hires
isfalse
, then the framebuffer is larger than the viewport.scroll-down
always scrolls blank pixels into the visible area, but can scroll set pixels into the region outside the viewport, whichscroll-up
can then scroll back into view.