Benchmarko Logo
Benchmarko Logo
Home
Projects
CPCEMU
Software
Download
Contact
Links

German French Spanish
 
back

CPCEMU - Configuration

  1. Changing the Configuration
    4.1 The setup menu
    4.2 The configuration file
    4.3 Command line parameters

 


 

4. Changing the Configuration

In this chapter you will learn how to configure CPCEMU for your needs. The setup menu is described as well as the configuration file and the command line parameters.

 

4.1 The setup menu

This is the simplest way to make adjustments to CPCEMU. Nevertheless this menu does not let you change all settings.

To give an example, if you want to use additional ROMs you must use the configuration file described in section 4.2.

As already mentioned in the keyboard section, you get into the setup menu with F7.

The following menu then appears:

Select the lines as already described in 3.2.1 (Loading from Disk) or in the online-help

 

Selection Value
___Emulation
Emulation Delay 0
Emulation Speed 1
Interrupt Frequency 300
Interrupt Resume 1
Realtime 0
  • Emulation Delay

    This option allows you to slow down the emulation if it is too fast. 0 means no delay, 100 is a small delay, 300 some more.

  • Emulation Speed

    Speed of the emulation.

    • 0 = slow Z80 emulation
    • 1 = fast Z80 emulation


  • Interrupt Frequency

    To change the frequency with which interrupts are generated. On a real CPC this is always 300 Hertz. If you raise this value many programs seem to run faster, but there is less computing power between two interrupts. If you own a slow computer you may have to lower this value to 100 or 200 sometimes. Possible values are 18 to circa 600. For further information look at chapter 7.

  • Interrupt Resume

    Another of these options one cannot explain without a lot of background information.

    • Ohne EMS (Expanded Memory) ist sie auf 0, d.h. Interrupts können schon mal vergessen werden. Without EMS (Expanded Memory) this option is 0 which means that interrupts can be skipped. Certainly this is not desired, but with 1 the emulation is getting too slow.
    • With EMS this option is 1, so CPCEMU tries to handle every interrupt.

      Important note: It seems that CP/M Plus only runs with EMS and this option = 0! For further information look at chapter 7.

  • Realtime

    Enables the realtime CPC. The emulator inserts waits to be as fast as a real CPC.

Selection Value
___Screen
Colour Screen 1
Multimode Update 0
Palette Change 1
Screen Offset 0
Video Mode 0
VSYNC Position 5
  • Colour Screen

    Emulation of a green or colour screen by changing the palette.

  • Multimode Update

    If programs use several modes simultaneously on the screen, switch on this option. Then CPCEMU tries to handle it correctly. Per default this option is switched off because it does not work properly in all cases.

  • Palette Change

    Set this option to 0 to disable palette changes. This makes sense if you cannot see anything because the screen flickers too much. If you press the function key F8 to cause a hardware reset, this option is reset to 1 automatically.

    Hint: If palette update is disabled and you see completely wrong colours, try pressing F2 twice.

  • Screen Offset

    Specify the number of lines the CPC screen should be moved. Usually you do not need this option. You get the same effect by pressing <Page Up> and <Page Down>. Possible values: 0=no offset, up to circa 25.

  • Video Mode

    Set the video mode of the VGA card.

    • 0 = 640x200x16 (default)
    • 1 = 640x350x16
    • 2 = 640x480x16
    • (and if you have a VESA-BIOS, mostly:)
    • 3 = 800x600x16
    • 4 = 1024x768x16
    • 5 = 1280x1024x16
    • ...


    WARNING: Do use modes >= 3 only, if you monitor supports them! If it makes some strange noise, switch it off immediately! But this should happen only with old monitors.

  • VSYNC Position

    Commonly you will not need this option, but nothing will be damaged if you try it.
    One time during the screen update there is a vertical frame fly with a special bit set, the so-called VSYNC bit (vertical synchronization). You can define the position, where the VSYNC should occur. Possible values are 0 to 5.

    For further information look at chapter 7.

Selection Value
___Sound
Sound Enabled 1
Sound Device 2
SB Delay 35
SB Delay0 6
SB DMA buf 128
SB sample rate 0
SB Stereo 0
  • Sound Enabled

    Enables the sound output. 1=on, 0=off. You can also press the function key F4 instead.

  • Sound Device

    Set the sound output device.

    • 0 = none
    • 1 = PC speaker
    • 2 = Soundblaster (Pro), FM sound
    • 3 = Soundblaster (Pro), digital sound, thanks to Ulrich Doewich
    • 4 = GUS (Gravis Ultrasound), thanks to Ulrich Doewich


  • SB Delay

    Set the amount of delay after every write access to the soundcard. With lower values (e.g. 0) the sound output is speed up. If problems with the soundcard occur, use 35.

  • SB Delay0

    Another delay for the Soundblaster. Do not change it.

  • SB DMA buf

    Set the DMA buffer size for Soundblaster digital sound.

  • SB sample rate

    Set the sampling rate for Soundblaster digital sound. 0=22kHz, 1=44kHz

  • SB Stereo

    Enable Stereo sound.

Selection Value
___Control
JOY0 Calibrate
JOY1 Calibrate
KBD Language 1
Mouse enabled 1
  • JOY0 Calibrate

    You surely know it from other programs that you have to calibrate the analog PC joystick first. Select this setting by pressing <RETURN>, move the joystick to the upper left, then to the lower right. Then some parameters are displayed. If you always want to use your joystick then take note of these parameters and write them in the configuration file (see next section).
    Nevertheless you have to repeat the calibration if you change the clock.

  • JOY1 Calibrate

    Same as JOY0 Calibrate, but for joystick 1.

  • KBD Language

    With this option you can select the keyboard mapping for other countries.

    • 0 = UK, default
    • 1 = GR, German-like keyboard. Unfortunately it is impossible to have a full German keyboard because SHIFTed keys cannot be mapped to non-SHIFTed. But Z and Y are swapped, and some other characters altered.
    • 2 = FR, French-like keyboard. After the introduction of a German keyboard the French will not stand in the rain. Some parts of the AZERTY Keyboard are realized. But is has the same problems as the German one.
    • 3 = SP, Spanish-like keyboard


  • Mouse enabled

    Enables mouse usage in different menus.

Selection Value
___PPI_Settings
Company Name 7
PPI 50Hz 1
PPI EXP signal 1
  • Company Name

    Company name in the opening screen.

    • 0 = Isp
    • 1 = Triumph
    • 2 = Saisho
    • 3 = Solavox
    • 4 = Awa
    • 5 = Schneider
    • 6 = Orion
    • 7 = Amstrad


  • PPI 50Hz

    The CPC can operate with

    • 0 = 60 Hz, or
    • 1 = 50 Hz (default in Germany, France)


    During a reset bit 4 of port B PPI is checked and the CRTC is initialized properly. Let it on 50 Hz.

  • PPI EXP signal

    Some Expansions cards set this signal. On CPC 464 set, if a disc drive is connected. On CPC 6128 always set.

Selection Value
___Misc
Amsdos disabled 0
Amsdos speedup 1
Break mask 3
EMS Enabled 1
Language 0
Tape Bypass 1
CPC Type 2
Show Config 0
Load Configuration
Restart Emulation
Save Configuration
Poke Database
DOS Shell
Continue
  • Amsdos disabled

    Forbids the initialization if the AMSDOS. This is useful if you want to load programs from cassette without giving the instruction |TAPE every time.
    Certainly you could simply make a comment of the ROM_BLOCK line for the AMSDOS (with ROM_BLOCK you specify the ROM to load), but with the effect that no AMSDOS is present at all. Using this option the AMSDOS is still present for some programs.

  • Amsdos speedup

    Permits an AMSDOS ROM modification speeding up disk accesses. This is done by minimizing the motor waiting times, not necessary for the emulator.

  • Break mask

    Only for debugging purposes. With the value 3 from the configuration file some errors are suppressed, caused by illegal instructions. Do not change this value!

  • EMS Enabled

    Permits the usage of EMS memory (Expanded Memory System). If no or not enough EMS memory is available, CPCEMU uses conventional memory automatically. For further information about EMS consult 2.3.1 and chapter 7.

  • Language

    Language for help messages.

    • 0=UK (English)
    • 1=GR (German)
    • 2=FR (French)
    • 3=SP (Spanish)


  • Tape Bypass

    Permit the usage of the cassette. Further information about the TAPE bypass are in chapter 7.

  • CPC Type

    Setzt den gewünschten CPC-Typ

    • 0 = CPC 464
    • 1 = CPC 664
    • 2 = CPC 6128
    • 3 = CPC 464+ (?)
    • 4 = CPC 6128+ (?)
    • 5 = KC compact


    In order to use type 3 to 5, you have to supply ROM images in CPCEMU.CFG first.

  • Show Config

    Permits the display of the configuration overview when starting the emulator.

  • Load Configuration

    Load another configuration file saved by Save Configuration. Some parameters may have no effect until you select Restart Emulation.

  • Restart Emulation

    After loading a configuration with Load Configuration, you can restart the emulation with the new values.

  • Save Configuration

    Save the current configuration. Note that you cannot overwrite the master configuration file CPCEMU.CFG.

  • Poke Database

    You are just playing a game you cannot solve? Then try this selection. If your game is in this list, you can make it easier by getting infinite lifes, e.g. You can also extend the list (CPCEMU.DBF) by your own pokes. See chapter 7 for a description of this file.

  • DOS Shell

    Open a DOS shell with much free memory, which you can exit with EXIT.

  • Continue

    Take the values and continue with the emulation. You get the same effect by pressing <RETURN> in any line with a value.

 

4.2 The configuration file

Now you will learn another way to configure CPCEMU.

At first CPCEMU reads the configuration file CPCEMU.CFG per default. Note that when you start CPCEMU with a CPCxxx.BAT file, it is located in the TMP directory. This enables user-defined configurations even if CPCEMU is onto a CD ROM. The structure of this file is described so that you will be able to use your own ROMs, change the keyboard language permanently, etc...

Have a look at the file CPCEMU.CFG:


;CPCEMU.CFG - The Configuration File for CPCEMU (v1.5)
;Marco Vieth, 20.11.1997
;
;standard configuration
;  for CPC 464, 664, 6128, 464+, 6128+, KC compact
;
SHOW_CONFIG=0       ;should the configuration be displayed?
CPC_TYPE = 2        ;CPC 6128, if no command line parameter -t
...

Already with these few lines you get the simple structure:

  • Comments start with a semicolon (";").
  • Options are changed by writing a key-word followed by = owed by a <value>.
  • The <value> depends on the key-word and is either a string or a number. Numbers can be given in decimal, hexadecimal (0x) or binary (%) notation.

    When knowing the meaning of the key-words, you can adjust the values with a text processing system for your own needs.

    You already know most of the keywords from the setup menu.

Following are the meanings of the new key-words:

#ENDIF
#IFCPC
AMSDOS_DISABLED
AMSDOS_SPEEDUP
BREAK_MASK
COLOUR_SCREEN
COMPANY_NAME
CPC_TYPE
DATA_FILE
DRIVE_A
DRIVE_A_AUTOSTART
DRIVE_A_SIDE
DRIVE_A_WRITEPROT
DRIVE_B
DRIVE_B_AUTOSTART
DRIVE_B_SIDE
DRIVE_B_WRITEPROT
EMS_ENABLED
EMULATION_DELAY
EMULATION_SPEED
HELP_FILE
INTERRUPT_FREQUENCY
INTERRUPT_RESUME
JOY0_CALIBRATE
JOY1_CALIBRATE
KBD_LANGUAGE
LANGUAGE
MOUSE_ENABLED
MULTIMODE_UPDATE
PALETTE_CHANGE
POKE_DATABASE
PPI_50HZ
PPI_EXP_SIGNAL
PRINTER
RAM_SIZE
REALTIME
ROM_BLOCK
ROM_PATH
SB_DELAY
SB_DELAY0
SB_DMA_BUF
SB_SAMPLE_RATE
SB_STEREO
SCREEN_OFFSET
SHOW_CONFIG
SNAPSHOT
SOUND_DEVICE
SOUND_ENABLED
TAPE_BYPASS
TAPE_PATH
TMP_PATH
VIDEO_MODE
VSYNC_POSITION

 

  • #ENDIF, #IFCPC

    Some control instructions for conditional configuration depending on the desired CPC:

  • #IFCPC <CPC type> ... #ENDIF

    For <CPC type> all four types from CPC_TYPE are valid.
    Consequently you need only one configuration file for all CPCs. The batch files CPC464.BAT, CPC664.BAT and CPC6128.BAT set the desired type with command line parameters. These are explained in the next section.

  • DATA_FILE = "<path+filename>"

    Set the data file (CPCEMU.DAT).

  • DRIVE_A = "<path+filename>"

    Set the path to disk images. If you use a filename as path, this disk is automatically inserted into drive A. Section 3.2.1 described Loading and Saving on Diskette.

  • DRIVE_A_AUTOSTART

    When you insert a disk image the first BASIC program is run automatically. DISC.BAS is always run if present. You may use the AMSDOS command |DIR to see the first BASIC program.

  • DRIVE_A_SIDE

    With double sided formats, side 1 (B) is inserted.

  • DRIVE_A_WRITEPROT

    The disk image is inserted write protected, so it is read only.
    This is especially useful if the disk image is on a read-only medium (e.g. a CD-ROM).

  • DRIVE_B = "<path+filename>"

    Same as DRIVE_A, but for drive B.

  • DRIVE_B_AUTOSTART

    Same as DRIVE_A_AUTOSTART, but for drive B.

  • DRIVE_B_SIDE

    Same as DRIVE_A_SIDE, but for drive B.

  • DRIVE_B_WRITEPROT

    Same as DRIVE_A_WRITEPROT, but for drive B.

  • JOY0_CALIBRATE = <xcen>, <ycen>, <xdead>, <ydead>

    Define a joystick calibration for your analog joystick. Use the values displayed after the joystick calibration in the setup menu (see section 4.1).
    This is a key-word with 4 values. You must always specify all of them. 4 times zero means not calibrated.

  • JOY1_CALIBRATE = <xcen>, <ycen>, <xdead>, <ydead>

    Same as JOY0_CALIBRATE.

  • POKE_DATABASE = "<path+filename>"

    Set the poke database file (CPCEMU.DBF).

  • PRINTER = "<path+filename>"

    Set the printer file where line printer outputs are collected. It is cleared at every emulation start. After quitting the emulator, you can send it to your printer with COPY <filename> prn:.
    Print without a printer file with PRINTER="prn".
    Use the first parallel port LPT1 directly with PRINTER="".

  • ROM_BLOCK = <ROM number>, "<filename>", <ROM position>

    Describe what ROM should be loaded and where.
    Repeat this line for every ROM you want to load. Every ROM has a size of 0x4000 bytes.
    The maximum number of ROMs is circa 20, if you use EMS.

    • <ROM number> is the number assigned to the ROM, that means it is selected by 'OUT &DF00,<ROM number>'.
      • 0 = Foreground ROM (e.g. BASIC)
      • 1 - 251 = Background ROMs. On a CPC 664/6128, the ROMs 1-15 are automatically initialized during reset (on a CPC 464 only 1-7). The AMSDOS ROM has always the number 7.
      • 255 = Lower ROM (e.g. OS; has only in emulator this number).
    • <filename> is a file in the directory ROM_PATH, which contains the ROM.
    • <ROM position> is naturally 0. If a file contains more ROMs, this is the desired ROM position 0, 1, 2, ...
  • Example:

       ROM_BLOCK =   255, "CPC6128.ROM", 0
       ROM_BLOCK =   0  , "CPC6128.ROM", 1
    
    The lower ROM and the foreground ROM are loaded one after another from the same file.

  • ROM_PATH = "<path>"

    Set the path to ROM images. In the configuration file this path is set to .\ROM.
    The ROMs itselfs are defined with the key-word ROM_BLOCK.

  • SNAPSHOT = "<path+filename>"

    Set the path to snapshots. If you specify a snapshot file as path name, this snapshot is automatically started. Look at section 3.2.3 for more details.

  • TAPE_PATH = "<path>"

    Set the path to tape files. In the configuration file this path is set to .\TAPE. Look at section 3.2.2 for more details.

  • TMP_PATH = "<path>"

    Set the path for temporary files. They are mainly needed if you select a file from inside a ZIP archive and CPCEMU needs to extract it with PKUNZIP.

 

4.3 Command Line Parameters

As you know from other programs, it is also possible with CPCEMU to use command line parameters. But currently there are only a few of them. Execute CPCxxx.BAT with the following options:

  • /f : use the fast mode (default)
  • /s : use the slow mode
  • /d : use the debug mode, described in chapter 7
  • /x : disable EMS usage
  • /c <file> : specify another configuration file, overriding the default CPCEMU.CFG. See section 4.2.
  • /t <type> : set the desired CPC type 464, 664, 6128, 464+, 6128+ or KC compact with /t 0 to /t 5 respectively.
  • /h : displays a help screen

The option "/d" is automatically used, if an unknown option was specified. Instead of "/" you can also use "-" known from UNIX.

 

Chapter 5. Data Transfer CPC <-> PC

 

© Marco Vieth, Mai 1998



MV, 04.03.2006 20:51:46