CustomDNFS 1.40 =============== mdfs.net/System/ROMs/Filing/FixDNFS J.G.Harston, 70 Camm Street, Walkley, Sheffield, S6 3TR Introduction ------------ Most BBC models Bs use DNFS 3.00 which contains DFS 1.20 and NFS 3.60. DFS 1.20 interfaces with the 8271 floppy disk controller and has many improvements and major corrections over DFS 0.90. NFS 3.60 has many improvements and corrections over the previous main release 3.34. The NFS defaults to a file server at station 0.254 and a printer server at station 0.235. Many systems have a printer server at the same station as the file server, and on a network with multiple bridges, this would mean keeping BBCs on the same subnet as the fileserver. This program allows you to change these default setting. There is a slight problem with DFS 1.20 if you use it with 3.5" disk drives. Various factors come together to cause the 8271 to return 'Disk error 10' (Drive not ready) errors. This program allows you to insert a patch so that disk access always waits until the drives are ready. This results in DFS 1.21. The DFS UTILS reserve 256 bytes of workspace for the *DUMP and *BUILD commands. These only need a few bytes of workspace, and can be optimised to not need this workspace. This results in PAGE dropping to &1800 on a DFS-only machine or &1A00 on a DFS+NFS machine. There is a slight bug in the NFS *EX command where it does not check for a seperator after the command. This means that, for example, *EXAM tries to examine the directory AM instead of running the program EXAM. This program allows you to fix this bug. With the 16K DNFS ROM you need to add the DFS UTILS optimisation first to make space. Usage ----- To use CustomDNFS you need a ROM image of DNFS or NFS. CustomDNFS can read the DNFS ROM active in the machine, or you can use the supplied *SRSave command to save it directly to disk. You need to know which ROM slot you have DNFS in. If you have a *ROMs command, this will tell you. Otherwise, the easiest way to find out is to look inside. The ROM sockets are at the front of the PCB just under the keyboard to the right. Slot 15 is the rightmost one, and they count down to 12 going to the left. If the DNFS ROM is in slot 14 (&E in hex), then use *SRSave to save the ROM image as follows: *SRSave DNFS 8000+4000 E When you run CustomDNFS you will be asked if you want to read DNFS from the active ROM. If you answer 'N' you will instead be asked for the name of the ROM image to load. At this prompt you can also do *commands. If you just press RETURN, the displayed default of 'DNFS300' will be used. You will then be shown what the current settings are as follows: Customise DNFS for BBC B/B+ =========================== Machine type: &0001 - Acorn BBC NFS version: 3.60 File server: 000.254 Printer server: 000.235 DFS version: DFS 1.20 NFS *EX bugfix: No Pressing RETURN will move between each option. Entering a new value or YES to the DFS and *EX options will update that option. The file server and the printer server must be on the same network. Changing either will change both. If the image loaded is an 8K NFS ROM, the DFS option will be disabled. When entering 'Yes' to the 'Ok?' prompt the program asks for the name to save the new image as. At this prompt you can do *commands. If you just press RETURN, the displayed default of the loaded filename changed to end with '1' or '2' will be used. This can now be blown into an EPROM and fitted permanently. Technical Information ===================== The DFS 1.21 patch works by adding a check at the end of the disk access code. This checks if the result is 'Not ready', and if it is, clears it and retries continuously until a result other than 'Not Ready' is returned. The patch code is as follows: A504 EQUS "COMPACT" A50B EQUB &BB ; Routine address-1 EQUB &BB ; Trim routine to A50C EQUB &1D EQUB &20 ; make space AA4C LDY #&2B DEC &A2 ; Dec. retries AA4E DEC &A2 ; Dec. tries BMI &AAC7 ; <0, jump to release AA50 BMI &AAC7 ; <0, jump to release JSR &BB15 ; Verify 00:8+2 and ; reset 'Not Ready' AA52 JSR &ACA4 ; verify 00:8+2 CMP #0 ; Check result AA55 BNE &AA4C ; Loop back with error AC0E JSR &ACA7 ; Wait until action done AC11 BNE &AC32 ; Result<>0, retry BNE &AC2D ; Result<>0, retry AC13 JSR &ABC7 ; Set retries to 10 AC16 INC &CE ; Increment track AC18 LDA #&00 AC1A STA &CF ; Set sector to zero AC1C LDA &107C ; Get number AC1F CLC AC20 ADC &1073 ; &1072-5=&1072-5+number*256 AC23 STA &1073 AC26 BCC &AC4B AC28 INC &1074 AC2B BNE &AC4B BCS &AC4B ; Jump to do next AC2D INC &1075 JSR &BB0D ; Reset 'Not Ready' AC30 BCS &AC4B ; Jump to do next BEQ &AC39 ; Jump to try again ; if 'Not Ready' ; AC32 DEC &A2 ; Dec. tries AC34 BPL &AC39 ; Try again AC36 JMP &AAC7 ; AC39 LDY #&04 ; Copy command back to &A3-A7 BADD ; Shortened help strings BB0D PHA ; Save result JSR &AA84 ; Reset 'Not Ready' PLA ; Get result back CMP #&10 ; Is it 'Not Ready'? RTS ; BB15 LDY #&2B JSR &ACA4 ; Verify track 0 JSR &BB0D ; Reset 'Not Ready' BEQ &BB15 ; Loop if 'Not Ready' RTS ; NOP ; Spare byte BB21 JSR &A9CE ; Shortened *COMPACT ; routine JSR &9FF7 EQUS "Compact :" ; removed "ing" Version History =============== 22-Nov-2015 v1.40 Optimised UTILS, *EX bugfix. 23-Aug-1998 v1.30 Will read DNFS from active ROM. 06-Jun-1998 v1.20 Timeouts fix for DFS added, default filename offered, checks loaded file appears to be DNFS. Checks if only 8K NFS ROM. 20-Nov-1997 v1.10 Allows customisation of NFS default settings for machine type, version, fileserver station and printer server station.