BigDumbDinosaur wrote:
GARTHWILSON wrote:
Initially you said you wanted to speed things up on your 6502 by copying the ROM to RAM at boot. How are you planning to kick the clock speed up after the copying?
That's a good question. Either the machine has to be clocked at a slower rate to accommodate the ROM, followed by a speed-up, or wait-states have to be used. The latter would be less tricky to implement, as glitching during a clock speed change might be a problem.
I was going to suggest looking at the WDC boards to see how they do it, but turns out I was thinking of a feature built in to the W65C265S.
The W65C265SXB board has both a 32Khz Crystal and a 3.6MHz crystal, and the MCU has inputs for both, and an output, PHI2, to connect to other parts on the board. Flipping a bit in a control register tells the CPU which clock to use.
From the data sheet:
Quote:
PHI2 output is the main system clock used by the microprocessor for instruction timing, general on-chip memory, and I/O timing. The PHI2 clock source is either CLK or FCLK depending on the value of System Speed Control Register bit 1 (SSCR1). When SSCR1=0, then CLK is the PHI2 clock source. When SSCR1=1, then FCLK is the PHI2 clock source.