kgl2001 / IntegraB-OS

IntegraBv2 OS for BBC Micro
1 stars 2 forks source link

Allow DFS and NFS to be individually enabled/disabled via *CONFIGURE when using DNFS #4

Open ZornsLemma opened 3 years ago

ZornsLemma commented 3 years ago

It's already possible to choose which of these filing systems is used as the default via *CONFIGURE FILE <dnfs bank> D/N, but as discussed here it is possible to enable/disable these filing systems individually and it would be nice to expose this as a separate *CONFIGURE option.

jgharston commented 1 year ago

Disabling half of DNFS is a type of INSERT/UNPLUG, whereas CONFIG FILE fs-rom-num is selecting which filing system is selected on Break. But how do you disable half of a ROM? I think maybe an extension to INSERT/UNPLUG to allow (|DFS|NFS). The MER and others have *CONFIG. DFS|NFS which twiddles OSBYTE 255 to select which is the default.

jgharston commented 1 year ago

The MER uses config byte 9 as: b4=0 Config. NFS b4=1 Config. DFS

jgharston commented 1 year ago

A thought from the confiduration layout thread, two bits are needed to enable/disable DFS/NFS, DNFS uses b7-b6 of &DF0,X, there are two bits spare in location 8, conveniently in b7-b6. So, the following code in service01 within the (NoSoftRestart) section would do it:

userRegEditDNFS = 8 LDX #userRegEditDNFS:JSR ReadUserReg ; Get EDIT/DNFS settings PHA JSR FindDNFSROMNumber ; X=DNFS ROM PHA:AND #&C0 ; *UNPLUG DFS/NFS settings EOR &DF0,X ; Overwrite b7-b6 in DNFS frugal bits AND #&C0 EOR &DF0,X STA &DF0,X

It needs a GetDNFSROMNumber subroutine

jgharston commented 1 year ago

Gah, that second PHA should be PLA ;) (or put it within GetDNFSROMNumber)