The following notes are intended to help you when merging an optional module into your Color 64 BBS system disk.
The first thing you need to do is load a programmers utility. I recommend BAID64, since it is in the public domain and it does a true merge (not just an append). I have a copy of it (along with DOCs) available for download in the C-64 Utilities area of my BBS.
The next thing you need to do is make sure the module that you are going to merge will not overwrite any lines already existing in the intended overlay program. Just load the overlay program and list the line range used by the module and if you don’t see anything… it is ok. If not, consider placing the module in one of the other overlays.
Once you have determined that the module will not overwrite any existing code, just type ‘merge”module/name”,8’ (with one of the BBS OVERLAY programs already in memory). In just a minute, the lines from the module will be merged with your system overlay file.
The next thing you need to do is to modify the code so that one of the spare commands will execute the module. There are 9 spare commands available in Color 64 BBS. Each of these spare commands will load a pre-defined overlay file and execute a pre-defined line number. The following are the defined overlays and lines executed for spare commands 1-9:
Spare 1 – ºbbs.msgs – line 13430
Spare 2 – ºbbs.xfer – line 13440
Spare 3 – ºbbs.ovl – line 13450
Spare 4 – ºbbs.ov2 – line 13455
Spare 5 – ºbbs.ov3 – line 13460
Spare 6 – ºbbs.ovl – line 13465
Spare 7 – ºbbs.ovl – line 13470
Spare 8 – ºbbs.ovl – line 13475
Spare 9 – ºbbs.ovl – line 13480
As you may notice, there is only one spare command pointing to ºbbs.ov2 and ºbbs.ov3. I intended that these overlays be used by modules that would require the whole overlay or that you use a menu program (like Games Menu) to display a sub-menu for your callers and this sub-menu program will execute the required routines based on the callers input.
Anyway, you need to modify the spare line at the appropriate line number based on the overlay program you are merging with. When you list 13430-13480, you will see the available spare command lines for the overlay program loaded into memory.
They look like:
134XX goto13100:rem spare X
You will not see all the above lines listed, just the lines that applicable for the overlay program you have loaded. You will want to use the insert key to push the ‘goto13100’ over and enter a gosub pointing to your newly merged module. Example:
134XX gosubXXXXX:goto13100:rem spare X
Now you need to save this modified version of your overlay program back onto the disk. If you will list line 1 of the program, then delete ‘1 rem’ and hit return, the line will automatically scratch the old overlay program and then save your modified version on your disk. After it is saved, do a directory (type @$0 with BAID64 enabled) to see the size if the new file. This file must always be smaller than ºbbs.init, that is 100 blocks or less. If the file is too large, you will need to use a different overlay or take something else out of this overlay. Make sure you save this modified version on both your BBS PROGRAMS and BBS PARMS disk.
Next, load “SETUP”,8,1. Put in your BBS PARMS disk and hit RETURN until you get to the second screen of BBS COMMANDS. On this screen, you will want to set the access level for the intended spare command to the desired value. You can also change the command key required to execute the module. If you do change the command, make sure you don’t select a command that is already used.
Well, that will do it. You may want to write down the line numbers occupied by this module so that if you decide to remove it to make space for another one you will know exactly which lines to delete (using your programming utility – like BAID64) and to change the spare command line back to normal.
703 466 2120