Page 2 of 2

BASIC: Load Runlength-encoded Sprite data into VERA RAM

Posted: Sat Jan 16, 2021 10:31 pm
by rje

An excellent upgrade suggestion, Guy, thank you.  As you can see from the data, there are several instances where that tweak would shrink the data size.

...sure enough, it trims 16 full lines of code, or (very roughly) about 1K.  As an example, here are the first four lines of the improved runlength encoding, which almost handle the first five lines of the old encoding.  So I predict it's around 16% more efficient.

240 DATA 3,$00,$12,$ae,185,$91,5,$14,$16,$14,$00,$12,189,$c9,1,$ae

245 DATA 130,$14,0,190,$c9,1,$17,133,$c9,2,$16,$ca,178,$c9,4,$cb

250 DATA $14,$91,$14,130,$c9,1,$af,133,$c9,3,$ca,$e9,$16,176,$c9,2

255 DATA $e7,$e9,133,$c9,1,$af,134,$c9,3,$e8,$e9,$cb,174,$c9,3,$e8


 


BASIC: Load Runlength-encoded Sprite data into VERA RAM

Posted: Sun Jan 17, 2021 4:54 am
by Cyber


On 1/15/2021 at 1:21 AM, rje said:




But how does VPOKE handle auto-increment?  (Because it doesn't out of the box...)



I always thought VPOKE should handle auto-increment, but I never tried. I understood it that way after David's video, where he described auto-increment feature. Do you think it's by design? Looks more like a bug or not implemented yet thing to me?


BASIC: Load Runlength-encoded Sprite data into VERA RAM

Posted: Sun Jan 17, 2021 5:12 am
by Lorin Millsap
I always thought VPOKE should handle auto-increment, but I never tried. I understood it that way after David's video, where he described auto-increment feature. Do you think it's by design? Looks more like a bug or not implemented yet thing to me?

No, VPOKE is not meant to take advantage of auto increment. VPOKE more fully takes advantage of direct access, but for speed once you set up auto increment you would just keep poking additional values. So if you are sending a sequence you would enable auto increment then VPOKE the first byte in the sequence and POKE the rest.


Sent from my iPhone using Tapatalk

BASIC: Load Runlength-encoded Sprite data into VERA RAM

Posted: Sun Jan 17, 2021 5:53 am
by Cyber


44 minutes ago, Lorin Millsap said:




No, VPOKE is not meant to take advantage of auto increment. VPOKE more fully takes advantage of direct access, but for speed once you set up auto increment you would just keep poking additional values. So if you are sending a sequence you would enable auto increment then VPOKE the first byte in the sequence and POKE the rest.



Now after your explanation and rethinking this myself it became logical and simple. I feel myself stupid now. ) Thank you for clarifying!