Page 1 of 1

Scrolling up one pixel

Posted: Sun May 03, 2020 7:56 am
by Bukster
When I was writing my giant letters utility, I had thought to make each letter scroll up not one line, but one half line - a ZX81 pixel. The routine I wrote was too slow to be of much use, but here is is in case anybody might like to make use of it. It doesn't clear the bottom line as the routine to write the next line of the giant letters was supposed to take care of that.

Here's the source code
Pixel_Scroll.asm
(5.2 KiB) Downloaded 279 times
And here's a compiled demo of it doing a sort of pixel scrolling starfield
Pixel_Scroll.p
(1.22 KiB) Downloaded 277 times

Re: Scrolling up one pixel

Posted: Mon May 04, 2020 4:07 pm
by XavSnap
Cool !

It remember this tread regard the ROM Plot command…

You can use the special characters mask too… (faster?)

Re: Scrolling up one pixel

Posted: Wed May 13, 2020 4:01 am
by glxcr5
Bukster, you got me to get off my ass and do something :). I was doing something similar but horizontally which I adapted.

It can go faster if the zx81 block character is converted into something 'or able', if its greater than char 8 then subtract the value from $8F. Do the 'or', then convert it back, again greater than char 8 etc.

Running against the random pixel test since its mostly spaces, I'll bet it can go even faster still if it tests for the char and the char below being 0=space, and if so skip all the conversion 'or' stuff.

I used z88dk with m4 macros Visual Studio Code. Macros are your friend BTW. I cannibalized your random pixel test code (thanks for that.)
pixelScroll2.P
(1.16 KiB) Downloaded 270 times
pixelScroll.asm
(1.54 KiB) Downloaded 294 times
Same technique horizontally:
scrollleft.P
(1.09 KiB) Downloaded 280 times

Re: Scrolling up one pixel

Posted: Mon Jan 18, 2021 7:22 pm
by stefano
..I wonder if a smoother scrolling would be possible by altering the display sync timing :P

Re: Scrolling up one pixel

Posted: Sun Jan 24, 2021 3:29 pm
by zsolt
Hi,
glxcr5 wrote: Wed May 13, 2020 4:01 am Bukster, you got me to get off my ass and do something :). I was doing something similar but ...
I was just wondering if this scrolling could be even faster - and yes. Here are two solutions: a little faster and an even faster one.

Both use such large d-file presented by Siggi & Joachim (which can already be handled by the latest X2 ROM :mrgreen: ), where the extra 32 bytes are the buffer for the random plot. The "BlockyScroll2" uses tables instead of calculations, this is why it is faster. (see source code)

Regards,
Zsolt

Re: Scrolling up one pixel

Posted: Tue Jan 26, 2021 11:42 am
by dr beep
stefano wrote: Mon Jan 18, 2021 7:22 pm ..I wonder if a smoother scrolling would be possible by altering the display sync timing :P
I think the fastest way would be to write pixels to a new screen and then point DFILE to that screen.
Next time swap back.