And so it goes.... I am placing the source code to the X-Com Wedge into the public domain. I would ask that any resultant usage of this code (and or the wedge system itself) at least give credit to its origin. This is a description of the files you will find in this archive, and an overview of the Wedge system itself. An Overview of the Wedge The Wedge currently uses 3 of the 4 extanded banks of memory. they are used in this manner. Bank #1 - the wedge command parser, common I/o routines, interbank jump code, and the bulk of the wedge's commands, along with a 4k working buffer. Bank #2 - common I/O routines, the find routines, protected copy, the resident formatter, and an 8k working buffer. Bank #3 - is used entirely for wedge disk accessories. The load routines exist in bank #1 and in the main memory driver. Bank #4 - is currently unused. Main memory (low mem-res handler) This segment contains not only the actual lo memory resident code but the bulk of the initialization code as well. (which of course gets thrown away once the system is initialized). The main bank code is created in a manner compatable with K ledbetters relocator. However before using relocator on the resultant binary file from Mac/65, FIRST use a desegmenter on the code to eliminate the multiple segments Mac/65 creates. This allows for a smaller relocatable output file from Keiths relocator, and since it cant quite handle all the situations that crop up in a multi segmented binary file, its best to run a desegmenter on it. (something like analogs streamliner for instance). How the wedge loads The code in the wedge is assembled at an offset, although its banked code resides contiguously from $4000 it has an ORG. of $8000. and since it isnt possible to fit 12k of code between $8000 and memtop with a cart enabled the "a" bank of code is split into segments. The actual executable file of wedge.com has 8 segments. The title screen, bank #1 offset code (1st part), bnk code relocator, bank #1 offset code (part 2), bnk code relocator #2, bank #2 offset code, bnk code relocator #3, and finally the main (relocatable) bank driver. This last segment is actualy a multi segment file in itself, being created with relocate.com but for our purposes its just one segment. Coding for the wedge Any code that is destined to reside in one of the extended banks must have a an org of $4000 and an offset of $4000 (see the mac manual for details). any coding done in the main bank module must conform to the premise layed out in Keith Ledbetters relocate.com program. ALL resultant assemblies (binary files) MUST be desegmented! This is a good practice to adhere with ALL the object files making up the wedge. adding more code to the wedge Note that each segment of extended bank code for the wedge must be followed by a "relocator" routine to swap in the extended ram and move the code down to its appropriate location in memory. Once Installed.... Once the wedge loads in and all preliminary tests have been successful, the wedge's main bank init routine prepares the modules in the extended banks for operation. This involves saving some system values into the main banks as well as telling the extended banks exactly WHERE the main bank handler is located. This involves storing these values directly into the banked code. You can see this from the initialization segment of the main bank of code as well as from the first page of the code residing in extended memory. Creating the Wedge from your object files... see the batchfile in create.arc for exactly how this is done. Create.arc also contains the object files with which you can create a running copy of the wedge from. Whats in the archive **** The following files are in the wedge archive. SUPPORT.ARC - this file contains the launch (relocator) source for the banked code, as well as a file splitter for banked code exceeding 9000 bytes in length. also there is the source to the wda conversion utility. TITLE_SC.ARC - this file contains the necissary code to generate a mac 65 list file of the necissary data to create the wedges opening screen. I would ask anyone who might revise or use any of these utilities, to indicate their origin, (read that, "at least mention my name!"). MAIN_BNK.ARC - this file contains the source to the main bank meory resident segment of the wedge including its init functions. WDA_SRC.ARC - this file includes the source code to the only wda currently existing for the wedge, bmenu. plus an environment in which to test WDA's X_BANK1.ARC - this file includes all the routines located in the first bank of the wedge. The key file is "BANK_1.M65" all the rest of the files are include files called from that one. X_BANK2.ARC - this is the same as above but for the second bank of the wedge. the key file being bank_2.m65. CREATE.ARC - this archive contains some current level .obj files and a batch file used to assemble them into the executable wedge.com file. REMEMBER that main.obj is created by first de-segmenting your code for the main bank, THEN running it thru RELOCATE.COM! In Closing...... I hope some of you will find this code to be of use to you. It represents a great deal of time and effort digging about the innards of the atari and sparta dos 3.2, I am available to answer any questions you might have concerning these files and or the wedge system itself. I can be reached on GEnie as, E.BACHMAN or... on the ACUTE bbs 300/2400 bd, 24hrs. 215-261-0620 leave feedback to the Co-Sysop.