I'd suspect Phi1_IN (Pin 39) xor Phi2_In (Pin 38) === TRUE except for extremely small glitches at the positive/negative edges of both signals as they're inverses of each other. VIC-I internally probably uses either the positive or the negative edge of both inputs ORed to derive the pulse train for the fast clock.JonBrawn wrote:However, I'm a bit mystified about why the values I've used work. The value in question is "Delay tap 11". That means I've delayed the visibility of the reverse bit (and just the reverse bit) by twelve ticks of the fast clock (taps 0 to 11). The fast clock is the clock you get when you notionally XOR the two 14.318181 MHz clock phases together [...]
Yes. Unlike PAL, where pixel clock and colour carrier are the same (4.43 MHz), the NTSC VIC-I derives the colour carrier frequency by dividing the fast_clk by 8, which gives 3.57 MHz.[...] - it zips along at 28.636363 MHz and is used so that the dot clock comes out as a whole multiple, seven cycles of the fast clock. The 14.318181 MHz clock isn't good enough for this purpose, as the dot clock would have to be 3.5 cycles... but I digress. So, the reverse bit is delayed by 12 of these fast_clk cycles. A pixel, as mentioned, is seven fast_clk cycles.
There's the timing circuit formed by U2 and U3 which adds some gate delays on the mainboard until VR/W is fed back to VIC-I. I'd think you get some relevant nanoseconds extra delay where VR/W goes "write"->"read" upon end of the CPU write cycle into the colour register, which gives a "not quite one" pixel delay for the colour changes. At least that's where I would start my investigations. As I wrote earlier, the issues at hand would be easier to understand with a full reversing of the original chip layout.A single cycle of the CPU clocks is 28 fast_clk cycles. 12 fast_clk cycles aren't anything that I can think of as being relevant.
... .I'm still working on this - I'm pulling together a new interface board for a different FPGA (one that money CAN buy), and once I've got that up and running, I'll need to get some child labour in to play games and spot things that aren't right.
bjonte's recent release of H.E.R.O. provides a nice new test case.