I will pretend I know the answers!
grafixbmp, on Tue Oct 20, 2009 12:45 AM, said:
For a long time now I thought I had this figured out but not sure anymore. I want to run throught/ ask questions about horizontal positioning to make sure I got it.
Any RES for the 5 objects set at the apropriate time triggers that objects drawing imediatelyon screen. At exactly what colour clock when that write occurs does the begining of the object start? That is taking into account double and quad size players one CC delay.
I keep getting mixed up on this myself. I end up writing or using a prepackaged sprite placement routine that does all the brain numbing math for me. After it's written I end up never having to think about it again since it would convert the desired pixel value to the proper RES and HMOVE value.
Quote
HM 's individualy sets a positive or negative value for P0 P1 M0 M1 and BL but doesn't become an offset until HMOVE register is triggered? And a single HMOVE triggering applies to every HM's setting?
Atleast 24 colour clocks are needed for an HMOVE to respond in each object.
This is correct. The offset is applied to all 5 objects when you hit a HMOVE, and only then. Keep in mind that timing is important when hitting the HMOVE. The positive and negative values given in stella.txt, etc generally assume a standard HMOVE. IE: When the HMOVE is the first thing done in the scanline. (So it ends on cpu clock 2. (takes 3 clocks to do a sta HMOVE, and clock 0 is counted as one.)
I'm not entirely sure about the 24 color clocks however. I do know you have to wait a while after hitting sta HMOVE before you can go updating the offset values or you get funny results.
Quote
This last one I may have conjored up myself but I also undestood that multiple triggers to HMOVE applied the fine tuning offset multiple times. For example, if HMP0 is +2 and HMP1 is +1 then if HMOVE is triggered 3 times with atleast 24 cycles before displaying, does that mean that P0 shifts 6 colour clocks right and P1 shifts 3 as well?
This is correct as well. However like I said above the timing on the HMOVE is VERY important. The offset values change depending on when you do the sta HMOVE, and you can't just do sta HMOVE, sta HMOVE, etc one after the other.
Doing a standard HMOVE also produces the little black bars on the left side of the screen if you're updating things during the visible display. To do a HMOVE without generating those you'd have to attempt triggering the HMOVE on cycle 73-74 instead - but this completely changes the meanings of the offsets and creates it's own headaches.
But otherwise, doing a proper HMOVE twice (each on a different scanline) would cause it to apply the offsets twice.