[comp.sys.amiga] Kickstart patch to fix the bug in the Alert

bryce@hoser.berkeley.edu.UUCP (11/02/87)

Ran across the fix to this bug by accident today.

A long time ago I noticed that recoverable Alert()s did not seem
to be recovering.  Blitzfonts was in my startup-sequence at the time,
so this did not seem too strange.  (Blitzfonts patches graphics.
library without using SetFunction())

Recently on the net someone else mentioned the problem.  I took a
look into it.  If there is autoconfigured memory at $C00000 then
recoverable alerts fail.  None, and they are fine.

While "researching" for my upcoming "Hacking Kickstart" article in
the New Transactor Amiga Magazine I hit it.  Here's the code:

listing of memory contents FC2FF8 to FC3008
FC2FF8    MOVE.L  4,D0
FC2FFC    MOVE.L  D0,D1
FC2FFE    ANDI.L  #$00FF0001,D1
FC3004    BNE.S   *+$5A
FC3006    MOVEA.L D0,A6

This code takes AbsExecBase and does a sanity check.  If it's
insane it branches to *+5A. If execbase is at the location 
were it would be in a CHIP memory only system ($676) then
the AND comes out a zero.  If execbase is at the $C00000
location ($00C00276) then the AND proves fatal.

One would suspect that they meant #$FF000001 instead, though
that would just shift the bug over to some 68020 system at
a future date.

If you don't have the tools to do the patch... sorry!  Or,
better yet, allocate $7.50 and take advantage of the fantastic
introductory bargain Transactor is offering. (-: Oops! 
Commercialism :-)

|\ /|  . Ack! (NAK, SOH, EOT)
{o O} . bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce
 (")
  U	"You can count how many seeds are in an Apple, but not how
	 many Apples are in a seed." -Ken Kesey	

kim@amdahl.amdahl.com (Kim DeVaughn) (11/02/87)

In article <21552@ucbvax.BERKELEY.EDU>, bryce@hoser.berkeley.edu (Bryce Nesbitt) writes:
> 
> Ran across the fix to this bug by accident today.
> 
> A long time ago I noticed that recoverable Alert()s did not seem
> to be recovering.
> 
> Recently on the net someone else mentioned the problem.  I took a
> look into it.  If there is autoconfigured memory at $C00000 then
> recoverable alerts fail.  None, and they are fine.
>
> [ ... ]
>
> If you don't have the tools to do the patch... sorry!  Or,
> better yet, allocate $7.50 and take advantage of the fantastic
> introductory bargain Transactor is offering. (-: Oops! 
> Commercialism :-)

You mean you'll be sending me a new set of proms for only $7.50 Bryce?  :-)

*This* is *just* the kind of thing that made me "apprehensive" when it was
decided that 1.2 was good enough to be burned into silicon.  My own feeling
is that it was about 2 releases too early, but then, there never is such a
thing as "the LAST bug".

I spent a very frustrating time actually trying to *use* my B2000 over
the weekend, and this bloody bug Guru'd me any number of times.  So much
HALF FAST ram ... grrrrrrr!

I will be interested to see how CBM responds to this rather serious problem.
At least I hope they respond in some fashion, as it is this kind of thing
that originally gave AmigaDOS such a "buggy" reputation!

So how about it, lets see a quick "setfunction()" outta West Chester to fix
this *before* it generates alot of bad press ...

And we thank you (CATS) for your support ...!

/kim


-- 
UUCP:  kim@amdahl.amdahl.com
  or:  {sun,decwrl,hplabs,pyramid,ihnp4,uunet,oliveb,cbosgd,ames}!amdahl!kim
DDD:   408-746-8462
USPS:  Amdahl Corp.  M/S 249,  1250 E. Arques Av,  Sunnyvale, CA 94086
CIS:   76535,25

bryce@hoser.berkeley.edu (Bryce Nesbitt) (11/03/87)

In article <17516@amdahl.amdahl.com> kim@amdahl.amdahl.com (Kim DeVaughn):
>In article <21552@ucbvax.BERKELEY.EDU>, bryce@hoser.berkeley.edu (Bryce Nesbitt) writes:
>> 
>> Ran across the fix to this bug by accident today.
>
>*This* is *just* the kind of thing that made me "apprehensive" when it was
>decided that 1.2 was good enough to be burned into silicon.

Remember, they added a facility at the same time to patch out any
of the resident modules into ram.  The only problem here is granularity
(You would need to replace *all* of Intuition, for example).


>I spent a very frustrating time actually trying to *use* my B2000 over
>the weekend, and this bloody bug Guru'd me any number of times.  So much
>HALF FAST ram ... grrrrrrr!

Well you could hit the jumper and disable it.  Or get the new Fat Agnus
and make it CHIP ram :-).  ( add some more :-)'s for some more insight
into how V1.2 Kickstart sizes CHIP )

Since I boot from a Kickstart disk I have no need for a ram patch,
but it would be easy to do.


>I will be interested to see how CBM responds to this rather serious problem.
>At least I hope they respond in some fashion, as it is this kind of thing
>that originally gave AmigaDOS such a "buggy" reputation!

Andy Finkel was onto this bug before I was.  It was a totaly accident
that I ran into it.  (Well not totally, I knew about the bug and kept
my eyes open).

I suspect a CATS patch soon.  What I hope more is that they will
throw this into V1.21 before it goes out.  (The change is minor
and can have *no* bad side effects)


Anyone have any other Kickstart hacks they would like to see get
wider fame?  I'm putting together a collection.


BTW: There appears to be life at the other end of comp.sources.amiga!

|\ /|  . Ack! (NAK, SOH, EOT)
{o O} . bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce
 (")
  U	"You can count how many seeds are in an Apple, but not how
	 many Apples are in a seed." -Ken Kesey	

andy@cbmvax.UUCP (Andy Finkel) (11/04/87)

In article <21573@ucbvax.BERKELEY.EDU> bryce@hoser.berkeley.edu.UUCP (Bryce Nesbitt) writes:
>In article <17516@amdahl.amdahl.com> kim@amdahl.amdahl.com (Kim DeVaughn):
>>In article <21552@ucbvax.BERKELEY.EDU>, bryce@hoser.berkeley.edu (Bryce Nesbitt) writes:

>Andy Finkel was onto this bug before I was.  It was a totaly accident
>that I ran into it.  (Well not totally, I knew about the bug and kept
>my eyes open).
>
>I suspect a CATS patch soon.  What I hope more is that they will
>throw this into V1.21 before it goes out.  (The change is minor
>and can have *no* bad side effects)

Probably I'll post it today.
Its a SetFunction() thingie; I want to clean it up a bit, then
I'll post a uuencoded binary.  (here; its fairly small)

			andy
-- 
andy finkel		{ihnp4|seismo|allegra}!cbmvax!andy 
Commodore-Amiga, Inc.

"Interfere?  Of course we'll interfere.  Always do what you're best at,
 I always say."

Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.

andy@cbmvax.UUCP (Andy Finkel) (11/05/87)

In article <17516@amdahl.amdahl.com> kim@amdahl.amdahl.com (Kim DeVaughn) writes:
>*This* is *just* the kind of thing that made me "apprehensive" when it was
>decided that 1.2 was good enough to be burned into silicon.  My own feeling
>is that it was about 2 releases too early, but then, there never is such a
>thing as "the LAST bug".

Fortunately, the magic of SetFunction comes to the rescue.
Here's the simple version.  There are a couple of enhancements
that should go in (splitting the seglist so you don't have to 'RUN' it,
and using C00000 memory if available, and making it
survive reboots, but that can come later...right now I bet you all want
to see the GURU's smiling face once more :-)

Here's the uuencoded binary of setalert.ld.  Cut on the dotted lines,
run through uudecode, and place in your C directory.  Then either
use RUN or RUNBACK to fire it up.  I suggest from your startup-sequence.
(give it an icon, and you could
start it from Workbench).  It will fire up, SetFunction itself,
and hang around forever. (or until you reboot; hence, putting it
in your startup-sequence)

>
>I spent a very frustrating time actually trying to *use* my B2000 over
>the weekend, and this bloody bug Guru'd me any number of times.  So much
>HALF FAST ram ... grrrrrrr!
>
>I will be interested to see how CBM responds to this rather serious problem.
>At least I hope they respond in some fashion, as it is this kind of thing
>that originally gave AmigaDOS such a "buggy" reputation!

And here's V1.0.  Give me about a week and I should find enough
time to add the above enhancements. (I hope)

>/kim

----------------CUT HERE------------------------------
begin 644 setalert.ld
M   #\P         .          T   "#    :P   !4    2    D@   !0 
M   (               /    $                    ^D   "#(\\    <
M(\     D(\@    H+'D    $(\X    $D\E.KO[:*$!*K "L9P  ]F$  ;J1
MR" L *SEB" P"!#EB$CG #!%^0   *Q'^0   "P@0'  $!A", @ )L@@.0  
M "0@>0   "A#\ @ #"$ (%+(__I"*0 !$AAG7 P! "!G]@P!  EG\";*# $ 
M(F<4%,$2&&="# $ (&<$%,%@\D(:8-02&&<P# $ (F?R# $ *F8@$A@, 0!.
M9P8, 0!N9@1R"F .# $ 16<&# $ 968"<AL4P6#,0A)"DR \    *)"+1H#D
MB$S?# !(>0   "PO $ZY    '"/     $$ZY    +"/     %"/     &$ZY
M     '  +GD    <3G5A  #&80  L"/     ("\ 0J<D0" J "1G$"QY    
M""! (B@  $ZN_X(B*@ @9R@D/    ^U.KO_B(\     0(\     4(\     8
M9PKEB"! *6@ " "D3KD     < !@!" O  0N>0   !PO "QY    !" Y    
M"&<&(D!.KOYB2KD    @9PY.KO]\(GD    @3J[^AB ?3G5(YP$&+CP  X '
M+'@ !$ZN_Y1,WV" <&1@L$'L %Q.KOZ 0>P 7$ZN_HQ.=4/Z !)P $ZN_=@C
MP     AGPDYU9&]S+FQI8G)A<GD       /L    &     $   'V   !L@  
M :8   &8   !B@   6H   %D   !7@   3X   $L   !'    0X   $(    
M_    .X   #>    9    %X   !,    1@   !H    .    "     (    "
M     @   10   %\     0    D   $"     0    D   #V         _( 
M  /J    :P A  $               #_______________\             
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                           #\@   ^D    52.<P
M "0O  P@+P 0)CD    $3KD     +SP     2'G___^4+P-.N0   "1*@D_O
M  QG#DAY     $ZY     %B/0J=.N0   !!8CTS?  Q.=0     #[     $ 
M   #    -@    $    *    1@    $    &    /     $    *    %   
M  $    $    &@    $    *    *     $    !    #@        /R   #
MZ@   !)!;&5R="!S970*  !#;W!Y<FEG:'0@,3DX-R @0V]M;6]D;W)E+4%M
M:6=A+"!);F,N($%L;"!2:6=H=',@4F5S97)V960       /R   #Z0   )(S
M_$   -_PFB \2$5,4+"X  !G  !P(<   $'X 0 @QR#5(#@ ! @   !F6"Q 
MT*X )E* 9DX@//'BT\0O +"?9CA*AVL^0>X" B#'(-5A  "8 H?__P  9A!*
M@$SX__\!@&8  2Q.[O^.2JX!)FP(,_S   #?\)I.=2Y\  0  $*G0F< .0 #
M +_B 0(Y /X O^ !(?P   "< "!&_"< <@4S_ %T -_P,G#_"/D  0"_X %1
MR/_V"+D  0"_X %1R/_V,#D W_ 8,_P(  #?\)P"  !_#   ?U?)_\YK  "P
M+P=.[O^.2.<A,G(*</]1R/_^4<G_^B0N @)P_[2 9W9/[_\X1]=!^@"N( )(
M0 P   %F!D'Z (I@#@@" !]F"$I 9P1!^@"E85I!^@"U851"&T'Z -1#[@("
M1?H 0DZN_?9#^@#C< !.KOW82H!G&"9.+$!"@$'7<BA.KO^F)$ B3BQ+3J[^
M8D_O ,A"N   </\M0 ("( I,WTR$3G46P$(33G5"&Q;89OQ0VTYU(#P  @  
M4X!N_$YP('@ !$[0)@].;W0@96YO=6=H(&UE;6]R>2X@ "8/4V]F='=A<F4@
M1F%I;'5R92X@ "8/4F5C;W9E<F%B;&4@06QE<G0N( #J#U!R97-S(&QE9G0@
M;6]U<V4@8G5T=&]N('1O(&-O;G1I;G5E+@".'D=U<G4@365D:71A=&EO;B C
M)3 X;'@N)3 X;'@ :6YT=6ET:6]N+FQI8G)A<GD 86QE<G0N:&]O:PT*    
M ^P    !    !    )8        #\@   ^D    42.< .BAO !0@;P 8(F\ 
M'$7Z #I/[_]T)D\L>0    1.KOWV</]*&U?(__Q&@&<2+P!(;P $2%1.N0  
M  !/[P ,3^\ C$S?7 !.=1; 3G4   /L     0    D    Z         _( 
M  /I    ""\")"\ "$AO  PO B\Y    %$ZY     $_O  PD'TYU   #[   
M  $    %    %     $    !    #@        /R   #Z@        /R   #
MZ0        /R   #Z0    ](YS "+'D    (3.\ #@ 03J[_T$S?0 Q.=0  
M+PXL>0    A.KO_*+%].=2\.+'D    (3J[_Q"Q?3G4   /L     P    $ 
M   &    (    #         #\@   ^D    0+PXL>0    1.KO]\+%].=2\.
M+'D    $("\ "$ZN_L(L7TYU+PXL>0    0B;P ((&\ #" O !!.KOY<+%].
M=0   ^P    #     0    0    4    *         /R   #Z@        /R
8   #Z@        /R   #Z@        /R
 
end
-------------------CUT HERE------------------------------------
-- 
andy finkel		{ihnp4|seismo|allegra}!cbmvax!andy 
Commodore-Amiga, Inc.

"Interfere?  Of course we'll interfere.  Always do what you're best at,
 I always say."

Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.

kim@amdahl.amdahl.com (Kim DeVaughn) (11/05/87)

In article <2684@cbmvax.UUCP>, andy@cbmvax.UUCP (Andy Finkel) writes:
> 
> >Andy Finkel was onto this bug before I was.
> >
> >I suspect a CATS patch soon.
> 
> Probably I'll post it today.
> Its a SetFunction() thingie; I want to clean it up a bit, then
> I'll post a uuencoded binary.  (here; its fairly small)

I just want to say it again ... *this* kind of thing is really great!

Thanks for the support!

/kim


-- 
UUCP:  kim@amdahl.amdahl.com
  or:  {sun,decwrl,hplabs,pyramid,ihnp4,uunet,oliveb,cbosgd,ames}!amdahl!kim
DDD:   408-746-8462
USPS:  Amdahl Corp.  M/S 249,  1250 E. Arques Av,  Sunnyvale, CA 94086
CIS:   76535,25