The next task, if you remember from the last post, was to remove the 16 bit multiplication from the block display code and replace it with linear screen value look up data.
Well, this took a bit longer than expected, as I was stuck on a piece of code that was adding the (unknown to me) already set carry flag during an addition instruction.
Looking at the debugger, I was getting a value of $41/65 in the recently set to =0 accumulator when adding a memory location that contained the value $40/64.
Thats all well and good, but the $1 brought into the addition calculation from the carry flag I still am not sure where it was set from, but never mind now...I just had to clear the flag (clc) before the adc and it all worked fine after that.
So apart from the initial screen block placement (which only happens once until the character leaves the screen), there are no other places in the code that use the mul16 multiply routine.
Although its a bit rough, I have recorded a video (using a 25fps old camera before it died) to compare the multiply calculated character block placement to the look up table pre-generated data version.
They are shown one after the other:
(Sorry for any inconvenience, I dont have a YT account, the zipped video shouldnt be a problem to play though).
Now if youve watched the video, although its not night and day, if you look closely, the speed difference can be seen.
According to the clip file lengths that I edited so they were each cropped from the start of the move to the end of the move and no more, I get:
multiply version: 1.97s
lookup data version: 1.73s
Not a bad time save, but would have been much better if perhaps the multiply routine wasnt so quick!

Ok, thats it for tonight.
As is probably blatantly obvious from the video, the next task is to stop the flickering.
This is due to moving the block out of sync to the screen draw times. A method has been discussed in an earlier post of creating a blit list which loads up all the blit jobs into a close task cycle proximity and gets started at the best time (likely to be when the screen refresh is at the top of the screen).
But there is much more work to do in that department.
Until then, I might branch off and try other stuff to make things interesting.