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
Line 121: Line 121:
 
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 133:
 
[[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'' ==

Revision as of 11:38, 31 December 2023

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? 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


 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èreici:

Quelles puces utiliser?

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.

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.
  • 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 .

  • Les EEPROMs sont des EPROMs effaçable électriquement, donc plus besoins d’UV, un simple programmateur suffit, voir dans certains cas un Arduino.

Quelle capacité ?

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 😁)

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 ! 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. 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).

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).

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. Mais notre ROM met du temps à se réveiller et il faut donc ajouter ce temps de réveil à son temps de réponse. 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.

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.

=== 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

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. 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

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.

  1. Le découpage HI/LO

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.

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. Le plus simple pour effectuer le découpage de votre image de TOS est d’utiliser un des logiciels suivants :

CARTMAN
  1. Démarrez CartMan
  2. Sélectionnez le premier onglet « Split L/H »
  3. 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.)
  4. 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. Pensez donc à bien renommer vos fichiers après génération par CartMan.

SREC_CAT
  1. Ouvrez un terminal
  2. Placer vous dans le répertoire contenant votre image de TOS (je vais appeler le fichier TOS.img par exemple)
  3. Pour la ROM HI:
     srec_cat <VOTRE FICHIER ROM> -binary -split 2 0 -o HI.bin -binary 
  4. Pour la ROM HI:
     srec_cat <VOTRE FICHIER ROM> -binary -split 2 1 -o LO.bin -binary 

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.

Découpage 6 puces

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):
  1. Démarrez CartMan
  2. Sélectionnez le 4eme onglet « Split ROMs »
  3. Renseignez « Input File » avec le fichier ROM HI à splitter
  4. Sélectionnez 32kB
  5. GO!
  6. Répétez l’opération avec le fichier de ROM LO.



Découper en 6 images avec « split »(Linux, macOS):
  1. Ouvrez une fenêtre terminal
  2. Placer vous dans le répertoire contenant vos deux images HI et LO.
  3. Utilisez split pour le HI:
     split -b 32k TOSHI.img TOSHI 
  4. Utilisez split pour le LO:
     split -b 32k TOSLO.img TOSLO 

Et voilà, vous avez maintenant 6 fichiers de 32ko prêts à flasher.


Flasher son TOS

Ça y est, vous avez des images de TOS prêtes et les puces pour les flasher, voyons ce qu’il vous faut.

Le programmateur d’EEPROM

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:

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/TomNisbet/TommyPROM

Acheter un programmateur:

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.

Le flashage:

Windows :
  1. Branchez le programmateur sur le port USB de votre PC
  2. Lancez le logiciel XGPro fournis avec le programmateur
  3. Sélectionnez le modèle d’EEPROM que vous allez utiliser (« Sélect IC »)
  4. Chargez l’image de TOS que vous voulez flasher (aucune option à modifier)
  5. Insérez votre EEPROM dans le programmateur, dans le bon sens (vérifiez la petite encoche) et verrouillez la avec le petit levier
  6. Programmez l’EEPROM (« Device »-> « Program »).
  7. 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 😁
  8. Répétez l’opération depuis l’étape 5 pour les EEPROMs suivantes.

Mac ou 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/).

  1. Installez « minipro » (voir la page GitLab pour les instructions).
  2. Ouvrez un Terminal et placez-vous dans le répertoire contenant vos images de TOS à flasher.
  3. Branchez le programmateur sur votre machine
  4. Vérifiez que votre programmeur est bien reconnu:
     minipro -k 
  5. Insérez votre EEPROM dans le programmateur, dans le bon sens (vérifiez la petite encoche) et verrouillez la avec le petit levier
  6. (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…:
    1.  # minipro -p <MODELE D’EEPROM> -D 
    2.  # minipro -p <MODELE D’EEPROM> -z 
  7. Programmez votre EEPROM:
     # minipro -p <MODELE D’EEPROM> -w <IMAGE TOS A FLASHER> -s 

  8. 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.
  9. 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 😁
  10. 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)

Suivez les instructions détaillées dans la partie 2 de ce tuto, ici

Installez les EEPROMs en version 2 puces dans 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.) 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é.

Tout d’abord regardons le brochage d’une puce 1Mb 28 broche et celui d’une puce 1Mb 32 broches (Figure #8):

  • La plupart des broches sont les mêmes, c’est une bonne nouvelle.
  • 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# » là où la ROM d’origine a A16.
  • Le SST39SF010 a un pin non utilisé (NC) là ou la ROM d’origine reçoit son +5V, tant mieux.
  • Le +5V du SST est « dans le vide », 3 pins trop haut.
  • Le SST a un signal supplémentaire « WE# » en haut à droite.

Si nous traitons broche par broche :

  • 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.
  • 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 là 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.
  • A16: Là 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.
  • 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.

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).

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.


Back to Hardware hacks