With the FPGA I'm putting together, it'd be nice if it auto-detected if it were in an NTSC or a PAL environment. Currently, I have a 100MHz clock on the board, so I could just count cycles of the incoming crystal clock - around 14MHz, it's NTSC. Around 4MHz? it's PAL. That's easy enough.
As an academic exercise, I was thinking about ways of differentiating the two systems without relying on that external 100MHz clock.
Suppose the VIC chip had write ability - you could divide the incoming crystal clock by four and try to use that to perform a bunch of read-modify-write cycles. If every write operation can be read back correctly, you're on a PAL system. If any of them fail, you're on NTSC because you'd be reading and writing 400-450ns RAM with a 140ns cycle time. Unfortunately, VIC is not a writer.
Using the same clock-divided-by-four technique, you could, I suppose, try reading the character generator ROM. If it comes back as all $00 or all $FF, that's a dead giveaway that you're going too fast. Or you could checksum it a few times and see if you get different values to check if it's returning varying values.
Any other thoughts?
[And yes, I am posting a lot at the moment - I'm stuck at home with a bad back, and I can't go out much, so y'all are "benefitting" from that]