Hardware hackers: stopping the clock

Once upon a time, I was a hardware hacker… in high school I believe I spent a total of roughly 10 credited semesters in the EE lab. But I’ve mostly left that behind, and it’s been a loooong time since I’ve picked up a soldering gun, so now I beg of you your advice.

I have a device, an electronic game called Say What? It’s got rather ingenious hardware and rather abysmal software. I’m pretty sure that reverse-engineering and rewriting the software is not a feasible option, so I’m hoping a quick hardware hack will help. I’d really like the ability to “pause” at certain times… by toggling a switch, to cause the game’s sensation of the passage of time to halt, resuming when the toggle is reset.

I’m guessing that everything this doohickey does is driven by a clock, and that clock is on its own 555-ish chip or is integrated with the rest of the game’s hardware logic, but either way there’s probably a crystal in there somewhere. I haven’t cracked it open yet, hoping to get expert suggestion on how to proceed here. Help me, fellow smart people, you’re my only hope.

There will probably not be a separate IC like a 555 chip. What is most likely there is an IC which contains the processor for the game that is connected to a crystal or a resonator. The electronics to drive the crystal is contained in the processor IC.

As someone who has had to debug issues with the crystal used to generate the clock for ICs, I do not think that you will be able to easily install a switch that will stop the clock. The problem is that that the IC needs to be held in reset while the crystal oscillations get to a proper size and amplitude. Until that time you can get short spikes on the clock to internal flipflops this can cause the flipflops to change state at times they are not supposed to change states. We traced back an issue of flakiness to not allowing sufficient time for the oscillations to become steady. I have also see issues with the short lines for the crystal to IC being to close to other signals causing problems. Putting a switch inline with the crystal will probably not work.

You could remove the crystal completely and feed in a clock. If you had a circuit which allowed you to stop the clock without short high or low pulses that would probably work.

A lot of ICs these days use dynamic registers, which are really just capacitors and they expect to be refreshed at a certain rate (this typically decides the minimum operational clock speed for the IC). If you slow the clock down too much the capacitors will decay too much and you’ll start getting software errors.

Have you really seen any thing with dynamic registers lately? I have only seen dynamic logic in RAM in the last 20 years.

Without knowing the particular microprocessor, no definitive advice can be given.

A typical CPU chip these days uses a RISC style pipeline with different stages for things like instruction fetch, operand decode, write back, etc. and the end of each stage is usually a register which stores the result of that stage and passes it onto the next stage on the next clock cycle. An easy way to tell if these internal registers are dynamic or not is to look at the specs for the processor. For example, an Intel PXA272 XScale processor has a minimum clock speed of 104 MHz and a max of 624 MHz, so it’s using dynamic registers internally. A PIC 16F874 has a minimum clock speed of “DC” (meaning 0 Hz), so it’s not using dynamic registers and you can stop it and restart it if you want simply by fiddling with the clock.

I really don’t think that the PXA272 has dynamic registers. They make a big deal in the data sheets about having SRAM so that they can go into deep sleep modes without the need to restore state.

Hi OP.

Getting back to the question you need to hack it open and see what level of integration is therein. I suspect you’ll just find a blob of black epoxy on the circuit board which is embedded in the chip with very little accessible.

If not, you may be able to halt the CPU by pulling up or down a WAIT or HALT line. This method is pretty simple - use a switch to wire these to ground will halt the CPU; just restart by moving the switch back.

If the circuit has other stuff going on in the background then you may have issues, but your device sounds pretty simple and is probably a good place to start.

I don’t think messing with the clock has legs though. In my experience (working on 70s to late 90s era arcade games) the clock pulse has a very small amplitude so a small degradation would be problematic and it would also be very sensitive to switch noise.

Good luck and post back if you have success.

t.

I’m involved with microprocessor design, and I know of none which use dynamic registers. For one thing, power management is done by shutting off the clock to sections of the processor not being used, and if this lost register state it wouldn’t work.

I suspect minimum clock speeds come from timing issues. One possibility might be that if you run the CPU clock slow enough, it wouldn’t be able to catch up to the bus clocks, which are slower, and of course in a different clock domain.

As for the OP, I second trmatthe’s advice. Find the processor type, look up the data sheet, and see if there is a WAIT. I suspect HALT might force the CPU to go into the complicated power up cycle, which would lose state.

Thanks everyone for the helpful advice. I’ll crack the thing open and take a look, but if mucking around with the processor is not feasible, I may have a fallback: I might achieve almost the effect I’m hoping to get by halting the processor by simply muting the speaker. I’m pretty sure I remember enough EE to be able to do that :wink: