#44 : COPY PROTECTION
295 LINES - 59 SECTORS
CONTRIBUTED BY DIAMOND JIM
-----*
COPY PROTECTING YOUR OWN DISKS
BY THOMAS T. BRYLINSKI
08/04/82
INTRODUCTION:
For those new-commers to the world of APPLE Computers, and to the history of
software development, here is a brief summary. In ancient times (1978-1979),
the APPLE Corporation was just getting started , and absolutely no software was
available for your $1530 toy. So most people who bought this expensive little
tan box had to write their own software. If you were among the more fortunate
users who had a good sales pitch, you talked your boss into buying you an APPLE,
and then spent your company's time learning the in's and out's of programming.
In any case, you could not purchase ANY good software for your mac hine.
Shortly after the first early programmers crawled out of their shells, APPLE
users groups started to form. The prime function of these groups was to share
programs and to exchange the secrets which one had learned in the previous
month. (also it was a good excuse to get away from the kids at home, for a
night)! Four or five months passed and a few early programmers got the idea
that they would market their software and make a few bucks for their hard hours
programming. And thus, the first APPLE soft ware companies formed. These
companies were very small and usually started in someone's basement. The prime
buyers of this software were the APPLE DEALERS. The dealers could now
demonstrate these marvelous machines with some "GREAT" software. By the way,
this great software came on cassettes, (you know, those little plastic things
you used to record music on). These cassettes were copyable by normal means,
(eg. tape recording), and the dealers started giving some programs away with
each system that theys old.
In the summer of the DARK AGES (1979), APPLE COMUPTER released their first d
isk drive system (3.2 DOS). This disk system made copying programs easier,
faster, and much more reliable. At this time copying was encouraged by both
programmer and dealer. So on the software companies realized the increasing
market for their products, and theorized that if they could produce a disk that
could not be copied by normal means they could sell more software, hence more
profit. APPLE'S disk system was the perfect answer to their problem. APPLE
chose to make their disk system totally "SOFT", which means that all information
pertaining to the disk operation is stored on disk . This information is then
loaded into RAM (random access memory), upon a system boot (PR#6). All commands
typed at the keyboard are examined by the "disk operating system" (DOS), and
then by the apple ROM's (that row of big fat chips inside the machine). Now the
software writers had an edge on the normal user, change how the APPLE responds
to user commands, and keep them out of your programs. The only problem was that
the copy program that came with your disk drive was able to copy the complete
disk. With a "soft" DOS, the programmers could change how the information is
read from disk and modify their DOS to read it. As Apple users became more
aware of the internal workings of their machines, programmers made more and more
changes to DOS, and the race was on!
So much for the history lesson (boring out-of-date information anyway), and o
n to the meat of the lecture.
TERMS USED IN THE TEXT:
BIT- the smallest piece of information that the computer can recognize or
process.
NIBBLE- four bits in a row, or a block
BYTE- eight bits in a row or block. It is the smallest piece of information
that people like to work with. (00000000)
VTOC- Volume Table Of Contents: DOS uses this sector to tell it which
sectors are used and which are free on the disk.
SELF-SYNC BYTE- a special byte used for locating information on the disk.
This byte differs from a normal byte in that it is made up of
nine bits. (111111111)
PROTECTION METHODS
DISK COMMAND CHANGES- changes to the DOS that make those familiar words like
Load, Delete, and Save, give the user that cold, unforgiving response...SYNTAX
ERROR
CATALOG TRACK LOCATION- moving the catalog to a non-standard track (normally
track HEX $11, DEC 17)
CHECKSUM ALTERATION- the portion of each sector that DOS automatically checks
to make sure that the information it has read is correct.
$D6,VECTOR- an Applesoft pointer used by the machine to make "carriage return"
= RUN.
LOADER DOS- a DOS whose sole purpose is to Load and execute one program from
disk.
HALF-TRACKING- writing information between the normal tracks on the disk.
DOS HOOK- designating a specific track on the disk, where the only information
on the track is a track & sector number, to tell DOS where to read next.
PROGRAM LOCK- a line of programming that looks at a specific memory location
and compares its contents to a programmed number. (x=peek(y))
HARDWARE LOCK- Using a hardware modification to lock the program.
NIBBLE COUNTING- setting aside a specific track on the disk where a number of
self-sync nibbles are written.
TOOLS FOR LOCKING PROGRAMS
DOS BOSS - Beagle Brothers Software
BEANETH APPLE DOS - Quality Software
PROGRAMMER'S AIDS - Dakin 5 Corporation
BAG OF TRICKS - Quality Software
SUPER DISK COPY - Sensible Software
TASC - Microsoft
THE EXPEDITER - On Line Systems
THE DOS MANUAL - Apple Computer Corporation
APPLE II REFERENCE MANUAL - Apple Computer Corporation
WHAT'S WHERE IN THE APPLE - William F. Luebbert
SOFTALK magazine
NIBBLE magazine
If you are familiar with the above manuals, software, and periodicals you ar e
well on your way to locking programs. Also you will need use of one of the nib
ble copiers on the market such as, LOCKSMITH, NIBBLES AWAY, or CLONE. CLONE is
my choice because it is very fast compared to the others.
LOCKING TECHNIQUES:
MESS UP DOS
Change some or all of the DOS commands. This in itself may be enough to prot
ect your programs. Go a little further. Bury some control characters in the
cata log. (control chrs. don't print usually). Change "CATALOG" to "LIST" and
the Bas ic command "List " becomes unusable. Try it, you can't "list" a program
in memory. Duplicate DOS commands are great. Only the first one encountered
will work. Confuse the user by changing the disk error messages. For example
do the following:
1) Change the SAVE command to STORE
2) Change the READ command to SAVE
3) Change the "NOT DIRECT COMMAND" error
message to "NOT COPYABLE"
Now when anyone tries to load and save your program you get the "NOT COPYABLE"
error message because he used the wrong command! *** EXPERIMENT ***
Now the following can be done to any disk you want. We will move the catalog
track from track $11 to track $5, just for convenience mind you.
1) Boot your favorite 3.3 system master to load DOS
2) Placeyour DOS BOSS disk in the drive and type:LOAD DOS BOSS (return)
3) Type: Poke 44033,5 (return)
4) Place a blank disk into the disk drive and close the door. (something your
parents keep telling you to do.)
5) Type: RUN (return)
6) Change a few commands...any one you want!
7) Before you leave DOS BOSS, change the disk volume heading to" SYNTAX ERROR"
... Don't forget the ctrl-G at the end!
8) Exit the DOS BOSS program.
9) Type: NEW (return)