summaryrefslogtreecommitdiff
path: root/hw/kdrive/savage/s3.nick
diff options
context:
space:
mode:
Diffstat (limited to 'hw/kdrive/savage/s3.nick')
-rw-r--r--hw/kdrive/savage/s3.nick41
1 files changed, 0 insertions, 41 deletions
diff --git a/hw/kdrive/savage/s3.nick b/hw/kdrive/savage/s3.nick
deleted file mode 100644
index 8f6791f87..000000000
--- a/hw/kdrive/savage/s3.nick
+++ /dev/null
@@ -1,41 +0,0 @@
-/* $RCSId: $ */
-
-global f_ref = 14318000;
-
-function s3_clock (m, n, r)
-{
- return f_ref * (m + 2) / ((n + 2) * (2 ^ r));
-}
-
-function s3_near (f1, f2)
-{
- return abs (f1 - f2) < f1 / 10;
-}
-
-function s3_clocks (f)
-{
- auto m, n, r, ft;
- auto dist, min_dist;
- auto min_m, min_n, min_r;
-
- min_dist = f / 5;
- for (r = 0; r <= 3; r++)
- for (n = 0; n <= 31; n++)
- for (m = 0; m <= 127; m++)
- {
- ft = s3_clock (m, n, r);
- if (s3_near (ft, f))
- printf ("m %d n %d r %d = %d\n",
- m, n, r, ft);
- dist = abs (f - ft);
- if (dist < min_dist)
- {
- min_dist = dist;
- min_m = m;
- min_n = n;
- min_r = r;
- }
- }
- printf ("m %d n %d r %d f %d dist %d\n",
- min_m, min_n, min_r, s3_clock(min_m, min_n, min_r), min_dist);
-}