This tool is a native Amstrad CPC tool that can help to diagnose a faulty disk drive.
Main purposes:
- Measure disk drive RPMs.
- Alignment of the head.
Any Amstrad CPC with a working disk drive or cassette player to load the program. Unfortunately the latest release don't work in a 464/664 machines (yet).
Head to the Releases section to download it.
- Disk drive selection.
- Start/stop the disk drive motor.
- Search for a Sector ID on a track.
- Measure RPMs.
- Alignment of the head.
Press 1 to discover and switch to the next available drive (A/B). Only two drives are supported. The switch can be activated even while measuring the RPMs in realtime.
Press 2 to start/stop the motor of the selected drive.
Press Q-W to increase/decrease the time taken to print the partial results of RPM measurement.
A good value is between 2-8 seconds.
Press A-S to select the target track that will be used for the test operations.
Press Z-X to select a target Sector ID to use for the test operations.
Press ENTER (BIG Enter) to start/stop measuring the RPMs of the current selected drive. It turns the motor on, searches for an invalid Sector ID and it starts the process.
The RPM results will be calculated using the amount of seconds specified in the options.
Press ENTER (Big enter) to search for the specified Sector ID at the specified track.
Be careful when using this test since it will run indefinitely until it succeeds.
This test will iterate from Track 0 until the selected track and will start reading all the Sector IDs for each of the tracks starting from the specified Sector ID until Sector ID+9 retrying the same Sector ID until it is found. This will enable us to adjust in real time the alignment. You can start specifying a low track number and progress to higher ones.
You need to ensure the disk you use contains no errors and that the specified Sector ID at the beginning of the test is the first of each track.
For an Amstrad DATA format disk that would be the Sector ID number 193 (c1 in hex)
The original code and the build pipeline (python 2.7 based) is more than 10 years old but it's been modified to work with Python 3.
Surprisingly it only needed changes on the print statements and string output from the subprocess.Popen commands. The rest did work as it was.
The build script(s) expect the compiler binaries and tools to exist under specific directories and are not taken from the system PATH. The tools are provided for both MacOS and Windows so it should work without issues in any of the systems.
But right at the moment I can only ensure it works out of the box with a MacOS computer with M1/2/3/4/5 processors and using SDCC 4.5.0.
Some of the required tools like hex2bin were compiled years ago and put into the respective directories. Feel free to re-compile and/or source the binaries yourself if you don't trust the executables.
Also mention that the FDC routines where highly influenced from the original FDC Tools code by Julien-nevo (Targhan) BUT the main routine that detects the rotational speed of the drive and all the other functionality are entirely mine.
PLEASE FORK, TEST, MODIFY AND PROPOSE CHANGES TO THIS VERSION SO WE ALL CAN BENEFIT!!!
If you would like to file the required tools by yourself you can follow the following procedure. Install Homebrew - The missing Package Manager for MacOS (or Linux). In a terminal window with superuser access or skip this step if you don't want to use it (there is a way also to not use brew here described as well):
sudo su
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Create a link for the just installed SDCC brew package. In a terminal from within the cloned repository type:
brew install sdcc
ln -Fs /opt/homebrew/Cellar/sdcc/4.5.0 ./build/sdcc/darwin/4.5.0OR without brew
curl -fSL 'https://downloads.sourceforge.net/project/sdcc/sdcc-macos-amd64/4.5.0/sdcc-4.5.0-x86_64-apple-macosx.tar.bz2?ts=gAAAAABpaAkcw2xwyQN-bDp2aq3EVPg9si-ate0GzZyK4LNtNesC7llCVmrUAz8aU3L_Wgn5yNdKvTp_75Sqe4zyORoX0NlfoA%3D%3D&r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fsdcc%2Ffiles%2Fsdcc-macos-amd64%2F4.5.0%2Fsdcc-4.5.0-x86_64-apple-macosx.tar.bz2%2Fdownload' -o sdcc.tar.bz2
mkdir ./build/sdcc/darwin/4.5.0; tar -xvjf sdcc.tar.bz2 -C ./build/sdcc/darwin/4.5.0
mv ./build/sdcc/darwin/4.5.0/sdcc-4.5.0/* ./build/sdcc/darwin/4.5.0
rm -rf ./build/sdcc/darwin/4.5.0/sdcc-4.5.0Install Python from Homebrew package manager OR get it from github and put it in the right directory:
brew install python
OR without brew
curl -fsSL https://github.com/bjia56/portable-python/releases/download/cpython-v3.13.9-build.0/python-full-3.13.9-darwin-universal2.zip -o python.zip
unzip python.zip -d ./build/Python3
mv ./build/Python3/python-full-3.13.9-darwin-universal2/* ./build/Python3
rm -rf ./build/Python3/python-full-3.13.9-darwin-universal2 python.zipFinally install pygal to get nice statistics charts:
If you followed the brew way:
pip install pygalOR without brew
./build/Python3/bin/python3 -m pip install pygalTODO
If you went the brew way you can straight type:
python3 ./build/build.py ./sources/DskTestFirmOR without brew
./build/Python3/bin/python3 ./build/build.py ./sources/DskTestFirm