Skip to content

Dallas RTC sync + TOS Y2K fix

This page describes how a still produced little piece of hardware can add real time clock (RTC) functionality to our old favourite computer systems. In this case it’s an Atari STE, but any ST with ROM sockets will work.


I can’t speak for everyone, but personally I’ve become quite accustomed to being able to look at file creation dates to see when I worked on what. It’s not something that bothered me too much 25 years ago when I used my Ataris extensively – although I did acquire a TimeKey cartridge a little while later. Also – it’s just good fun to extend the old machines for nostalgic reasons.

How – hardware:

Maxim Integrated has a series of ICs named Dallas 1216x – where x denominates whether they’re intended for use in RAM or ROM situations, and the amount of pins. For the Atari ST line of computers, the easiest way to add the ICs to the systems is either through a cartridge or as a pass-through in an existing ROM socket.

Many Atari STEs have their ROM chips already socketed. Depending on the ROM version and whether they’ve been upgraded to a later TOS the chips are either 28 pin or 32 pin. The matching Dallas chips are thus the Dallas 1216E or Dallas 1216F version. (Do not try using any of the others – the functionality is very different)

The chips are available from various reputable online dealers at a somewhat steep price (~€45). They also seem to be available from slightly more risky sources at much lower prices, although it’s possible those would suffer from issues with battery life lengths etc.

Once you have the IC, removing one of the existing ROM chips is a matter of using a flat screwdriver and carefully nudging it upwards little by little switching sides a few times. All you have to do then is to insert the Dallas chip in the existing socket and re-seat the ROM into the pass-through connector. It will look something like this (maybe less dusty though):

Mounted Dallas 1216F

(Never mind the yellow cables – as can be seen on the ROM chip stickers I have a dual TOS installation and the cables go to a switch)

I use an HxC Floppy SD emulator myself and haven’t tried putting back the internal disk drive. I believe it would still fit, although tight. It’s also not important which ROM socket you put the Dallas chip in (HI or LO).

With this, the actual hardware installation is done. Next up is the software – there’s a bit of magic involved in how an RTC inserted into a ROM socket can be accessed by the Atari.

How – software:

The Dallas chips work by closely monitoring the ROM accesses, and if a special hard coded sequence of 64 reads is detected (which will never happen by chance) it’s possible to either read out the contents with a further 64 reads – or by reading ROM in a different way write to the chip. Luckily for us, Bill Penner wrote a software suite back in the late 90s that contains a graphical configuration program as well as a clock display .acc and a program meant to go into an AUTO folder setting the correct time and date in TOS at boot. It’s downloadable from various places, including here.

Unfortunately, even though the release history says it’s Y2K-fixed, neither I nor the person I bought my Dallas chip from were able to get the boot program working as it should. The year became 2028, even though the .acc and the configuration program displayed everything correctly. This is well known as the Atari TOS Y2K problem, where year 2000 and later are unable to be set and retrieved by TOS.

Enter Ingo Linkweiler, who early in the year 2000 released a software TOS fix that works by intercepting calls to two TOS routines (datetime set and get) and wind them 20 years back and forth making it possible for TOS to work fine again up until the year 2020.

It’s likely, although I didn’t try, that the AReal boot program would work if Ingo’s Y2K fix had been run beforehand.

How – Troed:

So, since the main reason why I’m playing around with old Ataris isn’t purely for nostalgia, but because it’s a nice system to write low level code on – I realised there was something here that I could do. While the configuration program in AReal works perfectly to set the time in the Dallas RTC – apparently at least I had the need for a utility that not only initialised the TOS clock to its values at boot, but did so in a Y2K compatible way. Additionally, I dislike having to create AUTO folders and take care of the order I add programs into them.

Attached here is Dallas RTC v1.0 – containing not only a replacement boot program for AUTO usage instead of the one in AReal, including a Y2K fix that works up until year 2030, but also the same code optimised for small size making it fit into a boot sector (=<480 bytes). By writing this onto your disks (or disk images, as in the case with my HxC Floppy emu) – or using the AUTO program – your Dallas RTC will now be transparently read by your Atari at boot.

Have fun – and let me know if you find any bugs! The source code is included, and can also be found at Github.


9 Comments leave one →
  1. June 8, 2016 15:09

    Dear Troed,

    Very nice work ! i love it.
    I made almost the same hack with a DS1315 with the forget me clock. It use A0 and A1 bit on bus.
    It’s possible to add this configuration in your program ?

    Best regards

    • June 8, 2016 17:30

      Hi Franck,

      Thanks! I did a quick read-through on the 1315 and it seems to work exactly the same (64 bit magic, the same one as on the 1216, next is read or write depending on WE etc). How is it mapped/accessed in your config?


  2. June 8, 2016 17:48

    Hi Troed,

    Yes, in fact DS1216 is a DS1315 in 28 or 32 pins packaged. So its the same.
    I wrote an article on the Forget me clock and i made schematic of this cardbridge. The différence with DS1216 on your hack, is on adresse map. With forget me clock adresse bus is A0-A1, and on DS1216 on Eprom, it’s A0 and A2.
    If you hunderstand french (that explain my bad english ;) ), you can see that on :
    (work in progress and not published yet)

    Best regards


  3. June 8, 2016 20:02

    Hey Troed,

    As i think, i tried to connect pin6 of my DS1315 to A2 line, and DALLRTS.EXE read correctly date in RTC. Of course “Forget me clock” cartbridge programme now did’nt detect it. It should be easy to add a test to detect if this device is connected to A1 line.
    Your program is really good !


    • June 9, 2016 10:06

      Ah ok. The DS1216 is accessed like this:

      * write: fe0000 or fe0002
      * read: fe0008 – read bit in bit 0

      So for the DS1315 the only difference would be accessing xxxxx4 instead when reading? Not having the device myself makes it a bit difficult – but if that’s all then yes I should be able to add that with only a few bytes of code so that everything might still fit within a boot sector (although it will be very tight … ;))


  4. June 9, 2016 13:13

    Hi Troed,

    I think you’re right. In fact DS1216 and DS1315 is the same part. DS1315 have 16pins and DS1216 is a 28/32pins module with a DS1315 inside. On DS1216 D0 and D2 are connected to the bus.
    On ‘forget me clock’ cartbrigde D0 and D1 are connected.
    On chipset WE is data input on A1 or A2 (write enable) st bus, Q on D0 (data output) and A1 on D (data input).
    So Write should be Fe0002 or Fe0004 if i understand.

    Best regards


  5. James permalink
    November 6, 2017 23:47

    So if I understand your article A DS1216E – would fit on one of the TOS chips in a 6 chip tos machine. – Thats all i have to do, and using your Rtc program v1.0 it will be set. Do I still use programs from the Bill Penner items? How long will the battery last? and I assume not replaceable?

    • November 7, 2017 10:58

      Hmm. Actually if it’s running a 6 chip TOS I don’t think it would work. If you convert to 2 chip then yes.

      The AReal suite needs to be used for setting the date, after that my tool takes care of syncing it back Y2K compliant each boot. The battery in a (new) DS-chip should work for about 10 years.

  6. James permalink
    November 7, 2017 16:53

    OK, so the specific pass throu option of the DS1216(EorF) will only work on a 2 tos board. Good to know. I thought all 6 chip were the 28pin and the 2 chip were the 32pin.. so because you said either or, I thought it would work that way. Now your tool you say works to 2050? can it be used with say RTC? maybe I will built that then.. or Exxos kit.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: