Pasting in posts from a follow-on thread, which can I think usefully be deleted:
futurama65 wrote:
Hey everybody,
I asked a somewhat similar question (and much less specific) on an earlier post, so forgive me if this seems like a re-thread. I have a glitchy 6502 chip (R6502AP-13) from an 80's arcade game that runs its intended program delay loops twice as fast as it should. The delay loops are are software based - not tied to the video refresh. The delay loops are directly influenced by the CPU clock speed. It seems that the 6502 has spontaneously started running double CPU cycles for its clock pulses.
Has anybody every seen this kind of glitch (perhaps caused by some static electricity or voltage spike) in a 6502 chip? All other parts of the program apparently run at normal speed. What exactly could be causing the 6502 to behave in this manner?
I could provide the affected lines of code if that helps.
Thanks in advance for your insight.
tim
GARTHWILSON wrote:
I know some forums don't want you to revive old threads; but here where projects may take
years and it's also helpful to be able to review what was discussed before, it might have been better to continue on the same thread. For reference, it was at
viewtopic.php?f=3&t=2458.
What does the clock circuit consist of in the computer you're talking about? Since it's not a CMOS processor (65c02), you wouldn't have an RC or crystal connected directly to the processor, but is one of those connected to a separate circuit, or does it have an oscillator can? The oscillator cans seem to be pretty dependable, but especially home-made crystal-oscillator circuits may not remain stable under all conditions (especially across temperature and voltage). When I made crystal oscillators 20 years ago, I remember them taking off on the wrong frequency if I didn't find the sweet spot for feedback. This is a fault of the oscillator and has nothing to do with the processor.
futurama65 wrote:
Yes, I should have posted under previous post. Thanks for showing the link.
Forgive me for not being incredibly knowledgeable in this field. I am documentary filmmaker who has been following the high score on a classic game that happens to use the 6502. Somebody got a world record, but further analysis showed that certain non-critical sub routines (involving a delay loop/timer countdown) were running faster, giving the player an unfair advantage.
So the program is on a big PCB with 11 Eproms, the 6502 and the 11.289 MHZ crystal. Swapping the PCB with another 6502 fully corrects the problem. The programmers of the game say that there is a failure on the 6502, but don't know exactly what is going on.