C64S - Commodore 64 Software Emulator Registered version 2.52, June 1997 (C) 1991-1997 Miha Peternel C64S USER'S MANUAL This document is (C) 1997 by Miha Peternel. No part of this document may be reprinted without written permission of the author. ____________________ 1. INTRODUCTION Welcome to a software emulator of the good old fat C64. It will allow you to run most of the original C64 software on your PC. The C64S emulator and accompanying utilities are copyrighted (C) 1997 by Miha Peternel and may not be copied, sold, hired or distributed in any way without written permission of the author. C64 and 1541 ROM code is copyrighted (C) by Commodore Business Machines. Minimum requirements: - 386 or better - 640K RAM (500K low ram free) - VGA display (register compatible) - DOS 3.0 or newer Optional: - a soundcard: Gravis UltraSound (best for sound output) Sound Blaster (all versions or DSP compatible soundcards) Pro Audio Spectrum (8 or 16 bit PCM) Covox or compatible DAC (digital to analog converter) - PC joystick (1 or 2) - tape/floppy interface You need at least a cached 386DX40 with a fast VGA for real time emulation. A soundcard is recommended, though the sound can also be played through PC speaker (at rather low quality). The following files are essential for proper emulator operation: - C64S.EXE C64 Software Emulator (386+) - CONFIG.EXE C64S hardware configuration utility - C64S.RES Emulator data file The following utilities make the life easier: - COM1541.EXE Transfers 1541 disk contents to .D64 files (286+) - TAPEIO.EXE C64 tape loader for PC (286+) - MAKETAPE.EXE Creates .T64 files and imports .PRG files (286+) - FIXTAPE.EXE Fixes bad CONV64 created .T64 files (286+) Documentation: - C64S.DOC A guide to the emulator you are reading - C64S.INI Default INI file - LPT64.DOC LPT64 connector description - LPT1541.DOC 1541 connection scheme - LPTTAPE.DOC Tape recorder connection scheme - T64.DOC .T64 file structure - D64.DOC .D64 file structure ______________________ 2. CONFIGURATION C64S comes with an automated configuration program, which lets you easily configure emulator options to best suit your hardware. To start the configuration program change to C64S directory and type on the command line: CONFIG Or in case of any troubles: CONFIG -s The configuration program will autodetect the presence of soundcards, analogue joysticks and parallel (LPT) ports. Some users may have many add-on cards installed in the computer in which case the autodetection procedures may fail or even crash the computer. If you notice any such trouble try running the configuration program with -s switch as suggested above. This switch will tell the program to skip autodetection procedure. The configuration program will then try to read current saved settings. If no settings are saved, it will use default settings. Also, you can always use -d switch to use default settings instead of the saved settings. In the configuration screen, you may use Up and Down arrows to move around, Left, Right and Enter keys to change the highlighted setting. Configuration overview: - Sound Output C64S can autodetect Gravis UltraSound, Sound Blaster (or true DSP compatible) and Pro Audio Spectrum soundcards. If the sound output is set to Autodetect, the priority of selecting sound output is: GUS, PAS, SB, PC speaker. If C64S fails to work with your soundcard, check the environment variables in AUTOEXEC.BAT. For a Sound Blaster or compatible the default BLASTER setting is: SET BLASTER=A220 I7 D1 H5 P330 T6 For a Gravis UltraSound or compatible the ULTRASND environment variable should be set similarly to: SET ULTRASND=220,5,6,11,7 Note that C64S can autodetect PAS soundcard only if MVSOUND.SYS device driver is loaded (this is done by the PAS installation program). The sound synchronization option determines at what level the emulator synchronizes emulated sound output with real sound output. Setting sound synchronization to High enables C64S to reproduce digital speech and other digital effects flawlessly, whereas Low setting saves some CPU time. - Analogue joysticks If this option is set to Autodetect, C64S will autodetect the number of analogue PC joysticks connected. Setting this option to 1 or 2 joysticks will force C64S to read the selected number of joysticks. C64S provides two methods of scanning joysticks. Compensating mode takes less CPU time but might fail with some joysticks or newer "speed compensating" game ports. Compatible mode will work with all joysticks. You are advised to try Compensating mode first. If it fails, change to Compatible mode. - Video mode C64S works in two VGA modes. Default Extended mode is VGA 368*240 pixels, 16 colours. Compatible mode is provided in case you are running the emulator on a laptop with LCD display or if your VGA system cannot display Extended mode. Compatible mode is standard VGA 320*200 pixels, 16 colours. C64S 2.5 also supports VESA compatible mode 800*600. Run the emulator with C64S -vesa on command line. - External devices C64S supports real-time communication with external CBM devices connected to PC's LPT port. Setting Use external devices must be set to Autodetect or to Yes to use any external device. If you don't use any external devices set Use external devices to No to speed up emulator loading. The same goes for External 1541 drive and External CBM printer settings. C64S can autodetect printer as device 4 or 5, and 1541 or compatible disk drives as devices 8-11. The lowest device number (8-11) not assigned to external 1541 drive is assigned to emulated 1541 drive. The lowest device number (4- 5) not assigned to external CBM printer is assigned to PC printer. - PC printer port This port setting is used for direct PC printer communication. Default setting is LPT1, but you may need to change this setting if you have more than one LPT port. If you try to assign a non-existing LPT port, the selection will be marked as not available (N/A). - Tape port & CBM IEEE port These port settings are used by TAPEIO and COM1541 utilities. CBM IEEE port is also used for direct 1541 and CBM printer communication. If you have only one available LPT port it will be autodetected. If you have many you are recommended to use LPT2 or LPT3 since LPT1 is usually a printer port. In case of a non-existing LPT port assignment the selection will be marked as not available (N/A). IMPORTANT: If you run C64S in multitasking environment (Windows, OS/2), you are strongly advised to disable sound output and set joystick scanning mode to Compatible. This will prevent general slow down and other difficulties in such environments, but still won't make possible to use external CBM devices. Whenther or not sound will work in multitasking environments depends on computer speed, soundcard type and soundcard drivers used by operating system. Exit environment and run C64S from plain DOS to enjoy full emulation performance. When you have finished with configuration, select Save configuration to save settings and exit. You may always press Esc to abort configuration without saving. ___________________ 3. FIRST STEPS This step by step introduction is here to help beginners use the emulator for the first time: 1. If you are running the emulator for the first time, and you have not run the CONFIG utility yet, please refer to the previous chapter for the information about hardware configuration. 2. Run the emulator by changing to the emulator's directory (if necessary) and typing on the DOS command line: C64S The well-known blue C64 screen appears. 3. Press F9 to get to the emulator desktop. Press ALT T to reach tape file screen or ALT D to reach disk file screen. Select an image file using arrow keys and press ENTER. The selected image file is now "open" and you will enter the directory screen with the list of files stored in the image file. 4. Select a program with cursor keys and press L to load it. Pressing ENTER instead of L will return you to C64 screen. In this case you need to press SHIFT+TAB (which equals SHIFT+RUN/STOP) to load a tape program and run it automatically. To load and run a disk program type LOAD"NAME",8,1 and RUN. 5. Press F10 to enter joystick option screen. Configure the joystick port emulation as you wish. You can even change the keys to emulate joysticks. IMPORTANT: If you are using analogue PC joystick and you are running the emulator for the first time, press `R' and follow the steps to recalibrate the joystick. 6. After you have finished configuring joystick settings, press ESC to get back to C64 screen and enjoy the nostalgia. :) 7. You can always press F10 to enter option screen, where you can adjust numerous emulation settings to improve the behaviour of the program you are running. 8. When bored press CTRL-ALT-DEL or CTRL-ALT-INS to reset the emulator and proceed from step 3. 9. CTRL-BREAK gets you back to DOS prompt. Please read the following chapters for more information on emulator behaviour. ________________ 4. IN ACTION The emulator emulates all the components of C64 needed to make the programs run correctly, display genuine graphics, synthesize sound, and emulate I/O operations. The keyboard layout is original C64 with some exceptions due to a different PC layout. Edit C64S.INI to change keyboard bindings. Some special emulator features make the work with the emulator easier. The tapes and disks to be used with the emulator are stored in a special format (referred to as image files) on the hard disk. You can select the tape position or a disk using emulator desktop. Emulation settings can be changed either with the CONFIG program (hardware settings) or in the option screen (other settings). You can configure the emulator additionaly by editing C64S.INI and using custom .INI files. Please refer to contents of file C64S.INI for details. C64S supports the following command line options: -tape Set default .T64 file (default is TESTTAPE.T64) -disk Set default .D64 file (default is TESTDISK.D64) -tapedir Set default .T64 directory -diskdir Set default .D64 directory -autotype Autotype text on startup -ini Set alternate .INI file (default is C64S.INI) -1541 Enable full 1541 emulation -vesa Enable VESA compatible mode 800*600*16 -slowieee Support slower devices on the LPT64 connector The command and the argument must be separated with a space. The text can include special C64 codes in hexadecimal form preceeded by a $ sign. Per example: $0D corresponds to Return key $20 corresponds to space character $22 corresponds to " character When running C64S, the following keys have special meaning: - F9 enters emulator desktop - F10 enters joystick option screen - F11 pressed prevents screen updates Great for uninterrupted sound reproduction !!! - ESC is an exit/cancel key - CTRL+BREAK exits the emulator - CTRL+ALT+DEL or CTRL+ALT+BackSpace emulate reset - CTRL+ALT+INS causes brutal reset (for reset-protected programs, actually it rewrites the CBM80 sign and performs a normal reset) - PRINT SCREEN captures screen to a Windows bitmap file (filename C64S0xxx.BMP) Table of replaced keys with their equivalents: - C= Alt - Ins/Del BackSpace - Clr/Home Home - £ Insert - ΄|` Delete - Run/Stop Tab - Restore F12 Default joystick emulation keys: - Primary set (1st emulated joystick): Default primary set consists of arrow keys and right Alt key. - Secondary set (2nd emulated joystick): W up S down U left I right O fire Several Control-Alt-key combinations are provided to accelerate option switching when running C64S: Ctrl-Alt-D toggle disk emulation mode Ctrl-Alt-S rotate CPU speed setting Ctrl-Alt-R rotate screen refresh setting Ctrl-Alt-M toggle machine type (PAL/NTSC) Ctrl-Alt-1 joystick #1 input device Ctrl-Alt-2 joystick #2 input device Ctrl-Alt-Y swap input devices between joystick #1 and #2 Ctrl-Alt-L toggle load optimizations Ctrl-Alt-I toggle interlaced video (VESA only) Ctrl-Alt-[ decrease sound volume Ctrl-Alt-] increase sound volume _________________________ 5. EMULATOR DESKTOP Press F9 in the emulator to enter the emulator desktop. The desktop consist of multiple screens that allow you to manipulate the tape and disk images used in the emulation, you can change several emulation parameters and you can even monitor the emulator CPU and memory (both C64 and 1541). The top screen line represents the main menu. Press Alt key to enter main menu. Move around with arrow keys and select a topic by pressing enter. Or, you can select a main menu topic directly by pressing Alt plus the highlighted letter. In all the the desktop screens the bottom screen line lists the actions available. Press the higlighted letter (without Alt!) to select the action. Enter will always select the left-most action. The following is the list of desktop screens and functions available: 3.1. TAPE The tape file screen lets you select the tape image file to be used in the emulation. Move around with arrow keys, press Enter to select the tape or change the directory. When you select a tape image file, you will enter the tape directory screen. Move around and press Enter to set the tape pointer position. You will get back to the emulation screen. When you enter the LOAD command or (Shift+Tab to LOAD and RUN), the emulator will read a file from the position set in the tape directory menu. When saving a file, the emulator will always add a file to the end of the tape image, regardless of the position set (it will not overwrite anything). You can load and run a program easily by pressing L in the tape directory screen. The actions available in the tape file screen are: - Open Opens the highlighted tape image file and enters tape directory screen (equivalent is Enter). - Files If a tape image file is open, it jumps to the tape directory screen (equivalent is right arrow key). - Description Lets you edit the highlighted tape's description. - New Enter the file name, tape desctription and maximum directory size and the emulator will create an empty tape image file. - CD (Change Drive) Press a drive letter (A-Z) to select a drive where the emulator will search for .T64 files. The actions available in the tape directory screen: - Set Sets tape pointer position and returns to the emulation screen (equivalent is Enter). - Load Reboots C64, loads highlighted file and runs it. - Name Lets you edit the higlighted file's name. - Delete Deletes the highlited file. - Import Select the file from the file list and the emulator will import it to the selected tape image file. The files to be imported must be in the two formats: - standard 1541 .PRG format: 2 bytes - load address, other bytes - file data. - German .Pnn format (nn is in range 00-99) 8 bytes - "C64File" description, zero terminated 17 bytes - file name, zero terminated 1 byte - record size (defaults to 0 for .PRG files) If the file selected is not in one of the listed two formats, you may get unexpected results. - Export Saves the highlighted file to a .PRG or .P00 file. All other extensions default to .PRG format (you can not export to a .T64 file). - Freeze Saves full emulator state in a file. When you load such a file, it will start automatically from the point when it was saved. This function is not yet standardized. That means that the files you save with this function may not be loadable in the forthcoming versions of C64S. - Tape Jumps to the tape file screen (equivalent is left arrow key). 3.2. DISK The disk file screen lets you select the disk image file to be used in the emulation. Move around with arrow keys, press Enter to select the disk or change the directory. When you select a disk image file, you will enter the disk directory screen. Press Enter to set the disk and get back to the emulation screen. You can proceed with C64 commands to use disk image file. You can load and run a program easily by pressing L in the disk directory screen. Be careful, changing disk image file when an emulated program uses it can damage contents of the image file. Actions in the disk file screen: - Select Selects the disk image to be used in the emulator (equivalent to pressing Enter). - Files If a disk image file is open, it jumps to the disk directory screen (equivalent is right arrow key). - New Enter file name, disk title and disk ID and the emulator will create an empy disk image file. To use it, select it in the disk file screen. - CD (Change Drive) Press a drive letter (A-Z) to select a drive where the emulator will search for .D64 files. The actions available in the disk directory screen: - Set Sets disk pointer position and returns to the emulation screen (equivalent is Enter). - Load Reboots C64, loads highlighted file to original address and runs it. - Import Select the file from the file list and the emulator will import it to the selected disk image file. The file to be imported must be in .PRG or .Pnn format. If the file selected is not in one of these two formats, you may get unexpected results. - Export Saves the highlighted file to a .PRG or .P00 file. All other extensions default to .PRG format (you can not export to a .T64 file). Currently only PRG files are exported properly. - Disk Jumps to the disk file screen (equivalent is left arrow key). 3.3. OPTIONS There are two option screens available: the general options screen and the joystick options screen. The option screen actions are: - Change Changes the higlighted option. It either selects the highlighted radio button, changes the check box status or asks the user to edit the higlighted field. If the radio button list title is highlighted, Change selects the next radio button. - Joystick Enters joystick option screen. - General Enters general option screen. - Swap Swaps joystick #1 settings with joystick #2 settings. This is to help you reassign joystick emulation settings. - Recalibrate Runs joystick recalibration. Move joysticks as the emulator asks you to recalibrate correctly. If the emulator displays "Cannot recalibrate" message run CONFIG and check if analogue joysticks are enabled (the option must be set to Autodetect). If joystick scanning mode is set to Compensating, try setting it to Compatible. Save configuration, restart the emulator and run joystick recalibration again. Options overview: - Screen refresh C64 updates on-screen picture 50 frames per second in PAL or 60 frames per second in NTSC version. That means the emulator must generate A LOT of video data and transfer it to the VGA card. As this is the most time consuming part of the emulaton, the emulator allows you to control the screen refresh rate thus making possible to achieve original emulation speed also on slower PC computers. However, if the screen refresh rate is to low, it might affect the animation smoothnes, or, in some cases, it will disturb the functions that depend on accurate screen refresh rates, per example some games use hardware sprite collision detection, which occurs only when the screen is updated. Keep this in mind if you notice such problems (bullets flying through objects or similar). Screen refresh settings: - Synchronized Automatically synchronizes the screen refresh rate with the speed of your computer. It will autoselect the screen refresh rate between original refresh rate and the custom frame rate. This way you can limit the lowest frame rate. It is advised that you input the custom frame rate between 1/3 and 1/10 and set the screen refresh to synchronized. - Original Selects original screen refresh rate (1/1). - Custom Selects custom screen refresh rate. 1/X means 1 out of X frames is displayed. 1/1 means each frame is displayed, 1/10 means only every 10th frame is displayed thus saving 90% time for faster CPU emulation. - CPU speed C64's 6510 CPU runs at a fixed clock speed of around 1 MHz. The emulator lets you control the CPU speed, which is useful in some applications. However, to achieve higher CPU speeds you need a fast PC (486/66 will run at 250-450% speed). The percentage displayed in the parantheses in the general option screen is the current estimated speed. CPU speed settings: - Original Tries to near original (100%) speed. - Maximum Forces maximum achievable speed. - Custom Use this setting to force a desired speed. IMPORTANT: To achieve higher CPU speeds, you must set the screen refresh to synchronized or to custom at a frame rate in range of 1/10. - VIC options The emulator lets you control sprite emulation in order to gain faster emulation or to cheat in the games that rely on the VIC chip when detecting object collisions. Set all options to back to "on" for original emulation. - Machine type There were two major types of C64 machines manufactured for two different TV standards: PAL (used in Europe) and NTSC (used in USA). Though most of the programs will run ok independent of this setting, the emulator lets you switch between the machine types to gain better compatibility. Try changing this setting when you notice on-screen garbage or music playing either too fast or too slow. - Joystick options You can control the emulation of two C64 joystick ports. You can use keyboard emulation or analogue joystick emulation. To use analogue joysticks, they must be enabled in the hardware configuration (set to Autodetect or the number of joysticks connected) and successfully recalibrated. The emulator allows you to define two joystick key sets. Primary key set is used, when only one jostick is emulated. Both key sets are used, when both joysticks are emulated by keyboard. In this case primary key set emulates joystick port #2, and secondary key set emulates joystick port #1. IMPORTANT: When the keyboard joystick emulation is enabled, the keys used for joystick emulation don't respond in the original way anymore. Per example: if key 'A' is used to emulate joystick direction, you won't be able to type character 'A'. When such conflicts occur, either press F10 and disable keyboard joystick emulation, or change the keys used for joystick emulation so they will not conflict with the keys that need to operate originally. Some keyboards also behave strange when multiple keys are pressed at the same time. This is the most annoying when emulating joystick, per example you might notice that you can't move up-left and shot at the same time. If you notice such or similar behaviour, try changing the joystick emulation keys. 3.4. MONITOR Built-in monitor lets you watch the programs when running. In the monitor screen you see: - 6510 registers (top right) - 6510 code (top left) - memory dump (bottom) Move around with arrow keys, move faster with Page Up, Page Down, Home and End keys. Data dumped at I/O addresses $D000-$DFFF is the latest data written or read from the I/O address, it is not always what CPU will read next. The actions available are: - Mode Switches focus between code and dump. - Bank Selects memory bank. 0-7 selects a C64 bank (equal to low 3 bits of memory location $01), 8 selects emulated 1541 memory. - Goto Prompts for a new address and jumps to it. - Find Finds data in the memory dump bank. Data must be hex, numbers longer than 2 digits are treated as word values and converted to LO/HI when searching. - Where Moves code display to the instruction where emulation was interrupted. - Disk Pops up a disk menu. You can load, save or disassemble memory blocks. - Assemble Assembles a 6510 instruction. Supports all ducumented and nondocumented instructions. - Trace (F7) Executes one instruction and moves code display. - Step (F8) Steps over the instruction skipping code display of subroutine branches. In case of a subroutine call, the subroutine is executed in debug mode. You can interrupt subroutine execution by pressing Esc or F9. - Here (F4) Sets a breakpoint at the position of code display and runs C64 emulation in debug mode until CPU reaches the instruction at the breakpoint or Esc key is pressed. IMPORTANT: Running C64 emulation in debug mode will cause 30- 50% slow down. Exit debug mode by pressing Esc, once you have finished monitoring the programs. 3.5. HELP Online help provides basic information the user needs when running C64S. It is meant more like online reference and not a copy of the manual. Help usage: - Use arrow keys to move around topics. - Press Enter or R to jump to the highlighted topic. - Press I to get help index. - Use Page Up and Page down keys to list help screens. _______________ 6. FAQ / TIPS Q: What are the most important changes from version 2.0 to 2.52 ? A: There are many: - improved compatibility - NewD64 supports GCR coded disks with protections - VESA compatible video mode (with optional TV-like interlaced video) - improved COM1541 can read GCR code and many protections - hot-keys can change emulation options on the fly (including disk emulation mode) - improved fastloader support, faster normal loads in full disk emulation mode - monitor now includes assemble and memory block load/save/disassemble - EMM386 bugfix for SB and PAS sound - TAPEIO line adjustment improved (up and down keys zoom in/out the data) Q: May I run C64S from Windows, Windows NT or OS/2 ? A: Yes, but C64S runs much slower in such environments. This slow down especially affects sound output. If you notice any troubles you are advised to run CONFIG, disable sound output (set to No sound) and set joystick scanning mode to compatible. Run C64S from plain DOS to gain best performance. Q: The emulator runs way to slow under Win95 ! A: The problem is that Win95 abstracts the timer interrupt from the emulator. Since C64S uses the timer heavily to emulate all functions of C64 at correct speed, it must use a rather high frequency of interrupts. It needs from 300 to 16000 interrupts per second, but Win95 does only 1000, except if started in DOS mode. So you can either: - restart your computer in DOS mode to run the emulator (suggested) - use Win95 compatibility measures, which are: joystick: set joysticks to compatible mode video: run the emulator in full screen mode external devices: PC printer may work, CBM IEEE bus will NOT work reliably sound: you may need to disable sound, sound will work only if there are no conflicts with Windows drivers Q: I selected a disk image file in the disk file screen. How can I use it ? A: Using 1541 drive operates in the original way. The CBM DOS commands (except format) work, too. Type LOAD"$",8,1 to load directory, LIST to see it, LOAD"prg name",8 to load a program (you may use wildcards) and RUN to start it. To load a file to its original address, you need to type LOAD"prg name",8,1. Run a machine code program writing SYS xxxx, where xxxx is the program entry address (decimal). Q: My display does not show the whole C64 screen ! A: Run CONFIG and set display mode to Compatible. You must do this if you use a laptop computer with an LCD display. Try VESA mode if your computer is fast enough. To use VESA mode, run the emulator with C64S -vesa. Q: When I press certain keys the emulator seems to dump random characters, arrows and noumbers ! A: You need to enter joystick option screen (press F10) and disable joystick emulation. C64 scans keyboard and joysticks at the same I/O addresses and this is the resulting side effect. Q: Keyboard joystick emulation does not work O.K. ! A: Try changing joystick emulation keys (press F10). Note that some keyboards behave strange when multiple keys are pressed at the same time. If you notice that particular keys work O.K. when pressed one by one, but malfunction when pressed together, you must change the joystick emulation keys (find a combination that will work O.K. with your keyboard). Q: I have difficulties using analogue joystick. What can I do ? A: You must recalibrate it in the joystick option screen (press F10 and `R'). If the emulator displays the "Cannot recalibrate" message, exit the emulator, run CONFIG and check that analogue joystick option is set to Autodetect or to the correct number of connected joysticks. If joystick scanning mode is set to Compensating, try setting it to Compatible. When you change joystick scanning mode, you also need to recalibrate joysticks in the emulator! Also, if you are using a single analogue joystick, try assigning analogue joystick emulation to one port only. Q: The emulator doesn't autodetect my PAS soundcard ! A: Check that MVSOUND.SYS device driver is loaded in your CONFIG.SYS file. If you installed PAS software properly the following line should be placed in CONFIG.SYS: device=c:\spectrum\mvsound.sys [parameters] Run PAS installation software to install the driver or read your PAS User's Guide to find out how to modify CONFIG.SYS and configure MVSOUND.SYS. Q: Can I use PC printer with emulated C64 programs ? A: Yes, but only for pure text output. Printing graphics or changing text attributes will not work, because CBM printers and PC printers use different sets of control codes. To use PC printer, you must run CONFIG and select the LPT port where your printer is connected (default is LPT1 which will work OK, if you only have one LPT port). Q: Can I use 1541 disk drive or CBM printer with emulated C64 programs ? A: Yes. Any CBM devices connected to LPT port can be used with emulated C64 programs. Run CONFIG and check that use of external devices is enabled or set to autodetect. If you get into problems, please refer to the configuration section of the manual. Q: The emulator does not detect my device connected to CBM IEEE port. How can I use it? A: Run CONFIG, set External devices to Yes. This will set up all the devices which are not internally emulated as CBM IEEE devices. This will work with any device in the range 4- 31. Even if your disk drive isn't properly detected for some reason (some drives don't talk to the bus for a long time after reset) this should help. Note that setting External devices to Autodetect forces the emulator to use only the correctly detected standard devices: printers at 4-5, and disk drives at 8-11. Q: How can I achieve the highest possible emulation speed ? A: Enter general options screen. Set the CPU speed to maximum. Set screen refresh to custom and enter custom frame rate 1/99. If the application does not use sprites set show sprites to off. Press ESC and watch your application go mad. To gain even more speed run CONFIG and disable sound emulation and analogue joysticks. Also, if possible, disable memory managers like QEMM, EMM and 386MAX. If you are using Windows or OS/2, try running C64S from plain DOS. Q: I prefer 320*200 graphics resolution used in the demo version ! A: Run CONFIG and set display mode to Compatible. Q: What is the best soundcard to be used for the sound emulation ? A: Gravis UltraSound. It takes the least CPU time and produces the best output. The new GUS driver uses advanced wavetable synthesis to generate crystal clear 44.1 kHz 16 bit sound output. Q: What to do to listen to C64 tunes on a slower PC ? A: Run CONFIG and check that sound synchronizing is enabled. Then run C64S and enter general options screen. First, set CPU speed to original. Set screen refresh to synchronized and enter custom frame rate 1/10. Now press ESC. If the sound seems to be disturbed, hold down F11. If the reproduction seems to be too slow run CONFIG, disable sound synchronizing and try again. If this does not help your computer is unfortunately too slow. _____________________ 7. COMPATIBILITY The following is the compatibility list. + means implemented and compatible (++ is new from v2.0) +* means implemented but not fully compatible - means not implemented or not compatible * means planned in the future CPU + full 6510 instruction set + $01 memory banking and I/O + $00 CPU I/O direction control +* flags (not 100% compatible in decimal operations) ++ cycle counts * boundary crossing I/O tricks VIC + all graphic modes + border + vertical open border (upper and lower) * horizontal open border (left and right) + sprites + interrupts: raster, sprite collisions (no light pen IRQ) ++ cycle exact raster IRQ + multiplied sprites +* big sprites + hardware scroll + shrunk screen ++* cycle exact screen changes + DMA + screen snapshots ++* forced DMA * full open border (left and right) * more $D011 and $D016 tricks SID + supports GUS, SB, PAS, DAC and PC speaker + all 3 channels + channel 3 muting + 8 bit sampled original waveforms + ADSR envelope control + master volume control + pulse width modulation + $D418 amplitude output + 8000 Hz synthesis on PC speaker (6 bit) and LPT DAC (8 bit) + 44100 Hz synthesis on GUS (16 bit wavetable), SB (8/16 bit) and PAS (8/16 bit) - no channel to channel effects * filtering (at least for digital sound effects) * SB AWE 32 native mode driver CIA 1 + keyboard emulation + joystick emulation + timer A + timer B + IRQ control ++ cycle exact IRQ + time of day (C64 synchronized) + time of day alarm ++ latch load delay ++ rebindable keyboard * more timer register tricky features - serial port CIA 2 + VIC bank select + serial bus communication + timer A + timer B + NMI control ++ cycle exact NMI + time of day (C64 synchronized) + time of day alarm ++ latch load delay * more timer register tricky features 1541 ++* chip level emulation (2K RAM, I/O, 16K ROM) + supports all CBM DOS 2.6 commands + fast (ROM trapped) C64 to 1541 connection ++ optimized full 1541 emulation ++ image file operation ++ 1541 disk transfer utility + emulates direct serial bus communication + supports 35 and 40 track .D64 image files with error information ++ supports new .D64 files with GCR tracks + real 1541 connection (LPT port) TAPE + ROM trapped LOAD and SAVE routines + tape image files with directory + ultra fast loading + TapeIO normal & Turbo Tape loader for PC tape connector + MakeTape utility + loads from Windows .WAV files PRINTER + supports PC printers (for pure text output only) + supports CBM printers (connected to LPT port) EMU-DETECTION + $DFFF read flip flop ($AA,$55) + $DFFE manufacturer code (`S'=C64S) + $DFFC version number ($0252=2.52) + $DFA0 message (tiltle, version, $0D, copyright, $00) _____________________ 8. FILE TRANSFERS The emulator uses two types of image files to store the information in the format C64 programs can handle. There are two types of image files: - .T64 files represent tape image files. Though the C64 tape drives were slow and unreliable this type of storage on PC systems has certain advantages over other methods. The most important is that a tape image file contains a tape directory with the information about all the files stored in the image file. This way the user can easily see the contents and select the file he or she wishes to access. Instead of slow C64 loader fast PC routines take care of loading and saving thus minimizing the time necessary for such operations. The last important feature is that multiple C64 files can be stored in one tape image file. This helps the user organize big collections of C64 software. The emulator provides the tools for manipulating .T64 files: the tools built in the emulator desktop, MAKETAPE utility for creating tape image files and importing files, FIXTAPE utility to fix CONV64 created files and TAPEIO utility, which is a Turbo Tape loader for PC. - .D64 files represent disk image files. These files are actually a faithful reproduction of the 1541 formatted floppy disk contents. They contain the data of all disk sectors in the order they appear on a real 1541 disk. The emulator emulates 1541 floppy drive so that emulated C64 programs can read and write emulated disks just like real disks. Of course, you can store hundreds of floppy disks to image files and use them simply by selecting them in the disk file selection screen. The emulator also includes a COM1541 utility that will let you transfer data from 1541 disks to image files. C64S 2.5 introduces NewD64 files. They extend the .D64 file format to provide: - GCR coded tracks with protections - timecodes used for protections - up to 44 tracks, up to 88 halftracks - efficient coding of unused disk space to keep the files small - simple extension with new formats and new features 8.1. Using COM1541 utility COM1541 will let you transfer data from 1541 (or compatible) floppy drive to disk image files that can be used with the emulator. If you keep a big collection of 1541 disks, you can now easily transfer them to your PC system. To run COM1541 successfully you need to do the following: If you are running COM1541 for the first time, run CONFIG and set the 1541 port to your LPT port's I/O address. If you do not know the address you will need to experiment to find the right one. Connect PC's LPT port and 1541's serial port with the cable (please refer to files LPT64.DOC and LPT1541.DOC for details about the connection). Then you can run COM1541 by typing on the command line: COM1541 If you are not running COM1541 from the emulator's home directory, you need to use a switch to specify LPT port I/O address. Use 1 for 278, 2 for 378 and 3 for 3BC. Example: COM1541 2 COM1541 will try to connect using LPT port at I/O address 378. Upon successful program execution the 1541 drive led should blink and the drive motor start running for a while. A short menu will display on the screen: [D] Display disk directory [C] Disk command [N] Change disk drive device number [I] Import full disk (fast mode, all sectors, all info) [G] GCR import full disk (GCR mode, for protections) [A] Import allocated sectors only (normal mode) [F] Import full disk (normal mode, all sectors) [P] Change PC directory [L] List D64 files in PC directory [X] Exit Insert a disk to 1541 drive and press `D' to see the directory. If the directory is displayed O.K., everything is ready for disk transfer. It is up to you to select a method. Usually selecting `I' will transfer the disks the fastest and correctly. This method uses a custom fast loader which works 10 times faster than normal loading mode and also transfers sector error information which is used by some protected programs. Method `G' uses the most sophisticated loader, it can read most protections, halftracks and disks with more than 35 tracks. Methods `A' and `F' are provided in case fast mode fails to work. Method `A' transfers only sectors marked as allocated in BAM to conserve on transfering time. Method `F' transfers all sectors like method `I', but doesn't transfer sector error information. Method `G' provides some additional options and brings up a new menu: Tracks selected for GCR import: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, 23,24,25,26,27,28,29,30,31,32,33,34,35 [5] 35 tracks [4] 40 tracks [T] Switch tracks [H] Switch halftracks [I] Start GCR import [X] Exit to main menu Above the menu there is a list of the disk tracks to read. Number 18 means standard track 18, whereas number 18.5 means the halftrack following standard track 18. `5' and `4' let you switch between 35 and 40 tracks, two of the most common 1541 disk formats. `T' and `H' let you switch intervals of tracks and halftrecks. If you don't know anything about tracks and halftracks a program uses, your best bet is to first try transfer 35 tracks, then 40 tracks and then 40 tracks / 40 halftracks. However, the transfer of halftracks and tracks with non-standard data is very very slow and you will need some patience. Press `I' in the GCR menu to start import. After selecting a transfer method, COM1541 will prompt for a file name. If a file with the same name already exists, C64S will ask you for permission to overwrite it ! You do not need to add an extension, because COM1541 will add .D64 by default. If no file name is given, the default file name is IMPORT.D64. If this is the case, rename the file after transferring to avoid possible later difficulties. In GCR import mode, you will see a graphic display of the progress. Red spots on the tracks mean there has been a logical error in a block of disk data. This may either be a real read error or disk protection. If you are not sure, try to import a disk for a few times and check for the red spots on the same track. If they appear only occasionally, it's a read error. Before transferring a disk you may wish to change the PC directory in which the transferred disks will be stored. Press `P' to change the directory. If you enter a non existing directory you will be prompted to create it. Press `Y' to create a new directory. You can always press `L' to list the D64 files in the current PC directory. When COM1541 finishes transferring the disk, exit with Esc or `X'. The disk image file is now ready to use with the emulator. Run C64S and check it. 8.2. Using TAPEIO utility TAPEIO utility is actually a C64 compatible loader for PC. It can load normal C64 files as well as Turbo Tape files either directly from the tape or from a Windows .WAV file. The files loaded without errors are stored to a .T64 file so they can be used immediately with the emulator. To load from tape you need to connect a C64 tape recorder to PC's LPT port (please refer to files LPT64.DOC and LPTTAPE.DOC for details about connection). Run TAPEIO by typing on the command line: TAPEIO The optional syntax is: TAPEIO [tapename[.T64]] [port] [wavfile.WAV] The main menu will appear: Select option: [I] Select input device (LPT port at $378) [T] Select tape image file (import.t64) [M] Monitor incoming data [L] Load from input device If you are running TAPEIO from the emulator's directory it will read the tape port selected with the CONFIG utility (default setting is 378). TAPEIO will not load anything if the input port or file is not set correctly. If a .T64 file with the given name does not exist, the utility creates an empty tape image file. After starting TAPEIO, follow these steps: Step 1: Prepare input device. To load from tape: • Plug the LPT64 connector in your PC's LPT port. • Connect the power source and the tape drive to the connector. • Select [S] in the main menu to select input. • Select [L] for LPT port. • Enter LPT port address in hexadecimal, it can be either 378, 278 or 3BC. To load from a Windows wave file: • Sample tape to a 44.1kHz 8-bit mono wave file. • Select [S] in the main menu to select input. • Select [W] for WAVE file. • Enter file name, don't forget the full pathname. Step 2: Check incoming tape data. • Select [M] in the main menu to monitor incoming data. • Press PLAY on the tape recorder (not necessary when loading from WAV files). If the communication is OK, you should see: flashing border, yellow graphics and red vertical marker lines scrolling up. • The yellow graphics is incoming data. It should form compact jagged stripes when loading directly from tape. When loading from wave file, the stripes become 2-4 parallel lines. • The stripes must not cross red marker lines ! - Turbo Tape files must have a stripe left from the leftmost marker and a stripe right from the leftmost marker - Normal ROM saved files must have 3 stripes between leftmost and rightmost marker - Use left and right keys to move the marker lines accordingly ! • If you can't see the stripes or if they look random: - when loading from wave file, press P to toggle sample polarity - when loading from tape, use screw driver to adjust head position • If the stripes cross the marker lines, use left and right arrow keys to move the marker lines. Press up and down arrow keys to zoom in and zoom out the data, when you cannot move the lines according to the instructions. • Press Esc to stop monitoring and return to main menu. Step 3: Load files. Select [L] in the main menu to start loading. The loader will start searching for a file header. When a header is found, all the data is dumped on the screen. When a file is being loaded, the border flashes and the increasing percentage is continuously displayed on the screen. This percentage tells the amount of the file already loaded. If the file is loaded with no errors it is added to the tape image file given on the command line. TAPEIO will continue loading files until the tape image directory is full or it is interrupted by pressing ESC. If you experience load errors, repeat Step 2. Step 4: Exit TAPEIO. Press ESC at any time to exit TAPEIO and return to DOS. 8.3. Using MAKETAPE utility If you transfer C64 files using the shareware X1541 utility or if you download them from a FTP site or a BBS, you will probably get the files in the raw C64 format (with usual extension .PRG). The files look like: 2 bytes - start address, other bytes - code. MAKETAPE allows you to create empty tape image files and import raw C64 files. In addition to that MAKETAPE also imports .P00 files. The syntax is: MAKETAPE [tapename] [file1] [file2] ... MAKETAPE first checks if tapename.T64 already exists. In this case it opens the file, otherwise it creates an empty .T64 file with the given name. If the tapename is succeeded by filenames file1, file2..., MAKETAPE adds each file listed to the end of the tape file. Example: You got a file called JOKE.PRG, which you know is a C64 file. You would like to create a new tape image file named "JOKES.T64" and import your file, so you can use it in the emulator. The solution is as simple as that: MAKETAPE jokes joke.prg Run the emulator, enter tape file screen and you will see a new entry "JOKES" listed among other tape image files. You can edit the description. Open the tape and "JOKE.PRG" will be listed in the tape directory. 8.4. Using FIXTAPE utility The first demo version of C64S was released without the MAKETAPE utility. As a result a quick hack utility CONV64 appeared. In best efforts to translate C64 software into the .T64 format the respective author simply used the Cybernoid's header not knowing that a lot of important information is stored in the .T64 file. Among other things the program end address was not adjusted according to the imported file's size. As a side effect many crunched programs refused to work, longer programs did not fully load and BASIC programs complained with an OUT OF MEMORY message. The emulator now checks if it loads from a CONV64 file and tries to fix the mess. LOAD ERROR message is generated to inform the user something is wrong. If you notice such behaviour run FIXTAPE to fix the tape image file. You are encouraged to make a copy of the file before trying to fix it for safety reasons. The syntax of FIXTAPE is: FIXTAPE [tapename1] [tapename2] ... FIXTAPE will check all the listed files (tapename.T64). It will display Fixed upon successful correction or O.K. if the file needs no fixing. Run this utility with one file tape images only ! _______________ 9. CONTACTS European representatives: Vertrieb, Support und Registrierung fόr Deutschland, Φsterreich und Schweiz: phs GmbH Davenstedter Str. 10 D-30449 Hannover Tel.: 49-511-444 193 Fax : 49-511-458 1524 BBS : 49-511-455 011 (300..28.8k Bd) EMail: phs_edv@t-online.de HTTP: www.phs-edv.de Germany orders DM 149.-- (+ 7,50 PuV + 6,-- Nachnahme) (including connector-adaptor and 3 coupons for updates or bbs-use) add DM 10,-- for foreign shipping (instead DM 7,50 PuV) add DM 10,-- for foreign-money exchange (costs for poor banks..) add DM 6,-- for "Nachnahme" and "Einschreiben" For credit Card (MasterCard only!): within Germany DM 156,50 abroad DM 159,-- North American representatives: C64S 2.5B is now available in USA, Canada, Mexico, Australia and New Zealand. Contact: USA orders $69.95us. Canada and Mexico orders $69.95us + $5.00us SH. Australia and New Zealand $69.95us + $10.00us SH. For Credit Card (VISA or MasterCard) orders Phone, Fax, Mail or Email to: Phone: 206.402.6003 Fax: 206.828.9011 BBS: 206.402.6388 Email: lab@seattlelab.com CompuServe: 71202,560 FTP: ftp.seattlelab.com (204.29.31.1) HTTP: www.seattlelab.com For Check or Money Order orders send to: Seattle Lab 9606 Northeast 180th Street Bothell, WA 98011 U.S.A. German version of C64S ships with a German manual, but English files are added for other nations. Prodaja in podpora v Sloveniji: Prodajo in podporo v Sloveniji izvaja Miha Peternel osebno. Cena emulatorja je 2500 SIT, placa se po povzetju. V paket ni vkljucen vmesnik za prikljucitev Commodorjevih zunanjih enot, vendar dodam navodilo za izdelavo le-tega. Za informacije in narocila uporabite enega od spodaj navedenih naslovov. Author: In case you would like to contact me you can choose among the addresses listed below. I prefer E-mail, because it's the cheapest, the fastest and I will always get the messages if addressed to all E-mail addresses. I am looking forward to hearing ANY ideas on how to improve the emulator (software and documentation). Also, feel free to ask any questions. E-mail: (preferred) miha.peternel@kiss.uni-lj.si miha@ferlin.fri.uni-lj.si miha@seattlelab.com Phone: +386-64-311-959 (fax/modem on demand) 8-11 PM, Central European Time Snail mail: Miha Peternel Pot v Bitnje 66 SI-4000 Kranj Slovenia ______________ CONTENTS 1. Introduction Basic C64S information. 2. Configuration Hardware configuration guide. 3. First Steps Step by step introduction to C64S system. 4. In Action The differences between real and emulated C64. 5. Emulator Desktop Detailed description of desktop and built-in tools. 6. FAQ / Tips Trouble shooting and tailoring emulation. 7. Compatibility Detailed compatibility list. 8. File Transfers A guide on file transfers with C64S utilities. 9. Contacts Getting in touch with representatives and the author.