[comp.sys.amiga] Will somebody fix Delay

mb@munnari.oz (Michael Bednarek) (04/29/88)

In article <2193@antique.UUCP> cjp@vax135.UUCP (Charles Poirier) writes:
:In article <409@ritcv.UUCP> msl5864@ritcv.UUCP (Michael S. Leibow) writes:
:>when the drive got to cylinder 40, 101 errors were registered.
:                       ^^^^^^^^^^^
:Oh no, it couldn't be, could it?  The Delay(0) bug?  It is known for
:trashing floppies' track 40

May be I throw loads of egg on my face, but

	when, for chrissakes, will somebody fix this bleeding bug?

rminnich@udel.EDU (Ron Minnich) (05/02/88)

In article <2093@munnari.oz> mb@munnari.oz.au (Michael Bednarek) writes:
>In article <2193@antique.UUCP> cjp@vax135.UUCP (Charles Poirier) writes:
>:Oh no, it couldn't be, could it?  The Delay(0) bug?  It is known for
>	when, for chrissakes, will somebody fix this bleeding bug?
Yeah, how about some of you good vector patchers out there?
You know, write:
FixDelay(x)
int x;
{
  if (x > 0)
    call BrokenDelay(x)
}

  and then patch the Delay vector to FixDelay, after first having
a copy in BrokenDelay().
WOuldn't this do it?
ron


-- 
ron (rminnich@udel.edu)

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (05/05/88)

In article <2347@louie.udel.EDU> rminnich@udel.EDU (Ron Minnich) writes:
>In article <2093@munnari.oz> mb@munnari.oz.au (Michael Bednarek) writes:
>>	when, for chrissakes, will somebody fix this bleeding bug?
>Yeah, how about some of you good vector patchers out there?
>You know, write:
>[ some code ]
>  and then patch the Delay vector to FixDelay, after first having
>a copy in BrokenDelay().
>WOuldn't this do it?

	Unfortunately, Delay() is part of the DOS domain, and DOS is immune
to the SetFunction() call, since DOS breaks the rules for library vectors.
So patching Delay() would be non-trivial.

	Jim Goodnow, on the other hand, would be able to do it in his sleep.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape  ihnp4!pacbell -\
 \_ -_		Recumbent Bikes:	      dual ---> !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor

andy@cbmvax.UUCP (Andy Finkel) (05/06/88)

In article <5877@well.UUCP> ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
>	Unfortunately, Delay() is part of the DOS domain, and DOS is immune
>to the SetFunction() call, since DOS breaks the rules for library vectors.

Two things:

1) as I've mentioned before, the bug is probably in the timer.device...
   Delay just makes a timer request and waits on it...nothing fancy at all.

2) As Dr. King pointed out to me, DOS follows the rules for library
   vectors...the only specification of what a vector contains is that
   it occupy 6 bytes.  I want to change this in 2 ways...
   make DOS like the others, and add a SetFunction2 call that plays
   with all 6 bytes.

>So patching Delay() would be non-trivial.

its still non-trivial; but DOS isn't where to look.
-- 
andy finkel		{ihnp4|seismo|allegra}!cbmvax!andy 
Commodore-Amiga, Inc.

"C combines the power of assembly language with the flexibility of
 assembly language."
		
Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.

michael@stb.UUCP (Michael) (05/14/88)

As a matter of fact, there is a program called catch_delay, written in modula-2,
that patches the global vector table to catch delay() calls, and filter out
the delay(0) calls. It was on the net a while ago, and if you want, I'll send the
moderators a copy of the binary (but I suspect you can get it from an ftp
archive site)
			Michael
: --- 
: Michael Gersten          uunet.uu.net!ucla-an.ANES\ 
:				 ihnp4!hermix!ucla-an!denwa!stb!michael
:				sdcsvax!crash!gryphon!denwa!stb!michael
: "Machine Takeover? Just say no."
: "Sockets? Just say no."     <-- gasoline