Page 10 of 18

Re: The Naked Atari 800

Posted: 30 Dec 2025 19:53
by rubber_jonnie
Well, my plans for using an Si5351 clock generator for a crystal replacement have turned a corner.

I spent a LOT of time trying to use an FTDI232H adapter that was supposedly good for I2C devices. Trouble is it wasn't, it was lying about it's capabilities despite passing all the tests I threw at it.

So instead I decided to try using a Raspberry Pi, and it actually sees my original clone device over I2C, and it also sees the 2 Adafruit devices that came today!!!

So I have been busy prepping the files I need to get over to the RPi ready for tomorrow and trying to actually program the damn things.

I'm quite excited about this as although I now have original crystals coming, I am really keen to have some sort of a backup plan for the future and given these little Si5351 boards are capable of frequencies from 8Khz up to 160Mhz I think being able to replace crystals cheaply will be a useful tool to have in the box.

Of the 3 boards I have, there is a tiny one that will fire out up to 2 clocks and the slightly larger boards will do up to 3 clocks. In something like an Atari 8 bit machine, including 2600's and probably the 7800 too as well at the computers, they generally have 2 crystals, so one board could replace both in one go.

We'll see, hopefully tomorrow will get me over the line.

Re: The Naked Atari 800

Posted: 31 Dec 2025 12:22
by rubber_jonnie
OK, so the I2C stuff went a little sideways, and instead I ended up using an SMBUS Python script on the RPi and I now have working clock generators!!!

The script I used was:

Code: Select all

#SMBUS programming script to directly program the Si5351 boards. Used because the I2C method failed.
#This requires the registers from Clockbuilder Pro to work. This programs the Si5351 to output 3.546894 MHz on CLK0.

from smbus2 import SMBus

# I2C bus 1 on Raspberry Pi
bus = SMBus(1)
addr = 0x60  # Si5351 default I2C address

# ClockBuilder Pro register dump
registers = [
    (2, 0x53),
    (3, 0x00),
    (4, 0x20),
    (7, 0x00),
    (15, 0x00),
    (16, 0x0F),
    (17, 0x8C),
    (18, 0x8C),
    (19, 0x8C),
    (20, 0x8C),
    (21, 0x8C),
    (22, 0x8C),
    (23, 0x8C),
    (26, 0xEB),
    (27, 0xC2),
    (28, 0x00),
    (29, 0x0F),
    (30, 0xF2),
    (31, 0xB6),
    (32, 0x04),
    (33, 0x1C),
    (42, 0x00),
    (43, 0x01),
    (44, 0x00),
    (45, 0x7C),
    (46, 0x80),
    (47, 0x00),
    (48, 0x00),
    (49, 0x00),
    (90, 0x00),
    (91, 0x00),
    (149, 0x00),
    (150, 0x00),
    (151, 0x00),
    (152, 0x00),
    (153, 0x00),
    (154, 0x00),
    (155, 0x00),
    (162, 0x00),
    (163, 0x00),
    (164, 0x00),
    (165, 0x00),
    (183, 0x92),
]

# Write all registers
for reg, val in registers:
    bus.write_byte_data(addr, reg, val)

print("Si5351 programmed successfully.")
This creates a 3.546894 MHz clock on output 0 of the 2 & 3 clock output boards

To create different outputs on different clocks you'd need to configure them using the Clockbuilder Pro, export the registers and replace the settings in the register section.

By using CB Pro you can select the IC, in my case an Si5351A and prorgam up to 3 registers in one go.

Next up I need to see if it works as a crystal replacement, but at least now I know how to program them and whatever else I need to do is just tweaking.

Next up is a trial on the 800.

Re: The Naked Atari 800

Posted: 31 Dec 2025 12:28
by rubber_jonnie
This is a summary of what I did BTW:

Just two things installed on the Pi:

smbus2 (so Python can talk I²C).

Nothing else — no Adafruit libraries, no Blinka, no virtualenvs.

The install command was simply:

sudo pip3 install smbus2 --break-system-packages.

Once that was in place, the whole setup came down to:

Enabling I²C on the Raspberry Pi via raspi-config.

Confirming the Si5351 was visible at address 0x60 using i2cdetect -y 1.

Taking the ClockBuilder Pro register dump.

Writing those registers directly over I²C using smbus2.

Re: The Naked Atari 800

Posted: 31 Dec 2025 12:31
by stephen_usher
I hope that it works! :-)

Re: The Naked Atari 800

Posted: 31 Dec 2025 13:20
by rubber_jonnie
stephen_usher wrote: 31 Dec 2025 12:31 I hope that it works! :-)
Will hopefully find out soon 😁

Re: The Naked Atari 800

Posted: 31 Dec 2025 14:20
by rubber_jonnie
stephen_usher wrote: 31 Dec 2025 12:31 I hope that it works! :-)
First hurdle hit...

The Si5351 boards don't remember their configuration when powered off.

So I'd meed a small microcontroller to boot up and program the clock gen over I2C as well as the clock gen. I think next I need to see if it works on the 800 before I go any further.

Re: The Naked Atari 800

Posted: 31 Dec 2025 16:24
by rubber_jonnie
OK, so the short answer is, the frequency is good - perfect in fact, but the waveform isn't quite right, so a bit more tinkering required I think as it the 800 doesn't run with it as a clock source.

Re: The Naked Atari 800

Posted: 03 Jan 2026 15:28
by rubber_jonnie
So I'm going to get back to the Si5351 shortly, but I had a care package from Best today:

IMG20260103142032.jpg

And in it was a PAL GTIA, Antic, 6502B, 6502C (Sally) and four PAL 3.546894 MHz crystals.

So I'm going to get the 800 verified as running with known good parts and then start my experiments proper with the clock generation using an Si5351 board.

If I can get it working with 3.546894 MHz I may also add in the 4.433 Mhz clock too just for fun. I have an ATTiny board coming that I can use to program the SI5351 at boot time since it has no means to retain settings, but I can use a microcontroller to squirt the necessary code at it on power up.

First I have a minor repair to do for the switch harness from the mainboard to the power board though as there is a bit of trace damage and 3 out of 4 wires just disconnected themselves!!!

I need this fixed for the Option, Select, Start and Reset buttons to work. No Help on the 800 & 400.

First having a coffee and one of the few remaining mince pies in the house :)

Re: The Naked Atari 800

Posted: 04 Jan 2026 12:50
by rubber_jonnie
OK, so the naked 800 is fully working :)

It now has a new 3.546894 Mhz crystal (Socketed so I can use it as a test machine for the clockgen boards) and new CPU, Antic and GTIA and it passes all the tests I can throw at it.

Carts work, SIO works, keyboard works, RAM is all good and it gives a very nice image out of composite.

I've even tested the joystick ports with sticks, trakball and touchpad :)

Next up with this machine will be figuring out if the clockgen will work as hoped.

Obviously the clockgen can't just be fitted in place of the crystal, so I need to figure out the best place to connect it up.

Screenshot 2026-01-03 at 10.03.52.png

Looking at the schematics I think it'll work best if I remove Q102, R106 and X101 I can then connect the clock generator in place of R106 with the output connected to 'C' and the other end is GND, plus the original oscillator circuit will be turned off.

Lets see how it goes.

Re: The Naked Atari 800

Posted: 04 Jan 2026 13:24
by stephen_usher
Yay!

And, yes, I agree with your idea for the clock generator connection.