Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!unsvax!uns-helios!alfter From: alfter@uns-helios.nevada.edu (SCOTT ALFTER) Newsgroups: comp.sys.apple2 Subject: Re: CPU speed detection Message-ID: <2429@unsvax.NEVADA.EDU> Date: 7 Dec 90 19:30:35 GMT References: <6129@crash.cts.com> Sender: news@unsvax.NEVADA.EDU Organization: University of Nevada System Computing Services Lines: 36 In article <6129@crash.cts.com> mdavis@pro-sol.cts.com (Morgan Davis) writes: >Fortunately, reading $C019 in the manner given above works correctly on >both the IIe and IIGS. Since the IIc doesn't have a polled VBL signal, >you'd have to write a VBL interrupt handler which did your tick counter >incrementing. On the II+, I designed a method by which a VBL-like signal >can be mapped to a different hardware location ($C060). The article >describing this scheme was posted a few months ago. Let me know if you >want it. All this talk about getting consistent timing at different clock rates brought up a problem with some telecomm routines I was writing. I needed some way to time a hardware BRK signal. Presently the routine just uses a tightly-coded loop, but the timing is only valid at 1 MHz. I figure that on a 60 Hz system, counting 14 ticks of the VBL will count 233.333333... ms, which is very close to the 233 ms that a hardware BRK is supposed to last. A problem crops up with 50 Hz systems (not that I have one, but someone who might want to use my program might have one). The time taken by one tick is longer, so instead of getting something close to 233 ms, 14 ticks will last 280 ms. Is the timing of a hardware BRK absolutely critical, or can you have pretty much any length so long as it's at least 233 ms? Also, does anybody have a clue how to go about getting a tick counter running on a IIc? The IIe/IIGS solution has already been spelled out--just tack on a few extra bytes to count 14 ticks. Something was mentioned about having to use interrupts to count ticks on the IIc--sounds yucky since it would involve installing and detaching an interrupt daemon every time you want to send a BRK. :-( ----------------------------------------------------------------------------- Scott Alfter _/_ / v \ Apple II: Internet: alfter@uns-helios.nevada.edu ( ( the power to be your best! GEnie: S.ALFTER \_^_/