[comp.binaries.apple2] FINDPAT - Franklin ProDOS patcher - Part 1 of 1

dvac@drutx.ATT.COM (Daniel Vachon) (02/16/89)

Wow!  I finally get to post to the binaries newsgroup with something that may
be useful to some other netters...  This Applesoft program will look through
any PRODOS system file, and look for the code that checks computer type.  This
is the code that causes ProDOS to lock up on Franklins.  I have tested this
patch finder on 1.0.1, ProDOS 8 1.3, 1.5, and 1.7.   It found and correctly
patched all of them.   I didn't spend much time making this user friendly as
you shouldn't have to use it much anyways.  When you get a new version of
ProDOS, just load up an older version (that you have already patched for the 
Franklin) and run this program with the new PRODOS file in the active volume.

There are really 2 lines in the program you need be concerned about....

Line 12 : i$="PRODOS"   This is the filename of the ProDOS OS System file.
                       You probably won't have to mess with it.

Line 13 : l$="15360"    Instead of spending time trying to add the code to 
                       pull the filesize out of the DIR block, you must
                       set this string to be the DECIMAL length of the 
                       PRODOS file you are patching.  

After you run the program if it finds the correct address to patch, it will
toss a barage of ^G's at you then ask you to <B>oot <P>atch or <Q>uit. 
<B>oot will allow you to check first and verify that the patch address
that the finder found is the correct patch.  Press <B> and the new PRODOS file
should load up.   To actually put the patch onto the PRODOS file so it will
boot automatically on the Franklin, just select <P>atch, and it will unlock,
bsave, then relock your PRODOS file.  <Q>uit does what it should.  

If you have any questions, comments, concerns, etc... PLEASE feel free to
toss me some e-mail, post, or call...

[---------------------------------[CUT HERE]--------------------------------]

NEW
0  REM   >> FRANKLIN PDOS PATCHER
1  REM   >>
2  REM   >> BY DAN VACHON
3  REM   >>   (02/10/89)
4  TEXT : HOME 
5 D$ =  CHR$ (4)
10  PRINT "PRODOS FRANKLIN ACE 1000 PATCH FINDER"
11  REM   =============
12 I$ = "PRODOS"
13 L$ = "15360"
14  REM   =============
15  REM    i$=filename
16  REM    l$=file length (dec)
17  REM   =============
19  PRINT D$"BLOAD "I$",A$2000,TSYS"
20 A = 8192
25 B = A +  VAL (L$)
30  POKE 34,2
33  HOME 
35  VTAB 21: HTAB 1: PRINT "By Dan Vachon !ucbvax!ihnp4!drutx!dvac"
37  VTAB 22: HTAB 15: PRINT "(303) 538-5466/289-2548"
41  VTAB 5: PRINT " ADDRESS RANGE : "A" TO "B
42  VTAB 10: HTAB 17
45  PRINT A
50 I =  PEEK (A):J =  PEEK (A + 1)
60 K =  PEEK (A + 2):L =  PEEK (A + 3)
70  IF I <  > 10 THEN 100
75  IF J <  > 10 THEN 100
80  IF K <  > 168 THEN 100
85  IF L <  > 77 THEN 100
87  HOME 
90  PRINT "Found it!  Patch should be applied to"
92  PRINT ""
93  PRINT "address : ";(A + 8): PRINT 
94  POKE A + 8,234: POKE A + 9,234
95  PRINT "(P)ATCH PRODOS": PRINT "(B)OOT INTO PRODOS": PRINT "(Q)UIT TO BASIC"
96  GET I$: IF I$ = "B" THEN  CALL 8192
97  IF I$ = "P" THEN  PRINT D$"UNLOCK PRODOS": PRINT D$"BSAVE PRODOS,TSYS,A$2000,L"L$: PRINT D$"LOCK PRODOS": PRINT : PRINT "PATCHED!": PRINT : END 
98  IF I$ <  > "Q" GOTO 95
99  PRINT "PATCHER EXITED": END 
100 A = A + 1: IF A > B THEN  PRINT "NOT FOUND": END 
105  GOTO 42
900  REM   ==
901  REM   PDOS PATCHER 
902  REM   ==

[=================================[ Cut Here ]===============================]
---
][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][
][ Later Days -=> Daniel Vachon <=-          {!ucbvax}!ihnp4!drutx!dvac    ][
][ "This project is so secret, even                                        ][
][    I don't know what I'm doing!"             Apple ][ Forever           ][
][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][