I also need to try to make practical use of the twin shifter board, which @sporniket was so very kind to build for me and for which I do not have any software of 'substance' with which to show it off. I would very much like to repay his patience with something special, but whether that is possible remains to be seen.
I have very little experience working on the 68000/ST computer, so have to learn the ways of the base 68000 architecture (I already know I will miss the bitshift instructions and the more forgiving memory alignment! :lol: )
So my plan of action and investigation will progress something like this:
- Blitter write granularity tests (so that I can see exactly what I am dealing with on the maximum writes per raster front).
- Possible optimisations for dealing with limitations in (1.) I may be able to transfer some of these from similar work on the TT previously.
- Use of the above on the twin shifter board to achieve an enhanced image display or possible game sprite application.
- Use of the above on a Megabus ET4000 VOFA board to achieve an enhanced image display or possible game sprite application.
With that in mind, let us begin.
1. Blitter write granularity tests
Ok, so the best way to 'see' how fast the blitter can write (we are keeping if simple and doing a direct source>destination blit) is to blit a number of writes to the background colur palette register (colour 0) and actually see how long it takes (in pixels) to re-write the register:
So, like posted before, here is a group of 16, 2 and 9 writes respectively. (Note that I am using colour data from an image, rather than spending hours hand crafting some contrasting colours out of the fractured 9 bit STFM/MST palette. If someone has any RGB+mixes fading to black colour values formatted for the correct bitwise ST palette, let me know and I can insert them.) Also note screen colouring is just to make blit/pixel counting easier as there are cycles of 16 colour 'bands'.
Suffice to say, although the colours are not different for every write because of this, an 8px write time for each of the 16/2/9 writes can be seen. Bear in mind that if the palette stops being written in the middle of a line of the same colour, it will display the same colour through the rest of the screen (as is clearly the case in the last two pictures). You can see what is the case from reference to the first picture.
Like I said, not 100% ideal, but it's 'good enough' to show what's going on at least:
16 writes:
2 writes:
9 writes:
Here is the program for the 16 blit example (Picture 1) together with a jitter of between 40px to just under 1 raster).
Like I said earlier, this isn't wrong, it just needs to do exactly the same on the Phoenix Blitter to prove that it is working to spec (i.e. as close to a real Blitter as possible). Having everything hunky dory and in perfect sync may not show up any faults where there may be some.
Moving on...
As we have produced code with jitter, I guess it's time we now moved onto having perfectly stable sync locked code. :D
A few caveats of having stable sync code though; We can't (unless there is a way I dont know about?) sync to any part of the background display, so I have had to sync to the beginning of the first line of the foreground display area. This also brings up the problems of 1. having to change the foreground colour display all to background colour, so the blit results can be seen and 2. the actual time the bit takes to prepare now starting the first write in the middle of the first raster.
This would put some of the otherwise visible writes into the border area, so whilst I was blitting small amounts, I added some delay NOPs to bring it to the start of the next line instead.
Anyway, after some mucking about with getting the blitter to re-write the whole 16 colour palette continuously (in HOG MODE, I might add), we can show the result of 50 full palette (x16) writes:
And here is the program:
So, to conclude, (unless someone can enlighten me to any errors in my methods; please do!) as a last effort to see if there was any 'free blits' by writing more than one register at once, I can see that it makes no difference, as writing the full palette of 16 words result in the same amount of blit time. In the last picture that being (8x16=128) 128px lines per 16 colour blit. (Remember, only colour 0 can be displayed on the background, so it stays on that colour until all the other colours have been written).
That's probably enough for now (and probably enough material for someone to pick holes in my research methods!).
Unless there is a substantial fault in my findings, I will move on to goal (2.) next time.
P.S. Apologies for not having everything 100% perfect. I have enough time to get things 'good enough' to prove, but if I tried to get everything perfect, none of this would even see the light of day. :(
