home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 10
/
aminetcdnumber101996.iso
/
Aminet
/
misc
/
emu
/
acpc_dem.lha
/
a-cpc.txt
< prev
next >
Wrap
Text File
|
1980-02-06
|
50KB
|
1,686 lines
A-CPC
=====
A-CPC is an Amstrad Colour Personal Computer emulator for any Amiga
with Kickstart 2.0 or better.
The Amstrad CPC was designed by Amstrad plc. There were 5 models. The
first 3 models appeared from 1984 and were called "CPC". The last 2
models appeared in 1989 and were called the "Plus" range because they
had enhanced hardware to display hardware sprites and a larger colour
palette.
The CPC464 had a cassette recorder on the right of the keyboard, and
64k of memory.
The CPC664 had a disk drive on the right of the keyboard and 64k of
memory.
The CPC6128 had a disk drive on the right of the keyboard and 128k of
memory.
The 464+ had a cassette recorder on the right of the keyboard, enhanced
hardware, different design and 64k of memory.
The 6128+ had a disk drive on the right of the keyboard, enhanced hardware,
different design and 128k of memory.
The CPC models share the same hardware:
- Z80A CPU running at 3.3Mhz
- General Instruments Ay-3-8912 sound generator.
- 3 channels of tone
- 1 channel noise
- simple hardware envelopes with fixed waveforms
- Intel 8255 Parallel Peripheral Interface (general interface
chip) connected to the sound generator, keyboard, cassette
hardware, and for miscelaneous information
- uPD765-A or INTEL 8272 Floppy Disk Controller
- support for 2 drives
- double density recording
- 3" discs with two sides (the disc must be turned
over to use the other side)
- 40 or 80 disks
- support for double sided disks
- 6845 Cathode Ray Tube Controller
- This chip produces the information to create the
display
- hardware scrolling, page flipping
- Gate Array
- Chip designed by Amstrad
- translates data from CRTC into graphics and adds
colours
- 27 colour pallette (3 levels of Red, Green and Blue)
- 3 modes
- 160x200x16
- 320x200x4
- 640x200x2
There are 2 versions of this emulator package. The demo/evaluation version
and a registered version.
The demo/evaluation version is freeware but the program code is (c) copyright
Kevin Thacker. It may be freely copied, provided that the archive contents
remain intact and you must not charge more than a small fee to cover copying
and the price of the disk. It may be uploaded to a ftp site or BBS (as long
as the BBS doesnt claim copyright on uploaded material) or put into a PD
library. If you would like to put it onto a magazine coverdisk or cover CD
then contact me first. (Permission is given to Aminet to distribute
this archive on their CD). The code remains copyright to myself
except for the ROM images which are copyright Amstrad plc and Locomotive
Software Ltd.
The demo/evaluation version has been restricted. However, you can still
try out software on the net. It supports loading of Snapshots and disk
images and tape files only.
The full version is NOT freeware it is (c) copyright Kevin Thacker. It may
not be put on a magazine coverdisk, ftp site, cd collection, copied, hired,
distributed without my written permission. The full version can be obtained
by contacting me, and it costs 10 UK Pounds or equivalent in your money,
please add enough money to cover postage if you want the registered version
to be sent via mail, otherwise just pay the 10 UK pounds and I will send you
the archive by e-mail.
Please send the money to my Postal address preferably in UK pounds, or
as an international money order. (I may experience problems trying to
convert the money into my own currency if you do not follow this advice,
and as such you may not recieve the emulator. I do accept DEM).
On receipt of the money, I will either send a disk in the post, or
if you prefer I could email the archive to you.
The full version has the following features:
- current version of the emulator archive
- read and write to disk images (.DSK)
- read and write snapshots
- read from CPC disks directly
- side switch and drive switch emulation
- support for 40 track discs on 80 track drives
- Make_DSK utility to transfer CPC disks to disk image
- format_dsk utility to create blank disk images
- z80_dissassembler utility to dissassemble files
- CPC+ emulation
- Joystick emulation
- Multiface 2 emulation (Multiface 2 ROM not included in the archive)
- a collection of utilities to help you use your CPC software
with the emulator
Updates of the emulator will be available as they are written. If you
already own the emulator, and you would like the update, then send the
disk with money to cover return postage to my address, or I can e-mail
the new archive for free.
When a update is available, I will post a message to comp.sys.amstrad.8bit.
See the history file for details of updates in the emulation.
NOTE:
You use this emulator at your own risk. I cannot be help responsible
for any damage caused from the use or mis-use of this product. As
far as I am aware, there are no fatal bugs that will crash your
system.I have run this emulator successfully on my own system and
others have reported that it runs well. Run this emulator with
plenty of memory free and you should not have any problems.
----------------------------------------------------------------------------
Requirements
============
To use A-CPC you will need the following:
- asl.library in your libs/ directory
(comes with Workbench2.0 and above)
- Kickstart 2.0/Workbench 2.0 or better
A-CPC supports the following minimum specification:
(This does not mean mean the emulation will be fast)
- 68000 CPU
- OCS chipset
- 1mb RAM
- single disk drive
To have a fast emulation, I suggest that you need the following:
- 68020 CPU or better (an accelerate machine)
- 1mb of true FastRam
- a harddrive
If you have a fast machine I would be interested to hear how fast
it runs at.
Speed comparisons
=================
John Stringer who has a A1200 with a 68020-28Mhz accelerator
card and fastram says that the emulation goes at about 2 thirds of the
speed of a real cpc. He also reports that the 68020 specific version is
5% faster than the 68010 version.
In these speed comparisons, the following simple BASIC code was used:
10 for i=0 to 200
20 print "hi!"
30 next i
A500 - 68000 7Mhz - 1mb Chipram (my machine): 4 mins 09 seconds
A4000 Cyberstorm 060 : ~30 seconds.
NOTE:
1. There are 6 versions of A-CPC in the registered version
- A-CPC standard emulation for 68000 processor, (A-CPC_68000)
- A-CPC standard emulation for 68010 or greater, (A-CPC_68010)
- A-CPC standard emulation for 68020 or greater, (A-CPC_68020)
- A-CPC plus emulation for 68000, (A-CPC_68000_plus)
- A-CPC plus emulation for 68010 or greater, (A-CPC_68010_plus)
- A-CPC plus emulation for 68020 or greater, (A-CPC_68020_plus)
The plus versions are slightly different to the standard version
in operation. They have been written to emulate the extra hardware
and some of the differences which are different to a standard CPC.
The registered version also contains two special versions
for 68020 or better processors. It takes advantage of some
of the extra commands available on these chips and the code
is slightly different.
If your Amiga has a 68020/68030/68040/68060 choose this
version in preference. I believe there is about 5% speed increase
over the standard 68010 version.
There are 3 version of A-CPC in the demo/evaluation version
- A-CPC standard emulation for 68000 processor, (A-CPC_68000)
- A-CPC standard emulation for 68010 or greater, (A-CPC_68010)
- A-CPC standard emulation for 68020 or greater, (A-CPC_68020)
----------------------------------------------------------------------------
Running the Emulator
====================
The emulator can be run from CLI or from Workbench. It requires a config
file.
5 Configuration files have been supplied which define the CPC type that
will be emulated:
cpc464.config - CPC 464
cpc664.config - CPC 664
cpc6128.config - CPC 6128
464plus.config - 464+ (registered version only)
6128plus.config - 6128+ (registered version only)
At the CLI type:
A-CPC_68000 <config_filename>
e.g.
A-CPC_68000 cpc464.config
Or from Workbench you can double click on the config icons themselves
and the emulator will automatically be loaded. The config files have
been set to load the 68020 version of the emulator. If you wish to change
this select the icon, choose "Information" from the menu and change the
Tool to "A-CPC_68000".
Or, you can double click on the A-CPC icon and enter a config file after
the A-CPC filename.
----------------------------------------------------------------------------
Some games crash... why?
========================
The emulator cannot run 100% of games. Many programmers have used
special features of the z80 which are not documented officially. I have
had to try and find all these features, so that I can produce an accurate
emulation.
So, if a game uses some of these instructions, and I have not emulated
them correctly, then they will not work properly. Also, not all instructions
have been emulated correctly, and there are still some hard to find bugs.
Some games will work, but you need to change the interrupt count value.
These games rely on the time between interrupts, and if the time is too
short, they start to corrupt themselves. To solve this change the interrupt
count to a larger value and try the game again.
One game which has this problem is Elite. On 68000 change INT_SPEED to 1000
and try running it again.
-----------------------------------------------------------------------------
Running Games
=============
When you select a directory from the file requesters, the emulator
will remember this. So, you can store your tape files in sub-directories,
and other files anywhere you like.
Snapshots:
Snapshots are simply a dump of the memory with the information about
the state of the hardware which are used to restart a program at the
point the snapshot was saved.
The file format is the same as used by CPCEMU and CPE and they
have the ".SNA" extension.
Almost all snapshots should work, except for Alien Highway.
Disk images:
Disk images are a file containing a copy of the data on a disk. They
can be created using CPCTRANS.EXE with CPCEMU on the PC, or with Make_DSK
which is provided in the registered version of this emulator.
The file format is the same as used by CPCEMU and CPE. As in CPCEMU you
can write to disk images (registered version only!). Disk images have
the ".DSK" extension.
To use a disk image you need to "Insert the disk into drive X". Select
the option from the Files menu and choose the disk image file.
Tape files:
These are files on an Amiga disk. Binary and Basic files must have
an Amsdos header to be recognised. To use Tape files you must select
tape operation (|TAPE), then you can run the files.
Loading from Disk Images or Tape files:
With Disk or Tape files you will need to use Amsdos commands and Basic
commands.
If you have not used an Amstrad before the following commands should
help you to run software.
(The "|" symbol is obtained by pressing SHIFT and @ key on the CPC keyboard)
|TAPE
Choose to load from tape
|DISC
Choose to load from disc
|CPM
Boot CPM from a CPM disk or this will run some games that
do not have files in the directory.
CAT or |DIR
This will display a list of files on the disc or tape.
RUN"<filename>.<ext>
This will RUN a file on the disc or tape. If the file
doesnt have a ". ", ".BAS" or ".BIN" extension then you
will have to specify it.
e.g. RUN"NEBULUS
LOAD"<filename>.<ext>
Load a file into memory. It will not run it. Basic files
can be shown by typing "LIST".
|ERA,"<filename>.<ext>
Delete a file on the disc
|REN,"<newfilename>.<newext>","<oldfilename>.<oldext>"
Rename a file on the disc.
|A
Choose drive A
|B
Choose drive B
----------------------------------------------------------------------------
Keyboard
========
The following Amiga keys are used as a short cut:
F1 - Load Snapshot
F2 - Save Snapshot
F8 - Multiface Stop Button (registered version only)
F9 - Reset CPC
F10 - Quit emulator
The Amiga keyboard has a different layout than the CPC, and the keys
are not marked the same, so you may find a problem trying to find
the CPC key. Here is a list of CPC keys and their Amiga equivalents:
CPC Amiga
!1 !1
"2 "2
#3 #3
$4 $4
%5 %5
&6 ^6
'7 &7
(8 *8
)9 (9
_0 )0
-= _-
^ pound +=
CLR |\ or DEL
f0 keypad 0
f1 keypad 1
f2 keypad 2
f3 keypad 3
f4 keypad 4
f5 keypad 5
f6 keypad 6
f7 keypad 7
f8 keypad 8
f9 keypad 9
f. keypad .
small keypad enter
enter
Q-P Q-P
A-L A-L
Z-M Z-M
@| {[
[{ ]{
:* :;
+; "'
]} <RET> (key cut out of RETURN on International keyboards)
\' <SHIFT> (key cut out of SHIFT on International keyboards)
<, <,
>. >.
?/ ?/
SPACE SPACE
DELETE BACKSPACE
TAB TAB
RETURN RETURN
ESC ESC
CLR DEL
SHIFT LEFT OR RIGHT SHIFT
CTRL CONTROL
COPY LEFT ALT
----------------------------------------------------------------------------
Configuration file
==================
The emulator needs a configuration file to run. The configuration filename
and path is specified in the commandline:
e.g.
a-cpc_680x0 <device:path/filename of config file>
The configuration is used to define the CPC model and characteristics
that A-CPC will emulate.
The minimum configuration file MUST contain the following:
- the location of a Operating System ROM (OS_ROM=)
- the location of a BASIC ROM (ROM=0 PATH=)
- size of the CPC RAM (RAM_K=)
The lines of the configuration may be in any order, and a line of
configuration can be added by loading the configuration file into
a text editor.
You can also add comments to the config, or comment out a line,
or seperate the config lines with a blank line.
The configuration will initialise the emulator to your prefered setup
when it starts. Some of these options can be changed from within the
emulator.
The following config command-lines are supported:
OS_ROM = <device:path/filename> [NOPATCH]
This line defines the location of the file containing
the operating system data. The file must NOT have a
AMSDOS header.
The keyword NOPATCH is optional. When a rom has been
found, the emulator will attempt to find a file
of the same name but with a ".patch" extension.
The patch file can be used to remove code to speed
up the emulation in places.
If the keyword NOPATCH is present, the patch file
will not be loaded.
This line must be present for the emulator to work.
e.g.
OS_ROM=A-CPC:roms/cpc6128-os.rom
ROM = <rom number> PATH=<device:path/filename> [NOPATCH]
This line defines the rom number and the location
of the file containing the data. The file must NOT
have a AMSDOS header.
This function allows the user to add extra roms in
addition to BASIC and AMSDOS in a rom position of
their choice. (rom position is in the range 0..15
for 6128 emulation, and 0..7 for 464 emulation so
that the operating system will notice it's existance)
ROM 0 must be present for the emulator to work.
The demo/evaluation version will only support BASIC
and AMSDOS ROMs.
e.g.
ROM = 1 PATH=A-CPC:roms/protext.rom NOPATCH
DRIVE_A = <device:path/filename>
This line defines a disk image (DSK) that will be
automatically "inserted" into CPC drive A,
when the emulator is started.
This function is not available on the demo/evaluation
version of the emulator.
e.g.
DRIVE_A=DSK:stormlord.dsk
DRIVE_B = <device:path/filename>
Same function as DRIVE_A, except the disk image will
be "inserted" into CPC drive B.
RAM_K = <size of CPC memory in decimal>
This function defines the size of CPC memory. This value
must be divisible by 64. It's value must be in the range
64-576.
This line must be present for the emulator to work.
PPI_PORT_B = <decimal value>
PORT B of the 8255 PPI has the following bits:
7 Tape read data
6 Centronics Busy
5 Expansion port device present
4 Screen refresh (50Hz/60Hz)
3..1 Machine name (Amstrad, Schneider etc)
0 Frame Flyback pulse
You can specify this byte and change the name of the
computer. The CPC was created by Amstrad, but sold
by different companies in Europe. With this byte you
can have their name instead.
INT_SPEED = <decimal value>
This function defines the number of opcodes that is
counted before a z80 interrupt is triggered.
If this value is reduced, then interrupts will be faster,
if it is increased, then interrupts are slower.
On faster Amigas, this value will need to be high (about
1500).
You may find that some games will not work. The reason
may be that the interrupts are too fast for the game.
Try changing this value, and you will find the game
will work.
The default value is 800.
MULTIFACE_ROM = <device:path/filename>
To use the Multiface II emulation you need a file containing
the ROM data. This line specifies the location of the file,
and if the file is found, the emulation is enabled. The ROM
must NOT have a AMSDOS header.
See the section on the Multiface emulation for more information.
This function is not present on the demo/evaluation version
of the emulator.
e.g.
MULTIFACE_ROM = A-CPC:roms/multiface.rom
SOUND = <decimal value>
This function will enable (0) or disable (<>0) the sound
before the emulator has been started. On slow Amigas music
and sound effects are not easy to recognise, so this
option is provided to turn off sound. Many times I have
found it annoying to listen to the sound.
You can turn the sound off or on from a menu
in the emulator.
e.g.
SOUND = 0
DSK_PATH = <device:path>
This defines the first directory path that is used
by the emulator for disk image files. You can change
the directory from the file requester, and it will
be used instead.
e.g.
DSK_PATH=A-CPC:Disks/
TAPE_PATH = <device:path>
This defines the first directory path that is used
by the emulator for tape files. You can change the
directory from the file selector, and it will be
used instead.
e.g.
TAPE_PATH=A-CPC:Tapes/
CART_PATH = <device:path>
This defines the first directory path that is used
by the emulator for cartridge images (In the CPC
plus emulation). You can change the directory from
the file selector, and it will be used instead.
e.g.
CART_PATH=A-CPC:Cartridges/
SNAP_PATH = <device:path>
This defines the first directory path that is used
by the emulator for snapshots. You can change the
directory from the file selector, and it will be used
instead.
e.g.
SNAP_PATH=A-CPC:Snapshots/
# <comment line>
This is used to add comments to the config file.
Each line which is a comment should have a # before it.
A comment cannot be added to the end of any other
config line. A comment line must exist on it's own.
There must be a space between the # symbol and the
start of the comment.
e.g.
# Load extra roms
CPC_DRIVE_A = unit_number [DS] [REAL]
This is used to define the Amiga drive unit to use
for CPC drive A when using the read from disk option.
(The units are 0,1,2 or 3). Unit 0 is the internal
drive. This cannot be changed inside the emulator.
The DS parameter is optional. If it is present, then
double-step is enabled. This is useful for reading
40 track 5.25" discs on 80 track 5.25" drives.
This can be changed within the emulator.
The REAL parameter is optional. If it is present, then
the emulator will start in disk read mode, otherwise
it will start in read disk image mode. This can be
changed from within the emulator.
This function is not available on the demo/evaluation
version.
e.g.
CPC_DRIVE_A=2 DS
CPC_DRIVE_B = unit_number [DS] [REAL]
This is similar to the CPC_DRIVE_A command, except this
defines which Amiga drive unit to use for CPC drive B
when using the read from disk option.
This function is not available on the demo/evaluation
version.
e.g.
CPC_DRIVE_B=0 REAL
JOYSTICK = <decimal value>
This function enables or disables the joystick task.
If 1 then joystick task is enabled, and joysticks can
be used as long as the gameport is not already used.
If 0, (or the line is not present in the config file)
then joysticks are disabled.
This function is not available on the demo/evaluation
version.
e.g.
JOYSTICK=1
NOTE:
1. I have used "PROGDIR:" in the config files. This is a special
assignment found in Workbench 2.0 and above. PROGDIR is only
defined inside a program, and it is different for each program.
It is equal to the directory path that the program was run from.
So, in the config file you will see:
SNAP_PATH=PROGDIR:Snapshots/
which means "directory the program was run from" plus the
Snapshot directory.
----------------------------------------------------------------------------
ROM Patch file
==============
When the ROM data is loaded during configuration, A-CPC will attempt
to load a patch file (this will not happen if the NOPATCH keyword
is present). The patch file is used to modify the ROM data to improve
compatibility with A-CPC or to speed up it's operation in A-CPC.
It has been provided so that the main code of the emulator does not
need to be changed specifically.
The patch file contains any number of entries. The entries have the
form:
1 word offset in ROM data in bytes
1 word low byte contains byte to poke at offset, high byte
is ignored.
NOTE:
If you wish to use ROMDOS with A-CPC, then you can use the same patch
file as used with CPC AMSDOS.
----------------------------------------------------------------------------
Multiface 2 Emulation (registered version only)
=====================
A-CPC has built in support for Multiface 2 emulation. To use this feature
you will need a copy of the Multiface 2 rom data. (A program has been provided
for you to run on your CPC which will do this).
The Multiface 2 ROM is (c) copyright Romantic Robot Ltd, UK, and so I cannot
include it.
The emulation will work just like the real thing. Programs can be frozen
at any time and you can enter pokes or look at the memory. You can even
save the memory out to a disk image (similar to a snapshot), and re-load
it later to start from the same position.
If you have a utility for the Multiface such as Tearaway or Insider, this
will work too. You will need a disk image of the utility or on the registered
version you can use the real disk.
In the emulator, you activate the multiface by pressing F8 or by selecting
"Multiface Stop" from the menu, you should then see the familiar Multiface
menu.
You will need to do the following to use this feature:
1) Transfer the two files MULTSAVE.BAS and MULTSAVE.BIN to a CPC disk,
2) With the CPC turned off, connect the Multiface 2 to the expansion port,
3) Switch on the CPC, and insert the disc with the files on it and
type:
RUN"MULTSAVE
4) The program will save the Multiface rom data to a file called
MULTFACE.BIN
5) Transfer MULTFACE.BIN from the CPC disk to an Amiga disk, and
copy it into the roms/ directory of A-CPC.
6) Load a text editor and add the following line to any of the
config files:
MULTFACE_ROM=A-CPC:roms/multface.rom
7) Now run A-CPC..
NOTE:
I have successfully run this feature using the rom data from my own
Multiface. This feature may or may not work with older versions of the
Multiface.
The Multiface for the CPC will not work with the Plus emulation
because of differences in the disk roms. The multiface assumes the location
of routines in the disk rom, and will crash if run with the wrong CPC.
(If you own a Plus machine with a Plus compatible Multiface, I would
be very interested to hear from you so that I can add support for Plus
Multiface).
The CPC version of the Multiface will only work with the 464/664 and 6128.
The Plus version of the Multiface will only work with the 464+ and 6128+.
Some protections will prevent programs from working if the Multiface is
enabled. To reduce the chance of this happening, the Multiface is made
invisible when the emulator is reset. (On the CPC, the Multiface is always
active when the CPC has been reset).
I have found that the Multiface emulation does not work with some games.
I do not know what is causing this, maybe this happens on the games anyway.
---------------------------------------------------------------------------
A-CPC Utilities
===============
Format_DSK (registered version only)
==========
This utility will create a blank disk image in the format you specify
so that you can save your own programs on it.
COMMAND FORMAT:
Make_DSK WRITE Dsk_filename FORMAT disk_format
dsk_filename
= Filename and path of DSK image to write
disk_format
= Name of the format
e.g.
Make_DSK write df1:programs.dsk format data
NOTE:
The following formats are supported:
DATA
SYSTEM
D1 (ROMDOS/RAMDOS)
D10 (ROMDOS/RAMDOS)
----------------------------------------------------------------------------
Make_DSK (registered version only)
========
Make_DSK will read any CPC format disk, even copy-protected discs,
and attempt to make a disk image. (The disk image is compatible with
CPCEMU). It has been designed so that you can use all your software with
A-CPC.
If you have copy-protected software which you would like to use on
A-CPC, then you must connect a 3" disc to your Amiga, or copy the disks to
3.5".
But, make sure that the copy you make does run on your CPC, otherwise
it will not run on A-CPC either. However, this does not mean that the
software will work. The emulator doesnt emulate the CPC perfectly
there are still some hard to find bugs which may prevent the disk from
loading correctly. This probably applies to disks with heavy copy-protection.
Some protected software relies on error codes returned from the fdc.
A-CPC supports some of these errors, but at this date, neither CPCEMU
or CPE do, but I have been talking with the authors about it. So, if
you create disk images from Make_DSK they may not work with CPCEMU or
CPE.
Please Note: I do not authorise or condone the use of this program for
backuping copy-protected software. You will need to obtain permission from
the copyright holder before converting any disk.
COMMAND FORMAT:
Make_DSK
DS Unit_Number Destination_FileName No_of_tracks No_of_sides Start_Side
DS
= If this keyword is present, this feature is active.
If you have some software on 40 track 5.25" discs (written
with a 40 track drive on the CPC), but you have a 80 track
5.25" for Amiga, then use this option. Instead of stepping
once, it will step twice (or double-track step), so now
the disk will be converted correctly.
Unit_Number
= Amiga drive containing the CPC disk
e.g. 0, 1, 2 or 3
Destination_Filename
= Filename and path of DSK image to write
e.g. ram:dsk_images/north_and_south-1.dsk
No_of_Tracks
= Number of tracks to read from CPC disk
e.g. 40, 42 or 80
NOTE: Some demos and games use track 40 and 41 to store more
data on a 40 track disk. If you are not sure of the
number of tracks used, enter 42.
No_of_Sides
= Number of sides to read from CPC disk
e.g. 1 or 2
Start_Side
= Side to start reading from. (e.g. if you have a side switch
on your CPC to use both sides of a 3.5" disc using AMSDOS,
you can choose the side to read with this parameter)
e.g. 0 or 1
e.g.
Make_Dsk 0 df1:dsk_images/north_and_south-1.dsk 40 1 0
NOTE:
For AMSDOS disks:
- 40 tracks (possibly 41 or 42 for copy-protected disks)
- 1 side
For ROMDOS disks:
- 80 tracks
- 2 sides
If you want to convert a CPC disk which needs a special program (on CPC
disk or CPC ROM) to read the format, such as ROMDOS or any other DOS, then
you will need a copy of this program to read the disk image and run
it on A-CPC.
For ROMDOS use SAVEROMS to save a copy of the rom data, and add a
line to the config file.
I have successfully converted the following to disk image from my
originals (these had some copy-protection):
North & South Road Runner (US Gold version)
Nightbreed Target Renegade
Run the Gauntlet
Short Curcuit
Barbarian
Mr.Heli
----------------------------------------------------------------------------
z80_dissassembler (registered version only)
=================
This utility will dissassemble any file. I originally wrote this file
to dissassemble the roms so I could find out where to patch them and to
work out where I could put breakpoints to test my emulation.
The input file must not have any header. If it did, this would be treated
as Z80 opcodes and dissassembled, so you would have garbage at the start.
The output file is a standard text file which you can load into any editor.
The dissassembler is not intelligent, it doesnt identify areas of text
or data. The output looks like this:
<address> <z80 opcodes> <z80 mneumonics>
e.g.
&8000 21 34 12 LD HL,&1234
It does support ALL undocumented opcodes, including the weird LD r,RLC (IX+0)
instructions and SLL!
z80_dissassembler <source file> <destination file> <start address> <length>
e.g.
z80_dissassembler roms:cpc6128-os.rom sources:cpc6128-os.src 0 16384
<source file>
= device, path and filename of the AmigaDOS file to dissassemble.
The file is loaded into memory before disassembly so make sure
there is enough free memory to do this.
<destination file>
= device, path and filename of the AmigaDOS file to write.
This file contains the z80 dissassembly of the input file.
<start address>
= this is a decimal number and defines the address you would
like the disassembly to start from (it can be thought of as
the load address for the file in z80 memory).
e.g. a start address of 32768 would give a dissassembly like this
&8000 21 34 12 LD HL,&1234
&8003 06 05 LD B,&05
<length>
= this is the size of the data to dissassemble in bytes. This
value is usually equal to or less than the size of the input
file.
---------------------------------------------------------------------------
SAVEROMS.BAS (registered version only)
============
This is a program to run on your CPC. It will display a list of ROMs that
are connected (e.g. PROTEXT,UTOPIA, ROMDOS etc). You can choose the name
of the ROM and enter a filename, and it will save the rom data.
To use this program, transfer it to an Amstrad disk and run it from AMSDOS.
You can use the ROM data with A-CPC by modifying A-CPC config file.
When you transfer the files to the CPC, make sure there is not a AMSDOS
header, otherwise the rom will not work.
----------------------------------------------------------------------------
SAVEMULT.BAS (registered version only)
============
This is a program to run on your CPC. It is used to save a copy of the
Multiface 2 rom data.
To use this program:
1) Copy the files onto a CPC disk,
2) Attach your Multiface to your CPC,
3) Switch on the CPC and run the program from AMSDOS
If everything works well, a file will be saved to the disc called
MULTFACE.ROM.
See the section on the Multiface emulation for more information.
----------------------------------------------------------------------------
SAVEBURN.BAS (registered version only)
============
This is a program to run on your CPC+. It is used to save the game
Burning Rubber from the cartridge supplied with the Plus. Since the
game is copyrighted, I cannot include a copy with this emulator, so
I have provided this utility to save it, so you can play Burning Rubber
on A-CPC.
To use the program:
1) Copy the files to a CPC disk,
2) With the Burning Rubber/BASIC cartridge inserted run this program
from BASIC,
4 files will be written and they will be called:
BURNROM.1, BURNROM.2,BURNROM.3 and BURNROM.4.
3) Copy these files to an Amiga disk and run the MakeBurnCart
program. (This will create a Burning Rubber cartridge image suitable
to be used with the emulator).
4) To play burning rubber select "Insert Cartridge" from the files menu
on the Plus version of A-CPC.
----------------------------------------------------------------------------
MakeBurnCart (registered version)
============
This utility will create a cartridge image from the files saved using
SAVEBURN.
MakeBurnCart <source_path> <destination_filename>
<source path>
= location of BURNROM.1, BURNROM.2, BURNROM.3 and BURNROM.4
files.
<destination_filename>
= device, path and filename of cartridge image to create.
e.g.
MakeBurnCart df0: Work:emulators/A-CPC/burnin_rubber.cartridge
----------------------------------------------------------------------------
Using CPC disks (registered version)
===============
If you want to use 3" or 3.5" disks that have CPC software on them without
converting them into disk images then use this feature. Please note, that
the speed of loading depends on the complexity of any copyprotection (if
present) and the speed of your machine. On my vanilla A500 reading CPC
disks under AMSDOS is slighly faster than reading disk images, purely
due to the fact that I am only using 2 drives and the AmigaOS has to
search through the disk image file and back again in these circumstances.
It will allow you to use all your CPC software, so you can then decided
which games you want to convert to disk later to and store them on your
harddrive.
As with the disk images, if a special program or rom is required to read
a format on the CPC, this must be used in the emulator to read the format.
This feature will load some copyprotected software. Since much copyprotected
software relies on undocumented commands or features and/or specific error
codes from the Floppy Disk Controller, they may fail to load.
If you are using 40 track disks on a 80 track drive then enable "Double-step"
for the drive which needs it.
I been successful with the following disk formats:
- all standard AMSDOS (DATA,SYSTEM etc)
- all standard ROMDOS (D1,D10 etc - using a ROM image)
- some copyprotected disks including
Get Dexter
Jack Nicklaus' Golf
Target Renegade didnt run, probably because the copyprotection
was very complicated.
----------------------------------------------------------------------------
Snapshot file format
====================
This describes the format of the Snapshot files used by A-CPC (and also
CPCEMU and CPE).
offset from Comment
start of file
00-07 "MV - SNA"
Identify file as a snapshot.
08-0F unused (0)
10 Snapshot version (1 or 2)
A-CPC reads and writes snapshot version 1.
11 z80 register F
12 z80 register A
13 z80 register C
14 z80 register B
15 z80 register E
16 z80 register D
17 z80 register L
18 z80 register H
19 z80 register R
1a z80 register I
1b z80 interrupt flag iff0 (z80 maskable interrupt)
iff0<>0 => Interrupts enabled,
iff0=0 => Interrupts disabled
1c z80 interrupt flag iff1 (z80 un-maskable interrupt)
1d z80 register IX (low byte)
1e z80 register IX (high byte)
1f z80 register IY (low byte)
20 z80 register IY (high byte)
21 z80 register SP (low byte)
22 z80 register SP (high byte)
23 z80 register PC (low byte)
24 z80 register PC (high byte)
25 z80 interrupt mode (0,1,2)
26 z80 register F'
27 z80 register A'
28 z80 register C'
29 z80 register B'
2a z80 register E'
2b z80 register D'
2c z80 register L'
2d z80 register H'
2e Gate array: current selected pen
2f-3f Gate array: pens 0-15, border (hardware colour value)
40 Gate array: current mode selected and rom configuration
41 Gate array: current ram selection
42 CRTC: current selected register
43-54 CRTC: register data (0..17)
55 Expansion ROM selected
56 PPI: port A
57 PPI: port B
58 PPI: port C
59 PPI: control port
5a PSG: current selected register
5b-6a PSG: register data (0..15)
6b-6c memory dump size (low byte then high byte)
64 => 64k, 128 => 128k
(The following parameters only exist in version 2. In version 1, they
are unused:)
6d CPC type where snapshot was generated
0=cpc464, 1=cpc664, 2=cpc6128, 3>unknown
6e interrupt number (0..5), the latest interrupt
during a screen update cycle.
6f-74 6 multimode bytes (thus screen modes 0..2 for
the interrupts 0..5
75-ff unused (0)
(the following is in all versions)
100.. memory dump (64k or 128k of data)
Disk Image file format
======================
Disc Information Block
======================
This is at the start of all disk image files.
offset in Comment
file
00-21 "MV - CPCEMU Disk-File\r\n\Disk-Info\r\n"
"MV - CPC" is used to identify the file as
a disk image.
22-2f unused (0)
30 number of tracks in disk image (40,80,42...)
31 number of sides (1 or 2)
32-33 size of track block including &100 byte track
info block (stored low byte and then high byte)
All track blocks MUST be the same size.
34-ff unused (0)
After this header, there are each Track Information Block for each
track on the disk. The tracks are stored in order, and in double sided
formats, side 0 then side 1, for each track. Each track consists
of a Track information Block and the data for the sectors in the track.
Track Information Block
=======================
offset from comment
start of
track block
00-0c "Track-Info\r\n"
0d-0f not used (0)
10 Track number (0 to number of tracks-1)
11 Side number (0 or 1)
12-13 not used (0)
14 BPS (bytes per sector)
0=128 bytes
1=256 bytes
2=512 bytes
3=1024 bytes
This is used to calculate the position of the
sector data in the track block.
15 SPT (sectors per track)
Number of sectors in this track block.
16 GAP#3 (used for formatting, &4e)
17 Filler byte (used for formatting, &e5)
18-&ff sector info list
Sector Info
===========
This is used to identify each sector on the disk)
offset comment
0 track number (C value)
1 head number (H value)
2 sector id number (R value)
3 sector size (N)
4 FDC Status register 1 (after read operation)
5 FDC status register 2 (after read operation)
6 not used (0)
7 not used (0)
For more information consult the CPC Guide section of the
"Unofficial Amstrad CPC WWW Resource".
----------------------------------------------------------------------------
Other emulators
===============
During the development of this emulator I have discovered that other
CPC emulators exist:
PC:
CPCEMU v1.3b by Marco Vieth (ali@uni-paderborn.de)
(It can be found on Simtel mirrors)
micros.hensa.ac.uk/pub/
CPE v5.0 by Bernd Schmidt (crux@Pool.Informatik.Rwth-aachen.de)
ftp.nvg.unit.no/pub/cpc/incoming/cpe50.zip
ftp.nvg.unit.no/pub/cpc/incoming/cpe50src.zip
A CPC emulator by Herman Dullink, currently in beta. It doesnt use
the same kind of emulation as in CPCEMU and CPE and it does support
direct reading of CPC disks. But it is very fast even for 386.
SIMCPC emulates a CPC (not very well) in black and white. It is not
really meant as a serious emulation attempt, however it is a good laugh
to look at.
There is also one other called CPCEMUII but I dont know anything else
about it.
Amiga:
CPE by Bernd Schmidt (a very early version, Bernd doesnt
plan to update this emulator. It comes with source)
ftp.nvg.unit.no/pub/cpc/incoming/acpe_new.lzh
AMI-CPC by a french guy known in the scene as Hypnom.
He doesnt have internet access. It runs on 68020
or above only.
Unix:
(Unknown) by Mark Conmy (mpc@scs.leeds.ac.uk)
The emulator supports snapshots and disk images
to a useable degree. This has not been released
yet.
Mac:
(unknown) by (unknown)
Aparently a CPC emulator for Mac is being developed.
I dont know any more than this. It is being
written by a guy on compuserve.
Archimedes:
!CPC by Mark Rison (rison@hep.cam.ac.uk).
A good emulator, at the moment it only supports
Snapshots. He has had some difficulty with the
disk emulation. Runs full speed on a low-end
Archimedes.
(unknown) by "Face Hugger"
Aparently, a famous CPC demo coder has written
a CPC emulator for the Archimedes. This may
just be a rumour. I have not seen the emulator
so I dont know about it's status.
If you are writing an emulator please contact me.
--------------------------------------------------------------------------
Connecting a 3" drive to the Amiga
==================================
WARNING! YOU COULD DO SERIOUS DAMAGE TO YOUR AMIGA OR 3" DRIVE WHEN
ATTEMPTING THIS LEAD. I CANNOT BE HELD RESPOSIBLE FOR ANY DAMAGE TO YOURSELF,
COMPUTER OR DISC DRIVE FROM ATTEMPTING TO MAKE THIS LEAD. YOU DO THIS
AT YOUR OWN RISK!
Now, I will attempt to describe how to make a lead to connect a 3" drive
to your Amiga (as a 2nd or third drive). I have not personally tried this,
but it is a simple matter of making a simple lead, so it does not need
much electronical expertise, but you need to be good using a soldering
iron.
Amiga pin outs:
These are the pinouts on the Amiga connector.
1 /RDY
2 /DKRD
3-7 GND
8 /MTRXD
9 /SEL2B
10 /DRESB
11 /CHNG
12 +5v
13 /SIDEB
14 /WPRO
15 /TK0
16 /DKWE
17 /DKWD
18 /STEPB
19 DIRB
20 /SEL3B
21 /SEL1B
22 /INDEX
23 +12v
CPC Pin outs:
(these are the connections on the CPC6128 2nd drive connector)
1 /READY
2 GND
3 /SIDE SELECT
4 GND
5 /READ DATA
6 GND
7 /WRITE PROTECT
8 GND
9 /TRACK0
10 GND
11 /WRITE GATE
12 GND
13 /WRITE DATA
14 GND
15 /STEP
16 GND
17 /DIRECTION SELECT
18 GND
19 /MOTOR ON
20 GND
21 not connected
22 GND
23 /DRIVE SELECT 1
24 GND
25 not connected
26 GND
27 /INDEX
28 GND
29 not connected
30 GND
31 not connected
32 GND
33 not connected
34 GND
Connections:
CPC/3" drive end Amiga
1 /READY ------------ /RDY
3 /SIDE 1 SELECT ----- /SIDEB
5 /READ DATA --------- /DKRD
7 /WRITE PROTECT ----- /WPRO
9 /TRACK0 ------------ /TK0
11 /WRITE GATE -------- /DKWE
13 /WRITE DATA -------- /DKWD
15 /STEP -------------- /STEPB
17 /DIRECTION SELECT -- /DIRB
19 /MOTOR ON ---------- /MTRXD
23 /DRIVE SELECT 1 ---- /SEL1B
27 /INDEX ------------- /INDEX
On the 3" drive end, all even pins connect together and to GND, pins 3-7
on Amiga connect together, and then to the even pins on 3" drive.
Some 3" drives dont have all 34 pins. I believe that most of them just have
the data lines as described above. You should attempt this as long as you
know something about the 3" drive you are using.
you can also connect the +5v and +12v from the Amiga to the 3" drive as
long as you dont have any other drives connected, otherwise use a seperate
power supply.
----------------------------------------------------------------------------
Sources of CPC software and information
=======================================
Firmware Guide by Bob Taylor and Thomas Defoe.
ftp.ibp.fr/pub/amstrad/misc/firmware.zip
Now in electronic form.
WWW:
Unofficial Amstrad CPC WWW Resource
http://www.cs.cf.ac.uk/User/K.E.W.Thacker/Amstrad/index.html
and soon a mirror at http://www.nvg.unit.no
It contains Amstrad related links and especially the CPC Guide
which contains documentation on the CPC chips and more documents
essential for emulator authors.
Newsgroups:
There is an Amstrad 8-bit specific newsgroup for talking about emulators
and all things Amstrad related.
comp.sys.amstrad.8bit
FAQ (Frequently Asked Questions):
There is a official FAQ for the Amstrad newsgroup. It is posted twice
a week, and it can also be found at:
ftp.ibp.fr/pub/amstrad/amstrad.faq
It is maintained by Emmanuel Roussin
Anonymous FTP:
At the prompt enter "anonymous" or "ftp", and your e-mail address for
the password.
ftp.ibp.fr /pub/amstrad
The files are mirrored from "Genesis the 8bit generation BBS"
run by Emmanuel Roussin. (roussin@blaise.ibp.fr).
This site contains a huge selection of public domain and shareware
software for the CPC and much much more.
This site is very busy during the day.
There is no incoming directory. You must contact
Emmanuel to sort out how to get the files to him.
ftp.nvg.unit.no /pub/cpc/
This site has lots and lots of games in snapshot
and disk image format. It also has much more.
Check out /pub/cpc/incoming for the latest uploads.
This site can be busy during the day.
You can put uploads into the /pub/cpc/incoming directory.
sunshine.informatik.uni-wuerzburg.de /pub/joscho/cpcemu
mirror of the ftp.nvg.unit.no site. Limited ftp access.
ftp.demon.co.uk /pub/cpm
Software for CPC C/PM. Limited set of files.
BBS:
Aspects (2:250/107) +44 1617920260 (UK)
Genesis the 8bit Generation (2:320/220) +33 1 39 50 54 11 (France)
Razormaid (2:2471/6009) +49 711 4204329 (Germany)
ZNODE 51 +49 89 961 45 75 (Germany)
==========================================================================
Please contact me if:
- you find a bug.
Please supply this information:
Amiga model, CPU, hardware connected, how the bug was generated.
- you find a game that does not work
Some games will not work because they rely on undocumented
features of the chips. But I might be able to improve the emulator
if I can find bugs and fix them.
- you know about the "KC Kompact" computer made by a German firm
- e-mail addressess of CPC demo coders
- e-mail addressess of game companies who made games for the CPC
- information about other emulators
- connecting a 3" drive to the Amiga
- if the program supplied to save Plus cartridges works and if you
have successfully had a cartridge image running on the plus emulation
(this does not include the Burning Rubber cartridge)
All your comments are welcome. Especially ideas about increasing the
performance of the emulator.
----------------------------------------------------------------------------
About the Author and the Program
================================
I am a 20 year old male studying Computer Science at Cardiff University
in Wales in the United Kingdom. I am now in my 3rd year.
The whole of the emulator package was written on a vanilla A500 with
2 disk drives and 1mb of Chip Ram, running Workbench 2.0.
It has taken me about a year and a half to write so far and it is my first
ever program using the Amiga Operating System, and it is actually my
2nd program I have written on the Amiga. (The first being an unfinished
Zool clone).
I am beginning to loose count of the number of times that a disk has
decided to become corrupted or the number of times the computer has
crashed, and I have had to reboot. Believe me that trying to develop
a program of this size on a A500 is a headache. The whole program
actually uses 3 disks. 1 disk for Devpac, 1 disk for Includes, 1 disk
for the source code and rom data. About another 30 disks hold snapshots
and disk images which I use to check the emulator is working correctly.
Thankfully, I am not used to a harddrive and the luxurys like large
amounts of memory after writing many programs on a CPC. (I wrote a Windows
system on the CPC and it took over half an hour to assemble!)
The source code takes about 15 mins to assemble. Not bad for about 700k
of source code.
The emulator should be 680x0 compatible. I have read through documentation
of other emulators and worked out what is needed for bare compatibility,
and when I can afford a new Amiga I will probably add 68020 enhancements
and more. Until then I will stick with the A500 and add as much as I can.
At least with the A500, when I change the code to speed things up, it is
noticeable.
I have only owned a A500 for two years now, previously I owned
a CPC6128. On the CPC I hacked lots of protections so I could transfer
tapes to disc, wrote a disk copier, a windows system, a windows-style
help system, picture converters, converted 100's of tunes from the Atari
ST, wrote some demos (many not complete), wrote a program to read PC
and Archimedes disks and with all this information I wrote the CPC Guide
which is available on the Unofficial Amstrad CPC WWW Resource. I can
still remember one Speedlock protection which had over 70 continuous
de-protection loops (all involving the dreaded R register!).
----------------------------------------------------------------------------
Credits and Contributions
=========================
Many thanks to everyone who has contributed to the emulator and the WWW pages.
They are (in no specific order), sorry if I have missed you out:
Bernd Schmidt, Marco Vieth, Jim Boulton, Emmanuel Roussin, Herman Dullink,
Christian Emre Lysel, John Stringer and all the others.
----------------------------------------------------------------------------
Contact:
Postal Address:
Kevin Thacker,
Fairhaven,
Whiteway,
Stroud,
Gloucestershire,
GL6 7EP
England
E-Mail:
K.E.W.Thacker@cs.cf.ac.uk (until June 96)
----------------------------------------------------------------------------
Acknowledgements
================
The ROMs included in this package (cpc464-os.rom, cpc464-basic.rom,
cpc664-os.rom, cpc664-basic.rom, cpc6128-os.rom, cpc6128-basic.rom,
cpc-amsdos.rom, plus-os.rom, plus-basic.rom and plus-amsdos.rom) are
(c) copyright Amstrad Plc and Locomotive Software. Permission has
been obtained to distribute them with the demo version and release
version of this emulator. Many thanks to Cliff Lawson and Richard Clayton.
The Multiface 2 is (c) copyright Romantic Robot Ltd.
Burning Rubber cartridge is copyright (c) Ocean Software, and Amstrad plc.
----------------------------------------------------------------------------