> CustomDNFS 1.40  (C)1997-98 J.G.Harston 2 Allows customising of NFS3.60 and DFS1.20 in ($ DNFS3.00 ROM or 8K NFS3.60 ROM 25 25-Jul-1998 v1.20 - Added NotReady patch to DFS <4 23-Aug-1998 v1.30 - Read image direct from ROM F4 22-Nov-2015 v1.40 - Optimise UTILS, *EX bugfix P: Z5&87:4"Customise DNFS for BBC B/B+"'4;27,"=") d@ 28,0,24,39,2:mem%&3FFF:mem%!&2000=0:mem%!&3A2C=0:LoadROM n&:26:update:psn%=0:change:11 xRsave$=" "+~mem%+"+":mem%!9=&2C534644:save$=save$+"4000" save$=save$+"2000" ;file$,1)>="0" file$,1)<="2":file$=file$,file$-1) 4mem%?&213=&32:file$=file$+"2" file$=file$+"1" ?"Enter name to save by: '"file$"'":":"A$:A$,1)="*":A$ !A$,1)<>"*":A$<>"":file$=A$ =save$="*Save "+file$+save$+" 0 FFFBBC00":save$;:save$:  : -LoadROM:file$="DNFS300": %.^.ROMImages Q'"Read image from active ROM? ";:""A$:A$,1)="Y"A$,1)="y":ReadFromROM: 7'"File to load: '"file$"'":":"A$:A$,1)="*":A$ !A$,1)<>"*":A$<>"":file$=A$ 7file$<>"":"Loading...";:"LOAD "+file$+" "+~mem% ?mem%!13<>&54454E:'"File '"file$"' is not a DNFS image.":  : #ݤd0(A%,N%)="00000000"+A%,N%) "$ݤh0(A%,N%)="00000000"+~A%,N%) ,.ݤstn(A%):=d0(A%256,3)+"."+d0(A%&FF,3) 6Aݤdot(A$):A%=A$,"."):A%=0:=A$ =256*A$,A%-1)+A$,A%+1) @: J(ݤtype(A%):A$:A%=0:="* Reserved *" T(A%&FF00)=&FF00:A$="SJ " (A%&FF00)=&0100:A$="Torch " (A%&FF00)=&0200:A$="Reuters " (A%&FF00)=&1000:A$="JGH " A%<256:A$="Acorn " ^A%=1:=A$+"BBC" hA%=2:=A$+"Atom" rA%=3:=A$+"System 3/4" |A%=4:=A$+"System 5" A%=5:=A$+"Master 128" A%=6:=A$+"Electron" A%=7:=A$+"Archimedes" A%=8:=A$+"*Reserved*" A%=9:=A$+"Communic'r" A%=10:=A$+"Master ET" A%=11:=A$+"Filestore" A%=12:=A$+"M-Compact" A%=13:=A$+"PC Ecolink" A%=14:=A$+"RISCiX" A%=15:=A$+"Risc PC" A%=16:=A$+"Iyonix" A%=17:=A$+"A9" A%=&1040:=A$+"ZX Spectrum" A%=&1041:=A$+"Amstrad CPC" A%=&FFF8:=A$+"GP Server" &A%=&FFF9:=A$+"80386 UNIX" 0A%=&FFFA:=A$+"SCSI Card" :!A%=&FFFB:=A$+"IBM Interface" DA%=&FFFC:=A$+"Nascom 2" NA%=&FFFD:=A$+"RM 480Z" XA%=&FFFE:=A$+"File Server" bA%=&FFFF:=A$+"Z80 CP/M" l =A$+"?" v: update:0,3); O"Machine type: &";h0(mem%!&21,4);" - ";type(mem%!&21 &FFFF);(39-)'' 1"NFS version: ";~mem%?&24;".";~mem%?&23'' 7"File server: ";stn(256*mem%?&2EE+mem%?&2E7)'' 7"Printer server: ";stn(256*mem%?&2EE+mem%?&304)'' G"DFS version: ";:mem%!9=&2C534644:$(mem%+&3A2C)'' "****"'' 7"NFS *EX bugfix: ";:mem%?&C57=&8C:"No " "Yes"  : 2ݤchange:psn%=psn%+1:0,psn%*3+1+3*(psn%>5)); Cpsn%=8:"Ok? ";:""A$:11:39:psn%=0:=A$,1)="Y" A$,1)="y" "Change to: "; $psn%=5:8,8:" fix timeouts? "; &psn%=6:8,8:" optimise UTILS? ";  &psn%=7:8,8:" add *EX bugfix? "; ""A$:11:39:A$="":=0  4psn%=1:A%=("&"+A$):mem%?&21=A%:mem%?&22=A%256 *psn%=2:A%=dot(A$):mem%?&23=("&"+(A%&FF)):mem%?&24=A%256:mem%?&210=(mem%?&24)+48:mem%?&212= ((mem%?&23)&F0)16+48:mem%?&213=((mem%?&23)&F)+48 45psn%=3:A%=dot(A$):mem%?&2E7=A%:mem%?&2EE=A%256 >5psn%=4:A%=dot(A$):mem%?&304=A%:mem%?&2EE=A%256 H*psn%=5:A$,1)="Y"A$,1)="y":FixDFS R,psn%=6:A$,1)="Y"A$,1)="y":FixUTILS \)psn%=7:A$,1)="Y"A$,1)="y":FixEX fupdate:=0 p: z)FixDFS:$(mem%+&3A2C)<>"DFS 1.20": ,mem%?&250C=&20: new address of *COMPACT -mem%!&2A4C=&7730A2C6:mem%!&2A50=&C9BB1520 6mem%?&2A54=&00: save catalogue resets 'Not Ready' 8mem%?&2C12=&1A: branch to earlier 'Not Ready' check 4mem%?&2C2B=&B0: branch earlier in addr=addr+num mem%!&2C2D=&F0BB0D20 0mem%?&2C31=&07: call 'Not Ready' reset code ʁ$(mem%+&3ADD)="src> "+&BC+"old> "+&A8+")"+&A8+")"+&BC+"title>"+&BC+"drv>"+255: Shortened help text -mem%!&3B0D=&AA842048:mem%!&3B11=&6010C968 -mem%!&3B15=&A4202BA0:mem%!&3B19=&BB0D20AC :mem%!&3B1D=&EA60F6F0: Check for and clear 'Not Ready' -mem%!&3B22=&F720A9CE:mem%!&3B26=&6D6F439F -mem%!&3B2A=&74636170: Short 'Compacting' $(mem%+&3A2C)="DFS 1.21": : .FixUTILS:$(mem%+&3A2C),7)<>"DFS 1.2": $ : A$ .0:A%=("&"+A$,4,4))-&8000:A$=A$,10,A$-11) 84:mem%?A%=("&"+A$,2)):A%=A%+1:A$=A$,3):A$="" B A$: A$,3)=":00" L V :01A56C0044AA ` :02A57200BF9593 j :01A57A00D20E t :01A581009940 ~ :02A58E00BF9577  :05B49500C904208EBF78  :01B4E800EA79  :01BA330032E0 Q :20BE8A00B1BEC921B0034C618C4CC180A900F002A9FF85AB2080BFA90DD01820D7FFB01C94 Q :20BEAA00C90AF0F728D0054820A1BF6820E3FF24FF3019AA25ABC90D084CA5BE28E00DF017 Q :20BECA000320E7FFA9004CCEFF2080BF24FF30651820E4BF20A9BFBA8AE907AA9AA9088565 # :09BEEA00AC20D7FFB0109D01014E G :1BBEF60020A9BFE8C6ACD0EDF016A92A20EEFF20EEFF20A9BFA9009D0101E8E7 3 :11BF1300D0EB386A85ABA2088A1865A885A89002E692 Q :20BF250068C97FB004C920B002A92E20EEFFCAD0EF20E7FFA5AB3091109720CEBE4C76ABB9 Q :20BF450020B8BFA98020CEFF85AA20A1BFA92085AEBA8AE94085ADA0FF84AFC884ABC884D0 Q :20BF6500AC8898A2AB20F1FFB0D0A200A4AABD000120D4FFE8C90DD0F5F0CF20B2BFA940B6 9 :14BF850020CEFFA8D0264C8CA1F005AD80FE2903602090BF89  ) :0CBF9A00FA4CC1B3FFFFFF20DCBFB00376  :01BFAD00EEA5  :01BFB6000981 ( :01BFFC00EE56 2 :0000000000 <: F FixEX PV$(mem%+&3A2C)="DFS 1.22":mem%?&C57=&BE:mem%?&C58=&89:mem%?&23=&62:mem%?&213=&32: ZH$(mem%+&3A2C),7)="DFS 1.2" mem%!12<>&54454E20 mem%?&C57<>&8C: d0A%=&2000::A%=A%-1:mem%?A%<>&FF:A%>&3FF4: nEmem%!(A%+1)=&21C9BEB1:mem%!(A%+5)=&614C03B0:mem%!(A%+9)=&80C14C8C x@mem%?&C57=A%256+&80:mem%?&C58=A%:mem%?&23=&62:mem%?&213=&32  : !ReadFromROM:file$="DNFS300" & mc% 79: P=0 1:P%=mc%:[OPT P*2 7LDA #&80:STA &73:LDA #0:STA &72 :\ Source address 8TAY:JSR &FFDA:PHA :\ Read current FS 3LDA #143:LDX #18:LDY #4:JSR &FFF4 :\ Select DFS 6LDA &F4:PHA :\ Save this ROM 7LDA &DBC:STA &F4:STA &FE30:LDY #0 :\ Select DFS ROM .lp :LDA (&72),Y:STA (&70),Y:INY:BNE lp :\ Copy a page =INC &73:INC &71:LDA &73:CMP #&C0:BNE lp :\ Copy whole ROM 5PLA:STA &F4:STA &FE30 :\ Restore ROM 4PLA:TAY:LDX #18:LDA #143:JMP &FFF4 :\ Restore FS ]:!&70=mem%:mc%: