            
DISCLAIMER:
===========
THIS SOFTWARE PRODUCT IS DISTRIBUTED "AS IS" WITHOUT WARRANTY OF ANY 
KIND, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY 
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL CHAOS ONLINE 
OR THE AUTHOR OF THIS SOFTWARE BE LIABLE FOR ANY KIND OF DAMAGES 
ARISING FROM THE USE OF THIS PRODUCT, INCLUDING BUT NOT LIMITED TO 
DIRECT, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES.

SOURCE CODE:
============
Version 1.2 of Free-OJ includes the source code! OJ.BAS is a great
example for those wanna-be door programmers. The program is written
using QuickBasic 4.5 and DoorFrame 4.9. This document has additional
information on what files you need, how to link/compile programs, etc.
I wish this information was available when I wrote "Chat With Lisa".

LEGALITIES:
===========
You may modify this source code to create your own door and market
the new door, but you may NOT sell the "Free-OJ" door or any other
O.J. Simpson program based on this code. The OJ source code, text
files and ANSI screens are copyrighted material and may not be sold
or used for any commercial purpose without my written permission.

However, you may edit the SYSOP.TXT file to provide documentation
for your own door. And you may also distribute the HELP.TXT file as
part of your documentation.

GETTING STARTED:
================
In addition to the source code that you already have, you need to get
copies of QuickBasic 4.5 and Doorframe 4.8 or 4.9. These programs are
used by many popular doors, including my own Chat With Lisa.

QuickBasic 4.5 was Microsoft's last version of their BASIC compiler
for DOS. The QBasic that comes with DOS simply won't work because it
cannot be linked or compiled into an executable file. VisualBasic for
DOS can be used if you obtain DoorFrame 2.1 for VB, but I have no
experience with that combination.

DoorFrame 4.9 is a BBS door development library for Basic that has been
around for years. I used it because I was very impressed with the T&J
doors (Studs, Studettes, Bordello) that use DoorFrame. You can download
DFRAME49.ZIP from my BBS Files library. Or just read the DFRAME.TXT
file (included with the Free-OJ files) to contact the authors directly.

If you don't register DoorFrame, there will be a short delay screen
and "evaluation copy" message at the start of the program. This is OK
while you are developing the game, but not acceptable for commercial
doors. The DoorFrame registration fee is very reasonable. Call them!

ANSI SCREENS:
=============
Since most doors use ANSI screens, you will need an ANSI paint program.
The most popular one is called TheDraw, and that is what I used to edit
my OJ screens. You can download TDRAW463.ZIP from my BBS files library.
Many ANSI artists freely distribute their work, and there are large
collections available on BBS's and AOL, Compuserve, etc.

PROGRAMMING:
============
Before writing your program, study the OJ source code. Note how it uses
modular subroutines for many functions. It's usually easier to write and
debug one module at a time, rather than the entire program. Try to under-
stand what the program is doing by referring to the comments on each line.

Also print out the DFRAME.TXT file. This document has all the DoorFrame
commands and their syntax/parameters. You need a printed copy because you
will be referring to this document constantly!

I'm not saying everything in the OJ source code is the best way to do
things, but it's good enough! This program has many of the same modules
as my Chat With Lisa door, and Lisa is installed on hundreds (thousands?)
of BBS systems. There really aren't any bugs in the code, as written.

LINKING/COMPILING:
==================
As you write your program, you will want to test the code often. But you
need to link and compile the code first, then test the executable file.
I use a batch file called LINK.BAT to make linking/compiling easy. Just
copy the following two lines into your LINK.BAT file:

BC OJ, OJ, NUL.LST /E
LINK OJ, OJ, NUL.MAP, BCOM45 DFRAME /E /NOD

Note that "OJ" appears four times in the two lines above. You MUST change
the OJ text to match the name of YOUR basic program, minus the extension.
If you don't get any errors, the batch file will create a .EXE file from
your .BAS file. These commands work great for me, consult your QB manual
for more details.

Also keep in mind that your source code and DoorFrame files need to be
located in the QuickBasic directory. Otherwise, they won't find each
other during the link/compile process. After the .EXE file is created,
it can be copied to another "clean" directory with other support files
used by your door (ANSI screens, data/text files, whatever).

You should keep all your BBS door support files in their own directory,
then copy the executable file to the door directory and test it locally.
All doors written with DoorFrame can be run locally by typing LOCAL
after the program name, ie: OJ LOCAL (then you can test the door).

REGISTRATION CODE:
==================
There is a subroutine in the OJ source code to evaluate whether the door
is registered or not. It does this by creating a unique code based on the
BBS and Sysop name, then compares it to the code in the config file. This
has worked fine for me, but I make no guarantees that it can't be hacked.

Make sure you modify the program to change the numbers that generate your
registration code, otherwise you will have the same reg codes as Free-OJ.
Just switch the numbers around a little bit and you should be OK. When
calculating the reg code, none of the sums can exceed the maximum integer
limit of 32768 or an error will result.

You will need to create a second program to generate the registration
codes for delivery to your customers. This part is easy; just cut and
paste the text below into a Basic program called "REG-CODE.BAS"
   '
   '
   ' This utility generates registration codes for "free-oj"
   '
   '
START:
   PRINT
   LINE INPUT "Enter the BBS name -----------> "; BBS$
   IF UCASE$(BBS$) = "Q" THEN END
   LINE INPUT "And the Sysop's first name ---> "; SYS1$
   LINE INPUT "Now the Sysop's last name ----> "; SYS2$
   PRINT
   TEMP$ = BBS$ + SYS1$ + SYS2$: TEMP$ = LCASE$(TEMP$)
   SUM = 0
BBSNAME:
   FOR L = 1 TO LEN(TEMP$)
      SUM = SUM + ASC(MID$(TEMP$, L, 1))
   NEXT L
   '
   SUM = INT(RND(-SUM) * 6969) + 127
   X = INT(RND(-SUM) * 5272) + 215
   Y = INT(RND(-SUM) * 7876) + 109
   Z = INT(RND(-SUM) * 6705) + 172
REDO.X: IF X > 999 THEN X = X - 700: GOTO REDO.X
REDO.Y: IF Y > 999 THEN Y = Y - 750: GOTO REDO.Y
REDO.Z: IF Z > 999 THEN Z = Z - 800: GOTO REDO.Z
REDO.SUM: IF SUM > 999 THEN SUM = SUM - 850: GOTO REDO.SUM
   PRINT "The code for " + BBS$ + " and " + SYS1$ + " " + SYS2$ + " is:"
   PRINT X; Y; Z; SUM
   LPRINT
   LPRINT
   LPRINT "  Thank you for purchasing FREE-OJ! Before entering your"
   LPRINT "  registration code, make sure the names in OJ.CFG are spelled"
   LPRINT "  as shown below: (case is not important, but punctuation is!)"
   LPRINT
   LPRINT "  BBS Name:  "; BBS$
   LPRINT "  First Name:  "; SYS1$
   LPRINT "  Last Name:  "; SYS2$
   LPRINT
   LPRINT "  And the registration code is: "; X; Y; Z; SUM
   LPRINT "  Use one long number in OJ.CFG, do not leave spaces between numbers!"
   LPRINT "  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
   LPRINT : LPRINT
   GOTO START
   END

Notice how the subroutine that generates the reg code is exactly the same
as the OJ source code. MAKE SURE THAT THE NUMBERS YOU USE TO GENERATE YOUR
REGISTRATION CODES ARE THE SAME IN BOTH PROGRAMS! This program does not
need to be compiled, just "run" it using QuickBasic.

TECHNICAL SUPPORT:
==================
Like all mortals, my time is limited. I am not able to provide personal
instructions to everyone that calls. This program is relatively simple;
if something doesn't make sense to you, study it some more!
 
I've included complete documentation to help you out. If you have any
questions about the DoorFrame commands, print out the DFRAME.TXT file.
For instructions on setting up the Free-OJ door, read the SYSOP.TXT file.
If you run into problems, read the HELP.TXT file.

And while I don't mean to be unfriendly, past experience has shown that
80% of the people that encounter problems didn't read the instructions
or follow my examples. I'm just going to ignore these people from now on.
However, if you have a thoughtful question, I will try to help you.
  
Finally, the source code and information that I have provided could save
you over 100 hours of effort. So don't forget the obligatory "thank you"
or sincere compliment when you call :)

WHERE TO REACH ME:
==================
BBS:  ChAoS Online, (310) 318-5089 (I am the Sysop)
      If you want help, log on with your name and [Y]ell at the Sysop 
      from the Main Menu. Call back in 48 hrs to read your mail.
      (please don't ask me to call your BBS, I will ignore you!)

America Online:  Send e-mail to mikefox1@aol.com
                 I check my mail at AOL at least once a week.
   
Snail Mail:  ChAoS Online
             P.O.Box 1211
             Torrance, CA 90505

SOME QUICKBASIC ERROR CODES (DOORFRAME USES THE SAME CODES):
============================================================
 2   Syntax error                       61   Disk full
 5   Illegal function call              62   Input past end of file
 6   Overflow                           63   Bad record number
 7   Out of memory                      64   Bad filename
11   Division by zero                   67   Too many files
13   Type mismatch                      68   Device unavailable
24   Device timeout                     69   Comm-buffer overflow
25   Device fault                       70   Permission denied
52   Bad filename or number             71   Disk not ready
53   File not found                     72   Disk media error
55   File already open                  74   Rename across disk
57   Device I/O error                   75   Path/File access error
58   File already exists                76   Path not found
59   Bad record length

END OF FILE!
============
