Posted By
Gaia on 2005-10-24 06:09:17
| Re: Video-Matrix Read-Cursor
Interesting topic! I guess you are referring to the video matrix fetch counter that is used by the DMA (cursor is a somewhat misleading term, because it may suggest it has something to do with the cursor aka. bitmap fetch counter located at $FF1A/B). This counter can not indeed be influenced directly by writing to a TED register, only implicitly.
Your list is OK (I might add that if you skip line $CC or $CD - can't remember exactly, then the counter will not be reset and it will just continue counting and eventually wrap around at $3FF). Two possibilities are missing however: $FF1E and $FF1F.
Let's start with $FF1F as this is a bit less complex. It is possible to delay and trigger the counter increase with this register's lowest 3 bits. The DMA counter increase is triggered by this vertical sub address. So, if you never allow it to reach 6, it will just re-read from the same address at the next DMA. Similarly, if you keep writing 6 to the VSA every line, it will always (re-)trigger a counter increase (I seem to recall there is a similar effect in the C64 achieved differently, called "line crunch"?).
I am not sure about the exact positions, but the counter is working like this: - at the beginning of every line where the TED is not in an idle state (bad lines have been allowed), the character position will be reloaded from its latched value - if we are on a line where VSA = 6, then at the end of the matrix fetch interval, the counter will be latched to a reload register, otherwise nothing happens
One thing is that - at least according to my experiments - the DMA fetch counter seems to be connected to the matrix fetch logic and not to the DMA logic. That is, you can not influence the number of characters the counter is increased with as it will always count 40 not matter if you delayed the DMA within that line or not (unless you trick that with a $FF1E write...)
As for the $FF1E: you can influence almost anything with it, it's a whole chapter in itself and to a great degree, still uncharted land...
|