Overclocking

From NeoGeo Development Wiki
Jump to: navigation, search

The principle of overclocking is to make electronic chips (not only CPUs) run at a clock frequency higher than intended.

Why overclock ?

Fanatics may not want to read this, but the NeoGeo can have slowdowns.

As the GPU runs in real time, slowdowns on most 2D consoles can only caused by the CPU because of long calculations (and not graphical complexity). For example, 20 moving sprites could cause slowdowns, but 200 static sprites won't.

Overclocking which chip ?

  • Overclocking the Chipicon.png 68k makes it execute instructions (game code) faster.
  • Overclocking the Chipicon.png Z80 is pointless, as it only takes care of music and has plenty of time for that.
  • Overclocking the GPU is also pointless: as mentioned above, it can't cause slowdowns.

In short, only the 68k CPU deserves overclocking.

Stability

CPU

The stock 68000-12 CPU can often work up to 14MHz (17% overclock) without crashing, but don't expect going above safely. Crashes are due to gate delays ? Crippling ?

Some people from the Atari and Amiga community showed that the high-end 68000-16 can work way beyond 16MHz. Reports of stable operation at 30MHz (150% overclock from 12MHz) can be found.

Heat is not an issue.

Memory

Overclocking might not be safe for all RAM access on the NeoGeo. For example, 68k user RAM is 100ns (166ns at 12MHz, would need <83ns at 24MHz). Max would be 19.8MHz ? Palette RAM is even slower: 120ns. Max would be 16.6MHz ?

The cartridge ROMs might also be too slow in some cases. Wait cycles could be artificially inserted to slow down acces, but overlocking would be way less efficient.

Video glitches

Twinkle Star Sprites runs a lot better at 20MHz (67% overclock) but glitches heavily.

When increasing the CPU clock only over 13.5MHz (13 %), some games start having video glitches. Games which have shorter access delays to the VRAM will glitch first.

The problem arises from the fact that the overclocked CPU inherently talks to the GPU faster, but the GPU still runs at 12MHz. This makes it skip writes or reads, making a mess in VRAM.

So why not also overclock the GPU ?

Simply because the GPU generates the video sync and vertical blank interrupt. If it is overclocked, the framerate will rise accordingly. This will not only make the snake bite its own tail, but also make the video signal go out of range for most TVs and monitors (14MHz would give 69 frames/s).

That's why most modification write-ups describe a way to keep the GPU at 12MHz and switch the CPU between 12MHz and 14MHz+ manually.

Oscillator swap mod

Cut clock input just before the 68k (lift pin if possible, don't cut the PCB). Wire a ~14MHz oscillator's output to it. Can use a SPDT switch to chose between the oscillator's output and the original Sig.png12M signal. Switching mid-game will certainly crash the CPU.

Warning: use an oscillator (usually 4 pins), not a quartz crystal (2 pins). Quartz crystals can't provide a clock signal all alone.

Gearbox mod

To do :)