Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - RGB SMS2 glitch-free overclocking

Reply to topic
Author Message
  • Joined: 14 Sep 2016
  • Posts: 81
  • Location: Vienne, France
Reply with quote
RGB SMS2 glitch-free overclocking
Post Posted: Fri Aug 14, 2020 3:43 pm
Hello!

Last few weeks I tried to find a simple / elegant solution to overclock my French RGB SMS2 and I finally found a single-chip contraption that works and lets the Z80 at a quite high speed of 5.37Mhz when no IO access is needed.

It really makes a difference in terms of slowdown in games when the TV standard is 60Hz and is quite cheap and not very hard to build.

It only needs an ATF16V8B programmable logic device and off-the-shelf parts.

I wonder if there are other SMS consoles that would be compatible besides the French RGB SMS2...

In the mean time I can now enjoy my childhood games in 60Hz and with perfect timing :)


****************************************
* SMS2-RGB glitch-free overclocking R2 *
****************************************

Design by GliGli

This design needs the following parts:
======================================

- ATF16V8B, DIP20 programmable logic device.
- Standard SPTD switch, hole mountable.
- 100nF non-polarized capacitor, "104" marking.
- Wires.
- Soldering hardware.
- Drilling tool.
- A SMS2-RGB Sega Master System, (this version only).

Quick explanation of how it works:
==================================

- Default Z80 clock is half of main quartz Clock (so: 5.3693Mhz).
- On /IORQ low level, the clock becomes the stock ~3.58Mhz clock, but
    sampled using the 5.3693Mhz clock, this way it avoids glitches when
    switching clock (which would cause the Z80 to fail due to transients
    that would clock beyond stable frequency range).
- After 11.92µS (64 cycles of the 5.3693Mhz) without any /IORQ, the clock
    goes back to 5.3693Mhz.

The period of time before the 64 cycles timeout where the Z80 runs at stock
~3.58Mhz is used to prevent accesses to I/O that would cause glitches in the
peripherals, eg: the VDP, which needs 7.26µS (26 cycles at ~3.58Mhz) between
writes to ensure proper VRAM updates.
   
Installation guide:
===================

- Flash the JEDEC fuses file ( SMS_OC_ATF16V8_Fuses.jed ) onto the ATF16V8B,
    eg. using a TL866II programmer.
- From the wiring diagram ( SMS_OC_SMS2-RGB_Wiring.jpg ):
    - Cut the trace using exacto knife or a medium sized drill.
    - Stick the ATF16V8B using 2-sided adhesive tape on top of the Z80.
    - Wire according to the diagram, let longer wires for the switch.
- Drill a hole into the casing to let the switch through and secure the switch
    into the hole.
- Put 2 layers of masking tape on the interior of the RF shielding around the
    Z80 to prevent short circuits with the ATF16V8B and wiring.


Results:
========

From all the games I tried, slowdowns are gone, even in 60Hz, even on titles
like Sonic Chaos. Most games run flawlessly.
Sonic the Hedgehog has very minor sprite glitches, but no tile
corruption so far.
Galaxy Force still has tile corruption on the enemy ships.

Limitations:
============

- Do not change the switch position while a game is running.
- This modification only works on SMS2 consoles with a 10.7386Mhz crystal.
- 5.3693Mhz is high for a Z80 but it seems it doesn't make it glitch.
    (maybe because SMS2s are equipped with CMOS Z80s).
   
Have fun :)



  View user's profile Send private message
  • Joined: 14 Sep 2016
  • Posts: 81
  • Location: Vienne, France
Reply with quote
Post Posted: Sat Aug 15, 2020 3:04 am
Picture of my own RGB SMS2 wiring.
I used a socketted ATF16V8B in case I had to upgrade the fuses but it's the same wiring (I hope :) as the diagram.
SMS_OC_My_Wiring.JPG (671.94 KB)
SMS_OC_My_Wiring.JPG

  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!