zerkman / zest

Implementation of an Atari ST in VHDL for Xilinx-based FPGAs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo not loading.

zerkman opened this issue · comments

Several demos are stuck at some point. They usually start one first intro screen, then get blocked.
Demos with that problem include:

  • dark side of the spoon
  • o-demo
  • odd stuff
  • ooh crikey wot a scorcher
  • decade demo
  • dothings
  • my socks are weapons

dothings : very slow to load first part, then not loading second part. could be two different bugs

ooh crikey and dark side have been fixed by 5746886.

odd stuff has been fixed by 6a0f3e0.

This is a known "feature" of the ST. If you deselect the floppy while the motor is still spinning, it won't stop spinning. The OS specifically waits for the motor to stop by polling the floppy, and then only deselects the floppy (light goes off). Some of these demos (the ones fixed now) use this behavior to have the floppy still spin for the next track to load, so there is no spinup delay.

I know it worked like this at the time, and I did not understand the mechanisms involved. What makes the WD1772 stop the drive is the detection of 9 index pulses (corresponding to 9 rotations of the disk) after running the last command. If the drive is de-selected before that, the WD1772 does not "see" these index pulses because the drive I/O is somehow electrically disconnected.

What fixed ooh crikey and dark side was another problem. It seems you don't have to enable the "motor on" flag in your FDC commands to get the motor actually turn on. It will turn on anyway. I removed some flag checks and now every command actually checks if the drive is on, undepending on the status of the motor on flag.

Decade demo: the intro runs, then the 9 to 0 countdown, and then the screen goes all red. The demo remains stuck at that point.