uvmac/docs/extras/testsync/index.html
2020-03-14 15:28:01 -04:00

1 line
5.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> TestSync </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="index.html">
</head>
<body>
<div>
<i> <a href="https://www.gryphel.com/index.html">www.gryphel.com</a>/c/<a href="../../index.html">minivmac</a>/<a href="../index.html">extras</a>/testsync
- <a href="https://www.gryphel.com/c/feedback.html">feedback</a> </i>
</div>
<hr>
<h2 align=center>
TestSync
</h2>
<hr>
<p> Download </p>
<blockquote>
<p> <a href="https://www.gryphel.com/d/minivmac/extras/testsync/testsync-1.2.0.zip">testsync-1.2.0.zip</a>
(36K) a zipped hfs disk image and checksum file.
The disk image can be mounted with Mini vMac.
Includes source code. </p>
</blockquote>
<p> TestSync is a simple application for testing Macintosh video emulation.
On a real Macintosh Plus it should fill the screen with vertical bars
that move smoothly to the left. (More specifically, one pixel wide bars
with 7 pixels of space between bars, moving to the left at one pixel
per tick, with about 60.15 ticks per second.) </p>
<p> For an emulator, this is about the worst possible case. It makes
clearly visible any "tearing" effects cased by different screen refresh
rates between the real and emulated computer. Also, if the operating
system doesn't give the emulator time to run very regularly,
it is very noticeable. And also, the entire screen changes with
every tick, preventing the optimization where Mini vMac redraws
only the part of the emulated screen that has changed, making
clear just how much processing power is needed for video. Old machines
such as a 400 MHz G3 iMac running OS X don't have enough, and can't
run TestSync at even 1x speed. </p>
<p> TestSync continues running until you click the mouse or press
a key. TestSync will not work on a Macintosh with Color
Quickdraw, and should refuse to run. </p>
<p> TestSync exists thanks to Manuel Alfayate, who complained about
graphics tearing in Mini vMac. I didn't see anything
like that, and I thought Apple documentation implied
it shouldn't happen in OS X 10.4 and later. Eventually I
had the theory that it was just the software he was running,
which perhaps would also tear on a real Mac Plus, or perhaps
some inaccuracy of the emulation caused it
to happen with this particular software. So
I created TestSync to prove this
theory, but instead it conclusively disproved it.
The tearing was clearly visible, even though I had never
noticed it before. </p>
<p> I haven't decided what to do about this yet, if anything.
It would not generally be practical to sync the
emulation and the real monitor.
A Macintosh Plus screen has a specific refresh rate
(about 60.15 times per second), and even modern
monitors that allow changing the refresh rate probably
mostly can't match that exact value. And even if
it could be done, it would only make sense to
do so in full screen mode, and changing the
refresh rate would probably take a noticeable
amount of time, and I like the current ability
of Mini vMac to enter and leave full screen mode
instantaneously.
To prevent tearing without syncing would necessarily lose
a bit of smoothness, since a real or emulated frame must
occasionally be skipped. This can be done in OS X using
the AGL_DOUBLEBUFFER and AGL_SWAP_INTERVAL
options of OpenGL, but it is very expensive, and
there might be more efficient alternatives. </p>
<p> By the way, redrawing the entire screen 60.15
times a second pushes the limits of what a
Macintosh Plus can do. 21,888 bytes need to
be changed in about 10,000 instructions. Which
is why TestSync is written the way it is, with
assembly language code writing directly
to the screen memory. </p>
<p>
Here is the md5 checksum for the download, signed with
<a href="https://www.gryphel.com/c/keys/k5.html">Gryphel Key 5</a>:
</p>
<blockquote>
<pre>
--------- GRY SIGNED TEXT ---------
abca0065eb3634606b83439edbcf85da testsync-1.2.0.zip
------- BEGIN GRY SIGNATURE -------
Gry/4Xa8CFcUzxdN/Pzwr3AiyObHHSd/DgzkHg73e1sHDdzf5O4v8/5k/SrUmVW2
kgJ0A/WwVES+pbdy77lySLj0cYo4fAGDx4fGT7t1P6/3b/juXmtqEd7sS9YXDGob
p2K7LGrZ4hE5fbxi6S4X0c9YCjbsWfyYoXjAx/X15ho5R6Hwdl0qBhzt7ivAlTsH
-------- END GRY SIGNATURE --------
</pre>
</blockquote>
<p> See the
<a href="../../appc/index.html">Compiling</a>
page for instructions on compiling TestSync from the source code. </p>
<p> You can redistribute TestSync and/or modify it under the terms
of version 2 of the GNU General Public License as published by
the Free Software Foundation. See the included file COPYING. </p>
<p> TestSync is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
license for more details. </p>
<p> : </p>
<p> If you find TestSync useful, please consider
<a href="https://www.gryphel.com/c/help/index.html">helping the Gryphel Project</a>,
of which it is a part. </p>
<a href="https://www.gryphel.com/index.html">
<img src="https://www.gryphel.com/d/gryphel-32.gif" width=32 height=32 border=0
alt="gryphel logo, 1K"
>
</a>
<hr>
<div>
<i> <a href="https://www.gryphel.com/index.html">www.gryphel.com</a>/c/<a href="../../index.html">minivmac</a>/<a href="../index.html">extras</a>/testsync
- <a href="https://www.gryphel.com/c/feedback.html">feedback</a> </i>
<br>
copyright (c) 2010 Paul C. Pratt - last update 10/21/2010
</div>
</body>
</html>