×   Main Menu ALL The 8BS News Manuals (New menu) Links Worth a Look Tools Disc and Basic Webring Site Map 8BS Guestbook Old Guest Book Me The Barnsley Rovers   
8-Bit Software

The BBC and Master Computer Public Domain Library

Y2K Fix and ADFS Utilities Raf Giaccio

Back to 8BS

Master 128 Y2K Fix and ADFS Wipe

Back to y2k fix page

ADFS Utility ROM

Mark Bush's Debugged/Amended Y2K Fix

MMC Utility and GoMMDFS ROM Images

Info, individual files + ssd disc image ROMs

The Master Panel in ROM

The latest Y2K Fix version, combined with new, full on screen Function Key list, ADFS *DRIVE, Panelrom (and how it works) and *wipe. Full description in Word format

Listing of Y2K Fix

Raf Giaccio


Please note that Raf wishes to retain copyright of these ROMs. Raf asks that anyone making changes to the listings should contact him

Here is the listing for the program Y2KWIPESC on the disc image. It is a plain text file.

Here is the listing for the program PATCHKEYSC on the disc image. It is a plain text file.

Y2K Fix and ADFS Wipe

Notes on Y2K Repair and ADFS WIPE ROM image listing and UTILSROM 04



I have tried to organise the Master-only version of this ROM image to be as speedy as possible while retaining the basic structure that Mark Bush has used. I have used &A8 and &A9 for addressing purposes in zero page. These locations are in MOS scratch space and are safe to use without needing to preserve the contents of the locations. The basic programming is fairly straight-forward. One fundamental difference is the use of dynamic filing system workspace RAM so as to preserve PAGE. I have tried to streamline and speed up the program by not having to repeatedly save zero page locations (except once when vital); by using MOS scratch space, which is quite 'legal'; by carefully manipulating the stack; and by exiting differently in 'ret'. The programming is otherwise as before. Note, however how I exit from 'ret':-

PLY
PLX
PLX
PLX
LDA #&0E
RTS

(note 'popping' X ). I have checked it all out by verifying the contents of &FFFF00EF which holds the value of the A register for the last OSBYTE or OSWORD call that has been made. It seems to matter not, at the end of 'ret', what the value of A is. After running Y2KWIPESC and installing the ROM image Y2KWIPE, the MOS knows absolutely that it is OSWORD &0E that is called after we type in *TIME$, *TIME or PRINT TIME$, as it always returns &0E in &FFFF00EF. So the 'ret' could end as follows:-

PLY
PLX
PLX
PLA
RTS

In fact, this is the ending that I use on my Master 128s; but I have MOSPLUS installed and it removes some MOS bugs that exist. I doubt it, but it might make a difference in machines without MOSPLUS or those with Operating System version 3.50 (I have 3.20).

The WIPE section starts off with preserving all registers and recognising its command name. Next, I preserve and clear the zero page locations to be used for addressing, storage and for use as flags. Then the addresses of files and directories in the current directory are read in from the data list. I am reliably informed that in both MOS 3.20 and 3.50 ADFS uses exactly the same addresses to hold the file and directory names of the current directory. I have tried to use more elegant techniques but directly accessing the locations where ADFS holds the name of each file and directory is the only way that I have found that works across the Tube.

The 'delete" area starts at &DD20 where "DELETE " is stored followed by the file name, some "padding" and then &0D. A simple call to oscli does the job of deletion.

There are some strange things stored in the locations where file names and directory names are placed by ADFS. In short, it depends on the length of a name as to what the last character is. It might be &00, &0D or &8D. As you will see from the listing this is sorted out by subtraction, and then the name (of file or directory) is padded out to 10 characters with &20 and then &0D is added onto the end in the 'file name-process' and 'delete' areas which are from &DD40 and from &DD20 respectively. Y holds the length of the name, a formality, really, but it needs to be stored in the parameter block at pblock+11 and at pblock+14 (MOD and DIV 256).

Next is 'JSR 'erase' with some preserving and flag clearing. The programming is largely self-explanatory. In 'erase' a 'JSR file_type' occurs where the file number is returned in 'file_num' and again one needs to be careful in printing out file/directory names as ADFS sometimes uses ASCII values above &80. Hence the care taken to sort this out in the lines that follow the label 'Pstay4', before the 'question' is asked, so to speak, about whether or not to 'delete', 'stay', 'show_dir', etc. When a deletion occurs the 'deleted' flag is set.

The sub-routine 'file_type' is used to get the file number which is returned in A when using OSFILE with A=&05. Deletion is permitted only if a 1 is returned in A. This indicates a normal file found. If A returns with 2 it indicates that a directory has been found and if &FF is returned it indicates that a protected file (E attribute set) is being processed. So they must be skipped over. Also, if a file has the L attribute set, bit 3 and/or bit 0 of pblock+14 is/are set on exit and that file name must also be skipped over. Testing is done by ANDing with 8 and 9 and a skip is made via 'stay7'. The use of locations &DD00 onwards is permitted, by the way - see the User Guide. Then, it is all easy sailing. I report back with information about the skip and why it occurred via the various routines e.g. stay3, stay4, stay5 and stay7. After a skip or a deletion I move on to the next file or directory address and repeat the whole process until zeros are found at the end of the list of files and directories in memory, which ADFS kindly provides. However, this may not be the case if a directory is full. Hence the need for EQUW &0000 at the end of the 'data' list.

Exiting is a bit tedious but is simple enough through 'restore'. I have found that unless the zero page locations are preserved and then cleared with zeros, annoying problems will occur, such as the repetition of file and directory names. Of course, the zero page locations need to be restored on exiting by pulling them back off of the stack.

The command *wipe takes upper or lower case characters and a limited abbreviation. Please do not forget to 'set' the current directory otherwise *wipe will simply return the usual Master prompt!

UTILSROM 04 takes upper and lower case characters and allows abbreviations for its commands. The 'CLOCK' utility clashes with 'SPELLMASTER'. In order to improve compatibility, I will be experimenting with other memory locations for workspace with each up-date (most of these will be unnoticeable). I will be using Econet workspace (Pages 11 and 12, &0B00 to &0CFF) to begin with. I doubt that there are many people officially using these locations nowadays.

Please note that I reserve the copyright for all software that I develop. Private personal use and copying is permitted free of charge. Please contact me about public use or if you have any problems with the software.

Dr. Raf. Giaccio
PO BOX 322
ELIZABETH
SOUTH AUSTRALIA 5112
AUSTRALIA

Email rafg1@bigpond.net.au

18/10/2003 To date, one problem has occurred with both 'Y2K Repair and ADFS WIPE 03' and 'Y2K REPAIR 02'. When using the *BUILD command errors will occur often in that the file willl not contain exactly what you type in, especially when used from Sideways RAM. The inconsistenties occur too frequently when using this comand with these ROMs/Images. It is recommended that you use other means eg *EDIT to *BUILD !BOOT and similar files. Please note that the same applies to the original programme provided by Mark Bush, when debugged. The use of main RAM in the original programme produces the same results and raises PAGE by one page of memory. The ADT ROM *ABUILD does work however. Raf Giaccio

ADFS Utility ROM

Notes on UTILSROM 04 ROM Image

UTILSROM 04 4.10 has several commands. It is a ROM image that has been patched and up-graded over the years. Consequently, it has no source code; and in any case the source code would be too long to type-in. Currently, I have the following commands available but as I have been able to combine ADFS WIPE (automatic skipping of directories, locked and protected files) with the Master-only Y2k Repair, I will probably be adding in e.g. *Panel (hopefully) from the Welcome disc, etc. I may also remove *WIPE from UTILSROM 04, if the Y2K Repair and ADFS WIPE ROM becomes popular. Due credit is hereby given to all of those people and sources that I have drawn upon over the years to present a few of these utilities to you.

So the commands are as follows, not alphabetically, but more in a developmental or up-graded order:-


*CLOCK < (ON Y) |OFF >
Complex as *fx22, 23 are tricky especially if ADT or MOSPLUS are fitted to the Master. The 'Y' parameter is used only to turn on the am/pm format display of the time at the top right Hand side of the screen. Can clash with SPELLMASTER. *kill/ *unplug this if fitted and you want to use the clock often. See also 'Notes on Y2K Repair and ADFS WIPE ROM image listing and UTILSROM 04'.

*CMOS
This shows the contents and ASCII characters of the usual 50 CMOS locations available to be visualized so that one can see whatever flag values or other information you have set. I developed this because I think these locations are useful as flags, etc.

*CRUNCH
Removes those unnecessary spaces in Basic programs. Co-processors must be turned off with this command. This is a well known utility that is always handy to have available.

*ITALIC
*THIN
*SQUAT
These three are text formats from the Welcome disc. I find *squat very useful for all my programming as it produces fine quality text on the screen.

*KEYS
I developed this so as to always have my usual function key definitions available. I think that its definitions should fire-up on power-up if a ROM form of this ROM image will be 'blown' or developed. Its definitions as well as a *fx254 are issued on every soft or hard reset. I am working on making more character space available for the nine programmable function keys currently available but I may leave this for now. I also have a program to alter the 9 function keys as needed. This is called 'PATCHKEYSC' and is on the accompanying disc, together with UTILSROM 04. A listing is available.

*NVED
This shows ALL of the CMOS locations - read/write is allowed! Please take care with this. You may 'write' to sensitive areas

*KILL <Rom id>
*PLUG <Rom id>
I developed these two to instantly '*unplug' or '*insert' for any of the 15 ROMs/slots. The action taken is maintained on power-down and power-up

*MESSAGE <ON|OFF>
This is used to display/remove a start-up message on resets.

*WIPE
This is an ADFS *wipe that skips over directories, locked and protected files. I developed this Master-only version over the years.

*XCOMPACT <drive>
This is a simple but effective routine that keeps compacting until there is only one area of free space on the disc. It works surprisingly quickly.

*NUMBERS
I developed this routine to convert numbers to different bases. So I have binary, octal, hexadecimal and decimal all available.

*ROMCOPY <0-F>
This copies any of the 15 ROMs/slots to disc. However, co- processors must be turned off.

UTILSROM 04 accepts upper or lower case commands and abbreviations.
Please note that I reserve the copyright for all software that I develop. Private personal use and copying is permitted and is free. Please contact me about public use or if you experience any problems.

Dr. Raf. Giaccio
PO BOX 322
ELIZABETH
SOUTH AUSTRALIA 5112
AUSTRALIA
Email:- rafg1@bigpond.net.au

Mark Bush's Debugged Y2K ROM

Mark Bush has written a ROM fix for the Master 128 year 2000 bug fix. Unfortunately this would not work on my Master 128. Raf Giaccio has debugged and amended this program to preserve PAGE by using filing system workspace RAM. This was the starting point for the above ROM and listing, so you don't really need this if you are using a Master:
Listing of bug fix Written by Mark Bush. Adapted, improved and fixed by Raf Giaccio
Disc image of debugged Listing and assembled ROM

 The Master 128 Panel in ROM

Raf has placed the Panel from the Welcome disc into ROM. Load this into sideways RAM or burn it to EPROM and call it with *RES or *RESET. For info on how to use Panel, please refer to the Master Welcome Guide.This ROM image works exactly as per the 'WELCOME GUIDE' for the Master 128, Page 23 onwards. It is in fact, Panel in ROM form and the century updated.

Please try this in ROM CHIP form to configure your Master from a COLD RESET. I think that you will be pleasantly surprised at its ease of use; but please remove ALL other ROMs.

Download disc image of ROM

Finally, when doing a COLD RESET do not insert this or any other ROM until you have configured your Master to your satisfaction

 Back to 8BS