This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
This book is written as an information guide for those who wish to learn about and experiment with software protection and duplication methods. It is not intended to encourage theft or illegal uses of copyrighted
software.
All information in this book is accurate insofar as can be determined by the authors and publisher. No liability can be assumed for any inaccuracies which may be inadvertently contained herein. The user of this information must assume all liabilities associated with its use. The user must also assume all risk to person or property associated with the use of the circuitry described in this book. It is recommended that the user be technically competent to determine the suitability of the application. In no event shall the authors or publisher be liable for incidental or consequential damages in connection with the use of the information
in this book. C-64,
VIC-20,and
MONITOR$8000
Commodore Business Machine, Romulatorf
Tapeworm,
are
Inc.
PSIPACK and
are all trademarks of PSIDAC.
trademarks of
its program names
^~ ~
L
C
c *** PROGRAM NOTES
use
Most of the
CBM
***
Basic programs will
"shorthand"
when typing
to
Q
require that you
avoid
excess memory
C
(~ .
use.
Programs have been
disk and 1525 tested
on a
printer.
written for the
Commodore
1541
Many of the programs have been
version of the
MSD.
The programs
"talk" to the drive controller such as error analyzers will not work with MSD.
which
Diskpicker and The others may
work.
/—
^-
(^ ^ v_ r
c
THE SOFTWARE PROTECTION HANDBOOK Copyright
part
c
of this
1984 by PSIDAC.
publication
All
may be
rights
^
reserved.
distributed
No
by any
means. The circuits and programs contained herein and on the PSIPACK disk may be copied for personal use. No
_
L
£
part of this book may be reproduced for publication.
C
SPH-64
C
VI284 THIRD PRINTING
2
USD19*95
c
O
O
Ike, pkiLoAOpy. of
tki/L book e.mb/iace.A
thn.e.e. main
I,
lo pnovide.
btioad vLe.w of
Lclwa. and
2.
lo aZe-zit
"v La Lou a.
p/Lote,ctLon
e,tkicA. th/ioug,k "LooLa.
j£ouj
tke, consume,il}
cLiLdLe,"
pote,ntLal co&t of
of. ike.
natu/ie,
p/iote,ctLon/p/tote.atLon bne.a,ke,nA.,
and
of
and
tke,
g,e,ttin$. caug,kt Ln tki/L
/LpL/iaL, 3-
lo
ne.move,
/Lome, of
tke,
muA.te.nu.
&u/L/toundine^ tke, Aub'j.e,at wkiLe. p/ioviding, a. UAe.fuL /ie.fe./ie,nce, doc.ume.nt.
to the uninitiated and thus provides a small measure of
Q
secrecy.
must be in machine language as
C_
it is not contiguous with user RAM. The size limits the
^7
extent of the
s~
Routines here
program,
but
it
Also it
is perfect
for boot or
protection routines and access codes.
The
unused
applications.
memory
c
r
^~
of this
*~
the
if each of these five vector locations
starting
address
RUN/RESTORE attempt will the routine.
In
of
keyboard.
this manner,
Most
a
routine,
force an automatic an
any
Q
jump into
C,
attempt to break
program for listing or disassembly the
area
similar
borders on the BASIC vector locations. The significance
contain
an insidious
has
(_
that
is
$02A7-$02FF
because it
is
This
at
(^
a
*-
cannot be done from
^
if
these
£
vector locations are loaded to from tape or disk,
upon
C
they point to will
*-
completion of the run! to
This
is
importantly'though is
load the program
the elusive method
using autorun
is that the
that
for AUTORUN!
The trick in the
C
Since
C
one of the purposes of autorun is to prevent listing of
^~
programs
before
the
the
^
program
to be
autorun must be
but
Q
the vectors
C
is the $02A7 to $02FF
^
computer BEFORE these
before the vectors. big enough to area.
in
a
Although
main
program must be
^
locations are loaded
user
RUNs
The
them,
large
program and
means
this
run it.
60
that
loaded along with
only area before
contain a program not
that
to.
area
is
perfect
RUN/RESTORE will
to
boot
*-
simply
Q
C
c
restart the program as
Relocate/loader
long as
process
in
the vectors are set!
The
chapter
the
six
gives
procedure to get around this and save these routines or
examine them. you can use
Appendix C lists an autorun routine that with your own programs
if you
locations specified for addresses and
The
zone at
autorun boots. the
other
$0100
Most
areas
should once
have
Superdirectory
which
Relocate/loader
is
for
•
talked
addresses
reside
a
been
used
for
ideas apply to it as
already
be alert
Note
load options.
sometimes
of the same
we
again
has
wish.
in
perfect
about.
shown up
this
zone.
to
save
way
You
by
The these
routines.
As usual, certain
the possibilites
locations
Ultimately,
you
in
then analyzing the
basic
result
method
operation of a the
to
would
basic
intact,
interfere
routine.
be
used
will need to be restored.
That
any basic
program
which requires is
to
find out
the control
as
When a
what
zone
execute
no a
and
with
is
the
the
normal
this case occurs, but
from the
the five vectors
There is a method which will from being
"Stopped"
special separate
POKE808,225
beginning of the program.
that
loader
moment the basic program is accessed,
listed
limitless.
for each particular case.
locations
autostart may
prevent
are
especially basic will need to have
vector
autostart
zone
the ability
is using in
Some programs,
the
the control
need
locations a program
for using or modifying
and
routines.
somewhere near
the
This location is the KERNAL
61
STOP routine vector
and poking
225
computer from doing
the STOP routine when the STOP key
is pressed! As
a
watchful
locations.
rule
pokes
or
the wrong place allows
protectors
to
keep
computer to go
people
from
programs.
need the
the five
r~
'Programmers Reference
(^
guide which
well
as
look for in
the
vectors and largest
buffer.
programs
s-
This range
(T
thirteen KERNAL
v_
unused
zone
and
the
.
included
r~
in
this book
just the
*~
The whole protection
Q
in nature and even as we write this
C
beginning in breaking protection.
dilemma is dynamic
V-
Probably the
$02A7 through $03FF.
BASIC
using
For
clones of this
to study and
are address locations
tools
s-
more
bookstore computer bookshelves.
as
page
attention to any changes of
look at their
most fertile range
book,
control
-v~
C
of the other
The
any
especially
when that routine or condition arises.
Guide or- one
tape
be
Q
you will
vectors
to
they cause the
information,
contains
Q
*=-
should
stores
q
to
"normal" means to
fill most
you
Pay particular
vector addresses as
This
the
• general
of
there prevents
c c
someone somewhere
are
is bound to be devising a new
^-
and more diabolical scheme.
Every time you buy another
*-
utility guaranteed to
"all forms
of protection"
Q
find something it
won't work on.
C
you
will eventually
Information
break
and understanding
are the most
keys you can have to unlocking protection.
DISK
important
^ ^
MEMORY
C 62
C
c
Perhaps
one
of
the
best
Commodore family of equipment the
disk drive.
Most
and
procedures being
from all
it
this
What
with the
of
special
disk
The information
we have managed
to distill
I hope you won't find
interest.
The
simplified disk few of the areas
VIAs which are
detailed
we will
it gibberish!
in figure
refer you to
3.4.
used
your User's Manual.
(group coded recording)
typical
You
disk sector.
what
organization as
the disk manual
will explain the and
should also note
it
is slightly
implies.
areas
in the
* For diskette
Appendix F shows a GCR
header
So and
range from
3.3 as well as point out a
drive are
formatting,
is a
disk
In this section ye will give you a figure
around
of the grapevine...
used
the
is somewhere between and although I know
is not genius,
map,
of
information concerning
what'isname said that.
gibberish to genius.
secrets
of the information
slightly fermented product
so said this...
is
kept
map of a the GCR
different from
The rest of this chapter
shown on the maps
in figure
3.3
3.4.
The unique
ROM used operating
majority
of all
software.
gives
system disk
is
designers
relatively
versus
This
in the disk (DOS)
16K and in
functions are
which
provides a the
accomplished
vast by
the hardware-software tradeoff which
the
expensive
slower,
is
cheaper
The Commodore directive
choice
of
hardware
software
making intensive
intensive
was to produce
63
fast
and
products
products.
an inexpensive
FIGURE
3.3
MEMORY MAP 1S41 DISK
FFFF —
16K
DISK
ROM
OPERATING
SYSTEM
(D.O.S. ) COOO
_
2000 1C0F
1C00
180F 18OO
2048
BYTES
(8K) RAM
OOOO
ALL
ADDRESSES
DOTTEO
AREA
64
IN
HEX
UNUSED
C C c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c o
disk which inherently
as many functions to detail here,
requires
the use of software
as possible. you
Although much too long
can get a complete disassembly of
this ROM by using Diskpicker which is explained
detail
in
chapter
six.
programming the disk, this.
Be
sure
printer and a
for
If
you
you
are serious
should take the
to have lots
in more
time to do
of paper ready
couple hours of
time.
about
for your
16K
is
a
ROM
only
lot to
transfer and print!
As
a
user,
you
can
extent that you may use there.
However,
could
"burn"
control
(JSR to)
the
to
the
the routines contained
those with the knowlege and equipment,
another
set
of ROMs
with
some of
the
routines specially modified.
The purpose of this might
then
to
be
manner drives.
to
cause
the disk
which could If
this
not
be reproduced
is done
interfere with normal
in
operating system could the
The only hope protection,
would be
one
protected.
scheme.
if
it would be a
The users write
"abnormal"
does not
"normal"
in the
operating
the user,
RAM buffer in the disk memory. could
This
Diskpicker;
be developed,
reproduce the
is
one of
the
to allow user machine
tested,
and
same
system.
by analyzing the
could write a routine that could be
into an unused cases,
a manner that
not copy or
manufacturers
an abnormal
by normal disk
reading operations,
very effective protection
way as
write in
way
fitted In some
the disk
was
primary purposes
of
language
to
programs
operated in the disk RAM.
The major problem in implementing such routines will be the
limited
RAM
available.
65
If
the
protection DOS
routine is called by an earlier DOS routine, RAM routine would
the
chain.
large.
call
need both,
The
The
whole
reason
is
routines within
so
on.
Only
capability. parts of
a
show you,
normal
DOS
C
out to RAM routines then back and
C
modified ROM
could
is going
provide this
^
still many routines you can use
^
As
chapter six will
Q
involve exactly
C_
error writing routines
this kind of process. The ROM area
for
the
manipulating data
have a lot
$FFFF
sectors,
and
and so on.
$F24C
mostly
v-
interpreting,
_
This you will probably not
r~
tasks
of reason to modify.
control
hardware
such
Many
accomplished versions
of
be
to
using
them.
control routines.
(~
These
^-
tracks and
-
selecting reading and writing
r
these
A source code
locate
of
The ROM from $F24D to
of the error
by
serves
things as selecting
starting motors,
so on.
able
$C000 to
oriented
contains the
routines
^
from
software
^-
this does not
address space,
RAM calls however.
our
become quite
^
There are
from
the
to
in
to
its
always allow jumping
as well as any others
thing starts that
the users
through
a
writing jobs can
be
Q
modified
^-
which you may
~
routines listing, user
or
group,
can
be
an
invaluable aid in using these routines.
r
C
c The RAM used, provides the zero by
6502
reserved
based
page
$O25B-$O2BO
RAM array
and
is 2K in size.
($OOOO-$OOFF)
systems.
for additional
and so on. for
by the disk
Two
pages
pointers,
which is in
takes care of
The RAM
Q
which is required
v_
$0100-$02FF are
stack requirements,
r-
this area is used
Q
file handling.
$02bl-
v.
C
66
C
c
$02FF
is for
codes
and
divided
output buffer information
directory.
into 256
The
byte
such as error
rest of the
"buffers".
RAM area
There
are
is
five of
these buffers which have the primary job of holding the
data
comming from
allocated
located
as needed
in
commands.
locations and
buffers
The first
far
going to
the disk.
by the DOS.
these
often used 'for a
By
and
18
User
and
They
programs
called
by
can be
the
bytes of the buffer at
are
user
$0500 are
jump table to user routines.
the
most
is the
important
area
$0000-$0005 which is
$0006-$0012 which
(track and sector)
provides
for the
the
of
these RAM
the
job queue,
respective
job in the queue.
headers
Note that
there are two RAM locations for each job location.
In addition to the ROM and RAM,
there
are also two
Versatile Interface adapters which are seen by the disk CPU as memory locations.
By nature,
a VIA occupies only
16 memory locations.
Figure 3.4 shows what
each
VIA.
location of
"seen"
at
a
$1800-$180F.
Its
the serial bus.
It
bus and has
job of
data
bus and
versa. $1COF
It
the
and
second its
job
primary
job is
normally to control
taking data from.
the
internal
it out on the serial bus and vice VIA is
is
to
normally
serve as
"seen"
at
$lC00-
hardware controller.
is connected to the circuits which drive the motors,
sense write protect, for the head. and
first VIA is
is connected directly to the serial
sending
The
The
is found at
from the
The
and controls the read/write logic hardware signals are transmitted to
VIA directly from
67
the
internal disk data
FIGURE
1541
DISK
C C C c
3.4
VIA
MAP
c
The
00
I/O
01
I/O REGISTER A
02
DATA DIRECTION REGISTER B
(DDR-B)
03
DATA DIRECTION REGISTER A
(DDR-A)
04
TIMER ONE LOW BYTE
05
TIMER
ONE
HIGH BYTE
06
TIMER
ONE
LOW
07
TIMER
ONE
HIGH
08
TIMER
TWO
LOW
09
TIMER
TWO
HIGH
0A
SHIFT
REGISTER
OB
AUXILIARY
OC
PERIPHERAL CONTROL REGISTER
OD
INTERRUPT
OE
INTERRUPT ENABLE
OF
I/O REGISTER
drive
two
with
the
primarily
For
used
memory
desired
indicated.
WRITTEN
being
This
to,
is
thus
and
taken line
From
a
an
(CLRS TO
BYTE
the
INT
ON
WRITE)
LOAD
c
BYTE
A
REGISTER
(ACR)
(PCR)
(IFR)
REGISTER
(IER)
(WITHOUT HANDSHAKE)
VIAs.
One
serial
at
port
oF
is
bus
The
The
one
oF
VIA
can
be
would
be
an
iF
is
being
with
it
used
in
the
other
is
VIA
occupies
specific these
the
microprocessor.
68
primarily
while
control.
either
output
care
ON READ)
LOAD
TO
(00-OF).
that
INT
BYTE
accessed
Note
READ
control
be
(CLRS
BYTE
hardware
locations
can
(WITH HANDSHAKE)
FLAG REGISTER
uses
c c c c c c c c c c c
B
CONTROL
communicating
16
1541
REGISTER
Function
locations
as
READ
or
input
normal
From
iF
it
WRITTEN
is
to.
READ/WRITE
c c c c c c c c c c c c c c c c c c
c c c c c c c
bus.
As
you can
functions^
see
from figure
the VIAs
3.4/
among
the
have directly addressable
other
timers
which are used as needed by the DOS.
One
interesting fact
"mirroring" 3.3.
As
memory map.
of memory
shown# can be
The
shown). hardware easier
deviccss
and each
16K
to decode
of
the
for this
memory block/
on the map figure
It
disk
are
produce
blocks
do
not
some confusion
it and you
say $2003. zero
memory,
"discover"
the way
What
page data
the
address
decoded
you would be at
so
overlap each
looks
$0003!
A
like
to
When only
to define at
a
every
In order to get
all address
though if you
and
lines
"mirrored"
no problems
what
2K
is
was simply cheaper
lines
Mirroring causes
four
(not
block will be
unique positions in
decoded
at
in its designed locations.
that
in the
16 byte locations
other location defined by those lines.
decoded.
up the disk
the RAM
only the necessary
address
is the
than one location areas/
decodes memory.
drive
which make
VIA at 256
reason
place the memory some
the
at two
The
1541
that is shown
seen at more
ROM
locations,
about the
lines must long as
other.
are not
It
programmer
two can
aware of
important
seeing is
be
data
actually could
at
the
confuse
those studying his code by accessing the same data with different
addresses.
Other sources for the
1541 Maintenance
covers the You
will
information on the disk include Manual by Michael Peltier,
system hardware not
find
it
if you need much
69
to make
help
for
which
repairs. software
applications though.
the drive should diskette
The User's Manual
be refered to for diagrams on how the
is configured with tracks and sectors.
note appendix F for the correct header final
interesting note
is
However
format map.
that the drive can be
beyond track 35 by software control. this
that comes with
One
forced
Chapter six covers
in detail.
c c c c c c c c c c c c c c c c c c c c c c c c c c c c c
***
CHAPTER
PROTECTION
Software
protection
relatively simple
rush
to
find
***
CONCEPTS
concepts
schemes
ways
FOUR
have
evolved
to very complex ones.
to keep
users
out of
In
protection then spawns
a
vicious cycle
users. short
takes
its toll
If you have been playing time
you have
perhaps
Each
w*hole new set
breaker programs and copying techniques. this
the
programs/
methods have been developed at an incredible pace. new form of
from
The
of
results of
on programmers AND
in this game
already bought
for even a
some
breaker
products only to
find that some new form of protection
foils the methods
it uses.
market
for
the
latest
breaker
on....
We cannot
doubt,
can anyone else.
will
probably
copier"
system
and
so on
in the and
so
offer a total solution to this nor I
take
which will
So once again you are
the not
The ultimate answer
form of interpret
71
a any
for disks
mechanical data
but
"dumb simply
read
and
write
wouldn't
be
an
a
protection.
exact copy.
guarantee
Although
against
This chapter
will cover a
techniques currently being used. seven will
to
stay
then
list
current
depends on your
off
with
There breaking
with
disk
really
try
five six and Your ability
r-
techniques
Q
We will
then
go
start
on
to /-
*-
copy?,
£
do you need to modify the program (code) to
C
One
things to
v
when
protection.
two is;
do you
customize it for your application? will
i_
finally tape protection methods.
are
and two is
variety of the
changing
practice and motivation.
about
forms
^
(^
Chapters
the ever
still
of
specific procedures.
information
cartridge and
certain
it
c c
a
Where applicable we
learn
Q
quite a bit by studying listings of protected programs.
(L
In
that the
*t-
you a much more
^
many
protected
cases,
protection no
information programs.
modifying
longer
valuable commodity.
to
help
Often you
the program so
exists will
give
you
^^
of
include
just need
get
listings
to
consider
can
you
£
won't have to play all the protection games if you need
C
an
additional
With your modified version,
backup copy!
DISK PROTECTION
Chapter
protection. giving
two
Here
you more
with our earlier the
various
defined
we
some
C
c c arbitrary
will expand on
levels
of
this
information
s-
protection
in contrast
(^
focus on tools available for breaking
C_
detail on the
levels.
72
C C C
LEVEL 0....
Although
this
level
is
"unprotected"
there are a
few points that a beginner should be aware
of.
program is in
If the
than
one program
separately. important
which
Basic, the user
would need
not
to run the program.
any other programs. might access data command.
It
run to see if
In a similar fashion,
save will not work
Even
though the machine
you
may
need to
use
Superdirectory to find the address
that
address of the
you know the
program to save
unprotected programs, need
to know
and
what
loads
by the
in machine that
all
it
is
routines are
something like the program
beginning and
The
ending
In general,
with
if you wish to copy by Saving you
the details of what kind of program it needs
simplest method of
will
it
since
range of
it.
is
loaded,
can save it with an Editor/Assembler.
require
BAM
it
files which would not be saved
simple
"unprotected",
a
copy
the program
the program might • be
for basic only.
so that you
should be
Often
language and a
E/A's
to
Since these are often chain loaded,
saved to the backup then perhaps
save
it may involve more
to
operate
correctly.
duplicating such programs
type copier.
Virtually any whole
is
is The
to use
disk copier
also work.
LEVEL
sort making added
1....
of autorun listings, use of
simply program.
a
in
this
category
feature which prevents and directly Saving STOP disable
pressing On
Programs
the
programs
poke
stop that
ask
keyboard or use a peripheral device,
73
see for
some
the user from
the program.
keeps
key to
use
the
user
whats data
The from
in
the
from
the
you can sometimes
break
of
into
them
range
or
talking to. which will
listings
unplugging
The
control
etc can
program,
be
you try.
writing
device
We
to the
^-
that point
_
the program will
s~
control to the
(^
and return
to be devious
At
in
break
the kinds of
into a
a
Other
ways
/*~
table that the programmer
C
Then by saving the program without the autorun
^
coherent
which prevents
int.o the vector
modified autorun, loaded
but
the
has
procedure for this a
backup
to get
that in
the disk can be edited so it goes to the
is your only
The
essence
such
autoruns as the
is in chapter
whole disk copiers.
means
protection!
into the code,
into
right
The
six.
f
complete
Q_
Once again
concern and you
you can use
and whole disk
you
STOP features as on
your
LEVEL 2.... which
do not
BAM copiers or
a new
unprotected
/"
C *-
of the
f~
still contain the autorun and non-
C
you a
"clone"
The final choice
needs.
use
^
c
^
originally written.
has
^-
The BAM
copiers will give
original which will
if
advantage of relocate/loading
it gives
~
place
program which you can list and modify at will.
programs
(_
data
longer
to get
r
^
more
that when the copy is
depends
well
cassette connector while the program
file.
v-
as
or with a
is
of error
^-
does not go
need
(^
user.
Usually
^
program is
processor and generate complete listings
relocate/loading
making
the
force some kind
were able to
involve
no
some value out
such
programs
wanted.
the
codes
so you will need
by unplugging the
was
computer
done.
the error
protected word
the
idea is to
return
intercept
things
by giving
c c
^*-
been defined as disk
74
errors
to
including those stop
whole disk
r
C
c
duplication.
In this
duplicators
which do
Although
"old"
several
"whole disk"
stop if the the
disk.
case, not
the errors will only stop reset or
as the protection methods go,
duplicator
kind
there
of error
possibilities but generally
falls
the
drive tells the
computer in essence
useable copy.
market
situation.
There
concept
of
is to
course
of
the more
can
handle
are
of
error.
that the diskette
exactly
what
you will not
the
get a
recent entries on the
this
kind
of
various possibilities
"skip over"
drive sees an
the category
Regardless of the
is
happen so that
Most
duplicator
of many-
duplicator stops because the disk
This
protectors want to
will
error on
be one
into
specific error,
defective.
there are
is an
could
tampered headers or data on the disk.
is
errors.
programs which
disk indicates that The
"handle"
any sector
Some such
error
but
the
in which the disk
as DD-1
will go ahead
and transmit the data on the sector in question in many cases. disk
Essentially drive
sector.
says
it
are
ignores
there,
and
the goes
errors
that
on
the next
to
the
This level of protection can be broken by error
tolerant duplicators. method level
just
can be
Alternately,
used on this
of protection
non-STOP
features.
stopping
the user
program.
The
errors,
sector tolerant
they
to
Otherwise
disable
the
itself has inserted on
copiers
which
routines.
75
no
This
autorun and
there would be
from simply loading
just
relocate/load
protection level.
usually includes
program are
the
nothing
and saving the
relation to the a
blank
don't
track
have
or
error
c
c LEVEL
3....
This
current software. have
level is more
typical of much
In this elaborate scheme,
errors and
autoruns as described
complicate matters,
disks will
earlier but to
£
to see if the errors are present at the right locations
t_
If
will not run,
checking
will
the errors are
or
the
either
backup disk as
places).
checking
routines
autorun
boot has
One is
itself program loading
r-
error checking you
(^
of put
the error
loader
checking
This
(and in the
s-
put the error
Q
that runs
things up.
after
the
The order
resetting vectors
is *-■
£
autorun then boots
in a loader
C
sophisticated and
handles the
^
the
main
disk
s-
find
the proper
£
errors in the correct locations it will not continue to
C
load the main
In
^
loader program
s-
which tracks
£
This way a main
C
program(s).
If
checking
the
loader doesn't
program or will
addition to checking
may be responsible
for
and
v_
forcing
more
error
C
the same errors back
A very small autorun routine loads
zone
which is and
This is called error
popular place to
started
control
to run.
to
the program
the original had
in a
something like this:
the
get rid
will need
correct
to
there,
a program employs
routines or you
on
it will crash.
and if
need to
not
loader
*-
will check
on the disk.
the program or a
C
cause a crash
for the errors,
the
for actually deciding
and sectors to load and in what order. program can be
saved and have
its
as the person
who writes the
the
sectors need to be
tracks and
amongst
the
valid
predefined tracks and
data
BAM erased.
etc.
As
loader knows which order loaded.
loads the
Interspersed
loader
can check
sectors for specific errors. 76
long
By
*~ Q
C ^
using
a
check,
table
of
a very
tracks
in this manner.
It
taking normal not
error
is obtained.
have been protected
will give you
as what kind
control
a
sector by
the
stopping. checks
sectors depending on
how it
these
When
correctly,
sector
the main
it
will
system preventing
further
for
of error.
loaded
of
methods of
approach
to
in making protected
up ones that
finally
perform
ones
ones contain data and which ones contain
errors as well has
and
protection
is helpful both
programs and backing
program
load
high degree of
Our disk analyzer
list of which
to
run
breaks
or
The main program may or may for
errors
on
is designed.
programs
is
to
tracks
and
The simplest use
an
error
analyzing routine and whole disk copier and then use an error
writer to
make errors on
like
they were on
this
is keeping
.progresses,
an
the original.
up to date
write onto your
find
errors.
The
other
on the errors
that you can
number
analyzer
error
checking
which sectors contain
find errors the
"Hunt"
in
command
to be
the
is
kinds
and
Again, it
the will
disk tell you
inspection it
of
the
is expecting to is
easier.
large amounts
With
you of code
locate occurances of likely command sequences.
77
of
loader routines
Upon
harder
an editor/assembler
systematically search through
to write
to
spotting that data of
able
is
help because errors.
state of the art
of different
know which sectors and
the
sections.
printout will
loader you will
As
method which
relocate/load and disassemble locate
exactly
problem with
that you need
increasingly large
backup -
The major
backup disk.
you
the
can to
Practice
c and In
experience general
are
the
you will
(XX= hex error
be
key to doing looking
code value)
this
for a
successfully.
sequence
followed
of
CMP #$XX
by a BEQ or maybe
BNE**.
r-
£
C C
The error writing
process itself involes a fairly
C
cumbersome system of writing special routines which are
*^
loaded
by the disk
^
basically mutant
r
and data writing
(_
into the disk drive RAM and
drive microprocessor.
versions of the
routines.
a
In other
backup
words,
are
a
^-
(or
^
of
£
like
£
to be formatted differently than the
**-
which needs
one sector header pattern
if you
have just saved
wish to protect
these mutated routines,
normal
routines
disks own formatting
program which you made
The
executed
for
include erasing an
by these means
them),
you
that
by running
one
can cause something
disk.
Other
possibilities
entire track of data
or
completely
wiping out a sector.
^ £
C
c The level three will at some point check to see if
errors
are
Alternately
present
before
the errors
a
run
might
will
be allowed.
be checked
within
r
LEVEL 4.... Level
3
but
This
in many ways
there
is
a
in this
others,
the trick of putting data
tracks defined
where
recovered tracks
and
in
none by the the
is
just
level of protection
the original
would DOS
be
an extension
^
The
errors
£
include with the
v_
sly twist.
involved
data
*-
the
program.
of
Q
beyond the normal
drive design,
expected
read functions.
"hidden"
78
data
require
and Both
35
or writing
can't the
modified
be
extra DOS
c
s-
(^ »
routines to be
loaded.
These DOS routines are machine
programs that operate similar to the normal ones disk
but
whereas
they
are
the normal
error.
The
sync
putting data
places
first
to
out
"hide"
as a
here using
would simply
track"
protection
beyond
track
there.
data
"gap",
35
There
such as
erased
headers,
but data
part of part.
a
such data
using an error
analyzer,
couple
of sectors
process can be you
see
blocks worth
is
is useful
number
to an
.20 sectors on have
some
of
reading
routine. then save would be
have
special
the
the usual
routine.
One
reading the data
of
hidden data.
the
in the
data.
it under a to change
the
79
couple
Changing the a
the
would
essence,
a
The diskpicker HDR read
value has
you
This
timing so
Often
sector
similar effect to
find
to
perhaps
protected disk will
with numbers higher
In
read
last valid sector
change
a given track but
this data,
thing
not
The disk may only expect
sectors
is normally
in
for this purpose.
recover
First,
more
illegal
these others.
and
In this manner you can recover
all you need.
routine
last
then to write data
then begin
worth
and
unexpected
to
will
repeated with a
more
far
Another trick is
is to find the
found AFTER this block.
that
This area
so it must be read with a
way to find
involve
can be written and
data
an
even go as
between the
track and
This
could or
data
return
are other
modified DOS routines.
erase all or
a
find the hidden
sector of any given track.
defined
the
routines
"extra
simply writing as
designed to
in the
than this.
again go you will
To
to a header get
valid number. copy header so
the data The
last
that
it
looked a
like the original.
copy disk by
reading
and writing it
Errors can be
the bad
part
verbatim to the
"spliced"
off
copy.
the
into
original
(See Diskpicker
Procedure) Once
^
c
again
though,
being manipulated
"unnatural
purchase
out
processes
programs
discourage
with
this
align
bumps
if
several
times)
as
this without
of protection as
(^
to the effects this
t
use
th^ere
are many
which seem to get
forced
to
already discovered.
but this
some drives.
you decide to
these
loading
programs
with a
blinking,
undue
and
£' V-
problem
A
^
able to handle
£
does exist
v-
and
You will
just have to live
purchase a
program with such
protection and it adversely affects your drive.
least
"bump"
r
These programs only aggravate-
mechanism should be
problems
will occur on
if
perform these?
s-
is
you may have
good guality drive
v_
and
of all,
head
is
(Bumping is when the head goes to the end
situation
with it
the
the drive
both the
form
valid guestions as First
to
especially the earlier models,
of
this
We
a drive.
excessively. and
in these
mutant
of software
have on
1541s,
by
acts".
there are some can
C
will
usually take
their
f .■
time
^
bumping,
chattering,
_
other assorted
paranormal
share of
various
In the
f
responses.
r ,
(
c Another dilemma with
that
it may
not
manufacturers. function drive.
the
When
a
level of
be compatible
How a
of
this
drive
hardware drive
is
80
with drives of
loads and as
protection is
and
software
other
saves data design
is
a
of
the
software dependant
as
£
Commodore's are,
a
have
operating
the
disk
100% compatible drive would have to system
copied
verbatim.
Although this has been done before with some computers, it
is
legally
questionable.
It
is
generally accepted
that totally compatible means 99% compatible while most "compatible"
equipment really
percentage.
What
compatible
disk
ORIGINAL
With level 4
in at a much
reasonable to
drive
programs and load WITHIN
is
comes
can
save
commercial
expect
and
is that a
load
software that
EQUIPMENT MANUFACTURERS
lower
it's own
is
recorded
SPECIFICATIONS.
software the protection is not within the
design parameters of the drive so it is anybodies guess what it will and what like an oil which
it won't work on.
company putting in
rots out
is
something
a additive to gasoline without
ever
bothering to check it out with car manufacturers!
Thus
programs,
levels
engine
It
gasket material
error writers and copiers that work at these
will
in
general
other than the
1541.
manufacturers
to be
programmers might
be uncompatible
can
able
try to
be
maker will need or
errors
to forsee
"defile
level
from the
loader
to
worry about
time you load same
as
the
done
the
this like
the various ways DOS".
kind of level
software,
three.
if
The error
to have the capability of writing data
beyond
for this
drives
You simply cannot expect equipment
Making duplicates of necessary,
with
the normal
would be to
tracks.
The
best
remove the error
approach
checking
or main program so that you won't have
all the error the program. others,
checking problems every
This with
81
is done virtually the relocate
loads
and
o
dissassombly.
LEVEL
^
5....
This
protection method
in
valid.
It works
which is
usually
the program runs the
key
is
in
current use
on the principle
of a hardware "key"
Q
plugged
joystick port.
*-
what
the
well
and crash
itself
if
that most people
it
is not!
As if The
r
reasons but the
£
have no means
of
^L
Even if they could
_
task to first figure out
r
of hardware.
C
Removing the sections of the program that check for the
*-
key would be
^
disk
opposed
and then
make a similar
the best approach but certainly not easy.
to
to run
hardware
contains
the
check to see
effective for several
time consuming
as
one.
As
the key
in to
as
effective r
duplicating the piece a
most
most
most noteworthy is
be
be the
it can periodically
hardware key is
it would
may
the and
key
error checking consume quite
can
be
microseconds and has
which requires the
a
validated
time,
in
matter
a
the of
degrading effect on
^
checking routines are
Q
so that they do not steal time from
C
the main program.
Many programs would be of little use
^-
if the protection
system had to run the disk for a
^
the program.
This
is why error
often in a loader,
seconds every so
trying to do.
limitations.
little or no
bit of
f ,
often in the
The
middle of what you were
hardware key does
not suffer these
It is possible to check for the valid key
literally hundreds of times within the main body of program,
without noticeable time lag!
is done durinq
bo
the
f \
C •
*^
If the checking
C ;
time, taken is
C '
Appendix H shows how an interrupt
^'
an interrupt cycle,
almost unmeasurable. routine can
few
easily accessed
82
the
from a main program.
^
C
V
The key itself
could
certain pins shorted see
as
a
allows
31
into a
small
key.
You
defeat
hardwired
This will
programs!
This
elaborate
use
a
the code.
Unfortunately we hardware key
protection,
and
up,
you
requirement
the
would
limit
can
disk
have
seller
be
the
not
be
passive
your own
too
that
hard
it was
to
just
a
the
protector
use
a
code
sent
can
on the
lines
for each code.
The
to what
on
a
chip to
key protection
If
little
simple
the
itself
can
key be
reason
ability has
There
solution is
the
easily
is valid as
magnetic medium.
83
to
only backed
to worry.
Your
been met while
still
from wanton distribution.
for
Thus
is
could be done.
offer no
keys.
in
If desired the protector
unethical
reproduction of these
the
a
these for
microprocessor
systems.
for backup
protecting the
feel
as
very complex set of passkeys.
imagineable
then
schemes,
complete
respond with a
it
would
at
pulses of a certain frequency or
a certain pattern as
that
of
different value
circuit could send
the
with
be hardwired
be defined
addressed by a
responds with a
simply no
looked
could
the user realized
ROM chip which is
could
plug
setup.
In more
and
a
joystick switches
that
easily make one
though if
it
just the five
code values
plug.
can
protected
value anytime
Using
possible
simple as
to ground which the computer would
specific
joystick port.
be as
us
in this
to
We
feel
encourage
respect,
we
long as you can back up
One
final
word
about
compiled
basic
programs.
The
compiled program has been transformed into it's machine
C'
language equivalent,
*-
harder
to
programs
In
which among other thinqs,
analyze.
makes
the
Using
a very effective means of
future
we hope
to
come into line with value.
on the horizon of
on compiled
protection.
see prices of
and
effectivness
software
against
to disks,
to
the
are quite
are
less well
simple.
to make known.
and The
use real
protection is the autostart feature Since
it
is running all
do you disassemble or save it? The answer
the time, is
how
just about
as simple; do not let it autostart! Understanding an doing
C
this depends on
realizing
that the only time the cartridge will autostart- is when
reset is the
is
first
initiated.
cartridge
cartridge at
the
external
will
turned on
If
and
computer will not autostart
^-'
^
cartridges
procedures
of the cartridge.
computer
Q
c
PROTECTION
hardware necessary
heart of cartridge
the
r-
^~
Compared
the
C
inspired
•
However due
>*-. C
New forms of protection are
CARTRIDGE
backups,
it
but along with them comes the questions
compatibilty
pirating.
protection
makes
or the coldstart
we disconnect certain lines on
then
turn
on
know the cartridge not
occur.
We
can
the
computer
the
there so
the
then switch
the
is
into certain areas of the computer and
contents
or
RAM system
or
save
them
to
tape
or
"look"
disk.
An
which emulates ROM through the use
84
€
^ \
C r ■)
*- • £ i
of
a
write
original
protect
cartridge
location,
then
can
later
code,
run
as
be
loaded with
switched
though
into
it
were
the
the correct
the cartridge
itself!
The
most
cartridges
difficult
is
the
configuration
used
with memory,
to
by
the
the
Although
protection in
effect.
The
procedure specifically
is required
the C64
Even
sense,
system
does
"where"
is
the GAME and
true
Romulator which
(See
cartridges can be
the
not
is
"filled"
though this
is
7)
the same
gives you a
you
seen
at.
to
know
All
that
that you determine the configuration of EXROM lines which ultimately control what
the computer does with memory and start up routines. have
3
in
has
require is
Chap.
"switched"
it
(Chap.
the cartridge
with
hardware memory
original.
place of some other memory device. not
overcome
duplication of the
Hardware Reconfiguration) up
obstacle
encountered no
other
forms
of
protection
We
with
cartridges.
TAPE
Tapes
have severe
protection others,
except tape
available
the
locations
PROTECTION
instead
compared
autorun
and method
that
limitations
the of
can and
is
autorun
in the
to disks. usually
really the routine will
kinds
As is
with the used.
same as the boot
of
in
The
disk
from the
the disk.
In the next chapter we will cover the clone system which will duplicate all tapes
85
regardless of protection
FIGURE 4.1
LOAD DATA AUDIO
&
SAVE DATA AUDIO
LOAD
IK/i
TO RICORDIR
SAVE
I Ra
TO RICORDIR
PIN # A-1
B-2
C-3
Dl
F-6
FUNCTION
Ground
+5 Volts
Cassette Cassette Cassette Cassette
Motor READ WRITE Switch
The JiOAD data audio circuit provides an audio output during LOAD operations. This is useful in determining characteristics of pre-recorded program tapes* It also provides a simple way to align the tape head by "ear". (Chapter five - Head aligoment procedure). Installation can be in the computer or on lines D-[|. and A-1 where they enter the datasette. If you are using a Tapeworm, or similar interface, parts can be mounted on the
interface unit itself.
(Use earphone for speaker)
The SAVE data audio circuit .is primarily for "Relocate Loading"
which is detailed in chapter five. You may choose to wire two aligator clips to an earphone with a 1K ohm series resistor. In this manner, you can simply clip it across E-5 and A-1 when you are performing header changes . The SAVE data audio circuit provides audio only during the time that the computer is
saving data to tape*
86
used.
As with disks,
several of
often a tape program will
sections which
each set up
the program and all
attempted after it
loading
saved
and
other
than cloneing
put
this,
requires stops
in you blank
be alert
sections.
in
certain parameters
to
run.
If
a
save
is
the program only part would be
would be useless.
section starts and and
are needed
load
so
To
duplicate
that you
this
know when each
that you can stop the
to make
a
copy.
by
Also,
tape
if you
try
for machine sections mixed between basic
You will need to use
an editor/assembler for
the machine sections.
Figure
4.1
shows
the
output which greatly helps sections. followed
A
taped
by a
tone
leader
the
program.
saving,
program consists of
followed If
one
find
distributing
one drawback
it
tone leader then another
taped
programs
is by
tapes can
is
use
is
the
nothing to prevent you
it will
just
keep you
from
them or running on more than one computer.
own use.
if
a
data burst which
copy
that
tapes,
this
itself,
to
there
As with disks, The
audio
the circuits very helpful.
However
backup
(header)
longer
you hope
protection
hardware key. from making
by a
an
in identifying separate load,
short data burst
you will
The
connections for
fries,
is not a
real is
problem then for your
the
reliance
you are out of business!
87
on the key
c c c c
***
CHAPTER
FIVE
c c c c
***
s~
C
TAPES
C
The very size of the C64 memory allows programmers to write some very powerful programs.
require large amounts quite slow if tapes are
loaded
of data, from a
they
As these programs
also tend to
datasette.
As a
not as popular as with the Vic 20.
even if you
.primarily use a
disk drive,
it
be
of a
datasette
have developed a expense of
(tm)
is still
(f
an
If you
allow you
The cost
In answer to this we
to
Chapter five
ۥ
o s-
£ \
the
features TAPEWORM
inexpensive interface
for standard
do not own a datasette this circuit
add a
\L
r
simple device which lets you avoid
datasette.
which is
recorders.
will
a
rare function.
£
However,
may prevent you from wanting to own one
for this somewhat
*~
result,
handy to have a tape drive available. You may encounter a taped version of a program you wish to have.
c c c c c c c c c
tape drive for
very little
^ Q •
C'
o
88
^ C'
oxpenso.
If
"clone"
you
tapes
Tapeworm will
drive as
already own a using
audio
such as message
is
that if
inherent Tapeworm
make
this
cassette
motor
work cannot
the datasette
since
it utilizes
Tapeworm
recorder circuits.
makes
It
turns digital the
the
for the computer.
aspects
for those
more technical
so
simple
tapes.
to
any tape
have
success
had
recorders,
it
audio signals function
tape
recorder
The
detail
severe
format.
if
An
Cloneplug
is
audio
a
with
of
digital
doing
this
with
some audio
The amount of signal degradation
data
is
not
clone is
even
been
converted to, worse
cloned
clone
digital
signals or audio-conditioned digital
method we will
done over
89
digital
in successive
The
be
two
so
purely audio clones
clone.
can
copier
Although
which have
cloning
these
which is
generations
that
to a
(tm)
dumb
can be duplicated.
well. the
of
theory of about
audio dubbing
is very unlikely that
will work very is
allows
essence,
virtually
an audio
inclined.
plug that In
all
digital signal
This chapter also features CLONEPLUG a
will
done at
opposite
digital
operation will give
be
into
output of the
signal
the
external device
converting the audio
level
interface
is entirely an
and
another
Another of
no change
computer data
recorder
the
lapse recording etc.
Audio
which
to add
to
you wish to do audio work
possible.
processing.
for
the means
playback or time
the
wish
duplication,
for dubbing purposes.
major differences
with
type
provide you with
required
datasette and
from
a
previous
show you relies
several
on
signals so generations
c without
the
inbreeding
problems.
c c
TAPEWORM
,-
DESCRIPTION
TAPEWORM between
provides
the
20 and
C64
the Vic
cassette
tape
proper
interface circuitry
computers
and
most
c C C C ^
standard
recorders.
c c FEATURES
The TAPEWORM to
is
an inexpensive
the purchase
of
*-
C C and
single use
reliable
alternative
cassette data
recorders
such as the datasette.
|~
(2
C When not
being used with
the computer,
your cassette
recorder can be used for normal recording applications.
r .
No
|T
changes
or
modifications
need
be
made
to your
recorder.
TAPEWORM
recorder
under
\- '
allows
to play
the
computer
and
program command;
security monitoring... recording...
to
control
the
record voice/sound
i.e.,
telephone
cassette
c c r
information
£ \
answering...
^'
slide show sound...
time
lapse
etc.
r
c TAPEWORM allows level
of
the
manual adjustment of the volume output cassette
recorder
90
so
that
you
havo
the
^~ r
C
q
5.1
When recording,
RECORDEt
^^^
When playing, IC1B circuitry restores the digital le
vel to the EAR signal from the cassette.
the recorder.
the Tapeworm conditions the computer signal to feed the MIC input on
Computer output and input must be 5V square waves.
IE "LTL
♦ M£
E "LTL
FIGURE
TAPEWORM BLOCK DIAGRAM
c ability to compensate
for tape quality variations.
C With an
optional modification,
during
the
load
operations
the to
data can be heard aid
in
analyzing
protection methods, A.C.
adapters
obtain
all
are
not
power
with
needed.
from
The
the
cassette
computer
and
TAPEWORM
just
like
a
£
C
^-
CLONEPLUG,
duplication
*,-
datasette does. Used
C
using
TAPEWORM
standard
facilitates
recorders
and
tape
or
one
*f-
datasette and one standard recorder, (fig. 5.7)
C
Simple to hook up. Ear, Mic, an power plugs provide all
^
cassette
*r
interface
connections
without
modifying
recorder.
£
Recommended tape Other
tape
in record
recorder:
SANYO SLIM
1 or SLIM
recorders may work with TAPEWORM.
levels,
fidelity,
voltages,
etc.
between
technical
discretion before
6VDC
Variations
connector polarity,
manufacturers requires
making
2.
C' c ^
some
Q
cassette recorder
C_
substitution.
TAPEWORM
THEORY
Refer to figure
function
5.1
of Tapeworm.
by the
computer
square
waves.
computer expects
to
r
Q
drawn at the left of the diagram
L
is
As
the cassette write
C c
and
block.
This
OPERATION
for the block diagram showing
Note
cassette read signals
OF
shown,
the normal
"see".
92
both
are
digital
five volt
signal
Cassette recorders
c
the
^
on the
Q
other hand, are much
do
not
better
suited
sinewave
shown
microphone
input
a
lOmV to
20mV
like
at
five volt square waves.
to smoother lower
on
a
fed
(0.020V)
through
and the
the
IK/100
right.
signal,
the
input
NOT 5
voltage deck
The
level
circuitry
to about
figure
5.1
For
of the The
show the
The
recorder
output circuitry
of the
of
the
This
5
is fed
square wave of the
into
the cassette read
you
can
see
from the
cassette switch line to
always
are depressed
print
"Press
If
think so that
Play...."
eliminate the need
schematic
figure
is always grounded.
cassette
depressed.
must
volt
As
switch
6 volts.
of IC1B • and Ql
cassette port on the computer.
the
in
the output
sinewave of about
the
to
cassette
taking place.
line of
the
the
signals
to the computer,
fast risetime
computer
reduces
from
as a high gain clipping amplifier and
correct polarity.
the
IC1A
squarewave of 5 volts to the computer.
IC1B is designed provides a
then
shaping
consisting
of
5V square waves
sketches
is a
to see
IC1A functions as
input
approximate
loading programs
tape
a
consisting
divider
at the Mic
20mV.
provide a clean
Ql
voltage
seen
Furthermore,
from the computer
ohm voltage divider.
computer.
the
volts!
signal
an integrator which rounds off the the
like
cassette recorder expects
To accomplish this, is
waveforms
They
you are
the
messages.
for wiring
which
the
closes
This
buttons
the
causes of
the
computer will not This
is
done to
inside the cassette deck when
technically able
93
5.2,
the
buttons
are
to determine the,
wiring on your
particular deck and wish to do so,
circuit board has ground your
link on deck.
recommend
The
As
provision for this. line F6 and this
wire
Simply
it to
is awkward
to
the
c c ^
cut the
Q
the switch in
v~
do,
we
do
not
it.
r~
Tapeworm board
from
^
Six volt DC
r
directly from the computer pin C3 to your
C
There is enough power at this output to
*-
the computer via the
power is fed cassette deck.
obtains operating power
5VDC output on pin B2.
easily drive most modern 6VDC recorders.
careful of polarity for your recorder,
You should be
^
(see note below)
£
c c ASSEMBLY
C
c Figures for
5.2-5.4 give
Tapeworm.
Appendix
the schematics and D
lists kits
layouts
_
available from
f
PSIDAC or you may use your own resources.
C
c Before
should
that
installing any
be cleaned
the copper
installed
grade
rosin core
iron of to
the board-
25
orient
scrubbing pad so
C
All parts
are
*-
the board with
the
^
the copper FOIL
Q
Soldering should be done with solder and a
IC
£
the holes on
to 40 watts maximum. the
board
shiny.
BLANK side of
through
the circuit
alcohol and
is bright and
from the
leads protruding side of
with
parts,
correctly.
small,
radio
clean soldering
Be especially careful Use
the
\_'
pin
1
dot or
notched end and the component layout for reference.
^ ^ •
C_
c The edge connector
is soldered directly to the PC 94
(^
8
EAR
RECORDER
FIGURE
5.2
I
TAPEWORM SCHEMATIC
•0047of
P-6
E-5
D-I4.
Cassette Switch
Cassette HEAD Cassette WHITE
+5 Volts
Cassette Motor
0-3
FUNCTION Ground
PIN # A-1 B-2
tl'
r COMPUTER
FIGURE PRINTED
5.3
CIRCUIT
LAYOUT
(c)
'82
tapeworm I*. I
PT#
QTY
POSITIVE
PC
LAYOUT
DESCRIPTION
C1
. 0047ufr
C2
.1uf
Disc
Disc
RADIO
Cap.
Cap.
C3
.47uF
IC1
LM3900
Quad
Q1
2N3904
NPN
Electrolytic OP
100
R4
4.7K
R5
10K
ohm
Resistor
R6
22K
ohm
Resistor
R7
100K
R8-9
1M
(All
ohm ohm
P1-2
1/8"
P3
DC
*
For
271- 1330
271- 1335 271- 1339 271- 1347
Resistor
Mini
plug
complete
271- 1311 271- 1321
Resistor
edge
phone
(to
connector
PSIDAC
plug
see
Mic.
wire,
Appendix
96
#CONN*
274-286
match recrdr)
solder,
kit,
271- 1356
1/4 Watt)
.156"
ties,
276- 1713 276- 2016
Resistor
resistors pin
272- 1417
Resistor
ohm
ohm
6
16V
Resistor
ohm
EQUIV.
272- 135
Transistor
1K
SHACK
272- 130
Amp
R2-3
EC1
12V
12V
R1
Misc — Wire
( FOIL SIOI SHOWN)
274-1551
etc. —
G-Price
List.
s
FOIL
IS
ON
nFTFRMINF
NOTE:
OPPOSITE
OF
PC
SLIM I* II
FIGURE
COMPONENT
YOUR RECORDER
BOARD.
RICORDfRS
SANYO
MOST
SIDE
nDRRFCT POLARITY ON
THE
LAYOUT
5.4
(sit mow)
board
traces.
You
"puddle" on each
should
first make
of the end
the edge connector.
By
alignment
heating
a
small
c c
solder
r
foil traces which are for
£
in
*-
your
^_
Do the same
r
with the other end. This will hold the connector firmly
(^
in place.
^-
iron,
the
and
then
you can
"tack"
holding the edge
the
If necessary,
connector
until
it's
lead
terminal
back and
with
in place.
you can remelt and reposition
it
is perfectly
.solder the middle terminals down to the
go
connector
resolder the two
aligned.
foil.
Then
-
Finally,
r
end terminals to
get a
good shiny connection.
**-
Note that the Mic ground is not soldered at the PC board
end.
prevents
It
is
"ground
(JT
soldered at loop"
the
Plug end.
interference
C
This
while
still
*-
An optional
|^
LED circuit is shown in the schematic. You can add this
t-
maintaining shield properties of the cable.
by drilling extra light
This
up when
holes
data
helps you
in the PC board.
is being
determine
The LED will
loaded to the
whether data
computer.
r-
is present as
£
well as being an aid in deducing the number of separate data
loads
prefer this
the
program must
go
through
to
run.
Some
to the audio modifications shown in chapter
4 and later in this chapter.
C c f
Q>
C
C
POLARITY
C
c c> Re extra careful in wiring the audio plug. use
will
any
recorder
need
to
other
than
determine
the
Sanyo
the polarity.
98
If you
recommended,
Most
you
recorders
(-
have
a
negative
figure
5.4
center pin.
inset.
If
system)
you
is
your recorder
lead connected to the Mic and ground
Sanyo
has
opposite! the
Ear ground pins
will not be
able
to use
See
positive
(Positive Tapeworm.
(Some Panasonics are wired this way)
If you make a mistake on the power connections, will
blow the
cause
any
computer
other
fuse.
It
it
is highly .unlikely to
damage.
USE
OF
TAPEWORM
HOOK-UP
- Always plug the
Tapeworm into the computer COMPONENT
SIDE UP with the computer TURNED OFF! -
Make
sure
all
cassette recorder switches
are up or
OFF before switching the computer on. -
Use high output,
low noise tapes of good quality.
-
Insert
EAR
marked
-
MIC and
MIC
Insert
and
plugs
the
cassette
jacks
EAR.
Tapeworm plug
jack marked
into
DC6V or
marked DC6V into
the cassette
6V power.
OPERATION
-
Turn
on
computer.
- You can advance or rewind tapes at -
The
cassette
recorder
3/4 of full volume.
volume
this time.
should
be
set
to
about
This setting may vary depending on
tape quality and recorder used. - The motor can be disabled by typing SAVE or S shift A
99
c c
RETURN then hitting Run/Stop.
r
- The computer SAVE,
LOAD,
now
accordance
function
in
and VERIFY operations will with
the
computer
instruction guide. NOTE:
The
RECORD
*-
"PRESS
ON TAPE"
C
PLAY ON TAPE"
messages
and
will not
"PRESS PLAY
AND
Q
be displayed when
C
using the unmodified Tapeworm.
- REWIND
of
tape
is
computer in READY
This
will
control
of
turn the
best
accomplished
state and using
on
tape
the motor
placing
*■
the VERIFY command.
(£
voltage
by
and give
you
deck.
-Press RUN/STOP to disable manual control. - We
C
recommend that
you always advance
leader when performing
*~ tape past the
Q
SAVE operations so that no data
C
is lost trying to record on leader.
c
c OPTIONAL MODIFICATION
When the Tapeworm recorder,
the speaker
into the jack.
r
EAR plug is in the is shut off
jack on your
by a switch
(*
By jumping this switch with a resistor,
C
like.
is present on the tape.
on a Sanyo
/r
built
a comfortable audio output will be obtained. feature you may
c c
This is a
It allows you to hear when data
s-
Figure 5.5 shows how to do this
£
Slim 1 or 2.
For other recorders,
use the
L
information in figure 4.1.
c c c c ioo
C
c
USE A
SMALL PIECE
RESISTOR
FOR
OF
TAPE
UNDER
INSULATION
FIGURE
SANYO
(USE FIG.4.1
SLIM
I
&
5.5
II
FOR OTHER RECORDERS)
HEAD ALIGNMENT
Normally all be
tapes
in alignment
However,
tapes
with
the tape
made
in difficult
older tape
recorder,
It
once
Otherwise
you will
SURE
you
it
and
each
recorders
other.
or some
to
are using an
align
using it
loads
is not a is
If you
may need
before
assure accurate
alignment
tapes,
loading.
made tape
your own tapes.
recorder will
not be aligned with your machine,
resulting
This will
head
on different
commercial tapes may
commercially
recorded on your
of
adjusted for
end up with
extensively.
commercial
good
idea
it with a
to
normal
a mess of
tapes AND
change the tracking.. misaligned
each requiring realignment to load properly. IT
IS
NECESSARY
BEFORE
ALIGNMENT!
101
PROCEEDING
WITH
BE
HEAD
If you are using a datasette you will need to wire
the
"LOAD DATA
oscilloscope. equivalent,
AUDIO" circuit
(fig.
4.1),
or
use an
If you have this circuit already or it's simply ignore
the reference to
"Ear Plug"
in the following procedure. "Ear"
c'
-
Unplug
-
Put
-
Locate alignment hole left of tape head,
-
plug.
in tape do not close cover.
- Set volume Adjust
(see sketch)
1/4 to 1/2 of full - Press Play.
screw for
c c c c c c c c
loudest output.
**Do not turn far!
A
c
slight adjustment back and forth only!**
TYPICAL
LOCATION
ALIGNMENT
ADDITIONAL
INFORMATION
102
c c c c c
OF
HOLE
HEAD
c c c c c c c c c c c c c c c c c c c c c c c c c c c
Other brands of Tapeworm.
than
However,
6VDC,
Instead,
recorders usually work
you
you
if
recorder voltage
cannot can
use the
use
the
is
different
power plug supplied.
adapter
or
normally supplied with your recorder.
power
source
This will
require
that you control
your recorder MANUALLY
normally controls
the
recorder
well with
since Tapworm
through the
6VDC
power
plug.
Another recorder
inherent
feature
with Tapeworm
recorder and as
and
can
start
such can be
The
most
using only the and
stop
the
efficient
similar to this
using
it
is
is that
control of your computer. plugs
of
used
standard
still
a
normal
for audio work under
By unplugging the Mic and Ear 6VDC
power
recorder
way
a
to do
plug,
under
this
the
computer
program
command.
is
to
use a
line
for turning motor ON:
100POKE1,PEEK(1)AND223 For
turning motor OFF:
110POKE1,PEEK(1)OR32
CLONING
Fighting
tape
protection
frustrating experience.
more time consuming just
need
original that
to
describe.
least,
than desireable a
backup
for safekeeping.
under all
"Clone"
make
In the
schemes
normal
the original
so
you
As a dumb copier,
be
a
can become
can
if you file
the
reasons we suggest
circumstances using
it
especially
that
For these
can
that
the cloneplug
you simply system
we
the cloning method does not
103
FIGURE 5.6a CLONE CIRCUITRY CASSITTI PORT
ClONI
PLUG
90° PI mi
t
FIGURE 5.6b
y' CLONE MOD. ON TAPEWORM SPOT
SWITCH
CUTAPfflT LEADING FKOM PADS
tape
Figure 5«6a is the schematic of a clone plug. You are using one or more datasettes,
90° plug.
Note that if
that you will need the
See figure £.8 for PC layout.
Figure .6b shows how to modify a Tapeworm so that you will not need a clone plug. (You must use two standard recorders which work in the normal manner with Tapeworm bo use this modification) You can either modify the artwork of figure 5.3 or remove traces from two lower pads and use jumpers fop changes indicated in solid black. Clone is C-D, normal C-N#
104
depend on or vary with the type of protection used.
Although useable and
we have
copies with
two tape
as
used
audio
tolerance
digital
but
by
The the
we do
not
reason lies
The
to wow and
people obtaining
straight audio
computer
signals.
signals.
induces
a
recorders,
very good method. signals
heard of some
that
it
in the
fact
that
not
is not
As a result,
seriously degrade
feel
frequency
flutter
problems which
are
to audio method
exactly
the
is
a
the same
requirements
and
as great with these
the audio to audio method
are minor
in
audio recordings
digital data.
If
attempted at
all,
the audio
method should use high quality reel
reel
recorders
and the
copies
should
always be
to
made
from an original.
The Cloneplug system is a simple arrangement which uses the
the Tapeworm digital
characteristics
sending them on will
and/or datasette
possible,
original
good
removed
best
is used
two
can
use
two
results
standard
with Tapeworm
available.
before
to four or
are still
However,
obtained
This five
when
when the
for cloning.
shows the different have
clones up
of
the Cloneplug
recorders
datasettes and no Tapeworm,
standard
signals
from the original.
One major feature you
the
to restore
to the recorder making the copy.
normally allow
"generations"
of
itself
and
a
and
or a
system is
one
that
Tapeworm,
or
combination of a
datasette!
Figure
5.7
hookups to match the equipment you
This
way you should
be
cloning with a minimum hardware aquisition.
105
able
to
use
FIGURE 5.7
CLONE HOOK-UPs
PLAY1ACK
C64
CASSETTE
PORT
CLONE
TAPEWORM
PLUG
RECORD DECK
TWO STANDARD RECORDERS
>°Plug
TAPEWORM
RECORD
'DICK
ONE DATASETTE AND ONE RECORDER
DATASETTE
CLONE
1
PLAYBACK
PLUG
DATASETTE 2
RECORD
TWO DATASETTES
106
(orbattmtos)
CLONING
Before you are If
using
you
are
are
recorders,
1.
cloning,
using
the
sure
compatible
that
with
datasettes
you will
Determine
be
PROCEDURE
not need
the
recorders
that
the Tapeworm and
C64.
only
and
no
to worry about
correct hookup from figure
standard
Tapeworm.
5.7 based on
the type of recorders you are using. 2.
Place original DECK
3.
plugs
plug
5.7b or of
Make
6.
main
the
5.7c,
plugs
NOTE:
edge
NOTE:
into
of
PLAYBACK Cloneplug.
RECORD DECK,
vertical
if
(90 degree)
cassette
buttons
are
set.
Enter
LOAD
computer.
,
verify clone by loading it.
results
same
(horizontal)
in RECORD DECK.
proper
on
When done Best
in PLAYBACK DECK.
Cloneplug.
sure
command
5.
into
Place blank tape
using
4.
tape
deck
are obtained if as
you record
you normally use
to
load
the clone on programs when
not cloning.
SAVING
There
are
times
program
via
the
biggest
advantage
program
is
equal
when
computer to
in
TAPES
you may
instead
doing
this
quality
107
to
wish
of
is
cloning.
that
an
to Save
the
a
The
"Saved"
original
tape.
FIGURE 5.8 SUPER CLONE PLUG
SOLDER
I
90° PLUG HERE ( foil to left)
I
J I
PC BOARD
F6 |
I
I
im
-SLOT
I
-. i
4 i
1:1
90° PLUG IS FOR
LAYOUT
RECORD ONLY
(SEE FIG. 5.7)
EPOXY BEAD
FOIL
SIDE UP & FRONT
SOLDER TRACES
108
Secondly,
you do
not
have
to
use
around with external hardware. that you need being used.
to have a Often
MANY sections a load TO,
and
or BASIC, to
two
recorders
good handle
program loads
in,
on
the
is a general
computer
saved
protection
simply
to know
where
the
whether the program sections
make direct
play
The main disadvantage is
this will mean
Following
and
how
sections
are MACHINE
outline of procedures copies
of
many taped
programs.
Start by determining
taking place. long
tone
This
leader
Another way is
the number of
can be done followed
by
separate loads
by listening for
the
short
header
to watch the screen for the
the
burst.
FOUND
interval which occurs after the header.
STOP the
data load) buffer.
computer
after each header
load
(before
and use an editor/assembler to read the tape
Write
down
the starting
given on each
header.
SECTIONS.
forward
past
you
should
Fast
When
done
NOTE:
DO
these
have
and
ending address
NOT LOAD THE PROGRAM to
the
a
next
list
header.
that
looks
something like this:
lrst
PRG.
Starts
$02A7 Ends
$030B
2nd
PRG.
Starts
$0801
Ends
$30FF
3rd
PRG.
Starts
$C000 Ends
$C400
Remember Programs that to
do with
that your load autorun
list
below $0801 and will
109
values will
be
in hex.
probably have something require
relocate/loading
(sec
separate
Write
R/L
above
section
by
$0801
basic.
If
separately
of
can
bo
saved
are
at
they
and
list
you save them
machine
If
these
on
your
language,
load
list.
$0801
final
command.
they
will
Write Mach.
programs
load
they make
or
them
sense
as
them and when
duplicate,
"SAVE"
save.
machine
you can
if
and
The
as
write BASIC beside
for your
the basic
to
separately
them to see
so,
editor/assembler. your
chapter)
each
basic routines.
saved via
this
they will be
Assume the rest are
be saved
with
beside each of
the
these on
list.
Lj
c c *-
To make
program
Q )
the
in order
backup,
you will
on your copy
need
tape.
to
save
each
^
Using your list,
r
perform a LOAD1"1,1,1
and the appropriate save for each
C*
program.
and its special save procedure on
*~
those
(Use TRELO
indicated
will have an
R/L)
exact
If
all goes well,
copy of
your
the original
final
tape
programs.
If
-
c
f~ ,
you are so inclined,
you may try to defeat the autorun
C ]
feature all together
so that your
^~
to duplicate
for future
copy will be easier
backups.
~
MACHINE SAVES
^ C
If you are not
it
^
is
r
not true, it is a very simple process which you need to
C
know.
Monitor$8000 and
^~
it's
^
may
seem
like
We
Monitor$C000
a
big
familiar with editor chore
recommend
to do machine
the use
which Commodore
64 Macro Assembler Development
When
modified according
to 110
of
sells on
System",
assemblers, saves.
This
"Commodore
(see chapter
appendix B,
any
2)
r
area in
C ^
C
memory
can be
saved
with the
"S"
(save)
command
as
follows:
S"prg
name",01,beginning
hex
address,
ending
hex
address
NOTEtthe 01
As
indicates tape drive.
you
can
see,
information provided
this
is
by the tape
RELOCATE
For disk use
LOADER
a natural
08.
with
the
buffer.
for
TAPE
TRELO-TMACHRELO
The
main
purpose
of
the
Relocate
process
is to force programs to load
so that
autorun and other
operate.-
find out what it does. be
able
done here
to
if
it
is
getting
Save the
locations in the
The
tape
up in memory
loads This
are normally
to $2000.
relocating process
save
from
$2000
does
all
original
the
zone"
to
so
keep
from
into memory
shift
keep the
the program
of
R/L
to $2000.
program
TRELO as the
for you
111
you
$0801.
will
you can
be
technique given
by the
"new end"
can't
to
autorun which normally
is performed by the
course
loaded
calculations
addresses
a
just want
loaded
before
will
Thus
will be
The save
we
routines which
"control
running.
the program and
which of
relocate/loader
to $0100
into"
The basis of the
autorun
into programs
features will not
In some cases,
program,
is running. that
"get
(r/1)
in the wrong place
"disabling"
This allows you to
load
replace
a machine
program.
and them
,from
TRELO
displays in
the
the tape
c header.
C
C Since abnormal
the
relocated
location,
correctly.
The
it
trick
program
program will
is
to
not yet
EDIT
the
load
and
header data
v_
that
words,
your copy must have a different header put on so
Q
that it will load to the normal location instead of the
L
swapping"
and. can
the "Save Data"
be
tricky.
It
is
will
called
require
"header the use of
(T
second timing.
If you use the timing method you only
C
have
0.5
attention
+/-
needs
to
be
header on the tape.
relocated
copy's
following
step by
process
for
figure 4.1
or
seconds
to
react.
paid
the
EXACT start
close the
/-
The process involves replacing the
(^
header step
to
Also
with
a
"normal"
procedure will
of
one.
The
simplify this
you.
2.
Load
and
run
C c *-
to make relocated copy.
the new header,
study
the
following
you through the
process of
the one with the
relocated
Before making
steps.
They direct
putting
a NEW header
over
address.
(TRELO keeps
track
of the correct addresses for you) 3.
Connect
"Save
STOPWATCH. pick up the
data
The audio
some monitors,
_
^
TRELO.
Follow prompts
L"
s~
RELOCATE/LOADER PROCEDURE
1.
/-
split
about
audio circuit of
In
run
r-
procedure
to.
Q
other
This
load
an
the
aroa.
it will
from
tells
relocated
where
SAVEs
you
audio" .circuit
method is more eliminating
112
v^
/-
(^ or
obtain accurate
reliable.
V-
(With
^
it will
r-
the need for the
Q
can turn up the volume and
SAVE audio,
(^
^
o
circuit or
stopwatch.
Check
this
with your monitor volume at full) 4.Set
up relocated
FIRST
tone
copy
leader.
tape at
This
by SAVING
a
program
. the very beginning
positioning
is critical
of if
using timing. 5.
Follow prompts.
By listening to data,
ONLY THE HEADER,
13.1 6.
allow to save
then STOP tape recorder.
(Or time for
seconds)
If all went well, "normal"
your relocated program will have a
header which
will cause
it to load
and
run as
loads
to get
it should! HINT:
Practice
used
to the
sketch)
"sound"
With a
accurately must use
listening to tape saves and
little practice,
respond
the
to
same
Be
careful
This will prevent
short
on
the
that the
place when editing
TAPE
the
name
doctored header so not change.
of headers
time
to start
you
will
break
loads. be able
between.
relocated
copy and
for the header the
tape
in
(see to You the
will
the same
as when the relocate load was done. it from recording over the data.
HEADER
CONFIGURATION
ALLOWABLE - APPROX.
and data
SKETCH
OVERLAP (HDR SWAP)
13sec.-
mmmmm ■<:-: header
S*.
-:'::::
DATA (POM.)
data i:&
vM-x-x-XyX;: i tx*:?:*:*:*:*
TAPE
TO
DISK
TRELO
PROCEDURE
113
c 1.
2.
Load
TRELO
byte. Low
4.
RUN.
Follow prompts
ADDRESS!
3.
and
r
for disk.
WRITE DOWN ORIGINAL STARTING
f
Convert to HEX,
break into HIGH byte and LOW
(
ie: if calculated value is $02A7
byte
High byte =02
=A7.
When process
_
use SUPERDIRECTORY to find
f
the starting TRACK and SECTOR used by the disk to store
C
your program.
*--
Use
is
DISK-EDITOR
Relocated
finished,
to change the
copy back
Address) The third
to
what
starting ADDRESS
you
calculated.
on
the
(Original
location from the top left on Disk-
C
C
Replace the THIRD BYTE
^
TO YOUR
Fourth
the
^
YOUR
f
Hit RETURN and follow prompts to
C
CALCULATED LOW
byte.
save
BYTE.
Change
the
CALCULATED HIGH BYTE.
data.
(Chapter
The
location
FOURTH LOCATION
six has
more
is
TO
info on
DISK-
EDITOR) Relocated
PROGRAMS
^-
c f
copy should
CAN
BE
now run normally.
SUCCESSFULLY
COPIED
NOTE:
WITH
NOT ALL
THIS
PROCEDURE. NOTE:
~
Editor display is the LOW byte. HIGH
5.
^-
if exchanging program medium from tape to disk,
Q.
C *-
or
vice versa, remember to change the device number in the booter section.
C
*-
^ C
C c c c c c c c c c
Cc c
TRELO 1
IFfl=0THEHfl=l:LOflD"TMfiCHRELO",8,1
2 P0KE53289,11:P0KE53231,11 3 PRINT'TMil TRELO/LOflDER IPSIDflC 84 VBNaT : PR I NT "MS11 GOTO 15 8 PRINT"sPUT CPV TfiPE IN DRIVE - SET FOR t\ RECORD!" : PRINT"flPRESS F7" 9 GETftf: I Ffi*O " II" THEN* 10 PRINT" ttfifiVING ";NF$:" FROM %BG;M TO ";Efl:SV38043
15 PRINT"MPLflCE ORIGINAL TflPE IN DRIVE" POKE1,PEEKU>flND223 20 PRINTM3flPERF0RM TflPE LOflD... WHEN FOUND NESSflGE" 21 PRINTliMRPPERRS, SRUH/STOP* THEN ENTER HRUN25^H END 25 POKE52>20:POKE56,20-POKE53280,11 :P0KE53281,ll
(»ives you an expanded directory of whats normal disk
include
directory.
identification of
for each program and and
given
t.
part of
details.
the
£
for
second
specific
less
s-
utilities
different types of
third
of the
in general,
cartridge.
in attacking
cover
and modify programs,
Chapter
and
have
r~
generally
introduction
we
to obtain
be
each of
Instead
which allow you
consists
operating details. specific
software.
files,
in
innocuous
determining
and
hex at
the
and first
what
you
The
the
file,
additional
starting
track
in
features and
sector
listing of deleted programs
starting address
decimal. glance,
may
listed
Although it
be up
us
of
is
each program
this
really
against
may seem a
on a
key
to
given
program.
If for example,
address of
the program shows a starting
less than $0801,
it will
zone and may be an autostart. be needed
blocks what
you wish to
used
its
first
if
by
the program will
likely
it
first,
often
you
it
you may
but
addition,
if
may not run
the
to
it cannot
to try disassembly
routine
In
short
If
the
list
the program can lose control
correctly as the
other
program
by
There
is
not run a
listed
after you
loaded
loaded
language,
Do be
of
loaded
it.
be machine
also.
program is
if
of
idea
routine
is probably basic and
no reason that
be ready
run
a
you will probably be able
however,
so
Again,
The number
give you an
autorun or autoboot.
begins at 0801, itself,
Relocating will probably
save or pick.
function may be.
is
affect the control
beftfre run
it.
separately,
it
sections are often
needed.
Programs
starting
usually machine the
tape
the
$033C-$03FF range
are
routines or access keys which reside
buffer.
meaningful
in
In
these
dissassembly
or
you
ASCII
should
code
look
in
for
a
representing
information.
Programs language Blocks
above
will
routines or hex data in
the
$8000 and
machine programs
in
its
is
$C000
be
machine
by the main program.
range?
utilizes
the
operation.
Supordirectory will Supordirectory
used
often
are
popular
for
and data.
Superdiroctory
"ADMACH"
$0801
Loading
automatically
simple,
after
119
machine
load
loading
and ADMACH. and
routine
running Use of
running,
it
o will give you
the option of
printer as well as the to
be
examined.
sending the output to the
screen,
We
then asking
recommend
that
for the disk
you
print
a
*^ f ,
Superdirectory for every disk you have, and make it one
C
of the first things you do with new disks.
^-
C
RELOCATE/LOADER
One
of
copiers
only
the
is that
a small
Many people so
Q;
of using
an entire disk
portion of that
like
that they
several
disadvantages
disk
may be required
when
£
used.
C
disk is actually
might
have several
on.
games on one
another,
business
In order
to "pack" a
another,
and so
different
programs you usually need
prgrams
SAVE commands.
do
^
to combine similar programs on a disk
utilities on
or machine
c
whole
not
lend
packages
know,
on
disk with
to use normal
As you well
usually
disk,
basic
commercial
themselves
to
this
operation.
r
£
l_--' fi r~
£
O
c The
premise
program
is
loaded
control
of
the
The
of
operation.
is that the address supposed
of to
Relocate/loader
is
to the WRONG PLACE,
system.
will. its
of
R/L has
the The
Thus
you
most
it will
are
SAVE routine
free
as
important
that
an
to
if
not
thing
to
at
part
remember
relocated copy will always have a starting $0A00, reside.
until its starting
regardless Thus
the
of
where
relocated
C'
take
SAVE
inherent
a
*-■'
the original
was
O ^
copy cannot
RUN
r^
That is
Q)
address has been doctored.
one' of the primary purposes of Disk-Editor.
^
If
you wish
relocated
to pick the
version
before
The disk version basic
program
programs.
basic
routines.
process.
the
are
"MACHRELO"
is
a
the vast
this
short
relocating
loaded
through
the name
the
of these
system
during the relocating size of
the basic
routines allows us to sgueeze size of
the
back.
the things done by the
switched out
The
R/L on
address
machine
This along with the compact
buffer.
use of
the
routines
One of
is
main and machine byte
. control
The machine
that basic
change
you can use
of Relocate/Loader uses
main program.
machine
is
to
you
program,
buffer
majority of
should
"long"
in a
50K
allow the
programs.
DISK-EDITOR
As one of allow you
we
to
will go
the primary uses change
the
addresses
into this next.
is
is
256
longer by
bytes 4:5
allows you to
the
block is next
can
"link"
any
third
when
all
On the
first
These
two
on the disk.
disk
of data
actual GCR format
contained bytes
Disk-Editor
of data
block.
tell
the
are
the
two
On
which
together which belong to
a
program,
starting address
the
it
the drive
Disk-Editor shows the
first block of
"resetting"
in the
In this manner,
of the blocks
bytes give
program.
"block"
see Appendix F).
the data
given program.
green.
the
dump any block on the disk to examine
or to change any of every block,
(binary,
to
on a disk,
sector of
and then a
in size
ratio,
contained
Each
contains header information which
of Disk-Editor is
bytes
address, on a
121
you
links in
the second and
(hex) need
to
of the change
relocated program.
Oncfi
these
values,
though
addresses
the
relocated
it were
the
bytes you change format
of
remember
of
have
low
that
been
reset
program
can
original!
are in hex byte
first,
These
be
their original
loaded
Remember
an
run
as
that the two
some of the
data
high
second.
Also
^
sector
r
rest of the
Q
byte
on the
starting
locations in the
^-
times when you
to
change
within a particular sector of
a disk.
postition the
change, completed
and
will
all
in the new
the
the RETURN key
It
cursor over the
type
changes
cause
([,' *-
Disk-Editor gives you this option. you
r
standard 6502
sectors contain program data. There may be
^
and in the
they are contained
the program.
to
c c
for
want
is simple to use, bytes you wish
values. a
the changes
given
When you sector,
to be
read
to
have
hitting
and
prompt
(^
C!
c • *- >
you on whether you desire to actually write the changes
(V»
onto the disk.
C
O Disk-Editor
is
a basic program
which loads its
machine subroutines under the name ADMACH. others,
you
must
machine routines. need
to re-RUN
run the basic
As with the
program to
machine
manner.
the main program,
program
This
the
If you get into a situation where you you
can always
the first line which calls the machine load, the
load
is
has
not
true of
been
all
wiped
of our
as
out
skip
long as in
some
basic/machine
programs.
LINKSTER
Linkster complete
list
is a of
basic program which sector
links
122
for
a
gives you
a
given program.
C'
^'
Linkstor
allows
you would
of
all
the
like
the
to specify which
to begin with/
tracks and
program.
beginning, point
you
will
from
the
point
than
sectors
disk,
when
a
some data.
a
and
then
to
stops
disk
sector.
In
replace
what
"repaired" ERROR
so
in the
the
the number
where
and returns
is
link
from
a
can
of be
program is
you
that
defective
program which
If
bad
list
from
printout
becomes
You can then concentrate on
previous
The
a
out which sector
really
a
linkster can be used to find bad
from. it
linking
the ones
finding out
If you have a
linkster to find
print
from that point
start
started.
sector
and printer.
program
looses
bit
you
simply
stored on your
used
Linkster also counts
screen only or screen
Other
it will
just give you
you choose.
blocks
sectors
You do not have
it
then
track and
may
cases you can
is
missing by hand
disk error,
"fixing" able
the program
some
loads
the error
be
the
to
and
the
for
use
is coming sector.
change the
"skips"
list
and
the bad
program
and
then resave
the
program!
ANALYZER
Error Analyzer checks an entire disk for errors by either a check.
sector Error
by sector check or by a
Analyzer
checks
tracks
This gives you
the ability to
protection
been
track
has
check
indicate
tracks and
is
if sync
used
primarily has
all
find out
on the
a sync
been wiped
disk.
the
if
out
way
to
44.
any level 4
The track
locator
if any has been written on the
123
track by track
by
which can
on any
"extra"
normal
inner
tracks above
35.
wiping out a extra
Many of the protection methods
track,
tracks can
bo detected
information
or
the
tracks,
"extra"
detect
that,
The
and
and
programs. more
protection
by
is
The
a
designed
so as to
it
machine
uses
a
the next.
with lots of doesn't
only
as
on
are
Error Analyzer
you a
found.
These
should
be
as
copied
program
protection you will
sound
a
as
get
"patching"
these
chores
the
program is
which can be
technigue
Instead
which
like
feature
cleaner,
its
will
options
on
paper
work
and
cow.
both checks.
the
by our programs
back
through
With
errors in various
printouts
a
listing of
supplied
you
on disks
safer,
having
it operating.
on your
is
four times and then go on
convenient
involving many
need
found
45
on new
longer but
some disk drives.
printouts
to
takes
about
test
the disk head
printer
"map"
time.
primary
is guicker,
lias
errors
the
It
of
takes
appreciate this
make your disk
used
a
programming
errors.
If any
boen written to
check
"bump"
You will
to the
program.
amount
sector test
alignment
This will give
this
writing
short
recheck each track or sector to
or
the only program that will
errors
not
detrimental
by
idea
by
When to
a
track
sector
thorough.
is
in
good
sync,
codes have
this
do so
track
seconds
erasing
such as
to work your
your
current
locations, way through
copy disk.
T/S ANALYZER
T/S Analyzer a
error
along
has
log which to
Fastback.
the primary purpose of producing
can be
stored
as
a
file
Although T/S does
124
and
passed
not have the
advanced
reading technique
have several logging for Fastback.
you should
on,
a disk especially
In this manner,
once when the
disk to be
you will build a
need to do
and
lot of copying,
to hold your
the log only need
copied
is new.
file of error logs and
the
appropriate error
program in question.
The output of T/S
errors are encountered
T/S
be done
As time goes
if you ever
another backup you can simply load
through it,
it does
options and serves as a map maker
If you plan to be doing a
format
error logs.
of Error analyzer,
Fastback
log
for the
tells both what
as well as which sectors contain
data and which sectors are unused on the disk.
This can
be helpful
but
not
to
locate
called through
sector
what
has been
sectors which
the
have data
normal linking
destroyed,
linkster
is beyond the bad sector.
method.
cannot
are
If a
find
T/S can give you a
out
clue
as where to pick up from!
T/S
loads
"ANALYMACH".
its
As before,
of the program.
T/S
analyze
the
tested.
Once this
log or
final
is
option
You can then make your
need arise.s or printout. and
logs
this
and is
is done
(3)
saving
that at
Sectors
done you
to load
print
routines under in the
on
have
out
name
first
line
it
the
for your
to your log disk.
The
time and
previously saved. This
then
appropriate,
convenience.
FASTBACK
125
disk being (2)
if you desire.
it becomes
to
of
an error log
one
First
the choice
The number of errors counted
printed
the
gives you four options.
Tracks
printing the
to
machine
allows you
later as
the
you can make a is
kept
track of
The
error
relieves
or bad are
loq
Fastback
from
loaded
into
the
Thus
copier can be.
copier
which
program.
easily
The
Fastback
just
copies
BAM
a
Fastback
the error
log
or
errors
need
be
used
to
put
copy has
errors
is
a
on.
in
the
on
fast
as DAM
not using
an
list
made,
you
can
use
where changes,
or
Diskpicker
can
Alternately you may choose
and
try to
first
its
line
modify
you
will need
machine
of
to
the
There may be data
errors that loads
of
copiable.
for the errors.
with
saved
containing
verified
Error writers
Fastback
"ANALYMACH"
it
been
the program
sectors
recover.
sectors
that
are
as
data
is comparable to a
rather
and
to be.
sections which look
the
is
about
printouts which indicate
list/disassemble
in
is
those
but
which sectors have data
Once
Only those with valid
operation
for,
bother with any empty
subsequently
difference
destroyed
to
Fastback asks
buffer and
The
only
which
having
sectors on the disk.
your copy disk. a
from T/S,
the
to
counterpart
program.
DD-1
DD-1
is the name of a group of four programs which
provide
direct duplication
programs
are
are
1DUPDAC
for single
controller
disk
2PSIMAIN
two disk drives. as
Fastback,
an
on
the
spot
and
you
via whole disk
its controller
copies.
are
used
2DUPDAC
for
whole
backup of
find a
DD-1
less
126
is
The
1PSIMAIN which
and disk
Although not as advanced will
copy.
its basic copies
with
in technique
very handy to make
protected
disk.
It
can
be quite and
fast
you make
The
if the original use
of
programs
the
are
able
level
protection disks
track
by track
BAMs,
and
allows
to copy
since
duplication
are
reading simple
handled
and
which does
A
the
by
direct
not depend on
Track and sector
machine
speed.
and
a
lower
150 block buffer is
swaps.
writing
operation
many of
they provide
minimum number of
manipulations
full
copy features.
it skips over errors.
used for a
maximum
fast
is only partially
routines
Error
for
decoding
circumvents many
error
protect ion schemes.
The
system also
features
can be sent
to a printer
writing
removal,
or
an error
display which
for logging and
DD-1
later error
will skip sectors
which
contain errors designed to stop whole disk copiers. the program requires
the errors to
If
be present you can
use diskpicker or an error writer to replace them.
The.
"fast
write"
program to skip contain
look
for
program
writing
a
data
with other
normal
checks
it and
of
over the writing
only format
compatibility
feature
format
the
if
drives,
contents
causes
the
of any sectors which
and no
of
DD-1
program
this
"ONEs"
of
or
the
data.
can
For
be set to
"ZEROs".
The
sector
before
it contains only format data
it will
skip to the next.
The
Multiple Copy
one copy per original This
will
allow
you
Option
-
without to -read
127
allows making
rereading in
a
more than
the original.
section
of
the
o original,
tlion write it to several copies,
'This
saves a great
only
read
chosing
corresponding
basic
number
of time
since
the original
^'
is
^
once.
After
the
amount
and so on.
DUPDAO
is
PSIMAIN
of
procedure
either
this chapter
or
loaded.
version
drives for
1
you
1)0-1
2
disk
Then
type
drives,
the
NEW and
load
that corresponds
are
are given
to
using.
The
in
procedure
the
the
options
*
(\
C
and
part
of
(section 2).
r ,
£>
DISKPICKER
C c
Diskpicker
development
C
system for the 1541 disk drive. It is designed to allow
^
you
is
to develop
memory space From
there,
menu
in
a
machine
machine
and the
language
language
routines
in
routines
Diskpicker.
drive memory contents
then be examined,
can
The
be
executed
from a
into the
printed,
various
editor
machine
utilizes
C64
memory
modified
assembler
language
ZMACH which
control
memory transfer features of
for
gives
It
C
Since
C
you have a
*-
accomplishing
it the
Diskpicker
the
^
also
£
ability to switch
effortlessly between its basic and machine functions. You may wish drive
ROM
ra'ther
routines to
using
large
that
FFFF and
to make
a
ROM
listing
diskpicker.
The
16K
size
of
will make
however.
The
disk
you
need
most
reside
will
thus makes
a
the
much shorter
128
a
controller
listing.
C s
^
your disk
printout
^
can
an so on.
tasks.
of
the disk
space.
Diskpicker uses the Commodore MONITOR$8000, featured
C64
then transfer them to the disk drive.
diskpicker allow you to transfer any or all
full
the
from F24D
In
addition
disk drive,
the
disk
memory
can
writing
drive
to see
and
what
is
images
created
normally.
With
routines
can be
these
out
The
given
data
other
and
the
available are
will
diskpicker,
special
This
allows
format
produce
to
the
from
to computer you to
information
Also modified
written to find
headers
errors
if
read
machine language
and
read data
gives you the
after
power to
methods of your own as well
that would otherwise
procedure
next as
see.
sent
sectors
back
,
which
specific
in
to load
Diskpicker
modified headers.
read
bo
there.
experiment with protection as
to
transfer them
you normally couldn't be
routines
you will also be able
look at header that
to
for
section
be
hidden.
Diskpicker will
but
the
menu
be
options
follows:
1...Transfer disk memory to buffer
(in C64)
2...Enable monitor
(machine E/A)
3...Transfer
buffer to disk memory space.
(C64)
4...Direct execute user program. 5...Job
Que
execute
user
program.
6...Load Sector to disk buffer. 7...Initialize disk
I/O.
8...Format Diskette.
ZMACH
Zmach load
any
is a time
short you
machine routine
are
particularly Monitor$8000.
using Zmach
129
an
which you can
editor assembler,
provides you with
a
way to save? fortli
and
between
necessary
exiting
to
from
restore
basic
and
prevent,
the
zero
machine
"lock
editor
page as you
up"
qo back and
language. of
assembler.
the
When
This
is
computer
when
loaded,
before
going to the E/A, you SAVE ZERO PAGE by typing SYS'19152
Q
RETURN. Later, after you exit from the machine monitor,
^
you
type
SYS491H4
to
RESTORE
ZERO
PAGE.
SECTION 2 — PROCEDURES
We will to
follow with
remaining
1
start
this
section with general
any new disk
individual
^
and
we will
(] !
notes to make
you aware of additional options that may
t '
not
from
Do
a
with
users standpoint.
a SUPERDIRECTORY
disk.
programs
cover
special
be obvious
utility
then
procedure
listing of what
is on your
new
If you have a printer, make a hard copy for your
records.
2
Run use if
an of
error
errors
making
3...Choose Go
ERROR ANALYZER TRACK check. protection
show up.
hardcopy
as
Next
to
do
a
tracks.
TRACK and
identify
Make hardcopy
SECTOR
analysis,
needed.
copy method.
directly
and extra
This will
DD-1,
procedure
DD-1
for
FASTBACK or RELOCATE/LOAD. method
PROCEDURE
chosen.
([ •
t-
1•..SELECT
and
LOAD
"1PSIMAIN",8
2... SELECT
and
LOAD
4...SET
a
and
change
last
line of
menu
NOTE:
if
have chosen this to
conserve
FAST COPY
NEW
and
LOAD
1
P=0 to P=l
after each error is
changed
for
STOP after
have
read
on
track
?PEEK(25G2).
If
POKE49751rl.
If
both
for
DD-1
MULTIPLE COPY
POKE49174,
Thus poke
on.
default
1
device
device number 9
few sectors
?PEEK(2561)
0,
of
and
POKE49747,1
and
then do nothing.
0
FAST COPY.
Default
makes
EXTRA copies desired].
for
value
program with
first
then
poke will produce
cycles.
6...DUAL DISKS;
the
1
option.
[number of
the value you
are
for your
space.
DD-1
one.
both PEEKs were
value
buffer
Run selected
but
been
from
method of configuratioA
memory
MODE.
to
you use this option a
copied
The
line
program
disk to be
5...SET
LOAD
wish to save the modified version
We
is default
and
then
must be pressed
to SYS49881.
lot you may
over
F7
unless
own use.
NEW
drives.
List
printer.
SYS49903
"2DUPDAC",8,1
for dual
3...PRINTER option.
printout
then
for single drive users.
"2PSIMAIN",8
turn on
"1DUPDAC",8,1
2 copies, 0
for
3
produces
one
copy.
8
for copy disk.
131
for
copy.
Note that
that many EXTRA write 2
number
one
copies
and so
original disk,
and
7...Run
J)D-1
formatted
option.
program disks
chosen.
for
copies
If you forget,
in normal way.
(Do
You
must
use previously
since DD-1
has no format
just RUN/STOP and format disks
not use wedge),
then
RUN again.
Follow PROMPTS on screen.
^ s-
Q
C 8...Bell
indicates program read or write
SECtor,
and
ERRor
displays
and any errors encountered.
is
active.
indicate current
TRack,
location
s-
You will have time to write
(^
the info down if an error was found.
You must press F7
L
after error to continue with copy process.
FASTBACK
1...LOAD and
printout
run T/S
PROCEDURE
analyzer.
if desired.
SAVE
Follow
error
PROMPTS.
log on
Make error
disk reserved
for that purpose.
&■
£
C
2
LOAD and RUN FASTBACK. Follow PROMPTS.
^ O
3...After copy is
done,
use error log
and
error maker or
Diskpicker to write errors back on copy disk.
4...As
an alternate
original these
program
routines
to error writing, and
may
Relocate/Loader
try
be
to get
in
the
boot,
into these
routines.
you may need
routines.
RELOCATE/LOADER PROCEDURE
132
C
to disassemble
remove error checking
Q
•
As
to use
1...L0AD and
2...Follow to bo
3...Type
RUN RELOCATE/LOADER.
PROMPTS
and
select
program
from
Relocate/loaded.
in
EXACT program name when asked
4...Save the
Relocated
program you can needed
for
often
as
copy.
load
picking. needed
If you are
The
for
relocated
copy can
study purposes.
need
start
"picking".
While picking,
normal machine
relocating
completed address,
the
any go
to
language
has
address
the
and
RUN
IF
track
and
which is
a
It
as
will have a
2560.
until
loaded
You do not
you are
done
changes
COPY and and
now
if
you have
need
to
reset
PROCEDURE.
PROCEDURE
DISK-EDITOR.
select
RESETTING sector
the
to
DISK-EDITOR
2...Follow PROMPTS and edit.
be
tools
routine.
DISK-EDITOR
1...L0AD
to pick the
you can save the program as a
been done
needed
it.
Editor /Assemblers or other
$0A00 or decimal
to change
for
trying
starting address of
5...If
original disk
for
first
Superdirectory
track and sector desired to
ADDRESS, the
this will
program.
track and
listing to
If
be the
you
sector you will
find
133
out.
do
not
need
first know
to do
c 3...Once desired sector display with the The
first
two
lias been loaded,
you will have i
hex values of each byte are
green
r
(Convert these to decimal to find
Q
next track and sector and convert any desired values to
^
hex before trying
to
if
and
next
track
replace
are
the
current
sector
is
NEXT
sector. and
SECTOR values IN HEX.
and
in the
*-
ones)
given as
TRACK
For example 17
10;
the
decimal value is 23 16. If you wish to change this link
C
to.
^
to say track 1 sector 12 you would type in 01 0C.
4...If you want
in
the 3rd
to change
and
the LOAD-TO address,
r ,
C
ones) Remember this only applies to the first sector of
^-
The
values
high
all
are
byte
in
load to
hex with
00
the
If
copy,
these numbers:
will
others contain data
second.
relocate/saved
(Two
is given
following the green
the program,
4th bytes.
it
C c
you 0A
location
in
low byte
you
location.
first
and
Which means
r
a
{T
this location
*-
that
at
the program
r
address back to what is used on the original disk, look
Q
up the correct start address from the HEX.ADD column of
*-
your
^
listing of
that
resetting
r
the
Superdirectory
If you are
_
the
are looking
would see in
$0A00.
this
disk.
C 5...Once all desired
PROMPTS one.
to either
changes have been
made,
SAVE changed sector
SAVED sector will
replace
itself
on
follow the
C
or get another
^-
the disk.
~
C G C C C C
8
DISKPICKER
The
uses
of
simple procedure allows will
you
to
Diskpicker
can
give you.
to use the
example error
routines
Beyond
you will need
this,
sucessful.
MONITOR$8000 disk. the
As
options
Note
cannot
is
the
occupy
locations. space
lines
that call).
the
beyond is a
fluency
that
and
to the disk.
call
Remember that
of basic
developing
information
read
routines
from the disk.
and
a
copy of
PSIPACK to change
MONITOR$8000. other monitors
RAM
You will need some free RAM to use
for
language
your
if you want
load and
we
give you some
obtain
saved on
beginning
system that
in machine
you must
be
what a
in the disk,
which you can send
which should
program
it
to use
Other monitors may be used
(SYS32768
will
go well
develop programs
explain how
to be
PROCEDURE
or
as buffer
for
Typically a
$C000
storing
couple of
K
be enough.
1...L0AD and
RUN Diskpicker.
2...MENU OPTION
1
-
Transfer disk memory to buffer.
The purpose
of
locations
in the
memory
of
the
study,
and
this option
disk drive to
C64
modify
options
will
allow
memory.
Since
the
from where
to
to allow any valid
be transfered to you
as desired. you
is
The
make
can dissassemble,
monitor printer printouts
of
total RAM in the disk is only
135
the
this 2K in
size,
you
have
for this
v
purpose. The requirements of Diskpicker do limit you to
^
using memory between
^
Option DISK
locations
you
buffer
STRONGLY
64
is
starting
transfer
to
will
recieve the
that
you
if
you want
you should use
or 4300 or
5300 etc.
NOTE:
the
$7FFF which
for the
to
to the C64
meaningful
in
the
20K.
and
ending
_
C64.
These
f
It will then ask you where you want the
which
Thus
ask
want
recommend
offset.
room
$3000 and
one will
must be in HEX!
C64
plenty of
because
We define
We
*-
page
^
$0300-$03FF
r
a buffer start such as 3300
C
will make disassembly more
^
page
00-FF as
use
to be.
the
to transfer disk
This
all
always
data
(/
addresses
location
will
same
be the
address;
same.
-
000-F00 as
C
page address; and 0000-F000 as block address.
C
c 2...MENU OPTION
This
2
-
Enable Monitor Mode.
option puts you
. use Monitor$0000
typical
you
can
machine
routine
option
3.
from a
select a can
be
looking at
an ASCII as
well as hex dump.
be
acess
meaningful
in
this mode.
For
Q
a
C_
memory,
Keep a
to
the
disk
by
that you have
s-
we recommend
Q
will give you
L
This can be useful when
codes or particular ASCII.
s-
area and write
command which
We The
information
disk through disk
assembler. purpose.
transfered
(intorrogate)
for
in
memory
using the I
looking
for this
are available
which
When
the editor
Commodore)
E/A features
example,
loaded
(by
into
f
copy of
^'
info which would
r-
figure
C
3.3
(disk
map) handy when using the monitor.
C '
C To EXIT the monitor mode,
type G C020.
This will
C
I
return
you
to
the
programs or data
intact as long on
top of
This
main
menu
that you were
in
basic mode.
Your
working on will remain
as you do not try to transfer something
them or
gives you
erase
them with a
the ability to
disk memory or machine routines
monitor
command.
keep many "images"
of
in memory at one time.
3...Transfer Buffer to Disk Memory
This option allows you to send the data or program that you have in the C64 buffer space TO the disk drive
memory. system
Remember that purposes and
programs to these 0300,
0400,
the disk uses you
will not
locations.
0500,
0600,
uses.
$0000 to $02FF for normally
The buffers
and 0700
transfer
in the disk,
are perfect
for
such
S
4...Direct Execute User Program.
Assuming
disk drive, program
address to
you have
this
to be
(hex)
begin.
executed!
in The
proper
memory*
is
in the
You
the disk at
to cause
is
a program
option will allow
Diskpicker It
transferred
you to cause that
will
be
asked
for
the
which you want execution
commands will
that program to
a good
to the
be
sent by
RUN in the
disk
idea to make sure a scratch disk
drive the first
few times you try a routine
in case it backfires.
Direct manipulate
Execute is data
reading or writing
rather
primarily than
.to sectors.
137
for routines
routines which The reason
which control
for this
is
that
direct
track and
execute
does
not
provide
for
automatic
sector preparation as does Job Que
Execute.
o ^
Q
C 5...Job
Que
Execute.
This option provides A
PART OF
r
the
r
drive will find the track and sector you have selected,
C
and then execute
your routine
*-
normally have
^
The
r
if
would
been
of
you
the
select
say
ROUTINES.
a Job Que
the
save you
might
disk routines.
the trouble of
In
WRITE,
Normally
to affect what
through
functions
lets
DISK
your routine.
be designed
done
EXISTANT
^
other
words,
one
execution of your routine AS
job que
trying to get
the
motors going, find track and sector, etc. The
following
list
gives
the
C ^
direct
execute
\~
commands:
128-READ -Reads
in selected
sector.
*-
144-WRITE -Writes to selected sector. 160-VERIFY -Compares
sector with one
176-SEEK TRACK -Locates 184-SEEK
SEC -Locates
specified
specified
Q in memory.
track.
sector.
192-BUMP -Runs head to stop and bumps 208-JUMP -Jumps 224-EXECUTE
Que,
finds
or
track and
of one of data
is
its
s-
(resets head)
£
specified memory location.
-Puts Track
goes to your routine
to
v.
and
sector,
Sector to
loads
machine routine.
Note
in
j:
header there and
s~
that your machine
Q v.
the five buffers, $0300 through $0700. Since
^
from
the disk
start
header,
drive inoiuory will bo affected.
at
affected
beginning
read
jump vector must
the
be
V
the
variables
in
the
r
Q
C 138
C
C
6...Load
Sector To Disk Buffer
This
option will
and sector) memory.
and
the headers
(track
will then load that sector to the disk
From there
for study.
ask you for
This
it can be transferred
option is useful
to C64 Memory
to examine specific
sectors.
7...Initialize disk I/O
This is essentially
the
disk to
wiping
power up conditions.
out all
Useful when you
other
a RESET command which returns
of memory like need
operations.
command any time
to be
It
a
sure
is a
It
does so without
C64 RESET the
good
disk
would do.
is
clear
idea to
for
use this
you have uncovered and error and wish
to send new commands to the disk.
This makes
sure the
disk is ready to receive the data properly.
8...Format Diskette.
This
option allows
breaking out of
to format a
program.
will typically be
diskette without
This can be useful
since you
trying to do things which can
"mess"
up your practice scratch disk!
9...Resetting.
If reset.
the
system
In extreme
locks
up,
use
SYS49184
cases you may need
turn off the computer.
a
reset
(See Appendix E).
139
for
a- warm
button or
X is used to
c c escape an input mode question.
(
C c C C c
ADVANCED TECHNIQUES In making protection,
go
beyond
simply
program test the
writing
There
an
some
error
error by trying
Error writing programs option.
there are
things which
and
r~
having the
to load the
Q
sector.
C
to date leave you with little other
are many things
possible
of which we will
s-
try to start you thinking about a few.
Consider first,
Q
how a disk sector
c
or partial
Q
track could be erased. The disk would normally find
C
this sector by its header, which
*-
has
been erased.
bad,
you can
However,
if you know which sector
front of it, which is good. Once the preceeding good
C
sector is found, the disk is programmed to wait for a
*-
certain
^
and
write
"nonexistant"
look
for the
some data.
sector.
This
sector
^ C
period
the disk to
is in
to the
tell
can't be done if it
data
then goes
A similar process can be
r
used to read this data. A quite effective means of
C
protection since it is difficult to reproduce the exact
^-
parameters used
^
be
used
on
the
Other ways
to write "extra"
the data!
tracks
to protect
GAP at the end of a
track.
This
beyond
include
variation can
35.
r
putting data
in
C
the
r-
If your copy maker is not
Q
aware that data is there it will not look there. With the machine be
road
in
a
routines
we have
included,
fashion
similar
to
the
the gap data
above
process.
C
can >
s-
C
140
C
c
Tracks and Sectors can be given
illegal numbers by
changing this data in the header.
(Appendix F)
The
normal DOS will not accept out of range values. machine routine used by the disk drive can do
A
this.
The
diskette could also be entirely or partially formatted in an abnormal pattern which would only be recognized by a modified
DOS
routine.
Another devious means would be sync pulses
pulses
could
spacing.
on
an unused
be encoded
part
have
a
to
as
These
simple
through normal
as
be
exactly according
of
the diskette which cannot
DOS routines.
routines.
is hard enough to understand how the normal
routines function/ done
idea of
if you go outside the confines of
DOS and develop both reading and writing
someone has
to a
or the program checking
These examples should give you a clearer what can be done
sync
Breaking such a system would require
sophisticated analysis
be done
disk.
"encoded"
the time between consecutive
predetermined VARIABLE spacing/ them would abort.
the
by a means
In other words,
sync pulses would
of
to write
let alone trying
beyond
this.
the It
DOS
to figure out what
These methods
will not be compatible with other drives.
by nature
It
is
also
interesting to note that copier programs usually will not copy themselves... obsoleted
in other words
by their own manufacturers
developed protection that they
can
cannot
do
copy
it,
so
itself,
can
they are since
they have
foils their OWN product!!
anybody else.
you may rest
141
If
certain
a
copy
that
If
program
within a
VERY short
time
o c
there will be many new programs out
that it also cannot copy!
r \
If the market continues to
develop in this direction, we will likely continue with our development of
a
disk
"Dumb Copier".
Such a
Q"
^~
system
will put to rest any protection that does not involve
/-
external hardware or physical modification of the disk
Q
drive.
v.
C C ERROR WRITING PROCEDURE
Following
are
some examples of
*~ c c
how
to send error
writing routines to the disk via Diskpicker. In the program section of all
the error
this chapter we have
routines
included.
C
listings for
You may prefer to
write a basic program which "sends"
Q
*r
these routines to
C
the disk and then executes them. We have chosen not to
C
as such error writers are abundant already and become
*-
outdated
^
as
fast
familiar with
as
they
are
sold.
the techniques of
If
you
become
Diskpicker,
you will be
able to add and modify routines as YOU see fit.
IMPORTANT:
Although
every
these procedures compatible
apparently
four revisions
Commodore.
As
compatibility
explained
can not guarantee on
all
past
earlier,
is of
many
forms
can of
procedures.
C
to make
there are
ROM put out
this
by
C C< **
Q
L ;
lead to
^-
protected
s-
is
Q
We
L
making routines will
^
future versions.
142
made
1541s,
questionable
that all error and
was
of the DOS
AS error making
why such protection
work
with all
problems with
software AS WELL
attempt
Q
This
validity.
s-
C
O
SPECIAL
INSTRUCTIONS AND CAUTIONS
NOTE:These techniques should not be attempted if you do not understand the underlying principles. Indiscriminate use could cause the disk head to stick which may require partial disassembly
1.
To
Escape
requested
back to
input
Main
Menu,
to correct!!
Input
letter
X for
value.
2.
To escape from Monitor$8000, space btween G & C020)
input G
C020.
(requires
3.
If disk or computer locks up, (and if you have a reset button), press reset and enter SYS49184 to restore system.
4.
Always Format disk to be written to with the same disk ID# as
5.
the original.
Never select tracks above 44 or disk head will bang against end stop and may get stuck. If this happens you will need to open disk case and gently push head back to
center.
6.
If head gets stuck, first operation or call the Job Que
7.
Always input valid header # and when using the Job Que. ERROR
20
try by using Initialize Bump command, #192.
NO
data
Load and run Diskpicker.
2.
Select menu option
3.
Input
L"20
NO
2.
track &
sector
HEADER
Erases header from specified
1.
for
track and sector.
Set printer choice
HEADER",08
After
"N". load,
Input
G
C020.
4.
Place diskette
5.
Select menu option 7.
6.
Select menu option 3.
7.
Input disk start
8.
Input disk end
9.
Input
Buffer
10.After Data 11.Input
to be written on in drive.
address
0300.
address 034F.
address
transfer
Job choice
execute address.
3300.
to disk, 224.
select menu option 5.
Select
choice
F0R
ONE
SECTOR
FOR
ALL
SECTORS.
143
SET
1
(0300)
for
MULTISECTOR*'N'
SET
MULTISECTOR*'Y'
12.For header #1,
13.For header#2, Note:
If
track # desired to write ON.
(USE 0 FOR SECTOR #s
sector
0 is to
highest sector'number
manual).
Q>
input value ONE LESS than sector desired
to write ON.
*
input
i.e.:
Input
being chosen.
14.REPEAT the above
1)
be written to,
the
C
a 20 if sector 0 on track 1 is
v-
on this track.
(see
select
O
Q
drive user
steps 8-11 for writing type 20 errors
to other headers of your choice. * Intermixing read, write and load operations may write over the error
routine being held in the disk memory buffer.
/-
Q
C. f
C
15.To test your errors, select option 5 (Job Que Execute).
^-
16. Input
v-
17.For
job choice
header #1
,
128.
enter
track #desired
to
read,
and
header#2, enter the sector number to read.
for
18.If everything went right, you will see the proper error message and OP status code.
**
For error
routines 21 ERASE
DATCHKSUM,
and
instructions
SYNC
as given
track and sector
around
thru
above
#s you wish
is
needed on sector 0)
44.
This will change
is usually used
reading
FOUND.
TRACK,
WRITER,
22 NO
repeat
DATA,
the
EXCEPT select
23
same
the EXACT
to write on.
(No wrap
The SYNC WRITER routine
to write sync pulses to tracks from 35
these areas
the error returned
from sync not
•
found
C
^
Q
C
Q
C r
^-
when
Q
to HEADER NOT
^
L
C READ HEADER
C
c This routine reads the GCR header from
a disk and
Q
allows you to put it in the computer for analysis or modification. By using this routine and the HDR WRITE you can "SPLICE:" bad headers from original disks on to your copy disks. In many cases this is more effective
^ v_ r
than
been
trying to
used
for
reproduce the header
protection.
1.
Load and run Diskpicker.
2.
Select
3.
Menu
Input
HUH",00
4.
After load,
5.
Place*
option
2
and
printer
choice
after load,
input. (] C020 to
be
read
(_ s-
Q
L"READ I!DR",08
diskette
errors that have
"N".
input
v.
LMCOPY
^
C *-
into drive.
^
C 144
C
6.
Select menu option 7 then option 3,
7.
Input disk start address
8.
Input disk end address
9.
Input buffer address 4300
10.After data
transfer,
11.Input Job choice address SECTORS
0300
034F
select
224
and
Of 0300. FOR ONE MULTISECTOR='V
12.For header #1,
menu option
enter
5.
select choice
SECTOR,
1
for execute
MULTISECTOR*'N'
FOR
ALL
track header you wish to copy is
on.
13.For header #2,
enter
sector value ONE LESS
value with header you want, ie: Input 0 choice. ** For sectors 0, seiect last sector on 14.Select menu option 15.Input disk start
16.Input disk end 17.Input
buffer
if
than sector
sector
that
1
was
track!.
1.
address
of
address of
address
of
18.After data transfer, printer option.
0400.
05FF.
6400.
select
menu option 2
19.Use memory dump command ( M ) image of the header and data memory locations from 6400 to explanation of GCR image. main menu.
and desired
of monitor to display GCR now contained in computer 65FF. See Appendix F for G C020 will return you to
COPY HEADER
Writes object
GCR image
diskette.
header from for
1.
Follow steps
2.
Insert disk to be written to
3.
Select menu option
4.
Input disk start address
5.
Input disk end address
6.
Input
7.
After
buffer
1-19
of
Useful
disk buffer
to
SPLICING.
for Read Hdr routine.
in drive,
(object disk)
3.
address
transfer of
ERROR
0300.
035F.
3300.
program
to disk,
5.
145
select menu option
c c 8.
9.
Input Job
Choice
224
and
select
choice
1
for execute
address of 0300.FOR ONE SECTOR, MULTISECTOR='N' SECTORS MULTISECTOR='Y1 For header #1/
to.
10.For
header#2,
sector
choice.
enter
to be
the
track header
sector
ie:
ONE
Input
is
LESS
to be written
than desired
0 if 1
is your
use highest sector value on THAT track,
in other procedures.
11.If everything went right, thru 19 to written! !
value
written to.
* If choice is 0, as described
enter
FOR ALL
look
you can use READ HDR steps 5
at and
verify
the
new
header
just
(~
^ C r
V ^
^-
(~
C
r~
Q ^ v-
C EXTRA NOTES
C
c Remember,
control
is written
and
give
sent
to
you
Q
is a disk development system especially for
which are
simple to use
C
programs are obsolete shortly after they are sold. With
^
DOS routines which are by nature short and easily traded, and use Diskpicker to transfer and execute these routines. Dedicated error writers generally try to keep you from getting into the program let alone
^~ v_ C
they have decided
Diskpicker you can
but restrict you
^
to
what
should be used
for errors.
concentrate on collecting
Such
modified
modify and update it.
Below are listed
some protection possibilities to
look for on original diskettes:
1.
(^
experimenting with and testing modified DOS routines. Do not confuse its intent with that of "turnkey" error
writers
what
designed to
^
It
exactly
is
the
disk.
of
Diskpicker
Missing or extra sync bytes.
this.
Use READ HDR to look for
f~
(^
C ^~
Q
C
r
2. Missing header or illegal header ID.
C
3. False header checksum.
^~
4.
Illegal
5.
False
ID
or missing
sectors.
numbers.
_ r
6. Protection data in GAP area.
Q
7. Missing or illegal data block ID byte.
^>
8.
Data
^
9.
False
block data
10.Protection
missing. checksum.
data
in end
of
track GAP.
146
11.Protection
data
combinations. ♦Note: It is
encoded
possible
using
to achieve
sync
some of
pulse
the
errors on tracks 36 thru 44 as these are available using the disk controller software.
above readily
Even though protection errors will cause loading problems under normal conditions, it is a fairly simple process to recover useable data from a bad sector. This is done by analyzing the error and writing a short machine program to recover the data. The trick is to sync up on a previous sector's sync pulse and count bytes to the location you wish to read from. When counting bytes, sync pulses show up as ONE byte even though several have occurred. A valid sync pulse does not
always
show
up
on
a
GCR sector
read
out
as
an
"FF".
The general philosophy for precise error writing is to place the GCR data you wish to record in one of the disk memory buffers, find a valid sync pulse on a nearby preceeding sector, count bytes up to the area you wish to write to, switch the disk controller to its write mode and dump the buffer to the diskette. Switching from read to write is Best accomplished during the gap time when GCR 55*s are being read. The read/write techniques just described will allow a clever programmer to read or write desired information to/from any place on the diskette!! Good luck!!!
***
IMPORTANT:
Diskpicker
When
procedures,
switching be
diskettes during
sure
to perform
Initialization - Menu option seven. This will insure that the drive page zero memory locations are initialized to the current diskette identification parameters. THIS DOES NOT HAPPEN ON POWER UP!
147
o c c c c CREATE
1.
2. 3. 4.
For
checksum
error
HEADER
ERRORS
in header,
^
load
monitor mode of Diskpicker.
ICON
If checksum in header error is not desired,
through monitor mode.
HDRthrough
t f
load CONHDR
v-
Q
Load WRITE HDR through monitor mode.
PUT
OBJECT
Select
desired.
DISKETTE
6
IN
v
DRIVE.
from main menu
and
r
enter
track#
and
sector#
C
5. Select choice 1 - (Transfer disk mem. to buffer)
^~
Start addr. 0000
■ 6.
End
addr.
Buff. addr. 6000 Interogate
mode.
8.
9.
.
memory
Refer
Locations"
7.
Q
OOFF
to
identify byte
Change locations
Disk
locations 6000 -6030
to Appendix
ID #s might
F
form monitor
"Important Disk
functions.
to value desired
normally be changed.
Memory
to create errors.
The GCR image of this hdr can be seen in computer buffer locations 6024-602B. (Which come from disk
(L.
f~
C
*-
£ _
C.
END ADDR Select 3
r
001B BUFF from main
Start addr. 0300 addr.
ADDR 6016 menu.
Q
031F
r
Buff. addr. 5300 10.Select
4
^
from main menu.
11.GCR image is now ready for transfer
Entry addr.
0300
r
in disk memory locations 03E0-03E7, to the object disk. Make sure object
disk is inserted in drive.
12.Select 3 from main menu.
r
Q
^~
Start
addr.
0300
Q
End
addr.
036F
r
Buff. addr. 3300
14.
^
memory 0024-002B) SELECT 3 FROM MAIN MENU START ADDR 0016
End
13.
r
Select
5
L
from main
menu.
Job
execute start addr, select 1
choice
(0300)
=
224.
For
For Hdr #1, use track desired. For Hdr#2, use ONE LKSS than desired. ("wraparound as in earlier procedures),