Benchmarko Logo
Benchmarko Logo
Home
Projects
CPCEMU
Software
Download
Contact
Links

German French Spanish
 
back

CPCEMU - Differences

  1. Differences between CPC and CPCEMU
    3.1 Keyboard
    3.2 Loading of Programs, Menus
    3.2.1 Loading from Disk, Menus
    3.2.2 Loading from and saving on cassette
    3.2.3 Loading and saving of snapshots

 


 

3. Differences between CPC and CPCEMU

In this chapter, I describe those features that differentiate CPCEMU from a real CPC. The section that follows will explain those keys on the keyboard that have a special meaning during emulation, especially the function keys. Afterwards you will be told how to load from disk or cassette.

 

3.1 Keyboard

Maybe you have already noticed that the function keys of the PC do not map directly to those of the CPC. They cause some strange output which I will describe below. Or maybe you have been looking for the COPY-key for hours...

All CPC keys are really emulated somewhere, you can be sure of that.

Here the secrets are unveiled:

  • ALT, ALTgr : COPY on a CPC
  • PAUSE Key : suspends the PC, until it is pressed again. If the function keys of the PC do not react anymore, you may have the PAUSE Key enabled.
  • Keypad : Depending on the Num Lock state, the keypad functions in a different way. With Num Lock enabled, the keypad represents the function keys of the CPC, otherwise it will emulate joystick 0. If you want to use an analog PC joystick, you have to calibrate it first. (See chapter 4 - Changing the Configuration)..
For completeness:
  • Page up/down: Moves the whole CPC screen. (Dont ask me for what purpose.)
And, of course, the function keys:
  • F1 : Online-Help Key. Could be the most important key when you start out.
  • F2 : Toggles between the CPC screen (normal view) and message screen (that one with a red border). This screen may show some control messages.
  • F3 : Insert a disk, see section 3.2.1
  • F4 : Toggle sound on/off
  • F5 : Load a snapshot (memory dump), see section 3.2.3
  • F6 : Save a snapshot, see section 3.2.3
  • F7 : Setup menu, see section 4.1
  • F8 : Hard reset, acts like a reset button on a CPC (or switching the CPC off and back on again). Use this, if CTRL+SHIFT+ESC does not work any more.
  • F9 : Allow/disable pallette update.
  • F10 : Debug menu, explained in chapter 7. If you stumble inadvertently into this menu, press r for R)un or q for Q)uit.
  • F11 : Reserved for future use
  • F12 : Exit the emulator

 

3.2 Loading of programs, menus

In this section you will learn how to load programs from disk, tape or snapshots. Certainly the same goes for saving.

How to use the menu is described, too.

 

3.2.1 Loading from Disk, Menus

Under normal conditions AMSDOS (Amstrad DOS) is active, and all file instructions use the disk.

You do not need to insert a real CPC disk into your PC drive every time you access a file (apart from the fact that you may have 3 inch CPC disks only). To obtain better speed a CPC disk is contained inside a so-called disk image. This file can be located anywhere on the hard disk (or on a high density disk).

Here some BASIC AMSDOS instructions:

  • CAT <RETURN> : displays the catalogue
  • With 'RUN"<filename>"' you load and start a program.
    You may omit the ending quotation marks. This instruction is useful for BASIC programs having the extension .BAS, and in many cases for binary programs with the extension .BIN.

    A simple way to run a program:

    1. Input the filename, e.g. disc without pressing <RETURN>
    2. Hold down the CTRL key and press cursor-left (the cursor moves back to the first column now)
    3. Still hold down the CTRL key and press the ENTER key on the keypad (RUN "disc appears and the program will be loaded)
  • LOAD"<filename>" lads a program without starting it. You can inspect BASIC programs with LIST and start them with RUN. Usually binary programs will not load with LOAD, but try using the MEMORY instruction first, e.g. MEMORY &1fff.
  • SAVE"<filename>" aves a BASIC program. For binary programs you have to specify some more parameters, e.g. SAVE"<filename>",b,&c000,&4000' will save the screen.
  • MERGE"<filename>" also possible. It merges one BASIC program to another already contained in memory.

    Some special AMSDOS instructions are introduced by a vertical dash:

  • |A, |B select the drive (also possible with |DRIVE,0 or 1)
  • |DIR,"<filename pattern>" see the directory. Important note: Use the following on a CPC 464: a$="<filename pattern>" : |DIR,@a$
  • |ERA,"<filename>" erases a file. Important note: Use the following on a CPC 464: a$="<filename>" : |ERA,@a$
  • |REN,"<new name>","<old name>" to rename a file. Important note: Use the following on a CPC 464: a$="<new name>" : b$="<old name>" : |REN,@a$,@b$
  • |TAPE to switch to the cassette. Described in the next section.
  • |DISC to switch back to disk.

There are some other instructions but they are not so important.

 

The Insert Disk Menu

Until now you can use only one disk, the one already inserted in the drive. To insert another disk, simply press F3 and the following menu appears:

Selection Value
Insert Disk
Drive Number 0
Side Select 0
Write Protected 0
Autostart 1

With the cursor keys <hoch/runter> you can select a line. You can also do that by typing in letters (go back with <DEL>). Change numbers with the cursor keys <left/right> or with direct input of digits. <RETURN> in any line (e.g. the first one) takes the changes. It would be dismissed with <ESC>. Drive Number is the desired drive (0=A, 1=B);

Side Select is a side switch for double sided disks, it has no effect when using a single sided format. With Write Protected you can mark a disk as write protected (0=No, 1=Yes, write protected).

If Autostart is active, the first BASIC program on the disk is run automatically after you have inserted the disk (alternatively: DISC.BAS).

 

The File-Selection Menu

Now press <RETURN> and a directory of the disk drive appears. Select a new disk with the same methods as described above. If there is already a disk lying inside the drive you do not need to remove it first as in real life. This is automatically done. At the bottom of the screen this disk is displayed.

You will see at most 15 files, if there are more, [_] appears.

  • <HOME> goes home to the first filename, <END> to the last one
  • <Page up/down> scrolls in pages through the list
  • <RETURN> takes the selected name, <ESC> escapes.

You can also select names directly by pressing a first letter.

When using the mouse, click [_] for <page up>, [_] for <page down>, [<] for <cursor left>, [>] for <cursor right> and [ok] for <return>. Use [¦] as <ESC>.

Use the right mouse button to mark a line.

.. is the parent directory; [A], [B], ... are the available drives. Please select only floppy drives with a disk inserted. Otherwise you could get some trouble.

It is also possible to insert disks from inside ZIP archives. Select a ZIP archive by pressing <return> and its directory is displayed as a normal directory. If you select a file from inside a ZIP archive, it is automatically extracted into a temporary file. For this feature you will need the program PKUNZIP somewhere in the DOS searchpath, or in the CPCEMU directory. Temporary files are automatically deleted if they are not needed any more. Changes are not written to the ZIP archive. If you save something on a disk image inside a ZIP file, it will be lost after you insert another disk. If you want to change disk images inside ZIP archives, extract them before starting CPCEMU.

How to create disk images from CPC disks that you own is described in chapter 5 (Data Transfer CPC <-> PC).

 

3.2.2 Loading from and saving on cassette

What actually is a cassette for CPCEMU?

Well, files on cassette are regular files in DOS directories. After the |TAPE instruction the BASIC instructions for file handling use the cassette. But only those starting not with |. Now you can use the instructions described in the section above (CAT, RUN, LOAD, SAVE, MERGE) for cassette. If you omit a filename, the file selection menu will appear which was described in the previous section. With SAVE you can either overwrite an existing file or create a new one by specifying a new name in the last line (new file).

Certainly you can load programs from inside ZIP archives, saving is ignored.

You only get such a fine cassette drive with the emulator!

 

3.2.3 Loading and Saving of snapshots

Snapshots are memory dumps that not only contain the actual memory contents but also the internal states of the hardware chips, e.g. the processor.

At any time you can interrupt the running program and save it as a snapshot. Later you can load it, and continue at the same position you were at when you interrupted it.

You create a snapshot with F6. Specify the snapshot size, if it is 64K or 128K. 128K snapshots only make sense if the second memory bank is in use. In this case use 128K Snapshot = 1, with the meaning 1=Yes.

The file selection menu is the same as already described with the disk, with the additional comments given for the cassette (3.2.1 and 3.2.2).

You can load a snapshot with F5.

 

Chapter 4. Changing the Configuration

 

© Marco Vieth, Mai 1998



MV, 04.03.2006 20:51:46