Scrolling up one pixel

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
Bukster
Posts: 93
Joined: Wed Sep 12, 2018 9:44 am

Scrolling up one pixel

Post 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 272 times
And here's a compiled demo of it doing a sort of pixel scrolling starfield
Pixel_Scroll.p
(1.22 KiB) Downloaded 270 times
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Scrolling up one pixel

Post by XavSnap »

Cool !

It remember this tread regard the ROM Plot command…

You can use the special characters mask too… (faster?)
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
glxcr5
Posts: 1
Joined: Wed May 13, 2020 2:40 am

Re: Scrolling up one pixel

Post 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 266 times
pixelScroll.asm
(1.54 KiB) Downloaded 290 times
Same technique horizontally:
scrollleft.P
(1.09 KiB) Downloaded 275 times
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Scrolling up one pixel

Post by stefano »

..I wonder if a smoother scrolling would be possible by altering the display sync timing :P
User avatar
zsolt
Posts: 214
Joined: Wed Apr 20, 2011 11:43 am
Location: Fót, Hungary

Re: Scrolling up one pixel

Post 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
Attachments
BlockyScroll.zip
(3.41 KiB) Downloaded 160 times
ZX81 (8K), ENTERPRISE 128, [ZX SPECTRUM (48K,+,+128K,+2,+2A), TS1000, TS1500, TS2068, Cambridge Z88, PRIMO A64 (red)]
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Scrolling up one pixel

Post 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.
Post Reply