THE PET EMULATOR Copyright 1982, Commodore Business

Transcription

THE PET EMULATOR Copyright 1982, Commodore Business
THE PET EMULATOR
Copyright 1982, Commodore Business Machines
Professional Computer Division
487 Devon Park Drive
Wayne, PA.
19087
COPYRIGHT
This
software
product
is
copyrighted
and
all
rights
reserved
by
Commodore
Bus i ness
Mach i nes,
Incorporated.
The
di s tr i but i on
and
sale
of
this
product
are
intended
for
the
use
of
the
original
purchaser only.
Lawful users of this program are hereby licenced
only
to
read
the
program,
from
its
medium
into
memory
of
a
computer,
solely
for
the
purpose
of
executing
the
program.
Duplicating,
copying,
selling
or
otherwise
distributing
this
product is a violation of the law.
This
manual
IS
copyrighted
and
all
rights
are
reserved.
This
document may
not,
in
whole
or
in
part,
be
copied,
photocopied,
reproduced,
translated
or
reduced
to
any
electronic
medium
or
machine
readable
form
without
prior
consent,
In
writing,
from
Commodore Business Machines (CBM).
DISCLAIMER
COMMODORE BUSINESS MACHINES,
INC. ("COMMODORE") MAKES NO
WARRANTIES, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THE PROGRAM
DESCRIBED HEREIN, ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR
FITNESS FOR ANY PARTICULAR PURPOSE. THIS PROGRAM IS SOLD "AS IS".
THE ENTIRE RISK AS TO ITS QUALITY AND PERFORMANCE IS WITH THE
BUYER. SHOULD THE PROGRAM PROVE DEFECTIVE FOLLOWING ITS PURCHASE,
THE BUYER (AND NOT THE CREATOR OF THE PROGRAM, COMMODORE, THEIR
DISTRIBUTORS OR THEIR RETAILERS) ASSUMES THE ENTIRE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION AND ANY INCIDENTAL OR
CONSEQUENTIAL DAMAGES. IN NO EVENT WILL COMMODORE BE LIABLE FOR
DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES RESULTING
FROM ANY DEFECT IN THE PROGRAM EVEN IF IT HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. SOME LAWS DO NOT ALLOW THE EXCLUSION
OR LIMITATION OF IMPLIED WARRANTIES OR LIABILITIES FOR INCIDENTAL
OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY
NOT APPLY.
PREFACE
The Commodore PET EMULATOR software package
execute programs that were originally designed for
PET computer on the new Commodore 64.
allows you to
the Commodore
The PET EMULATOR modifies the CBM Model 64 so that it will
operate identically to the 2.0 Basic PET 2001
in most respects.
Th i s mod if i cat i on cons i sts of two parts:
memory re-conf i gurat i on
and
system
interaction
interpretation.
The
exact
technical
spec if i cat ions of jus t
how the PET EMULATOR operates are we II
outs i de the scope of th i s documen t, however the more importan t
conceptual information of its operation are presented.
It
is recommended that you
trying to use the EMULATOR to
wi II be a successful one.
read the entire document before
ensure that your first experience
USER CONVENTIONS
It
is
recommended
that
you
familiarize
yourself
with
the
Commodore keyboard.
Here is a brief description of certain keys
and symbols , and their respective function in reference to the PET
EMULATOR and th i s manua I.
Up Arrow
The Up Arrow character, on the upper
left corner of the keyboard, is used to
load and execute
program.
/
These
two
keys
are
used
to
load
a
program into the computer's memory.
A
more
definitive
explanation
will
be
presented later in this manual.
and %
@ and
Greater Than
Th'ese two keys are used in terchangeab I y
as the command prompt for the emulator.
TABLE OF CONTENTS
SECTION
PAGE
1.0
Getting Started
1.1
Loading the PET Emulator
2.0
Theory of Operation
3.0
Operation
2
4.0
DOS 5. I
2
4.1
Command Summary
3
5.0
Combinations of Mode/Memory
4
1.0
Getting Started
The operation of the PET Emula t or is not on l y simple but really
transparent to the user.
I t was des i gned by Commodore for one
reason only:
Software Compatability.
It is our desire that you
find the program useful and of real benefit.
Please take a moment
to make sure
that
you
have
the following
equipment connected
properly, as per the instructions In the Commodore 64 User Manual.
I.
2.
1.1
Commodore 64
Commodore 1541 Disk D r ive
Loading the PET Emu lator
On the diskette contained in -the package there is a small program
that will load and execute the PET Emulator, the Emulator itself,
and several PET Publ ic Domain programs for your enjoyment.
To load the PET Emu Iator type: LOAD" *" ,8.
Aft er the computer
replies READY , type RUN.
This will load and execute the Emulator.
You will notice a message appears on the screen indicating that the
Emulator is loaded and running .
2.0
Theory of Operation
Memory Configuration
The CBM 64, in normal operati'on, stores BASIC programs in the $0800
to $9fff memory range (HEX), wi th the screen stored at $0400 to
$0800.
The PET stores BAS IC programs at $0400 to $ 7fff, wi th the
screen stored at $8000 to $8fff.
The Emulator re-configures the Commodore 64 memory so that
duplicates the PET internally .
Thus POKES to the screen, ' POKES
the program, and other such direct access operations work proper Iy.
it
to
System Interaction Interpretation
Many PET programs access the sys tem direct I y with PEEKS , POKES and
WAITS.
Most of the common PEEKS, POKES and WAITS are interpreted
by the Emu Iator and shou I d operate exact I y as they wou I d on the
PET. These locations are as follows:
The PET Emulator
Page -1-
Location
PEEK
50003
59464
59467
59466
59468
x
x
x
POKE
Operation
x
x
BASIC version type test
CB2 sound frequency
CB2 sound on/off
x
Set upper/lower case
set to 15
x
All POKES and PEEKS between $0000 and $03ff
translated.
POKES not able to be interpreted
'i lIegal quantity error'.
Cassette buffer #2
(same as the PET).
system routines will
th i s cassette buffer.
(when possible) are
return the message
is
also available for machine code programs
Machine language programs that do not ca II
work with no modifications if they reside in
The CB2 sound is emulated as closely as possible.
Certain very
high tones avai Iab I e on the PET can not be obta i ned on the 64, and
the pitch of the tones varies across the scale.
Musical tunes may
not be emulated correctly, but other sound effects usually sound
better under the emulator than they may have on the PET.
3.0
Operation
The Emu I ator loads into high memory on the 64, $COOO (HEX).
I t may
be loaded directly by typing:
LOAD"EMULATOR",8, I
and then after
the computer repl ies READY, type SYS 12*4096.
As stated above, the
fir st program on the di skette
is a program that will
load and
execute the Emulator for you.
In addition this program contains
the logic to allow screen color selections before actually loading
the Emulator.
4.0
DOS 5.1
I nc I uded
on
the
di skette,
and
operabl e
with
the
Emu Iator,
is
another valuable product from Commodore, the DOS 5.1 Universal Disk
Operat i ng System program.
Th i s program is more common I y ca II ed the
DOS Wedge because it 'wedges' itself in between the computer and
the disk drive to facilitate disk operations such as LOAD and SAVE.
The
DOS
Wedge
provides
a
very
useful
'short
cut'
method
of
communicating with the disk drive.
It cannot make the disk drive
do anything more than can be done through commands in a BASIC
program, but allows the user to communicate in a direct mode.
Th i s versi on of the DOS Wedge will actua II y a II ow the 'short
commands to be given from within a BASIC program as well.
The PET Emu Iator
form'
Page -2-
4.1
Command Summary
Normal DOS Wedge Commands
up arrow
Load and Run a program
/
Load a program
program area
%
Load a program into the area in memory
dictated by the programs load address
left arrow
Save a program
@
Read and
channel
@$x
Display
drive x
@$x:pgm*
Search the directory on drive
the files that begin with 'pgm'
@n:name,id
Header
'id'
@rO:a=b
Rename file 'b' on drive 0 to 'a'
@cO:a=O:b
Copy file
on drive 0
@sO:name
Scratch file 'name' on drive 0
@uj
Reset disk drive
@1I9
Change the active unit
default value of 8 to 9
@q
Qu it, turn
Emulator
@ix
Initialize disk drive x
into
display
the
the
normal
disk
drive
the directory of the
(ie. @$O for drive 0)
a
NEW
'b'
off,
di sk,
on
the
us ing
drive
DOS
BASIC
error
disk
in
x
for
'name'
and
to
file
'a'
number from
the
0
Wedge
and
the
File names for the LOAD and SAVE commands may be within quotes
anywhere on a line of the screen
(as in a directory listing), and
all other extraneous information on the line is ignored.
Using the DOS Wedge from within a program:
10
20
30
40
INPUT "DO YOU WANT TO LIST THE DISK DIRECTORY" ;A$
IF A$="Y" GOTO 40
STOP
@"$O"
The PET Emulator
Page -3-
5.0
Combinations of Mode/Memory
New
commands
include:
added
to
the
DOS
@m
toggle memory configuration
@e
togg I e emu I ate mode (PET /64)
Wedge
to
support
the
Emulator
E i ther
of
the
I atter
two
commands
will
display
the
current
mode/memory status.
The @m command
'news', erases, the BASIC
program
currently
in
memory.
Therefore,
'are
you
sure'
is
asked
before the command is executed.
The emulator normally loads up into the PET memory mode with the
PET
emu I ator
on.
Thus
four
combi nat ions
of mode/memor y
ex i s t.
When chang i ng modes warn i ngs are pr i n ted where potent i a I conf us i on
exists.
Now once the computer is in PET memory mode with the
Emulator on, the system operates as a PET as described above.
When
in 64 memory mode wit h the emu I ator off, the emu I ator has no effect
on the normal operation of the Commodore 64.
Please note
disabled.
that
The PET Emulator
when
in
the
PET
memory
mode
the
RUN/STOP
key
Page -4-
is