Atari coding BBS
|Re: Compiled sprites madness!|
Posted by: ggn
Thanks for the reply - that is exactly the kind of feedback I was expecting! The "more subtle case" and the moveps are absolute gems :).
A few comments are in order I suppose:
- I never checked the cycle counts too much so I thought that (An,Dn) addressing would be about the same as (An)+ but it seems the former is 8 cycles slower - good stuff! Although I think it would depend on the sprite itself, maybe some other (bigger sprites) with enough gaps inside the scanlines would start showing slowdowns when you have to update the pointer using add.x.
- Traverse the scanlines in a non-linear order - yup I had this idea as well but I didn't dare suggest it as it would introduce too much complexity in the generator and might have ended up in https://xkcd.com/292/ (we are building it up incrementally so it can be more manageable).
(Who am I kidding? I'm sure that at some point it will have to be remade from scratch :))
- Keeping the most frequent data in registers also means you could write them in a non linear fashion using (An, Dn) but I guess the gain (if any) is not very apparent - perhaps the generator can make some kind of decision about this.
- Regarding the previous point, I also had the idea that the generator could keep track of "local" frequencies (a couple of scanlines) and if they change significantly then reload data registers with new data. Probably only good for larger sprites.
Thoughts, anyone? :)
In the first post I didn't want to start listing all of the above ideas because I am not sure if there are real gains in using them. Also it seemed more and more that we are trying to build a packer and I'm not sure if we can do a good job in this :).
[All messages in this thread]