The ST has one non-deterministic feature that is determined randomly (well, not exactly, see below) at power up. It is called “wakeup” mode. Depending on the current wake up mode, some programs might not run correctly, or not at all.
I found only two wakeup modes. And I don’t see much possibilities of more than two. If anybody knows about more, please let us know.
The two wakeup modes depend on which bus cycle slots are assigned to the CPU, and which to the MMU/Shifter, in relation to the GLUE video counter clock. It would be actually more accurate to say that they depend on the relation between two internal GLUE clocks.
Let’s assume the following model:
Code: Select all
GLUE has internally a 2Mhz clock (period equivalent to one NOP) for the video state machine. Plus another 4Mhz clock to round robin grant bus access to the CPU or to the SHIFTER.
The two clocks are in perfect phase. This means that the active edge of the 2Mhz clock coincides with the 4Mhz one. The 2Mhz clock toggles an internal flip-flop. But the initial state of the flip-flop is not deterministic at power up.
Then, in one wakeup mode, the CPU is granted access concurrently with the 2Mhz period. In the other, it is the SHIFTER.
Note that it is not really possible to determine if this is the actual hardware internals. This is just a model that explains the behavior. Internally it could be implemented in a few different ways, and still get the same behavior.
What I found very interesting is that in the case of my ST, the wakeup modes are not exactly random. I constantly get one when the machine is cold (after being turned off for several hours), and other when it is warm.
Attached is a small program that will show the current wakeup. Note that the wakeup is set at power-up. It won’t change after reset, not even after executing those “cold-boot” programs. Also note that I don’t know if the multiple wakeup exist on all the ST machines, such as in STe. It might vary depending on the exact GLUE part.
Assuming the cold/hot behavior is not unique to mine machine (which I really have no idea), the most interesting way to test this program is as following: Try it after your machine was turned for all the night. Take note of the shown wakeup. Then power cycle the computer (wait about half a minute), and run the tests again.
Would be interesting to see the results of others.