home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.apple2
- Path: sparky!uunet!usc!rpi!usenet.coe.montana.edu!nntp.uoregon.edu!cie.uoregon.edu!nparker
- From: nparker@cie.uoregon.edu (Neil Parker)
- Subject: Re: Apple II RWTS codes.
- Message-ID: <1992Aug28.091925.1873@nntp.uoregon.edu>
- Sender: news@nntp.uoregon.edu
- Organization: The Universal Society for the Prevention of Reality
- References: <m0mNh96-000130C@crash.cts.com> <philip.714956593@labtam>
- Date: Fri, 28 Aug 92 09:19:25 GMT
- Lines: 41
-
- In article <philip.714956593@labtam> philip@labtam.labtam.oz.au (Philip
- Stephens) writes:
- >ncp@gnh-cathouse.cts.com (Neal Pitts) writes:
- >
- >>>> The stuff in DOS 3.3 reads the raw data and then analyzes it,
- >>while the ProDOS routine analyzes it while it's reading (where analyze ==
- >>convert from 6+2 encoding to plain data). <<
- >
- >>Is there any good reason for ProDOS to do this? I would think that it would
- >>have taken the speed penalty for a good reason...
- >
- > ProDOS's way is faster. Since ProDOS reads and writes data in blocks (two
- >sectors at a time), having the two sectors of a block physically adjacent means
- >they can be read and written quicker. And to top it off, this arrangement
- >allows the interleave to be 2:1, compared to DOS 3.3's interleave of 3:1.
-
- Actually, DOS 3.3 uses a 2:1 interleave. The difference is it's
- backwards--going in order around the disk you encounter (logical) sectors
- 0, 7, 14, 6, 13, 5, 12, 4, 11, 3, 10, 2, 9, 1, 8, and 15. DOS 3.3 allocates
- sectors in descending order, so in effect it's getting an interleave
- pretty much equivalent to ProDOS's.
-
- Interestingly enough, the bottleneck in DOS 3.3 isn't coming from RWTS's
- habit of decoding after the sector is read--it's coming from the fact that
- the DOS 3.3 file manager tells RWTS to read the sector into its own
- internal buffer, and then it doles out that buffer one byte at a time to
- the user's code. By the time it's copied out the whole buffer, the next
- sector has already spun by, so you have to wait for another disk
- revolution. If the file manager's "middleman" buffer can be eliminated
- from the picture, the remaining code is fast enough to catch the next
- sector BEFORE it spins by, and a dramatic improvement in speed occurs--an
- entire track can be read in 2 revolutions instead of 16, and hi-res
- pictures load in roughly 5 seconds. I know of more than one "fast DOS"
- patch that worked by eliminating the "middleman" buffer (I even wrote one
- myself once).
-
- - Neil Parker
- --
- Neil Parker No cute ASCII art...no cute quote...no cute
- nparker@cie.uoregon.edu disclaimer...no deposit, no return...
- parker@corona.uoregon.edu (This space intentionally left blank: )
-