waggoner@berlioz (Mark Waggoner) (06/01/89)
I have occasionally seen postings regarding setclock and various
methods of clearing a stuck real time clock. I had to deal
with this problem a while back and here summarize my workaround.
-----------------------------------------------------------------
SETCLOCK RESET cannot reset your battery backed up clock!
-----------------------------------------------------------------
I managed to crash my Amiga recently in such a way as to turn off
my battery backed up clock, or perhaps put it in test mode. I
tried using SetClock to reset the chip, but all it would say was
'Battery Backed up Clock not found'. After getting no help at
all from my local Amiga dealers, but a clue from another user
that SetClock checks for the existance of the clock before
attempting to reset it, I set out to correct it.
First, a couple of warnings on using the patch:
1. Use it only if you need to reset your clock. The patch
disables the check for the existance of a clock.
2. You still must specifiy the RESET option
3. If you normally get the message "Warning: Clock at old
address", use the second patch (at your own risk)
-----------------------------------------------------------------
Making the patch:
Copy SetClock to FixClock and make the following patch to FixClock.
I used NewZap3.0 from fish disk 58 to make the patch.
Sector 2, Byte BE
From: 00 00 01 C6 4A 80 66 42 23 FC 00 D8
To: 60
If you have a system where you normally get the message
"Warning: Clock at old address"
you could make the patch at byte D2, which should look like:
Sector 2, Byte D2
From: 00 00 01 C6 4A 80 66 1E 48 79 00 00
To 60
I have not tried this! (Do any such systems even exist?)
-----------------------------------------------------------------
What are you doing?
The patch changes a conditional jump to an unconditional jump
where the program is checking for the existence of the
clock (BNE -> BRA). If you are interested in seeing exactly
what you are doing, use one of the dissassemblers available
to pull SetClock apart (I used the one on fish disk 27).
-----------------------------------------------------------------
Mark Waggoner waggoner@logic.nsc.com
(408) 721-6306
--
/-------------------------------------------------------------------\
| Mark Waggoner (408) 721-6306 waggoner@logic.nsc.com |
\-------------------------------------------------------------------/