Changing the TOS of an Atari (STF/STE/Mega): Difference between revisions

From Atari Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Languages|Changing the TOS of an Atari (STF/STE/Mega)}}
 
{{Languages|Changing the TOS of an Atari (STF/STE/Mega)}}
  +
Hello, here is a tutorial on updating the TOS of our machines. I imagine that for many of you, this will be familiar, but you never know.
 
WORK IN PROGRESS
 
 
This page is not yet translated.
 
You can practice your French by clicking on the link above to the French page or wait a few days to get the English version.
 
 
 
Hello, I offer you a tutorial on updating the TOS of our machines. I imagine that for many of you, this will be familiar, but you never know.
 
   
 
'''Why change the TOS and with this FAQ?'''
 
'''Why change the TOS and with this FAQ?'''
Line 20: Line 13:
 
=== TOS Compatibility ===
 
=== TOS Compatibility ===
   
[[File:TOS Compatibility matrix.png]]
+
[[File:TOS Compatibility matrix.png|800px]]
   
 
</br>
 
</br>
  +
 
=== TOS Language ===
 
=== TOS Language ===
 
You can search everywhere in the menus, there is no option to change the language of your TOS. Each chip contains only one language, and to change it, you need to change your TOS. So if you want your beautiful Mega STE from Germany to speak in the language of Molière, you need to change the TOS. But '''be aware that the keyboard mapping also depends on the TOS''', so if you put a French TOS into an English machine with a QWERTY keyboard, every press of Q will display a beautiful A as on an AZERTY keyboard. Fortunately, there are utilities to change the keyboard: Keyedit, CKBD, or Clocky.
 
You can search everywhere in the menus, there is no option to change the language of your TOS. Each chip contains only one language, and to change it, you need to change your TOS. So if you want your beautiful Mega STE from Germany to speak in the language of Molière, you need to change the TOS. But '''be aware that the keyboard mapping also depends on the TOS''', so if you put a French TOS into an English machine with a QWERTY keyboard, every press of Q will display a beautiful A as on an AZERTY keyboard. Fortunately, there are utilities to change the keyboard: Keyedit, CKBD, or Clocky.
Line 121: Line 115:
 
Here's what you need to do:
 
Here's what you need to do:
   
# First, if you are using 6 chips, check if your motherboard has a 74LS11 chip (U68 on the board). If not, you'll need to add one to switch to 2 chips. A 74LS11 can be found for a few cents online, and you can also replace it with a 74ACT11, 74F11, or 74ALS11, but make sure you order a PDIP-14 version. Then, get some desoldering wick, a good soldering iron, and you're ready for step 2 (keep the iron on as you'll need it).</br>[[File:Blobs and U68.jpg|500px]]
+
# First, if you are using 6 chips, check if your motherboard has a 74LS11 chip (U68 on the board). If not, you'll need to add one to switch to 2 chips. A 74LS11 can be found for a few cents online, and you can also replace it with a 74ACT11, 74F11, or 74ALS11, but make sure you order a PDIP-14 version. Then, get some desoldering wick, a good soldering iron, and you're ready for step 2 (keep the iron on as you'll need it).</br>[[File:Blobs and U68.jpg|500px]]
 
# For ST/STF: Locate the "BLOBS" on the motherboard, usually near the ROMs. They come in pairs, labeled 1M and 256. On an ST with 6 chips, the 256 Blob will be covered in solder, while the 1M won't be. On an ST with 2 chips, it's the opposite. To switch from one configuration to the other, simply reverse the Blob that is soldered and the one that isn't. Use some desoldering wick on one side and a drop of solder on the other, and you're done. You don't need to be a soldering pro to make this change.
 
# For ST/STF: Locate the "BLOBS" on the motherboard, usually near the ROMs. They come in pairs, labeled 1M and 256. On an ST with 6 chips, the 256 Blob will be covered in solder, while the 1M won't be. On an ST with 2 chips, it's the opposite. To switch from one configuration to the other, simply reverse the Blob that is soldered and the one that isn't. Use some desoldering wick on one side and a drop of solder on the other, and you're done. You don't need to be a soldering pro to make this change.
 
# For MegaST: On the MegaST, there are no BLOBS, but there are 3 jumpers on the motherboard (see photo
 
# For MegaST: On the MegaST, there are no BLOBS, but there are 3 jumpers on the motherboard (see photo
Line 133: Line 127:
 
[[File:STE Jumpers.png|500px]]
 
[[File:STE Jumpers.png|500px]]
   
== ''Utiliser un TOS 2.06 dans un STF,STFM ou Mega ST''==
+
== ''Using TOS 2.06 in an STF, STFM or Mega ST'' ==
   
J’ai mentionné dans les parties précédentes que le TOS 2.06 était compatible avec les STF, STFM ou Mega ST mais qu’il nécessitait une modification hardware.
+
I mentioned in the previous parts that TOS 2.06 is compatible with STF, STFM, or Mega ST but requires a hardware modification.
  +
Today, we will see why the machine needs modification and how to do it. The first part explains the "why" for the curious. If you're just interested in the solution, you can skip directly to the "Decoding Solutions" section to save some time.
Nous allons voir aujourd’hui pourquoi il faut modifier la machine et comment le faire. La première partie explique le « pourquoi » pour les curieux, si vous êtes juste intéressé par la solution, vous pouvez passer directement à la rubrique « Solutions de décodage » et donc gagner un peu de temps.!!!
 
   
=== L’Atari et ses périphériques ===
+
=== Atari and Its Peripherals ===
   
  +
Our beloved Atari is not just a CPU and memory; it also has several peripherals to communicate with the outside world. To communicate with these peripherals, the Atari uses memory addresses or specific address ranges, and each read or write to these addresses is sent to the corresponding peripheral (referred to as "memory-mapped peripherals").
Notre bel Atari ne se résume pas à un CPU et de la mémoire, il a aussi un certain nombre de périphériques pour communiquer avec l’extérieur. 
Pour communiquer avec ces périphériques, l’Atari va utiliser des adresses mémoire ou des plages d’adresses spécifiques et chaque lecture ou écriture à ces adresses sera envoyée au périphérique correspondant (on parle de « Memory mapped peripherals »).
 
Par exemple une adresse entre $000008 et $3FFFFFF sera en mémoire RAM, une adresse entre $FA0000 et $FB0000 sera sur le port cartouche, $FFFC00 et $FFFC06 sur le clavier ou le MIDI, etc…
+
For example, an address between $000008 and $3FFFFFF will be in RAM memory, an address between $FA0000 and $FB0000 will be in the cartridge port, $FFFC00 and $FFFC06 will be for the keyboard or MIDI, and so on.
Le chef d’orchestre de tout ça c’est la GLUE, une des grosses puces de votre Atari, qui va activer le bon périphérique au bon moment en fonction de l’adresse demandée par le CPU.
+
The conductor of all this is the GLUE, one of the significant chips in your Atari, which activates the right peripheral at the right time based on the address requested by the CPU.
  +
When the CPU puts an address on the bus, the GLUE reads that address, identifies the corresponding peripheral, and sends a signal to the relevant device to start working.
Quand le CPU met une adresse sur le bus, la GLUE lit cette adresse, regarde à quel périphérique ça correspond et envoie un signal au périphérique concerné pour lui dire que c’est à lui de travailler.
 
   
=== La ROM du STF/STFM/MegaST ===
+
=== The ROM of STF/STFM/MegaST ===
   
La ROM de la machine tombe dans la même catégorie que les autres périphériques et doit être activée lorsque c’est à elle de travailler, donc quand l’Atari va lire de l’information en ROM, pas possible d’y écrire quoi que ce soit puisque c’est de la ROM (quoi que, mais on verra ça plus tard).
+
The ROM of the machine falls into the same category as the other peripherals and must be activated when it's time for it to work. So, when the Atari reads information from the ROM, it's not possible to write anything to it since it's a ROM (well, maybe, but we'll see that later).
Regardons de plus près le démarrage de la machine, là ou le TOS va être démarré.
+
Let's take a closer look at the boot-up of the machine, where the TOS will be started.
  +
* You've pressed the power switch, and the Atari wakes up slowly. A small timer keeps it in RESET state for about 1.5 seconds to allow all peripherals and clocks to become operational.
# Vous avez appuyé sur l’interrupteur, l’Atari se réveil doucement, un petit timer le laisse en état de RESET pendant environ 1,5 seconde le temps que tous les périphériques et horloges soit opérationnels.
 
# Ensuite, le CPU est démarré et va tout de suite, comme tout bon 68000 aller lire ce qui se trouve aux adresses $000000 à $000007. Il va y trouver quelques informations de configuration, mais surtout l’adresse à partir de laquelle charger le premier programme, qui dans le cas de l’Atari sera la ROM.
+
* Then, the CPU is started and immediately, like any good 68000 CPU, goes to read what's at addresses $000000 to $000007. It finds some configuration information there, but most importantly, the address from which to load the first program, which in the case of the Atari will be the ROM.
  +
* Loading continues from this new address until the end of the boot. So far, nothing too complicated.
# Le chargement se poursuit à partir de cette nouvelle adresse jusqu’à la fin du boot. Jusque là, rien de très compliqué.
 
   
Si vous regardez le contenu d’une ROM 1.04 par exemple, vous allez trouver dans ces 8 premiers octets les valeurs suivantes: 60 2E 01 04 00 FC 00 30.
 
Les 4 derniers octets, 00 FC 00 30 correspondent justement à l’adresse où se trouve le démarrage du TOS.
 
En effet dans les STF/STFM et Mega ST, la ROM se situe à partir de l’adresse $FC0000 et fait une taille de 192k, donc jusqu’à $FEFFFF.
 
   
  +
If you look at the contents of a ROM 1.04, for example, you'll find the following values in these first 8 bytes: 60 2E 01 04 00 FC 00 30.
Si nous revenons à la GLUE, voici ce qui se passe lors du démarrage:
 
  +
The last 4 bytes, 00 FC 00 30, correspond precisely to the address where the TOS starts. Indeed, in STF/STFM and Mega ST, the ROM is located starting from address $FC0000 and has a size of 192k, up to $FEFFFF.
# Le CPU demande l’adresse $000000 -> La GLUE active la ROM qui renvoie 60 2E (nous sommes en 16 bits, donc 2 octets)
 
# Le CPU demande l’adresse $000002 -> La GLUE active la ROM qui renvoie 01 04
 
# Le CPU demande l’adresse $000004 -> La GLUE active la ROM qui renvoie 00 FC
 
# Le CPU demande l’adresse $000006 -> La GLUE active la ROM qui renvoie 00 30
 
# Le CPU demande l’adresse $FC0030 -> La GLUE active la ROM qui renvoie les premiers octets du TOS.
 
   
  +
If we go back to the GLUE, here's what happens during startup:
On remarque que les adresses vont de 2 en 2, c’est normal, nous sommes en 16 bits, donc en renvois 2 octets à chaque fois.
 
  +
* The CPU requests address $000000 -> The GLUE activates the ROM, which returns 60 2E (we're in 16 bits, so 2 bytes).
On remarque aussi que la GLUE active la ROM pour les adresses $FC0000…$FEFFFF mais aussi pour les octets $000000...$000007.
 
  +
* The CPU requests address $000002 -> The GLUE activates the ROM, which returns 01 04.
Heureusement, sinon le ST ne pourrait pas démarrer depuis sa ROM.
 
  +
* The CPU requests address $000004 -> The GLUE activates the ROM, which returns 00 FC.
  +
* The CPU requests address $000006 -> The GLUE activates the ROM, which returns 00 30.
  +
* The CPU requests address $FC0030 -> The GLUE activates the ROM, which returns the first bytes of the TOS.
   
  +
You'll notice that the addresses go up by 2 each time, which is normal since we're in 16 bits, so it sends back 2 bytes each time.
=== La ROM des STE et la 2.06. ===
 
  +
You'll also notice that the GLUE activates the ROM for addresses $FC0000…$FEFFFF and also for bytes $000000...$000007.
Lors de la création des premiers ST, Atari a décidé d’utiliser des puces de ROMs de 32k, ce qui avec les 6 puces donnait 192k au total. C’était étroit, mais à force de « bidouilles » diverses et variées les développeurs ont réussi à tout faire tenir TOS et GEM dans ces 192k. Pour ceux que ces bidouilles intéresse, faite une recherche sur Atari TOS Line-F…
 
  +
Fortunately, otherwise, the ST couldn't boot from its ROM.
Avec l’arrivée des STE, la prise en charge des fonctionnalités supplémentaires ne rentrait plus dans 192k et il a fallu passer à la taille supérieur, soit 256k.
 
Mais, comme ça n’avait pas été prévu au départ, Atari a rencontré un problème: $FC0000 + 256k = $FFFFFF😟
 
   
En commençant à $FC0000, la nouvelle ROM couvrait maintenant l’espace de l’ancienne, mais aussi l’espace à partir de $FF0000 réservé au clavier, souris, MIDI, son, etc…
 
Les ingénieurs ont donc décidé de faire démarrer leur nouvelle ROM à une adresse plus basse et en regardant les premiers octets d’un TOS 1.06 on trouve: 60 2E 01 06 '''00 E0 00 30''', la ROM commençant maintenant à l’adresse $E00000 et s’étendant jusqu’à $E00000 + 256k= $E3FFFF.
 
   
=== Le problème des STF/SFTM et MegaST: la GLUE ===
+
=== The STE ROM and the 2.06. ===
  +
When the first ST computers were created, Atari decided to use 32k ROM chips, which, combined with the 6 chips, provided a total of 192k. It was tight, but with various hacks, developers managed to fit both TOS and GEM into these 192k. For those interested in these hacks, you can search for "Atari TOS Line-F."
Avec un TOS de 256k démarrant en $E00000, la vieille GLUE des anciens ST n’est plus adaptée. Quand elle voit passer une adresse en $E0xxxx, elle ne va jamais activer la ROM, et donc pas de boot possible !!!
 
   
  +
With the arrival of the STE, accommodating additional features could no longer fit within 192k, so it was necessary to move up to the next size, which is 256k. However, Atari encountered a problem: $FC0000 + 256k = $FFFFFF 😟
=== Comment faire fonctionner un TOS 2.06 dans un STF? ===
 
Si la GLUE ne sait pas décoder correctement les nouvelles adresses de la ROM, on pourrait penser qu’il suffit de changer la GLUE. Malheureusement Atari n’a jamais sorti de nouvelle GLUE pour les STF et celle des STE n’est pas compatible.

 
Il va donc falloir aider notre GLUE et activer soit même la ROM sur la nouvelle plage d’adresse. Pour cela, il suffit d’utiliser quelques circuits logique qui vont interpréter les adresses et envoyer le bon signal à la ROM à la place de la GLUE.
 
Comme les adresses $000000-$000007 se comporte de la même manière que l’on soit sur une ROM 192k ou 256k, nous n’aurons pas besoin de nous en soucier, il suffira de reprendre le signal de la GLUE qui fait déjà le travail pour ces adresses.
 
   
  +
Starting at $FC0000, the new ROM now covered not only the space of the old one but also the space from $FF0000 reserved for the keyboard, mouse, MIDI, sound, etc. Engineers decided to start their new ROM at a lower address. Looking at the first bytes of a TOS 1.06, you'll find: 60 2E 01 06 '''00 E0 00 30'', with the ROM now starting at address $E00000 and extending to $E00000 + 256k = $E3FFFF.
=== Comment décoder les adresses $E00000-$E3FFFF? ===
 
Les adresses ont été jusqu’à maintenant représenté en hexadécimal, l’Atari lui ne connait que le binaire. Ça tombe bien, l’hexadécimal a une propriété pratique: chaque symbole (lettre ou chiffre) correspond exactement à un groupe de 4 bits binaire.
 
Donc si je retranscrit mes adresses de TOS 256k, ça donne b1110 0000 0000 0000 0000 0000 - b1110 0011 1111 1111 1111 1111… un peu long et pas pratique.
 
Si nous disons exprimons maintenant le problème en disant que nous devons activer la ROM quand l’adresse commence par $E0-$E3, ça devient un peu plus simple.
 
Nous disons donc que si le début de l’adresse en binaire peut s’écrire : b1110 0000 - b1110 0011 il faut activer la ROM.
 
On remarque que dans l’ensemble d’adresse binaires si dessus seuls les deux derniers bits varient sur la plage d’adresse utilisée par la ROM, on peut donc résumer en disant que si les 6 premiers bits de l’adresse sont b1110 00, alors il faut activer la ROM.
 
   
  +
=== The Problem with STF/SFTM and MegaST: The GLUE ===
=== Concrètement on fait comment ? ===
 
  +
With a 256k TOS starting at $E00000, the old GLUE from the previous ST models is no longer suitable. When it sees an address in the range of $E0xxxx, it will never activate the ROM, and therefore, booting is not possible!!!
Le CPU 68000 a des pins correspondant à chaque bit de l’adresse, c’est en activant ces pins (+5v pour «1» et +0v pour «0») que le CPU envoie une adresse sur le bus.
 
Donc si nous récupérons sur le CPU les 6 bits qui nous intéresse, faisons un peu de logique dessus, nous devrions pouvoir décoder facilement.
 
Les 6 pins dont nous avons besoin sont A23,A22,A21,A20,A19 et A18, et ce que nous voulons est alors « Quand A23, A22 et A21 sont à 1 et que A20, A19 et A18 sont à 0, alors il faut activer la ROM ».
 
En logique, si nous appelons le signal pour activer la ROM « ROMCE » par exemple, nous pouvons donc écrire ROMCE=A23 AND A22 AND A21 AND NOT A20 AND NOT A19 AND NOT A18.
 
On y est presque, à deux détails près:
 
* La ROM utilise une « logique négative »: Elle est active quand elle reçoit un 0 et inactive quand elle reçoit un 1. Il faut donc réécrire l’équation logique ci-dessus en NOT ROMCE=A23 AND A22 AND A21 AND NOT A20 AND NOT A19 AND NOT A18.
 
* DTACK: Le 68000 a besoin d’un signal « DTACK’ » qui lui dit que le périphérique a mis des données pour lui sur le bus. Les puces de ROM n’ont pas cette fonctionnalité, c’est normalement la GLUE qui fait le travail pour elle. Donc là aussi, il va falloir le faire nous même. DTACK étant aussi en logique négative, et à activer quand on active la ROM, il suffit donc d’écrire DTACK = ROMCE.
 
* Dernier petit point « pénible » concernant DTACK, il est donc actif quand son voltage est à 0, mais contrairement à ROMCE, quand il est inactif il ne doit pas être à +5v, mais simplement pas connecté du tout. Pour ça, il suffira de mettre une petite diode devant ou d’utiliser des circuits logique « open collector ».
 

Bon terminé avec la théorie, quelles sont les solutions ?
 
   
  +
=== How to Make TOS 2.06 Work in an STF? ===
=== Solutions de décodage ===
 
  +
If the GLUE cannot correctly decode the new ROM addresses, one might think that changing the GLUE is the solution. Unfortunately, Atari never released a new GLUE for the STF, and the one from the STE is not compatible.
Il existe soit des solutions « toute faite », soit il faut faire soit même ce qui sera traité dans une prochaine partie sur le DIY.
 
Pour les solutions « toute faite » il ya malheureusement une mauvaise nouvelle pour les possesseurs de STF et STFM: Pour faire le décodage, il va falloir aller prendre des signaux sur le CPU et donc les solutions clef en main vont '''nécessiter de dé-souder le CPU''', de mettre à la place la carte de décodage et de remettre le CPU sur un support sur la carte de décodage.
 
Il faudra aussi dans la plupart des cas aller souder quelques fils pour récupérer le signal d’origine envoyé par la GLUE et bien évidemment pour envoyer le signal de notre décodeur vers la ROM.
 
Si vous avez un Mega ST, c’est votre jour de chance, le MegaST a un connecteur reprenant tous les signaux du CPU, il va donc suffit de brancher la carte dans ce connecteur.
 
Voici quelques exemples de cartes de décodage, il en existe sûrement plein d’autre, n'hésitez pas à me les signaler pour que je les ajoute.
 
* Chez Exxos: Décoder 2.06 (25£), Trudie IDE ave interface IDE en plus(45£)
 
* Chez Olivier Gossuin: CompactFlash With TOS 2.06 and RTC avec IDE, et horloge (25€). Attention, plus possible de fermer le ST!!!
 
* Chez Fairlite: Atari MonSTer avec 2xIDE, décodeur 2.06, ROM flashable par logiciel, horloge RTC et mémoire « ALT-RAM » de 8Mb (70£). C’est la seule qui puisse officiellement se connecter via le Megabus d’un Mega ST moyennant un petit adaptateur (25£). Je n’ai pas testé mais je suppose que cet adaptateur doit aussi fonctionner avec les autres cartes listées ici.
 
* Chez Czietz: Lightning ST avec USB, IDE et décodeur (110€), Cloudy décoder avec sa propre ROM, flashable par logiciel(???€)
 
   
  +
So, we'll need to assist our GLUE and activate the ROM ourselves in the new address range. For this, we need to use some logic circuits that will interpret the addresses and send the correct signal to the ROM in place of the GLUE.
Toutes ces solutions sont somme toute assez compliquées à mettre en place et assez cher juste pour utiliser un TOS 2.06. Si vous voulez un TOS évolué, apportant la plupart des avantages du 2.06 (et plus), vous pouvez toujours démarrer un EmuTOS depuis une disquette.
 
  +
Sinon, les composants nécessaire à faire un décodeur coûtent quelques centimes et avec un peu d’huile de coude il est assez simple d’en faire un soi même.
 
  +
As the addresses $000000-$000007 behave the same way whether you're using a 192k or 256k ROM, we won't need to worry about them; we can simply take the signal from the GLUE, which is already doing the job for these addresses.
Nous verrons ça dans une prochaine partie dédiée au DIY.
 
  +
  +
=== How to Decode Addresses $E00000-$E3FFFF? ===
  +
Addresses have been represented in hexadecimal so far, but Atari only understands binary. Fortunately, hexadecimal has a convenient property: each symbol (letter or number) corresponds exactly to a group of 4 binary bits.
  +
  +
So, if we transcribe our 256k TOS addresses, it would look like this: b1110 0000 0000 0000 0000 0000 - b1110 0011 1111 1111 1111 1111... a bit long and impractical. If we express the problem as needing to activate the ROM when the address starts with $E0-$E3 in binary, it becomes simpler. We can say that if the beginning of the address in binary can be written as: b1110 0000 - b1110 0011, then the ROM should be activated. Notice that within the binary address range above, only the last two bits vary within the ROM's address range. So, we can summarise by saying that if the first 6 bits of the address are b1110 00, then the ROM should be activated.
  +
  +
=== How to Implement this ? ===
  +
The 68000 CPU has pins corresponding to each bit of the address, and it sends an address on the bus by activating these pins (+5v for "1" and +0v for "0"). If we take the 6 bits we're interested in from the CPU, apply some logic to them, we should be able to decode them easily. The 6 pins we need are A23, A22, A21, A20, A19, and A18, and what we want is: "When A23, A22, and A21 are 1, and A20, A19, and A18 are 0, then activate the ROM." In logic terms, if we call the signal to activate the ROM "ROMCE," for example, we can write: ROMCE = A23 AND A22 AND A21 AND NOT A20 AND NOT A19 AND NOT A18.
  +
  +
We're almost there, with two details remaining:
  +
* The ROM uses "negative logic": It's active when it receives a 0 and inactive when it receives a 1. So, we need to rewrite the above logic equation as NOT ROMCE = A23 AND A22 AND A21 AND NOT A20 AND NOT A19 AND NOT A18.
  +
* DTACK: The 68000 requires a "DTACK'" signal, which tells it that the device has placed data on the bus for it. ROM chips don't have this functionality; normally, the GLUE does this work for them. So here too, we need to do it ourselves. Since DTACK is also in negative logic and should be activated when we activate the ROM, we simply write DTACK = ROMCE.
  +
  +
One last "annoying" point about DTACK: it's active when its voltage is 0, but unlike ROMCE, when it's inactive, it should not be at +5v but simply not connected at all. To achieve this, you can place a small diode in front or use "open collector" logic circuits.
  +
Now, enough with the theory, what are the solutions?
  +
  +
=== Decoding solutions ===
  +
There are both "ready-made" solutions and DIY solutions, which will be covered in a future part. For the "ready-made" solutions, there's unfortunately bad news for STF and STFM owners: to perform the decoding, you'll need to take signals from the CPU, so off-the-shelf solutions '''will require desoldering the CPU''', replacing it with the decoding card, and then putting the CPU back onto a socket on the decoding card.
  +
  +
In most cases, you'll also need to solder a few wires to retrieve the original signal sent by the GLUE and, of course, send the signal from your decoder to the ROM. If you have a Mega ST, you're in luck, as the MegaST has a connector that includes all the CPU signals, so you can simply plug the card into this connector.
  +
  +
Here are some examples of decoding cards, and there are probably many more. Feel free to let me know if you'd like me to add others.
  +
Here are some examples of decoding cards, and there are probably many more. Feel free to let me know if you'd like me to add others.
  +
* From Exxos: Decoder 2.06 (£25), Trudie IDE with an additional IDE interface (£45).
  +
* From Fairlite: Atari MonSTer with 2xIDE, 2.06 decoder, flashable ROM via software, RTC, and 8Mb "ALT-RAM" (£70). This is the only one that can officially connect via the Megabus of a Mega ST with a small adapter (£25). I haven't tested it, but I assume this adapter should also work with the other cards listed here.
  +
* From Czietz: Lightning ST with USB, IDE, and decoder (£110), Cloudy decoder with its own flashable ROM (price not specified).
  +
  +
All these solutions are somewhat complicated to set up and somewhat expensive just to use TOS 2.06. If you want an advanced TOS that brings most of the benefits of 2.06 (and more), you can always boot EmuTOS from a floppy disk. Otherwise, the components needed to make a decoder cost a few cents, and with a bit of elbow grease, it's quite simple to make one yourself. We'll cover that in a future section dedicated to DIY.
   
 
== ''DIY'' ==
 
== ''DIY'' ==
 
 
  +
So, you've decided to update your TOS, but you've found that the version 1.4 of the TOS in Bulgarian that you're interested in is only available in a 2-chip version, and you need 6 chips? No worries; let's see how you can prepare your TOS yourself.
Finalement vous avez décidé de mettre à jour votre TOS mais sur internet cette version 1.4 du TOS en Bulgare qui vous intéresse tant n’est vendue qu’en version 2 puces et il vous en faut 6?
 
  +
Qu’a cela ne tienne, regardons aujourd’hui comment préparer vous même votre TOS.
 
Tout d’abord si vous avez un STE ou Mega STE je vous conseille l’excellent tuto vidéo de Vincent Rivière[https://youtu.be/anAocJsDD_A ici:]
+
Firstly, if you have an STE or Mega STE, I recommend Vincent Rivière's excellent video tutorial[https://youtu.be/anAocJsDD_A ici:]
  +
  +
=== What Chips to Use? ===
  +
The original chips in your Atari are typically ROMs with factory-programmed software that cannot be modified. Since we (at least I) don't have a factory to burn new ones, we need to use a different technique. For this, there are PROMs, EPROMs, and EEPROMs that will make our task much simpler.
   
=== Quelles puces utiliser? ===
+
=== Types of chips ===
Les puces d’origine de vos Atari sont dans la plupart des cas des ROM dont le logiciel a été gravé en usine et qui ne peuvent donc pas être modifiées. Comme nous (en tous cas moi) n’avons pas d’usine à disposition pour en graver de nouvelles, il va falloir utiliser une autre technique.
 
Pour cela, il existe les PROMSs, EPROMs, et EEPROMs qui vont nous rendre la tâche beaucoup plus simple.
 
   
  +
* PROMs are chips that can be programmed once and retain their programming for life. They have long been replaced by EPROMs.
=== Les types de puces ===
 
* Les PROMs dont des puces qui peuvent être programmées une fois et qui gardent ensuite leur programmation à vie. Elles ont depuis longtemps été remplacées par les EPROM.
 
   
  +
* PROMs can be erased using UV light and are recognizable by their small transparent plexiglass window for erasing the content
* Les EPROM peuvent, elles être effacées grace à des UVs et sont reconnaissables à leur petite fenêtre transparente en plexiglass permettant justement d’effacer le contenu .
 
 
[[File:Eprom.jpg|250px]]
 
[[File:Eprom.jpg|250px]]
   
* Les EEPROMs sont des EPROMs effaçable électriquement, donc plus besoins d’UV, un simple programmateur suffit, voir dans certains cas un Arduino.
+
* EEPROMs are electronically erasable EPROMs, so there's no need for UV light; a simple programmer will do, or in some cases, an Arduino.
   
=== Quelle capacité ? ===
+
=== Which size ?===
  +
NWe've seen that TOS 1.0, 1.02, and 1.4 have a size of 192KB, so for a 6-chip configuration, you'll need 32KB chips (192 / 6). For a 2-chip configuration, you'd need 96KB chips, but those don't exist. So, we'll go for 128KB chips.
Nous avons vu que les TOS 1.0, 1.02 ET 1.4 avait une taille de 192ko donc pour une configuration 6 puces il va falloir des puces de 32ko (192 / 6).
 
Pour une configuration 2 puces il nous faudrait des puces de 96ko...qui n’existent pas. Donc nous partirons sur des puces de 128ko.
 
La capacité des EPROM se calculant en bit et non en octets, pour 32k octets il nous faudra donc une puce de 256k bits et pour 128k octets ce sera 1M bits. (Je ne vous ferais pas l’affront de rappeler qu’il y a 8 bits dans 1 octet 😁)
 
   
  +
EPROM capacity is calculated in bits, not bytes, so for 32KB bytes, you'd need a 256K-bit chip, and for 128KB bytes, it's 1M-bit. (I won't remind you that there are 8 bits in 1 byte 😁)
=== Quelle vitesse ? ===
 
  +
Quand l’Atari veut lire une information en ROM, le CPU va envoyer l’adresse de la donnée à la ROM et attendre une réponse, mais il n’est pas très patient. Il faut donc que la ROM réponde suffisamment rapidement !
 
  +
=== Which speed ? ===
Notre CPU est cadencé à 8 MHz (16MHz dans le cas des Mega STE), ce qui veut dire que ses actions sont cadencées au rythme d’une toutes les 125 nanosecondes.
 
  +
When the Atari wants to read information from ROM, the CPU sends the address of the data to the ROM and waits for a response, but it's not very patient. So, the ROM needs to respond quickly enough! Our CPU runs at 8 MHz (16 MHz in the case of the Mega STE), which means its actions occur at a rate of one every 125 nanoseconds. The 68000's operation (you can read the full documentation) is such that after putting an address on the bus, it waits for 2 cycles before reading the response (See timing figure below).
Le fonctionnement du 68000 (je vous laisse lire la doc complète) est tel qu’après avoir mis une adresse sur le bus, il patiente 2 cycles avant de lire la réponse (voir figure des timings 68000).
 
   
 
[[File:Timing 68k.jpg|thumb|Timings 68000]]
 
[[File:Timing 68k.jpg|thumb|Timings 68000]]
Pour ceux qui veulent creuser le sujet, voici la documentation du 68000: https://www.nxp.com/docs/en/reference-manual/MC68000UM.pdf
 
Il nous faut donc des puces qui répondent en moins de 250ns (2 cycles de 125ns).
 
   
  +
For those who want to dive deeper into this, here's the 68000 documentation: https://www.nxp.com/docs/en/reference-manual/MC68000UM.pdf So, we need chips that respond in less than 250ns (2 cycles of 125ns).
Dans les faits, il faut prendre des puces plus rapides, du type 150ns ou 70ns.
 
  +
En effet, nous avons vu précédemment qu’en fonction de l’adresse envoyée par le CPU la GLUE de l’Atari allait activer le bon périphérique en lui envoyant un signal.
 
  +
In practice, you should use chips that are faster, like 150ns or 70ns.
Mais notre ROM met du temps à se réveiller et il faut donc ajouter ce temps de réveil à son temps de réponse.
 
  +
As we've seen before, depending on the address sent by the CPU, the GLUE will activate the right peripheral by sending a signal. But our ROM needs some time to wake-up, so we need to add this to its response time.
Si nous prenons une EEPROM avec un temps de réponse de 200ns, en lisant son manuel (voir datassent ci-dessous), nous voyons qu’elle a un temps de « réveil » (OE to Output Delay) de 75ns, donc notre CPU recevra ses données 75ns+200ns après avoir envoyé l’adresse, c’est trop tard.<br>
 
  +
If we take an EEPROM with a 200ns response time, its data sheet (see below) explains that the wake-up time (OE to Output Delay) is 75ns, so our CPU will get back data 75ns+200ns after sending the address... it's too late.<br>[[File:Datasheet eprom.jpg|500px]]
[[File:Datasheet eprom.jpg|500px]]
 
  +
  +
=== Recommended chips to buy for a 6 chips configuration: AT27C256R-70PU. ===
  +
These are EPROMs, but they cannot be erased because they lack the plexiglass window. This is one of the few models that can still be found in the correct format for the Atari and at an affordable price (around €2 each). You can buy them from Mouser, DigiKey, or other electronic component distributors, but I would advise against eBay or AliExpress for this type of component.
  +
  +
=== Recommended chips to buy for a 2 chips configuration: SST39SF010
  +
These are EEPROMs based on flash memory, and they are also readily available, typically between €1 and €2 each. They can be reprogrammed in case of errors. They do have one small issue: they have 32 pins instead of 28. In an STE, this is not a problem; you just need to change the jumpers. However, in an STF or Mega ST, it's 4 pins too many for the socket, so you'll need to use a saw or, more precisely, a soldering iron.
   
  +
=== Preparing a TOS for Flashing ===
=== Les puces à acheter pour une configuration 6 puces: AT27C256R-70PU. ===
 
Il s’agit d’EPROM mais elles ne peuvent pas être effacées car il manque la fenêtre en plexiglass. C’est un des rares modèle que l’on trouve encore avec le bon format pour l’Atari et à un prix abordable(~2€ pièce). Elles peuvent être achetées chez Mouser, DigiKey ou autres distributeurs de composants électroniques mais je vous déconseille eBay ou AliExpress pour ce genre de composants.
 
   
  +
Retrieve the TOS to Flash: It may seem obvious, but you'll need to find the image of the TOS you want to flash. For this, there's nothing like a search on the Internet, and if you want the full package, the TOSEC archives (https://www.tosecdev.org) should help you. For non-Atari TOS versions, you'll need to get them from their respective sites; see the links in a previous tutorial. ''A small piece of advice: once you've found the image, '''test it with an emulator to ensure it works!''' I've wasted a lot of hours and fried a certain number of EPROMs simply because the image of TOS 1.4 FR found on the Internet was corrupted.''
=== Les puces à acheter pour une configuration 2 puces:: SST39SF010
 
Ce sont des EEPROM basées sur de la mémoire flash, on les trouve là aussi facilement entre 1€ et 2€ pièce et peuvent être reprogrammées en cas d’erreur.
 
Elles ont juste un tout petit défaut : elles ont 32 broches et non 28. Dans un STE, ce n’est pas un problème, il faut juste changer les jumpers, mais dans un STF ou Mega ST ça fait 4 broches de trop par rapport au support, il va falloir utiliser la scie...ou plutôt le fer à souder.
 
   
=== Préparer un TOS pour le Flashage ===
 
   
  +
==== Splitting your TOS ====
Récupérer le TOS à flasher: ça peut sembler évident, mais il va vous falloir trouver l’image du TOS que vous voulez flasher. Pour ça, rien ne vaut une recherche sur Internet et si vous voulez la totale, les archives TOSEC (https://www.tosecdev.org ) devraient vous aider. Pour les TOS non Atari il faut les récupérer sur leurs sites, voir les liens dans un précédent tuto.
 
  +
The image you've retrieved usually comes in the form of a .img or .bin file of 192KB or 256KB, but you'll need to fit it onto several chips, so you need to split it.
''Un petit conseil, une fois l’image trouvée, '''testez-la''' avec un émulateur pour vous assurez qu’elle fonctionne! J’ai perdu pas mal d’heures et grillé un certain nombre d’EPROM simplement parce que l’image du TOS 1.4 FR trouvée sur Internet était corrompue.''
 
   
==== Découper son TOS ====
+
===== The HI/LO Split =====
  +
Whether your Atari uses 2 or 6 chips, you'll need to start by splitting the image into two: HI and LO. This split isn't just a simple separation of the original file into two halves; it's a bit more complicated.
L’image que vous avez récupéré se présente généralement sous la forme d’un fichier .img ou .bin de 192k ou 256k mais il va falloir le faire rentrer sur plusieurs puces, il faut donc le découper.
 
   
  +
The Atari has a 16/32-bit CPU, meaning it internally processes data in 32-bit groups but communicates with the outside world in 16 bits. However, our EPROMs only communicate in 8 bits, so what do we do? It's simple: when the CPU requests data for an address, that address will be presented simultaneously to each of the EEPROMs. One will send the first 8 bits, while the other will send the next 8 bits. And there you go; we're sending 16 bits to the CPU.
# '''Le découpage HI/LO'''
 
  +
If we look at the first bytes of a TOS 1.4, as seen previously: '''60''' ''2E'' '''01''' ''04'' '''00''' ''FC'' '''00''' ''30'', we'll put '''60 01 00 00''' in the HI ROM and ''2E 04 FC 30'' in the LO ROM.
Que votre Atari utilise 2 ou 6 puces, il faut dans tous les cas commencer par découper l’image en deux, HI et LO. Ce découpage n’est pas une simple séparation du fichier d’origine en deux en coupant par le milieu, c’est un peu plus compliqué.
 
En effet, l’Atari a un CPU 16/32 bits, c’est à dire qu’en interne il traite les données par groupes de 32bit mais communique avec l’extérieur sur 16bits. Mais nos EPROMS ne communiquent, elles que sur 8 bits, comment faire ?
 
C'est simple: quand le CPU demande les données pour une adresse, cette adresse va être présentée en même temps à chacune des EEPROMs et l’une va renvoyer les 8 premiers bits tandis que l’autre va renvoyer les 8 bits suivants. Et voilà, nous envoyons bien 16bits au CPU.
 
Si nous reprenons les premiers octets d’un TOS 1.4 comme vu précédemment '''60''' ''2E'' '''01''' ''04'' '''00''' ''FC'' '''00''' ''30'', nous allons mettre '''60 01 00 00''' dans la ROM HI et ''2E 04 FC 30'' dans la ROM LO.
 
   
  +
When the CPU requests the content of address $000000, the first chip will send 60, and the second will send 2E, so our 68000 will receive 60 2E, just as expected. The easiest way to perform the cutting of your TOS image is to use one of the following software options:
Quand le CPU demandera le contenu de l’adresse $000000, la première puce enverra 60 et la seconde enverra 2E, notre 68000 recevra donc 60 2E, soit 16 bits comme prévu.
 
  +
* CartMan for Windows (https://github.com/TzOk83/CartMan)
Le plus simple pour effectuer le découpage de votre image de TOS est d’utiliser un des logiciels suivants :
 
  +
* srec_cat (http://srecord.sourceforge.net/download.html ) for Linux/macOS.
* CartMan pour Windows (https://github.com/TzOk83/CartMan)
 
* srec_cat (http://srecord.sourceforge.net/download.html ) pour Linux/macOS.
 
   
===== CARTMAN =====
+
====== CARTMAN ======
# Démarrez CartMan
+
# Launch CartMan
# Sélectionnez le premier onglet « Split L/H »
+
# Select the first tab: « Split L/H »
# Renseignez « Input File » avec le fichier ROM à splitter. (Attention, CartMan filtre les fichiers proposés sur l’extension « .bin ». Si votre ROM possède une autre extension, changez le filtre.)
+
# Fill « Input File » with the name of the ROM file to split. (Note that CartMan filters files based on the ".bin" extension. If your ROM has a different extension, change the filter.)
 
# GO!

 
# GO!

'''Petite subtilité''': CartMan est fait pour des systèmes "Little Endian" mais notre Atari et son 68000 sont "Big Endian". Donc ce que CartMan va appeler "LO" sera en fait "HI" pour nous et vice-versa.
+
'''A small pitfall:''' CartMan is designed for "Little Endian" systems, but our Atari and its 68000 are "Big Endian." So, what CartMan calls "LO" will actually be "HI" for us and vice versa. Therefore, remember to rename your files after generation by CartMan.</br>
Pensez donc à bien renommer vos fichiers après génération par CartMan.</br>
 
 
[[File:Cartman 1.jpg|500px]]
 
[[File:Cartman 1.jpg|500px]]
   
===== SREC_CAT =====
+
====== SREC_CAT ======
# Ouvrez un terminal
+
# Open a terminal window
# Placer vous dans le répertoire contenant votre image de TOS (je vais appeler le fichier TOS.img par exemple)
+
# Navigate to the directory containing your TOS image (let's call the file TOS.img, for example)
# Pour la ROM HI: <pre> srec_cat <VOTRE FICHIER ROM> -binary -split 2 0 -o HI.bin -binary </pre>
+
# For HI ROM: <pre> srec_cat <ROM FILE NAME> -binary -split 2 0 -o HI.bin -binary </pre>
# Pour la ROM HI: <pre> srec_cat <VOTRE FICHIER ROM> -binary -split 2 1 -o LO.bin -binary </pre>
+
# For LO ROM: <pre> srec_cat <ROM FILE NAME> -binary -split 2 1 -o LO.bin -binary </pre>
   
Vous avez maintenant vos deux images HI et LO. Si vous avez besoins d’ une version 2 puces, vous êtes maintenant prêts à flasher votre TOS.
+
You now have your two HI and LO images. If you need a 2-chip version, you're now ready to flash your TOS.
   
==== Découpage 6 puces ====
+
===== 6 Chips split =====
  +
For a 6-chip version, you need to split the files again into LO0, LO1, LO2, HI0, HI1, HI2. This second split is simpler, as you simply divide it into 3 equal pieces.
Pour une version 6 puces, il faut de nouveau découper les fichiers en 3 pour obtenir LO0,LO1,LO2,HI0,HI1,HI2.
 
Ce deuxième découpage est plus simple, car là on découpe simplement en 3 morceaux égaux.
 
   
===== Découper en 6 images avec CartMan(Windows): =====
+
====== Split in 6 images with CartMan(Windows): ======
# Démarrez CartMan
+
# Launch CartMan
# Sélectionnez le 4eme onglet « Split ROMs »
+
# Select the 4th tab « Split ROMs »
# Renseignez « Input File » avec le fichier ROM HI à splitter
+
# Fill « Input File » with the name of your ROM HI file to split
# Sélectionnez 32kB
+
# Select 32kB
 
# GO!
 
# GO!
# Répétez l’opération avec le fichier de ROM LO.

+
# Repeat this operation with ROM LO file.

 
</br>
 
</br>
 
[[File:Cartman 2.jpg|500px]]
 
[[File:Cartman 2.jpg|500px]]
===== Découper en 6 images avec « split »(Linux, macOS): =====
 
# Ouvrez une fenêtre terminal
 
# Placer vous dans le répertoire contenant vos deux images HI et LO.
 
# Utilisez split pour le HI: <pre> split -b 32k TOSHI.img TOSHI </pre>
 
# Utilisez split pour le LO: <pre> split -b 32k TOSLO.img TOSLO </pre>
 
   
  +
====== Split in 6 images with « split »(Linux, macOS): ======
Et voilà, vous avez maintenant 6 fichiers de 32ko prêts à flasher.
 
  +
# Open a terminal window
  +
# Navigate to the directory containing your two HI and LO images.
  +
# Use split for the HI: <pre> split -b 32k TOSHI.img TOSHI </pre>
  +
# Use split for the LO: <pre> split -b 32k TOSLO.img TOSLO </pre>
   
  +
There you go; you now have 6 files of 32KB each ready for flashing.
   
=== Flasher son TOS ===
+
=== Flashing your TOS ===
Ça y est, vous avez des images de TOS prêtes et les puces pour les flasher, voyons ce qu’il vous faut.
+
You now have your prepared TOS images and the chips to flash them. Let's see what you need.
   
==== Le programmateur d’EEPROM ====
+
==== EEPROM Programmer ====
  +
To transfer your prepared TOS images from the previous steps to your chips, you'll need an EEPROM programmer. You have two options: buy one ready-made or build one with an Arduino.
Pour transférer vos images de TOS préparées lors des étapes précédentes vers vos puces, il va vous falloir un programmateur d’EEPROM.
 
Vous avez deux solutions: En acheter prêt à l’emploi ou en fabriquer un avec un Arduino.
 
   
===== Fabriquer son programmateur: =====
+
===== Building Your Programmer: =====
  +
I haven't tested this solution, but here are two links to Arduino projects that allow programming of 27C256 and more. There are many projects of this type, and a Google or GitHub search for "Arduino EPROM programmer" will provide you with many solutions. Make sure to check that the chosen setup can program the EPROM/EEPROM model you need for your Atari.
Je n’ai pas testé cette solution mais voici deux liens vers des montages Arduino qui permettent de programmer des 27C256 et plus.
 
Il existe pas mal de projets de ce type, et une recherche de « Arduino EPROM programmer » sur Google ou GitHub vous fournira bon nombre de solutions.
 
Pensez à vérifier que le montage choisis est capable de programmer le modèle d’EPROM/EEPROM nécessaire pour votre Atari.
 
 
https://github.com/StormTrooper/eeprom_programmer
 
https://github.com/StormTrooper/eeprom_programmer
 
https://github.com/TomNisbet/TommyPROM
 
https://github.com/TomNisbet/TommyPROM
   
===== Acheter un programmateur: =====
+
===== Buying a Programmer =====
  +
This is probably the simplest "plug & play" solution, compatible with Windows, Mac, or Linux. These programmers can be used for flashing TOS, but also for thousands of other circuits, reading and writing EPROMs, testing chips, and programming GALs (for creating a TOS 2.06 decoder, but we'll cover that later). In terms of products, the TL866II+ is the most straightforward reference, offering the best quality-price ratio and available under various Chinese brands. You can expect to pay around thirty euros on AliExpress and around fifty on Amazon. Different configurations are available, with the difference being the included adapters, but for TOS, you don't need any adapters.
Sûrement la solution la plus simple, « plug & play » aussi bien sous Windows que sur Mac ou Linux. Ces programmateurs pourrons vous servir pour flasher le TOS, mais aussi des milliers d’autres circuits, lire et jumper des eproms, tester des chips et aussi programmer des GALs (pour faire un décodeur de TOS 2.06, mais nous verrons ça plus tard).
 
En terme de produit, la référence la plus simple est le TL866II+, c’est le meilleur rapport qualité prix disponible et vous le trouverez sous différentes marques chinoises. Il faut compter une trentaine d’euros sur AliExpress et une cinquantaine sur Amazon. Il y a différentes configurations disponibles, ce qui change ce sont les adaptateurs livrés avec, mais pour les TOS vous n’avez besoin d’aucun adaptateur.
 
   
 
[[File:Minipro .jpg|500px]]
 
[[File:Minipro .jpg|500px]]
 
 
   
==== Le flashage: ====
+
==== Flashing ====
   
 
===== Windows : =====
 
===== Windows : =====
   
# Branchez le programmateur sur le port USB de votre PC
+
# Connect the programmer to your PC's USB port.
  +
# Launch the XGPro software that comes with the programmer.
# Lancez le logiciel XGPro fournis avec le programmateur
 
  +
# Select the EEPROM model you will be using ("Select IC").
# Sélectionnez le modèle d’EEPROM que vous allez utiliser (« Sélect IC »)
 
  +
# Load the TOS image you want to flash (no options to modify).
# Chargez l’image de TOS que vous voulez flasher (aucune option à modifier)
 
# Insérez votre EEPROM dans le programmateur, dans le bon sens (vérifiez la petite encoche) et verrouillez la avec le petit levier [[File:Programer usage.jpg|250px]]
+
# Insert your EEPROM into the programmer in the correct orientation (check the small notch) and lock it in place with the small lever [[File:Programer usage.jpg|250px]]
# Programmez l’EEPROM (« Device »-> « Program »).
+
# Program the EEPROM (« Device »-> « Program »).
# Collez une petite étiquette sur le dessus de l’EEPROM avec la référence (LO-0, LO-1, etc…), cela vous évitera de tester toutes les combinaisons possible quand l’Atari ne démarrera pas 😁
+
# Attach a small label to the top of the EEPROM with the reference (LO-0, LO-1, etc.). This will save you from testing all possible combinations when the Atari doesn't start.😁
  +
# Repeat the process from step 5 for the following EEPROMs.
# Répétez l’opération depuis l’étape 5 pour les EEPROMs suivantes.
 
   
 
[[File:Xgpro screenshot.jpg|500px]]
 
[[File:Xgpro screenshot.jpg|500px]]
   
===== Mac ou Linux
 =====
+
===== Mac or Linux
 =====
 
 
Le logiciel fourni avec le programmateur n’existe qu’en version Windows, mais une alternative open-source est disponible sur Linux et macOS: minipro (https://gitlab.com/DavidGriffith/minipro/).
+
The software provided with the programmer is only available for Windows. However, an open-source alternative is available on Linux and macOS: minipro (https://gitlab.com/DavidGriffith/minipro/).
   
# Installez « minipro » (voir la page GitLab pour les instructions).
+
# Install « minipro » (see the GitLab page for instructions).
# Ouvrez un Terminal et placez-vous dans le répertoire contenant vos images de TOS à flasher.
+
# Open a Terminal and navigate to the directory containing your TOS images to be flashed.
# Branchez le programmateur sur votre machine
+
# Connect the programmer to your machine.
# Vérifiez que votre programmeur est bien reconnu:<pre> minipro -k </pre>
+
# Verify that your programmer is detected:<pre> minipro -k </pre>
  +
# Insert your EEPROM into the programmer in the correct orientation (check the small notch) and lock it in place with the small lever (see picture)
# Insérez votre EEPROM dans le programmateur, dans le bon sens (vérifiez la petite encoche) et verrouillez la avec le petit levier
 
# (Optionnel) Vérifiez que l’EEPROM est bien insérée et reconnue: <MODELE D’EEPROM> correspond bien évidemment à celui que vous avez choisi, AT27C256, SST39SF010, etc…:
+
# (Optional) Verify that the EEPROM is properly inserted and recognized. Replace <EEPROM MODEL> with the one you have chosen, such as AT27C256, SST39SF010, etc.:
## <pre> # minipro -p <MODELE D’EEPROM> -D </pre>
+
## <pre> # minipro -p <EEPROM MODEL> -D </pre>
## <pre> # minipro -p <MODELE D’EEPROM> -z </pre>
+
## <pre> # minipro -p <EEPROM MODEL> -z </pre>
# Programmez votre EEPROM: <pre> # minipro -p <MODELE D’EEPROM> -w <IMAGE TOS A FLASHER> -s 
</pre>
+
# Program your EEPROM: <pre> # minipro -p <EEPROM MODEL> -w <TOS IMAGE TO FLASH> -s 
</pre>
# Le « -s » permet d’ignorer la vérification de la taille du fichier. Dans le cas d’une version 6 puces, ce n’est pas nécessaires, nos 6 images font bien 32k ce qui est la taille d’une AT27C256. 
Dans le cas d’une version 2 puces, les TOS 1.6 ou 2.06 font bien 128k, ce qui est la taille d’une SST39SF010. Par contre, pour un TOS 1.02, 1.04 ou autre TOS 192k, chaque fichier fait 96k, ce qui est plus petit que les 128k d’une SST39SF0101. Ce n’est pas grave, l’espace restant ne sera pas utilisé, mais il faut forcer minipro qui pense que c’est une erreur.
+
# The "-s" option allows you to skip file size verification. In the case of a 6-chip version, this is not necessary, as our 6 images are indeed 32KB in size, which matches the size of an AT27C256. For a 2-chip version, TOS 1.6 or 2.06 is indeed 128KB in size, matching an SST39SF010. However, for a TOS 1.02, 1.04, or other 192KB TOS versions, each file is 96KB, which is smaller than the 128KB of an SST39SF010. This is not a problem; the remaining space will not be used, but you need to force minipro, which thinks it's an error
# Retirez l’EEPROM et collez une petite étiquette sur le dessus de l’EEPROM avec la référence (LO-0, LO-1, etc…), cela vous évitera de tester toutes les combinaisons possible quand l’Atari ne démarrera pas 😁
+
# Remove the EEPROM and attach a small label to the top with the reference (LO-0, LO-1, etc.). This will save you from testing all possible combinations when the Atari doesn't start. 😁
  +
# Repeat the process from step 5 for the following EEPROMs.
# Répétez l’opération depuis l’étape 5 pour les EEPROMs suivantes.
 
   
==== Installez les EEPROMs en version 6 puces (STF) ou 2 puces (STE) ====
+
==== nstalling the EEPROMs in a 6-chip version (STF) or 2-chip version (STE) ====
Suivez les instructions détaillées dans la partie 2 de ce tuto, [[Changing_the_TOS_of_an_Atari_(STF/STE/Mega)/fr#Installer_les_ROMs|ici]]
+
Follow the detailed instructions in part 2 of this tutorial, [[Changing_the_TOS_of_an_Atari_(STF/STE/Mega)#Installing the ROMs|here]]
   
==== Installez les EEPROMs en version 2 puces dans ST/STF/Mega ST ====
+
==== Installing the EEPROMs in a 2-chip version in ST/STF/Mega ST ====
(Je pars du principe que votre machine est prête pour recevoir juste 2 puces, si ce n’est pas le cas la modification est expliquée en partie 2 de ce tuto.)
+
((I assume your machine is ready to receive only 2 chips; if not, the modification is explained in part 2 of this tutorial.)
  +
You can quickly see that it doesn't fit! Your machine has 28-pin sockets, and your chips have 32 pins. You'll need to "modify" the chips to make them fit, but it's not too complicated.
Vous voyez rapidement que ça ne rentre pas ! Votre machine a des supports 28 broches et vos puces ont 32 broches.
 
Il va falloir « bricoler » les puces pour les faire rentrer, mais ce n’est pas trop compliqué.
 
   
  +
First, let's look at the pinout of a 28-pin 1Mb chip and a 32-pin 1Mb chip :
Tout d’abord regardons le brochage d’une puce 1Mb 28 broche et celui d’une puce 1Mb 32 broches (Figure #8):
 
  +
[[File:ROM-SST Comparison.jpg|500px]]
* La plupart des broches sont les mêmes, c’est une bonne nouvelle.
 
  +
* Most of the pins are the same, which is good news.
* Sur le SST39SF010, la broche A16 est en haut à gauche alors que sur la ROM d’origine elle est sur le côté droit.
 
* Le SST39SF010 a un signal « OE# » la ROM d’origine a A16.
+
* On the SST39SF010, pin A16 is in the top-left corner, whereas on the original ROM, it's on the right side.
* Le SST39SF010 a un pin non utilisé (NC) là ou la ROM d’origine reçoit son +5V, tant mieux.
+
* The SST39SF010 has an "OE#" pin where the original ROM has A16.
  +
* The SST39SF010 has an unused pin (NC) where the original ROM receives its +5V, which is good.
* Le +5V du SST est « dans le vide », 3 pins trop haut.
 
  +
* The +5V of the SST is "floating," 3 pins too high.
* Le SST a un signal supplémentaire « WE# » en haut à droite.
 
  +
* The SST has an additional signal, "WE#," in the top-right corner.
   
'''Si nous traitons broche par broche :'''
+
'''If we look at each PIN:'''
* La broche OE# du SST doit être soulevée (doucement) et soudée via un petit fil sur VSS. Il s’agit du signal « Output Enable » et nous voulons que la ROM envoie des données quand elle est sollicité. Comme il s’agit d’un signal qui est actif « low », cela veut dire qu’il doit être connecté à la terre pour être opérationnel,. Donc soudure sur VSS.
+
* The OE# pin of the SST needs to be gently lifted and soldered to VSS with a small wire. This is the "Output Enable" signal, and we want the ROM to send data when requested. Since this is a signal that is active "low," it means it must be connected to ground to be operational. So, solder it to VSS.
* VDD et WE#: WE# correspond à Write Enable, qui permet de programmer cette puce. Comme nous voulons l’utiliser en tant que ROM, il ne faut jamais que ce signal soit actif, et comme il s’agit aussi d’un signal actif « low », cela veut dire que pour être inactif il doit être connecté à du +5v. Ça tombe bien, c’est le pin d’à côté. Un petit blob de soudure devrait suffire entre les pins 31 et 32. 
Comme il faut aussi connecter tout cela au +5v d’origine qui se trouve sur le pin 30, il suffit donc de faire un nouveau blog de soudure pour avoir les 3 pins de connectés ensemble, le pin 30 amenant le +5v au 2 autres.
+
* VDD and WE#: WE# stands for Write Enable, which allows programming this chip. Since we want to use it as a ROM, we must ensure that this signal is never active. Also, it's an active "low" signal, meaning it must be connected to +5V to be inactive. This works well since the next pin is +5V. A small solder blob should suffice between pins 31 and 32. As we also need to connect all of this to the original +5V, found on pin 30, you can simply create a new solder blob to connect the 3 pins together, with pin 30 bringing +5V to the other two.
* A16: il y a deux options, mais dans tous les cas il faut souder un fil sur la broche A16 du SST. Ensuite, vous avez le choix de glisser l’autre bout du fil dénudé dans le support, sous la broche OE# que vous avez soulevée à l’étape 1. Un autre option plus simple: Le support vide d’à côté peut être utilisé, glissez simplement l’autre extrémité du fil dans le pin 22 du support vide et vous avez A16.
+
* A16: Here, there are two options, but in any case, you need to solder a wire to the A16 pin of the SST. Then, you have the choice of slipping the other end of the stripped wire into the socket, under the OE# pin that you lifted in step 1. Another, simpler option: the empty socket next to it can be used; simply slip the other end of the wire into pin 22 of the empty socket, and you have A16.
  +
* Repeat the same operation for the second chip, and you have a working TOS.
* Répétez la même opération pour la deuxième puce et vous avez un TOS qui fonctionne.
 
   
Le schéma reprends ces modifications. Vous pouvez voir sur les photos une puce modifiée, j’ai coupé le bas des pins qui ne rentrent pas dans le support, mais ce n’est pas nécessaire.<br>
+
The diagram shows these modifications. In the photos, you can see a modified chip; I cut the bottom of the pins that don't fit into the socket, but this is not necessary. <br>
[[File:Eprom schematic.jpg |500px]]
+
[[File:Eprom schematic en.jpg|500px]]
 
[[File:Closeup pin 16.jpg|500px]]
 
[[File:Closeup pin 16.jpg|500px]]
 
[[File:Modified eprom.jpg|500px]]
 
[[File:Modified eprom.jpg|500px]]
   
Il ne reste plus qu’à mettre vos nouvelles puces dans la machine et tester que tout fonctionne. Si ce n’est pas le cas, vérifiez vos connections, vérifiez que vous avez bien mis la puce HI dans le support HI et la LO dans le support LO. Et surtout que les pins « qui dépassent » du support sont bien du côté de l’encoche. A ce sujet, ne vous fiez jamais à l’encoche du support mais à celle gravée sur la carte mère. Atari a eu la mauvaise habitude de souder certains supports à l’envers (voir photo).<br>
+
All that's left is to place your new chips in the machine and test that everything works. If not, check your connections, make sure you've placed the HI chip in the HI socket and the LO chip in the LO socket. And make sure that the pins "sticking out" of the socket are on the side of the notch. In this regard, never rely on the socket's notch but on the one engraved on the motherboard. Atari had the bad habit of soldering some sockets upside down (see photo).<br>
 
[[File:Sockets.jpg|500px]]
 
[[File:Sockets.jpg|500px]]
   
'''Vous devez maintenant avoir une machine avec un nouveau TOS "Fait main"'''. Dans la prochaine partie, nous regarderons comment avoir plusieurs TOS dans la même machine et comment faire fonctionner un TOS 2.06 dans un ST/STF/Mega ST.
+
'''You should now have a machine with a "Handmade" TOS.''' In the next part, we will look at how to have multiple TOS versions in the same machine and how to run TOS 2.06 on an ST/STF/Mega ST.
 
   
 
Back to [[Hardware hacks]]
 
Back to [[Hardware hacks]]

Latest revision as of 12:49, 31 December 2023

Hello, here is a tutorial on updating the TOS of our machines. I imagine that for many of you, this will be familiar, but you never know.

Why change the TOS and with this FAQ? Unlike modern PCs and Macs, on the ST, the operating system is stored in ROM chips on the motherboard (except for the very first ST models). The big advantage of this solution is that it allows for nearly instant startup and is quite resilient over the years. However, updating the system requires a hardware operation and the replacement of these chips with new ones. Over the years, Atari has evolved its OS, and different versions of TOS have been released, each bringing its share of new features (and incompatibilities). In addition to Atari's TOS, other versions have emerged, fixing bugs and modernising the OS. Changing the TOS can be interesting for several reasons: having a more modern desktop, fixing bugs, being able to easily boot from an IDE drive or an UltraSatan, etc. The purpose of this FAQ is to gather the necessary information for changing your TOS by yourself, but it does not go into the details of the TOS itself; there are plenty of excellent articles on that. There may be some shortcuts, likely errors, or missing information, so please don't hesitate to let me know.


Different TOS versions

There are several versions of TOS, from the 1.0 of the very first ST models to the 4.04 of the Falcon. Here are a few key advantages and disadvantages of versions 1.x and 2.x. Versions 3.x and 4.x, reserved for TTs and Falcons, are not covered here. As soon as someone gives me one of these machines, I will update the document 😀. I also won't discuss other OSes (Mint, MultiTOS, etc.) since they are not stored in ROM anyway.

TOS Compatibility


TOS Language

You can search everywhere in the menus, there is no option to change the language of your TOS. Each chip contains only one language, and to change it, you need to change your TOS. So if you want your beautiful Mega STE from Germany to speak in the language of Molière, you need to change the TOS. But be aware that the keyboard mapping also depends on the TOS, so if you put a French TOS into an English machine with a QWERTY keyboard, every press of Q will display a beautiful A as on an AZERTY keyboard. Fortunately, there are utilities to change the keyboard: Keyedit, CKBD, or Clocky.

Advantages and disadvantages of different TOS versions

  • TOS 1.0 and TOS 1.02 : The first versions of TOS, considered the most "compatible" with most games. On the downside, there are quite a few small bugs, but more importantly, limited compatibility with hard drives. For example, it will be impossible to have partitions larger than 256MB, a limited number of files per directory, and so on.
    TOS 1.02


  • TOS 1.04: Also known as "Rainbow TOS," it fixes many bugs and allows for easy use of a hard drive but brings some incompatibilities with older games. This is generally not a problem as most games have long been patched to work with versions 1.4 or 2.06, but if you have original floppy disks, they may no longer work.
TOS 1.04


  • TOS 1.06 and TOS 1.62: These are the first versions for STE and only work on STE. Version 1.06 is almost identical to TOS 1.04 but supports STE's new features, and 1.62 is just a bug fix for 1.06, with no major changes. However, 1.06 has a annoying bug, it doesn't save the resolution properly. So it's impossible to start in Medium resolution; you have to manually change it after booting. It's not a big deal but can be quite annoying. Utilities exist to fix this (STE_FIX.PRG to be placed in AUTO).


  • TOS 2.02 and 2.05: The first TOS versions for Mega STE, quite rare.


  • TOS 2.06 : This is the only version of TOS (by Atari) that works on all ST to Mega STE machines... almost. It brings a new desktop with many improvements, extended support for hard drives, and so on. Unfortunately, all of this comes at the expense of compatibility with older software, but once again, most have been patched long ago. However, please note that this version of TOS will not work on an ST, STF, or Mega ST without a hardware modification; we will come back to this.


TOS 2.06 Boot screen
TOS 2.06 Desktop

Other TOS

There are several other TOS versions not produced by Atari that can be installed in your ST:

  • EmuTOS: This is a complete rewrite of TOS, entirely open-source and having good compatibility. EmuTOS brings many new features, greatly improves disk management, and more. Note that if your machine has enough memory, it may not be necessary to install EmuTOS in ROM; it can be loaded from a floppy disk or the hard drive at boot. EmuTOS website
  • Pera Putnik's TOS: Available on PPera's website, these are based on the original TOS but include many bug fixes and the ability to boot TOS 1.4 from an IDE drive, and more. Since they are based on the original TOS, compatibility is good, and there are even "chimera" versions like TOS 1.4 with the desktop of version 2.06 to have new features while maintaining maximum compatibility. PPera's TOS
  • Others: I only know them by name (KaosTOS, SuperTOS, etc.) and therefore can't say much about them.

For those who want to delve deeper into TOS, I recommend the presentation by Vincent Rivière and Frédéric Sagez here.


Change your TOS

Before changing your TOS

Changing your TOS is, in most cases, a fairly simple operation. You just need to replace your chips with new ones containing the version you want, restart the machine, and you're good to go. However, there are a few things to check beforehand to avoid making mistakes and ending up with an unusable new TOS.

First, you need to check the compatibility of the desired version with your machine (see the table in the first part) and also the number of chips for ST/STF/Mega ST or the number of pins on the chips for STE and Mega STE.

2 chips or 6 chips?

On ST/STF or Mega ST machines, the TOS on your Atari may consist of either 6 chips of 32k each or two chips of 128k each. This depends on their manufacturing year and, more importantly, what Atari found cheaper at the time. In any case, you will have 6 slots on the motherboard, but sometimes there will be 6 chips, and in other machines, just 2 with 4 empty slots.

28 or 32 pins ?

For STE and Mega STE machines, there are only 2 slots for the ROM, but these can contain chips with either 28 pins or 32 pins, again depending on what the Tramiels found cheaper on the market. Normally, whether the chip has 32 or 28 pins, the slot on the motherboard is designed for 32 pins. However, if you don't want to solder, the new ROM should have the same number of pins as the old one.

Sockets ?

Avant de changer votre TOS, vérifiez tout de même que vos ROMs sont bien sur des supports et pas directement Before changing your TOS, make sure that your ROMs are on sockets and not directly soldered onto the motherboard. It's very rare to have soldered ROMs, but if that's the case, you'll need to desolder them before replacing them. This is also a good opportunity to add sockets.

Now that you know what you need in terms of version, the number of chips, and the number of pins, what solutions are available to you?

The simple solution: buy your TOS online


The "plug-and-play" solution involves purchasing the corresponding chips online, opening your machine, and replacing the original chips with the new ones. It's not very expensive (between €7 and €15), and you only need a screwdriver to open the machine. As long as you order models that match and are compatible, the operation will be quick and painless (unless you are really clumsy). So, this is the simple solution, requiring no soldering (as long as you choose the same number of chips and the same number of pins), but the choice of TOS is limited to "standard" TOS versions, and not all combinations of version/language/number of chips are readily available.

Dual TOS Cards

With today's better price-to-capacity ratio of EEPROMs compared to 1985, it's relatively easy to put multiple TOS versions into a pair of EEPROMs and choose the desired version when starting the machine. For this purpose, you can find "dual TOS" cards that replace the original chips and contain 256k chips instead of the original 128k ones. A jumper allows you to switch between TOS versions (with the machine turned off!!!). Having two TOS versions allows you to keep a "low" version for maximum compatibility and add a more advanced and less buggy version when you don't need to run your favorite game on an original floppy disk requiring a TOS 1.0 max. These cards are generally a bit more expensive, around €30-€40, are not available as 6-chip versions to my knowledge, and offer a limited number of TOS combinations.

Installing the ROMs

Now that you have your new TOS or Dual TOS card, you need to install it in the machine.

Before performing the operation, take some precautions:

  • Prepare a container, box, or something similar to store the screws. You will have a variety of different-sized screws, and when reassembling the machine, it's best to avoid making mistakes.
  • If you have contact cleaner, it can be a good opportunity to use it on the ROM sockets. These sockets are old and not always of the best quality, and a poor contact can become really troublesome over time.
  • Machine chips are very sensitive to static electricity, so ideally, it's better to use an anti-static bracelet. In practice, if you're not wearing a thick wool sweater, a fleece, or a 1970s nylon undershirt, and if you avoid petting your cat during the operation, you should be fine. In any case, avoid touching the component pins.

Here are the steps to perform the operation:

  1. Open the machine by removing the screws. On STF and Mega ST, it's not necessary to remove the 3 screws from the floppy drive, unlike the STE. Two articles explain well where the screws are and how to open the machine: https://jlgconsult.pagesperso-orange.fr/Atari/opening/index.htm and http://info-coach.fr/atari/hardware/disassembly_fr.php
  2. Disconnect the keyboard, remove it, as well as the shielding and the power supply (this could be an opportunity to check the condition of the capacitors).
  3. Now, you'll need to locate the ROMs :
    1. On an STF, a group of 6 identical chips (or 6 slots with only 2 used) is located near the cartridge port, either under the power supply or under the keyboard, depending on the motherboard version.
    2. On a Mega ST, it's the same: a group of 6 chips or 6 slots, just next to the CPU (the largest chip in the machine).
    3. On an STE, the 2 chips are near the floppy drive.
    4. On a Mega STE, you'll find the ROMs just below the memory modules.
  4. Before removing the chips, I advise you to take a clear photo of the existing chips, sharp enough to read the codes marked on them. Normally, you will have marks on the motherboard indicating which ROM goes into which socket, but you never know.
  5. To remove the chips from their sockets, use a flat and rigid object (e.g., a flathead screwdriver) that you slide between the chip and the socket. Lift the chip gently, without forcing, by lifting a bit on one side, then the other, and so on. Under no circumstances should you press on the small yellow components in front of the chips; these capacitors break very easily!!!
  6. Once the chips are removed, prepare the new ones and insert them in the correct orientation (see the figure) and in the right place:
    1. For 6 chips, you'll have HI0, HI1, Hi2, and LO0, LO1, LO2. You should normally find the same references next to each socket or on the original chips. (I hope you took a photo before removing them 😁)
    2. For 2 chips on an STF, HI goes into HI-0, and LO goes into LO-0.
    3. For 2 chips on an STE, you only have 2 chips to replace; HI and LO are normally marked on the motherboard.

And there you go, it's done.

I strongly recommend testing your machine before putting the shielding back on and screwing everything back in place!!!!

On an STF or Mega ST, remember to reconnect the keyboard before starting; otherwise, your ears won't like it. On a machine with TOS 2.06, a floppy drive must be connected, or you will get 4 bombs after the memory test.

If it doesn't work, check that the chips are securely seated in the sockets, and if you had to do any soldering, check each solder joint. If it works, you can close the machine and enjoy your new TOS.

Finally, if you really haven't found the TOS you need or simply want to do more tinkering, you can create your own chips, including a Dual or even Quad TOS, but that's for the next part ...

What to do if you can't find the right TOS combination?

If by chance you have a 6-chip TOS, and the new one is only available in a 2-chip format, all hope is not lost. The same goes if you have 32-pin chips to put in an STE that originally had 28-pin ones. But you will need to use a soldering iron.

Switching from 6 chips to 2 chips and vice versa for ST/STF/MegaST

Please note that certain versions of STF motherboard (e.g., C070523) cannot be modified easily. They lack both the 74LS11 chip and a socket for it, so the process will become more complicated, and I won't address it here. For these boards, Dual TOS is still possible but in a DIY version, which I will cover in the next part dedicated to DIY.

Here's what you need to do:

  1. First, if you are using 6 chips, check if your motherboard has a 74LS11 chip (U68 on the board). If not, you'll need to add one to switch to 2 chips. A 74LS11 can be found for a few cents online, and you can also replace it with a 74ACT11, 74F11, or 74ALS11, but make sure you order a PDIP-14 version. Then, get some desoldering wick, a good soldering iron, and you're ready for step 2 (keep the iron on as you'll need it).
  2. For ST/STF: Locate the "BLOBS" on the motherboard, usually near the ROMs. They come in pairs, labeled 1M and 256. On an ST with 6 chips, the 256 Blob will be covered in solder, while the 1M won't be. On an ST with 2 chips, it's the opposite. To switch from one configuration to the other, simply reverse the Blob that is soldered and the one that isn't. Use some desoldering wick on one side and a drop of solder on the other, and you're done. You don't need to be a soldering pro to make this change.
  3. For MegaST: On the MegaST, there are no BLOBS, but there are 3 jumpers on the motherboard (see photo


Switching from 28-pin chips to 32-pin chips for STE

Here, you'll need to locate jumpers on the motherboard, slightly to the right of the ROMs (see photo). They are labeled W102, W103, and W104 and look like vertically soldered resistors. I strongly recommend removing them and replacing them with actual jumpers, as this will greatly simplify any future changes or reinstallation of the original ROMs.

Here are the possible configurations of these jumpers that you'll need to set according to your new chips.

Using TOS 2.06 in an STF, STFM or Mega ST

I mentioned in the previous parts that TOS 2.06 is compatible with STF, STFM, or Mega ST but requires a hardware modification. Today, we will see why the machine needs modification and how to do it. The first part explains the "why" for the curious. If you're just interested in the solution, you can skip directly to the "Decoding Solutions" section to save some time.

Atari and Its Peripherals

Our beloved Atari is not just a CPU and memory; it also has several peripherals to communicate with the outside world. To communicate with these peripherals, the Atari uses memory addresses or specific address ranges, and each read or write to these addresses is sent to the corresponding peripheral (referred to as "memory-mapped peripherals"). For example, an address between $000008 and $3FFFFFF will be in RAM memory, an address between $FA0000 and $FB0000 will be in the cartridge port, $FFFC00 and $FFFC06 will be for the keyboard or MIDI, and so on. The conductor of all this is the GLUE, one of the significant chips in your Atari, which activates the right peripheral at the right time based on the address requested by the CPU. When the CPU puts an address on the bus, the GLUE reads that address, identifies the corresponding peripheral, and sends a signal to the relevant device to start working.

The ROM of STF/STFM/MegaST

The ROM of the machine falls into the same category as the other peripherals and must be activated when it's time for it to work. So, when the Atari reads information from the ROM, it's not possible to write anything to it since it's a ROM (well, maybe, but we'll see that later). Let's take a closer look at the boot-up of the machine, where the TOS will be started.

  • You've pressed the power switch, and the Atari wakes up slowly. A small timer keeps it in RESET state for about 1.5 seconds to allow all peripherals and clocks to become operational.
  • Then, the CPU is started and immediately, like any good 68000 CPU, goes to read what's at addresses $000000 to $000007. It finds some configuration information there, but most importantly, the address from which to load the first program, which in the case of the Atari will be the ROM.
  • Loading continues from this new address until the end of the boot. So far, nothing too complicated.


If you look at the contents of a ROM 1.04, for example, you'll find the following values in these first 8 bytes: 60 2E 01 04 00 FC 00 30. The last 4 bytes, 00 FC 00 30, correspond precisely to the address where the TOS starts. Indeed, in STF/STFM and Mega ST, the ROM is located starting from address $FC0000 and has a size of 192k, up to $FEFFFF.

If we go back to the GLUE, here's what happens during startup:

  • The CPU requests address $000000 -> The GLUE activates the ROM, which returns 60 2E (we're in 16 bits, so 2 bytes).
  • The CPU requests address $000002 -> The GLUE activates the ROM, which returns 01 04.
  • The CPU requests address $000004 -> The GLUE activates the ROM, which returns 00 FC.
  • The CPU requests address $000006 -> The GLUE activates the ROM, which returns 00 30.
  • The CPU requests address $FC0030 -> The GLUE activates the ROM, which returns the first bytes of the TOS.

You'll notice that the addresses go up by 2 each time, which is normal since we're in 16 bits, so it sends back 2 bytes each time. You'll also notice that the GLUE activates the ROM for addresses $FC0000…$FEFFFF and also for bytes $000000...$000007. Fortunately, otherwise, the ST couldn't boot from its ROM.


The STE ROM and the 2.06.

When the first ST computers were created, Atari decided to use 32k ROM chips, which, combined with the 6 chips, provided a total of 192k. It was tight, but with various hacks, developers managed to fit both TOS and GEM into these 192k. For those interested in these hacks, you can search for "Atari TOS Line-F."

With the arrival of the STE, accommodating additional features could no longer fit within 192k, so it was necessary to move up to the next size, which is 256k. However, Atari encountered a problem: $FC0000 + 256k = $FFFFFF 😟

Starting at $FC0000, the new ROM now covered not only the space of the old one but also the space from $FF0000 reserved for the keyboard, mouse, MIDI, sound, etc. Engineers decided to start their new ROM at a lower address. Looking at the first bytes of a TOS 1.06, you'll find: 60 2E 01 06 '00 E0 00 30, with the ROM now starting at address $E00000 and extending to $E00000 + 256k = $E3FFFF.

The Problem with STF/SFTM and MegaST: The GLUE

With a 256k TOS starting at $E00000, the old GLUE from the previous ST models is no longer suitable. When it sees an address in the range of $E0xxxx, it will never activate the ROM, and therefore, booting is not possible!!!

How to Make TOS 2.06 Work in an STF?

If the GLUE cannot correctly decode the new ROM addresses, one might think that changing the GLUE is the solution. Unfortunately, Atari never released a new GLUE for the STF, and the one from the STE is not compatible.

So, we'll need to assist our GLUE and activate the ROM ourselves in the new address range. For this, we need to use some logic circuits that will interpret the addresses and send the correct signal to the ROM in place of the GLUE.

As the addresses $000000-$000007 behave the same way whether you're using a 192k or 256k ROM, we won't need to worry about them; we can simply take the signal from the GLUE, which is already doing the job for these addresses.

How to Decode Addresses $E00000-$E3FFFF?

Addresses have been represented in hexadecimal so far, but Atari only understands binary. Fortunately, hexadecimal has a convenient property: each symbol (letter or number) corresponds exactly to a group of 4 binary bits.

So, if we transcribe our 256k TOS addresses, it would look like this: b1110 0000 0000 0000 0000 0000 - b1110 0011 1111 1111 1111 1111... a bit long and impractical. If we express the problem as needing to activate the ROM when the address starts with $E0-$E3 in binary, it becomes simpler. We can say that if the beginning of the address in binary can be written as: b1110 0000 - b1110 0011, then the ROM should be activated. Notice that within the binary address range above, only the last two bits vary within the ROM's address range. So, we can summarise by saying that if the first 6 bits of the address are b1110 00, then the ROM should be activated.

How to Implement this ?

The 68000 CPU has pins corresponding to each bit of the address, and it sends an address on the bus by activating these pins (+5v for "1" and +0v for "0"). If we take the 6 bits we're interested in from the CPU, apply some logic to them, we should be able to decode them easily. The 6 pins we need are A23, A22, A21, A20, A19, and A18, and what we want is: "When A23, A22, and A21 are 1, and A20, A19, and A18 are 0, then activate the ROM." In logic terms, if we call the signal to activate the ROM "ROMCE," for example, we can write: ROMCE = A23 AND A22 AND A21 AND NOT A20 AND NOT A19 AND NOT A18.

We're almost there, with two details remaining:

  • The ROM uses "negative logic": It's active when it receives a 0 and inactive when it receives a 1. So, we need to rewrite the above logic equation as NOT ROMCE = A23 AND A22 AND A21 AND NOT A20 AND NOT A19 AND NOT A18.
  • DTACK: The 68000 requires a "DTACK'" signal, which tells it that the device has placed data on the bus for it. ROM chips don't have this functionality; normally, the GLUE does this work for them. So here too, we need to do it ourselves. Since DTACK is also in negative logic and should be activated when we activate the ROM, we simply write DTACK = ROMCE.

One last "annoying" point about DTACK: it's active when its voltage is 0, but unlike ROMCE, when it's inactive, it should not be at +5v but simply not connected at all. To achieve this, you can place a small diode in front or use "open collector" logic circuits. Now, enough with the theory, what are the solutions?

Decoding solutions

There are both "ready-made" solutions and DIY solutions, which will be covered in a future part. For the "ready-made" solutions, there's unfortunately bad news for STF and STFM owners: to perform the decoding, you'll need to take signals from the CPU, so off-the-shelf solutions will require desoldering the CPU, replacing it with the decoding card, and then putting the CPU back onto a socket on the decoding card.

In most cases, you'll also need to solder a few wires to retrieve the original signal sent by the GLUE and, of course, send the signal from your decoder to the ROM. If you have a Mega ST, you're in luck, as the MegaST has a connector that includes all the CPU signals, so you can simply plug the card into this connector.

Here are some examples of decoding cards, and there are probably many more. Feel free to let me know if you'd like me to add others. Here are some examples of decoding cards, and there are probably many more. Feel free to let me know if you'd like me to add others.

  • From Exxos: Decoder 2.06 (£25), Trudie IDE with an additional IDE interface (£45).
  • From Fairlite: Atari MonSTer with 2xIDE, 2.06 decoder, flashable ROM via software, RTC, and 8Mb "ALT-RAM" (£70). This is the only one that can officially connect via the Megabus of a Mega ST with a small adapter (£25). I haven't tested it, but I assume this adapter should also work with the other cards listed here.
  • From Czietz: Lightning ST with USB, IDE, and decoder (£110), Cloudy decoder with its own flashable ROM (price not specified).

All these solutions are somewhat complicated to set up and somewhat expensive just to use TOS 2.06. If you want an advanced TOS that brings most of the benefits of 2.06 (and more), you can always boot EmuTOS from a floppy disk. Otherwise, the components needed to make a decoder cost a few cents, and with a bit of elbow grease, it's quite simple to make one yourself. We'll cover that in a future section dedicated to DIY.

DIY


 So, you've decided to update your TOS, but you've found that the version 1.4 of the TOS in Bulgarian that you're interested in is only available in a 2-chip version, and you need 6 chips? No worries; let's see how you can prepare your TOS yourself.

Firstly, if you have an STE or Mega STE, I recommend Vincent Rivière's excellent video tutorialici:

What Chips to Use?

The original chips in your Atari are typically ROMs with factory-programmed software that cannot be modified. Since we (at least I) don't have a factory to burn new ones, we need to use a different technique. For this, there are PROMs, EPROMs, and EEPROMs that will make our task much simpler.

Types of chips

  • PROMs are chips that can be programmed once and retain their programming for life. They have long been replaced by EPROMs.
  • PROMs can be erased using UV light and are recognizable by their small transparent plexiglass window for erasing the content

  • EEPROMs are electronically erasable EPROMs, so there's no need for UV light; a simple programmer will do, or in some cases, an Arduino.

Which size ?

NWe've seen that TOS 1.0, 1.02, and 1.4 have a size of 192KB, so for a 6-chip configuration, you'll need 32KB chips (192 / 6). For a 2-chip configuration, you'd need 96KB chips, but those don't exist. So, we'll go for 128KB chips.

EPROM capacity is calculated in bits, not bytes, so for 32KB bytes, you'd need a 256K-bit chip, and for 128KB bytes, it's 1M-bit. (I won't remind you that there are 8 bits in 1 byte 😁)

Which speed ?

When the Atari wants to read information from ROM, the CPU sends the address of the data to the ROM and waits for a response, but it's not very patient. So, the ROM needs to respond quickly enough! Our CPU runs at 8 MHz (16 MHz in the case of the Mega STE), which means its actions occur at a rate of one every 125 nanoseconds. The 68000's operation (you can read the full documentation) is such that after putting an address on the bus, it waits for 2 cycles before reading the response (See timing figure below).

Timings 68000

For those who want to dive deeper into this, here's the 68000 documentation: https://www.nxp.com/docs/en/reference-manual/MC68000UM.pdf So, we need chips that respond in less than 250ns (2 cycles of 125ns).

In practice, you should use chips that are faster, like 150ns or 70ns. As we've seen before, depending on the address sent by the CPU, the GLUE will activate the right peripheral by sending a signal. But our ROM needs some time to wake-up, so we need to add this to its response time. If we take an EEPROM with a 200ns response time, its data sheet (see below) explains that the wake-up time (OE to Output Delay) is 75ns, so our CPU will get back data 75ns+200ns after sending the address... it's too late.

Recommended chips to buy for a 6 chips configuration: AT27C256R-70PU.

These are EPROMs, but they cannot be erased because they lack the plexiglass window. This is one of the few models that can still be found in the correct format for the Atari and at an affordable price (around €2 each). You can buy them from Mouser, DigiKey, or other electronic component distributors, but I would advise against eBay or AliExpress for this type of component.

=== Recommended chips to buy for a 2 chips configuration: SST39SF010 These are EEPROMs based on flash memory, and they are also readily available, typically between €1 and €2 each. They can be reprogrammed in case of errors. They do have one small issue: they have 32 pins instead of 28. In an STE, this is not a problem; you just need to change the jumpers. However, in an STF or Mega ST, it's 4 pins too many for the socket, so you'll need to use a saw or, more precisely, a soldering iron.

Preparing a TOS for Flashing

Retrieve the TOS to Flash: It may seem obvious, but you'll need to find the image of the TOS you want to flash. For this, there's nothing like a search on the Internet, and if you want the full package, the TOSEC archives (https://www.tosecdev.org) should help you. For non-Atari TOS versions, you'll need to get them from their respective sites; see the links in a previous tutorial. A small piece of advice: once you've found the image, test it with an emulator to ensure it works! I've wasted a lot of hours and fried a certain number of EPROMs simply because the image of TOS 1.4 FR found on the Internet was corrupted.


Splitting your TOS

The image you've retrieved usually comes in the form of a .img or .bin file of 192KB or 256KB, but you'll need to fit it onto several chips, so you need to split it.

The HI/LO Split

Whether your Atari uses 2 or 6 chips, you'll need to start by splitting the image into two: HI and LO. This split isn't just a simple separation of the original file into two halves; it's a bit more complicated.

The Atari has a 16/32-bit CPU, meaning it internally processes data in 32-bit groups but communicates with the outside world in 16 bits. However, our EPROMs only communicate in 8 bits, so what do we do? It's simple: when the CPU requests data for an address, that address will be presented simultaneously to each of the EEPROMs. One will send the first 8 bits, while the other will send the next 8 bits. And there you go; we're sending 16 bits to the CPU. If we look at the first bytes of a TOS 1.4, as seen previously: 60 2E 01 04 00 FC 00 30, we'll put 60 01 00 00 in the HI ROM and 2E 04 FC 30 in the LO ROM.

When the CPU requests the content of address $000000, the first chip will send 60, and the second will send 2E, so our 68000 will receive 60 2E, just as expected. The easiest way to perform the cutting of your TOS image is to use one of the following software options:

CARTMAN
  1. Launch CartMan
  2. Select the first tab: « Split L/H »
  3. Fill « Input File » with the name of the ROM file to split. (Note that CartMan filters files based on the ".bin" extension. If your ROM has a different extension, change the filter.)
  4. GO!


A small pitfall: CartMan is designed for "Little Endian" systems, but our Atari and its 68000 are "Big Endian." So, what CartMan calls "LO" will actually be "HI" for us and vice versa. Therefore, remember to rename your files after generation by CartMan.

SREC_CAT
  1. Open a terminal window
  2. Navigate to the directory containing your TOS image (let's call the file TOS.img, for example)
  3. For HI ROM:
     srec_cat <ROM FILE NAME> -binary -split 2 0 -o HI.bin -binary 
  4. For LO ROM:
     srec_cat <ROM FILE NAME> -binary -split 2 1 -o LO.bin -binary 

You now have your two HI and LO images. If you need a 2-chip version, you're now ready to flash your TOS.

6 Chips split
For a 6-chip version, you need to split the files again into LO0, LO1, LO2, HI0, HI1, HI2. This second split is simpler, as you simply divide it into 3 equal pieces.
Split in 6 images with CartMan(Windows):
  1. Launch CartMan
  2. Select the 4th tab « Split ROMs »
  3. Fill « Input File » with the name of your ROM HI file to split
  4. Select 32kB
  5. GO!
  6. Repeat this operation with ROM LO file.



Split in 6 images with « split »(Linux, macOS):
  1. Open a terminal window
  2. Navigate to the directory containing your two HI and LO images.
  3. Use split for the HI:
     split -b 32k TOSHI.img TOSHI 
  4. Use split for the LO:
     split -b 32k TOSLO.img TOSLO 

There you go; you now have 6 files of 32KB each ready for flashing.

Flashing your TOS

You now have your prepared TOS images and the chips to flash them. Let's see what you need.

EEPROM Programmer

To transfer your prepared TOS images from the previous steps to your chips, you'll need an EEPROM programmer. You have two options: buy one ready-made or build one with an Arduino.

Building Your Programmer:

I haven't tested this solution, but here are two links to Arduino projects that allow programming of 27C256 and more. There are many projects of this type, and a Google or GitHub search for "Arduino EPROM programmer" will provide you with many solutions. Make sure to check that the chosen setup can program the EPROM/EEPROM model you need for your Atari. https://github.com/StormTrooper/eeprom_programmer https://github.com/TomNisbet/TommyPROM

Buying a Programmer

This is probably the simplest "plug & play" solution, compatible with Windows, Mac, or Linux. These programmers can be used for flashing TOS, but also for thousands of other circuits, reading and writing EPROMs, testing chips, and programming GALs (for creating a TOS 2.06 decoder, but we'll cover that later). In terms of products, the TL866II+ is the most straightforward reference, offering the best quality-price ratio and available under various Chinese brands. You can expect to pay around thirty euros on AliExpress and around fifty on Amazon. Different configurations are available, with the difference being the included adapters, but for TOS, you don't need any adapters.

Flashing

Windows :
  1. Connect the programmer to your PC's USB port.
  2. Launch the XGPro software that comes with the programmer.
  3. Select the EEPROM model you will be using ("Select IC").
  4. Load the TOS image you want to flash (no options to modify).
  5. Insert your EEPROM into the programmer in the correct orientation (check the small notch) and lock it in place with the small lever
  6. Program the EEPROM (« Device »-> « Program »).
  7. Attach a small label to the top of the EEPROM with the reference (LO-0, LO-1, etc.). This will save you from testing all possible combinations when the Atari doesn't start.😁
  8. Repeat the process from step 5 for the following EEPROMs.

Mac or Linux


The software provided with the programmer is only available for Windows. However, an open-source alternative is available on Linux and macOS: minipro (https://gitlab.com/DavidGriffith/minipro/).

  1. Install « minipro » (see the GitLab page for instructions).
  2. Open a Terminal and navigate to the directory containing your TOS images to be flashed.
  3. Connect the programmer to your machine.
  4. Verify that your programmer is detected:
     minipro -k 
  5. Insert your EEPROM into the programmer in the correct orientation (check the small notch) and lock it in place with the small lever (see picture)
  6. (Optional) Verify that the EEPROM is properly inserted and recognized. Replace <EEPROM MODEL> with the one you have chosen, such as AT27C256, SST39SF010, etc.:
    1.  # minipro -p <EEPROM MODEL> -D 
    2.  # minipro -p <EEPROM MODEL> -z 
  7. Program your EEPROM:
     # minipro -p <EEPROM MODEL> -w <TOS IMAGE TO FLASH> -s 

  8. The "-s" option allows you to skip file size verification. In the case of a 6-chip version, this is not necessary, as our 6 images are indeed 32KB in size, which matches the size of an AT27C256. For a 2-chip version, TOS 1.6 or 2.06 is indeed 128KB in size, matching an SST39SF010. However, for a TOS 1.02, 1.04, or other 192KB TOS versions, each file is 96KB, which is smaller than the 128KB of an SST39SF010. This is not a problem; the remaining space will not be used, but you need to force minipro, which thinks it's an error
  9. Remove the EEPROM and attach a small label to the top with the reference (LO-0, LO-1, etc.). This will save you from testing all possible combinations when the Atari doesn't start. 😁
  10. Repeat the process from step 5 for the following EEPROMs.

nstalling the EEPROMs in a 6-chip version (STF) or 2-chip version (STE)

Follow the detailed instructions in part 2 of this tutorial, here

Installing the EEPROMs in a 2-chip version in ST/STF/Mega ST

((I assume your machine is ready to receive only 2 chips; if not, the modification is explained in part 2 of this tutorial.) You can quickly see that it doesn't fit! Your machine has 28-pin sockets, and your chips have 32 pins. You'll need to "modify" the chips to make them fit, but it's not too complicated.

First, let's look at the pinout of a 28-pin 1Mb chip and a 32-pin 1Mb chip :

  • Most of the pins are the same, which is good news.
  • On the SST39SF010, pin A16 is in the top-left corner, whereas on the original ROM, it's on the right side.
  • The SST39SF010 has an "OE#" pin where the original ROM has A16.
  • The SST39SF010 has an unused pin (NC) where the original ROM receives its +5V, which is good.
  • The +5V of the SST is "floating," 3 pins too high.
  • The SST has an additional signal, "WE#," in the top-right corner.

If we look at each PIN:

  • The OE# pin of the SST needs to be gently lifted and soldered to VSS with a small wire. This is the "Output Enable" signal, and we want the ROM to send data when requested. Since this is a signal that is active "low," it means it must be connected to ground to be operational. So, solder it to VSS.
  • VDD and WE#: WE# stands for Write Enable, which allows programming this chip. Since we want to use it as a ROM, we must ensure that this signal is never active. Also, it's an active "low" signal, meaning it must be connected to +5V to be inactive. This works well since the next pin is +5V. A small solder blob should suffice between pins 31 and 32. As we also need to connect all of this to the original +5V, found on pin 30, you can simply create a new solder blob to connect the 3 pins together, with pin 30 bringing +5V to the other two.
  • A16: Here, there are two options, but in any case, you need to solder a wire to the A16 pin of the SST. Then, you have the choice of slipping the other end of the stripped wire into the socket, under the OE# pin that you lifted in step 1. Another, simpler option: the empty socket next to it can be used; simply slip the other end of the wire into pin 22 of the empty socket, and you have A16.
  • Repeat the same operation for the second chip, and you have a working TOS.

The diagram shows these modifications. In the photos, you can see a modified chip; I cut the bottom of the pins that don't fit into the socket, but this is not necessary.

All that's left is to place your new chips in the machine and test that everything works. If not, check your connections, make sure you've placed the HI chip in the HI socket and the LO chip in the LO socket. And make sure that the pins "sticking out" of the socket are on the side of the notch. In this regard, never rely on the socket's notch but on the one engraved on the motherboard. Atari had the bad habit of soldering some sockets upside down (see photo).

You should now have a machine with a "Handmade" TOS. In the next part, we will look at how to have multiple TOS versions in the same machine and how to run TOS 2.06 on an ST/STF/Mega ST.

Back to Hardware hacks