Home
Home
First Prev Contents Next Last
First - Prev - Contents - Next - Last
Deutsch Español Italiano
Deutsch - Español - Italiano

5. Devices

5.1 MOS 6510 Processor and Emulator Speed

The speed of the Emulator can be controlled using the menu item Options/Emulator Speed.

Reference Clock - PAL vs. NTSC:
PAL and NTSC are two major standards for television signals. While PAL used in most west European countries (except France), NTSC is the common standard in North America. A PAL signal consists of 625 scanlines (including scanlines for vertical blank, leaving a usable resolution of 768x576 pixels) that are displayed at a nominal refresh rate of 50Hz. NTSC on the other hand uses only 525 that are redisplayed at 60Hz. Note that both systems use interleaving, i.e. during each screen refresh, only every other scanline gets redrawn, thus the entire image is only redrawn at 25Hz (PAL) or 30Hz (NTSC).
When a Commodore 64 is connected to the TV the standards are interpreted in a slightly different manner. The central image of a C64 screen has a resolution of 320x200 pixels. Around this area there is a frame, that stretches the image to about (depending on the actual TV set connected) 384x288(PAL) pixels. To make a full TV signal all pixels are displayed at half the regular TV pixel rate, with the effect, that they are scaled in horizontal direction. Furthermore both half images are then same, resulting in stretched image in vertical direction. Depending on the video mode the internal clock of the C64 is driven at either 0.985MHz (=625*63*50/2 PAL) or 1.023MHz (=525*65*60/2 NTSC). Most C64-programs will work fine in both modes. PAL mode produces less strain on the Mac CPU and is therefore advantageous. Only games that won't work in PAL mode should be run in NTSC mode.

System Clock:
Depending on the choice of video mode the reference clock of the emulated C64 is driven at either 0.985MHz (PAL) or 1.023MHz (NTSC). This frequency is used to drive the CPU and CIAs (Timers) (but not the SID or VIC). You can increase the System Clock rate to obtain a faster C64 while maintaining the speed ratio between CPU and CIA. Note that compatibility will still suffer if you select a value different from 100%.

CPU Clock:
In addition to adjustments to the System Clock it is also possible to accelerate the CPU alone. If you have a CPU intensive program, that you want executed as fast as possible, than this is the parameter to adjust. Note so, that compatibility for games will suffer if you select a value different from 100%.

Frames per Computed Screen & Frames per Screen Redraw:
Power64 maintains the screen in two steps. In a first step it creates an image of the C64 screen in an internal buffer (as a byproduct of this computation Power64 also checks for sprite collisions). This image is compared to the one last computed and only if a change is detected then the changed parts are copied to the Macintosh screen in a second step. Frames per Computed Screen defines how often the first step is performed. Frames per Screen Redraw sets the frequency of the second step. A setting of 1:1 means that the screen is recomputed/redraw 50(PAL) or 60(NTSC) times a second. 1:n indicates that the screen is redone only on every n-th frame. Choosing Auto causes Power64 to select the speed that best fits the C64 game and Macintosh used. Thus Auto is the recommended setting for both Frames per Computed Screen and Frames per Screen Redraw. Only games that require very precise Sprite Collision detection might require Frames per Computed Screen to be set to 1:1. To display the actual number of frames per second enable the menu item Options/Display CPU Load (see below).

Timing Precision:
Power64 currently supports five types of video emulation, that differ in respect to the exact timing of video image calculation. In Scanline mode (which is fastest) the entire scanline is drawn at once at the beginning of the scanline. In contrast to this Advanced Timing mode obtains the Sprite information at the beginning of the scanline, and draws the rest of the image approximately in the middle. High Precision Mode takes care of all changes in the video registers that occur during the duration of a scanline. It is therefore the most compatible type of video emulation, and the only mode that is able to simulate features like open left/right borders, or changes in the background color in the middle of a scanline. These features come at the cost of increased stress on the Mac CPU. CPU Cycle Exact Mode works like High Precision Mode with respect to the VIC, but does a more exact timing analysis for the CPU. In particular the VIC now steals the correct cycles from the CPU (rather than just the (almost) correct number as in High Precision Mode). This can be necessary for very special tricks (like Electronic Arts Fastloader). Unfortunately this precision does again increase the load on the Mac CPU.
If you have a sufficiently fast Mac it is recommended that you use CPU Cycle exact Mode, otherwise you should use High Precision or Advanced Timing.

Inactive Windows:
When an emulator window is not the active (focused) window, the emulator is usually suspended until its window becomes active again. Stopping the emulation gives other applications the full power of the Mac CPU. On the other hand it is possible to keep the emulation running either with or without sound. This way you can have e.g. 'Little Computer People' on your desktop, while you work, or can use sound-demos to make your work more pleasurable. Be aware so, that this consumes significant CPU power, so your other applications are slowed down.

Speed Display:
The current performance of the emulator can be displayed in the top right corner of the emulator window. Power64 can display the the speed of the virtual M6510 CPU of the emulated C64 (in MHz) This should be 0.98 of PAL-mode (preferred) and 1.02 in NTSC mode. Furthermore Power64 will display how much load is puts on the Mac CPU (in %). For smooth sound and video emulation the Mac-CPU should not be loaded more than 90%. If the second line Power64 displays the number of frames that are displayed and computed per second as well as the number of frames that a real C64 would display.
Use the Speed Display option to indicate which data Power64 should display. If is also possible to turn the display off altogether with Options/Display CPU-Load (Cmd-?). Use Opt-Cmd-? to apply this change to all windows.

After adjusting the preferences use Set Global to make the set of options valid for all emulator windows currently open as well as newly opened. Clicking Ok will only change the options for the current window.

Turbo Boost (Cmd-B):
To speed up the C64 during long LOADs with Full Floppy Emulation, or to make a chess program think faster without decreased compatibility, use the Turbo Boost mode. Turbo boost mode deactivates the speed control logic of Power64, and makes the C64 go as fast as the Mac CPU will take it. To gain even more speed Turbo Boost mode furthermore deactivates the sound (which otherwise would be Mickey-Mouse style) and sets the number of Screen Redraws to 1:12. Unless the Screen Recalc Rate was chosen to be 1:1 in pursuit of optimal compatibility, the Screen Recalc Rate is also set to 1:12. The System Clock and CPU Clock settings are NOT modified, even so additional speed could have been obtained there. Only the Macintosh side of Emulation is affected, while the C64 side remains unchanged. Therefore activating Turbo Boost mode, does NOT decrease compatibility.

5.2 Video Options

Many aspects of how the C64 image is displayed on the Macintosh screen can be controlled by the user via Options/Video Setup.

Video Draw Mode:
Power64 maintains the screen in two steps. In a first step it creates an image of the C64 screen in an internal buffer. This image is compared to the one last computed and only if a change is detected then the changed parts are copied to the Macintosh screen. This second step can be done using several methods. One way is to use the original Macintosh Quickdraw routines, that are provide optimal compatibility but are very slow and should be used only if absolutly necessary. Using Power64's custom drawing code offers better performance and is compatible with almost all video hardware. If your Mac is equipped with OpenGL compatible hardware you can also use that to draw to the C64 image. Using OpenGL makes it possible to scale the image to any desired size (even non-integer multiples of the original size).

Edge Smoothing:
If the C64 screen is displayed in double size or larger the pixel structure of the C64 screen becomes quite annoying. To alleviate this problem Power64 can display a black line between any two scanlines to make the transitions between colors somewhat smoother. In addition Power64 can smooth edges in a simple fashion by cutting of the corners without using any additional colors, or Power64 can use true antialiasing using additional colors to blend between color transitions.
When using OpenGL it is highly recommended to enable Edge Smoothing.

Frame Width:
On a real C64 the central screen area is surrounded by a wide frame to adapt the C64's 320x200 pixel screen resolution to the 504x312 (PAL) or 510x263 (NTSC) TV resolution. This frame usually is filled with a single color (and thus carries little information). In newer games authors have devised ways to display sprites in the frame (commonly used to display scores and/or scrolling messages). Frame Width to decide how wide the frame displayed by Power64 should be. Available values are 0 to 32 pixels on the left and right and 0 to 48 pixels on the top and bottom. If a frame width of 32 or more pixels for the top and bottom frame is chosen in NTSC mode Power64 automatically reduces the frame to 31 pixels, so that there are 262 (=31+200+31) scanlines.

Black Frame for Zoomed Window:
When a window size other than 1:1 is selected Power64 can automatically center the emulated C64 on the Macintosh screen and draw a black frame around it to cover any other windows that are on the screen. This is not Macintosh like, but gives more C64 feeling. To hide the menu bar too, see the next point.

Hide Menubar for Black Frame:
To gain optimal C64-like feeling it is possible to switch off the menu bar when the emulator is in full screen mode. Thus the screen looks like you would find it on a real C64, nothing reminds of a Macintosh. If this option is selected, the menubar will be hidden after the C64 ran for two seconds in full screen mode. Moving the mouse or pressing the option key brings the menubar back on the screen.

Maintain Aspect Ratio: OpenGL makes it possible to change the emulation windows width and height freely. It is e.g. possible to make the window very wide but not tall, producing a strange squished look. Usually it is desireable to limit the freedom of window scaling and enforce that the window's width and height are always scaled with by same factor.

C64 Palette:
There are many different opinions, based on the observation of different C64s connected to different TVs and monitors, what the 16 C64 colors look like and how they should be displayed on a Macintosh. Power64 offers several different Color LookUp Tables (CLUT), created by various people, that attempt to map the C64 colors correctly to the Macintosh. Use C64 Palette to select the CLUT that best matches your memory of the C64 colors.
It is also possible to use a customised palette. To do so, first select the palette that is already closest to your desired palette, and then select 'Palette Editor' from the pop-up menu. Starting out from the previously selected palette you can now fine tune the colors to match the colors on your Mac screen to those of the original C64.

Use Color on Color Screens:
Power64 can display the C64 screen in original colors or as a black and white image. Select Use Color on Color Screens to see original colors on color Macintosh screens. Enabling this option is definitely recommended.

Zoom Out (Cmd -):
Reduce the zoom factor of the current C64 window by one.
Use the Option key to make the new size apply to all open windows.

Zoom In (Cmd-+):
Increase the zoom factor of the current C64 window by one.
Use the Option key to make the new size apply to all open windows.

Invisible Background (Cmd-I):
Power64 is a well-behaved Macintosh application, that runs in regular windows. Outside the Power64 windows the Finder and other applications' windows are visible. To create a more C64-like feeling Power64 has the ability to draw a big black window over the entire screen, that hides all other applications. If you also want to hide the menu bar check "Hide Menubar for Black Frame" above.

5.3 Sound Options

Sound Sample Rate and Sample Size control the sound quality for immediate playback. Higher sample rates produce better sounds, but also create more Mac CPU load. For optimal results the sample rate selected for Power64 should match the sample rate selected in the Sound Control Panel (up to MacOS X 10.2) or be set to 44100Hz (MacOS X 10.3 and later, where the sample rate is no longer configurable in the control panel). Any extra samples created by Power64 will be discarded by the Sound Manager, missing sample will be interpolated (at additional CPU cost).
In addition to this you should make sure that the sample rate for MIDI playback is configured to at most 48000Hz. Use the program Audio MIDI Setup (in /Applications/Utilities) and set the Audio Output setting to 44100Hz. This value is sometimes changes by external audio interface (like the Griffin iMic or other USB audio interfaces) or their drivers (that remain in the system even after the hardware has been unplugged!) You should check that the setting is correct both with the hardware plugged in and unplugged. If the MIDI sample rates are too high Power64 might run much too fast and/or might remain mute. This is not a Power64 specific problem. Other applications (like Quicktime) suffer from the same problem. For more details see: http://docs.info.apple.com/article.html?artnum=300832.
Power64 will always create Samples in 16 bit. The 8 bit option simply discards the least significant 8 bit. This does NOT save time or space, and is intended only for estimating the achievable quality of a 8 bit recording.
Sound is played back at at most 44100 Hz by Power64. Selecting a higher sample rate will not cause playback at that rate (which would furthermore not be possible using the Apple Sound Manager). Instead Power64 computes the samples at the chosen samplerate and then averages two (88200 Hz) or four (176400 Hz) of these oversamples to create a sample usable for playback at 44100 Hz.

Sound Volume:
Selects the active Sound Volume in the range from 0% to 120% of the maximum.
Note that values above 100% can cause sounds to be clipped under certain conditions (all 3 voices plus sample playback reach peak amplitude at the same time). Fortunately these conditions are extremely rare during normal music playback, and it is quite safe to set the volume slightly above 100%.
Note that while a Volume setting of 0% does not produce an audible sound, the SID is still fully emulated. Recordings are still possible and the values of SID[$1B] and SID[$1C] are correct. To turn of SID emulation completely (and reduce Mac CPU load) select Mute (Cmd-M) (see below).

Mute Voice:
The SID chip has three voices that create the music. To hear (or record) the melody played by a single voice clearer Power64 can selectively mute single voices.

Activate Filter:
Before sending the sound of the three SID voices to the speaker it can be sent through a (common) filter to modify the sound. On a real C64 the filter is always present. In Power64 the filter is optional. If active it does consume some extra CPU power, but reproduces the sound of the C64 better.

Sound Recording:
Power64 also offers the possibility to record the sound played by C64 games to a AIFF sound file that can be played e.g. with the QuickTime Player.
Furthermore Power64 can record sound in reSID file format. This file format requires much less hard disk space than AIFF, because not the actual sound samples are recorded but just the commands sent to the SID sound chip. To reduce the file size even further the reSID file can be compressed with GZ. This is recommended unless you want to analyze the contents of the file by hand or some other program. Power64 also supports the Frodo file format, but this is done only for reasons of compatibility to older versions of Frodo. Frodo will soon switch to the reSID file format too, so that this file format will fade out.

Recording Sample Rate and Sample Size control the sound quality of the AIFF recording. These settings are not available when recording in reSID or Frodo file format. High sampling rate and large sample size give good quality, but unfortunately also large sound files. Technical Note: Power64 creates its sound at the chosen Sound Sample Rate (see above), 16 bit, Mono and produces the other sample rates/sizes by discarding or duplicating part of that information. It is not advisable to select a high Recording Sample Rate than Sound Sample Rate, because the extra samples are added by duplication of the computed samples. Thus the 'useful' sample rate of the recording is just that of the Sound Sample Rate, while the disk space occupied will correspond to the higher Recording Sample Rate, combining the disadvantages of both high and low sample rates.

Pause Recording during Silence:
Power64 can automatically stop sound recording when there is not tune to record. Enabling this feature causes Power64 to delay any recording until the music starts and eliminate silence after the end of the music. Furthermore any intermission that lasts longer than 1/2 second is truncated to 1/2 second. This is a very useful feature as you can start the recording before running the game without causing useless stretches of silence in the AIFF file. Unfortunately some games produce sound with lots of intermissions, that sound queer if these intermissions are truncated. For such games it is useful to turn off the Pause Recording feature.

Sound File Folder:
The recorded C64 sounds are stored in a file called 'C64 Sound - dd.mm.yyyy (x)' in the Sound File folder. Click on Select Sound File Folder to choose the folder in which these files are to be stored.

Options/Mute (Opt-Cmd-M):
Disable the SID emulation. As the SID emulator requires a significant amount of processing time, turning off the sound will give a performance boost to games that would otherwise be to slow to run at full speed. Even with SID emulation off SID[$1B] can still used as a random number generator.

Options/Volume Up (Cmd->) and Options/Volume Down (Cmd-<):
Increase and decrease the sound playback volume. Decreasing the volume when it is already at its minimum, will disable sound emulation. Increasing the volume again will turn it back on.

Pressing the Option key while selecting a new mode for the SID emulation will cause all open Power64 windows to adopt this mode.

Record Sound (Cmd-*):
To start or stop sound recording press Cmd-*. There is also the possibility to select Options/Record Sound but it is much harder to select this item at a precise moment. The sounds will be recorded at the sample rate and size chosen in the Sound Options dialog to a file called 'C64 Sound - dd.mm.yyyy (x)' (where dd.mm.yyyy is the current date and x is a counter) in the Sound File folder (see above).

5.4 Keyboard

Power64 supports two keyboard modes - Macintosh Keyboard mode and C64 Keyboard mapping. It is possible to select a Keyboard Mode using the menu items Options/Mac Keyboard and Options/C64 Keyboard. Usually this effects only the active emulator window. If the Option Key is pressed when selecting a new Keyboard mode, than this mode is activated in all emulators.

In Macintosh Keyboard mode the translation between pressed Macintosh keys and logical C64 keys is based on the character that is usually associated with a particular key. i.e. Pressing the key (or key combination) that will create a '*' in any Mac word processor will also create a '*' in Power64. This is very handy if you have not used your C64 very much recently and are no longer familiar with its keyboard layout. On the other hand, some keys that require just a single keystroke on a C64 might require the use of Shift/Option+Key on the Macintosh or might not be reachable at all. This might cause problems with programs that require these keys.

As an alternative there exists the C64 Keyboard mode. In this mode the Macintosh Keyboard behaves just like a C64 Keyboard i.e. Key mapping is based on the relative (physical) position of the keys on the keyboard. The character that is associated with a key in other Macintosh applications (and that is usually printed on the keycap) is irrelevant in this mode. This offers the advantage that all C64 keys are accessible for the emulator, but it might cause some typos for experienced users on the Macintosh Keyboard.

Macintosh Keyboard mode makes it easy to type (plain) text, as you don't have to think twice (or correct typo's afterwards) whether you are in a Macintosh window or an Power64 window - the keyboard is always the same.

Commodore 64 Keyboard mode is better when you need fine grain emulation. It will enable you to access all the graphic characters available on the Commodore 64. Furthermore those games that use the keyboard to control their hero usually select the action keys in a way that provides convenient access on a Commodore 64 keyboard. On a local keyboard the keys might be shuffled around and impossible to reach.

Note: If you have a US-keyboard on your Macintosh there is very little difference between the two keyboard modes. You will probably want to use Commodore 64 keyboard mode, as it offers higher compatibility.

The C64 keyboard features some special keys that have been mapped to the Macintosh keyboard by Power64:

C64Macintosh
Run/Stop Escape
Restore Cmd-R (includes Run/Stop)
(or Menu: File/Restore)
Reset Cmd-K (Press Option-Cmd-K for Hard Reset)
(or Menu: File/Reset)
Commodore Option
Control Control
Shift (left) Shift (left & right)
Shift (right) End or F12
Shift Lock Caps Lock
Insert/Delete Insert/Help
Backspace Backspace or Delete
Clear/Home Home or F9
F1 F1 or Cmd-1
F2 (=Shift-F1) F2 or Cmd-2 or Shift-F1
F3-F8 like F1/F2
Cursor Right Cursor Right
Shift Cursor Right Cursor Left or Shift Cursor Right
Cursor Down Cursor Down
Shift Cursor Down Cursor Up or Shift Cursor Down
Left Arrow Underscore('_') (Fire in 'Castle Wolfenstein')
Up Arrow Circumflex('^') or F10 or Page-Up
Pound Sign ('£') Page-Down or F11 or '£'
Pi Symbol ('π') Shift-Page-Up or 'π' (Mac keyboard: Opt-p)

The numeric keypad on a Macintosh keyboard can be used in just like the regular numeric keys in the top row of the keyboard in Power64.

Choose File/Key Caps to see the current mapping (taking into account the state of the modifier keys) of C64 keys to your Macintosh keyboard.

Below are some pictures of the C64 keyboard layout, to help locate all the many graphics characters.
Without any modifier keys the C64 keyboard is very similar to the standard US Macintosh keyboard.

C64 Keyboard Layout

Abbreviations: C/H…Clear/Home - I/D…Insert/Delete
RST…Restore - R/S…Run/Stop - LCK…Shift Lock

When SHIFT is pressed (or SHIFT LOCK is active) the following characters can be accessed:

C64 Keyboard Layout with Pressed Shift Key

Finally the following characters can be accessed by using the Commodore (Macintosh: Option) modifier key:

C64 Keyboard Layout with Pressed Commodore Key

More text colors are available by pressing CTRL-1..CTRL-8. Use CTRL-9 and CTRL-0 to turn reverse printing on and off.

5.5 Joysticks

Power64 directly supports USB joysticks, and can also use the Macintosh keyboard to simulate joysticks with optional auto-fire in both game ports of the C64.

To customize the joystick simulation select the menu item Options/Joysticks. Here you can define the keys that are to be used for every direction of joystick movement and the fire button. It is perfectly fine to use the same set of keys for both joysticks. You can define either 4 or 8 directional keys for each joystick.
If you define just 4 keys, than diagonal movements require two keys to be pressed at once. If you want to fire diagonally (making it a total of 3 keys), this can cause problems, as the Mac keyboard has difficulty decoding certain combinations of 3 or more keys.

Power64 will map the axis and buttons of the USB-joystick(s) to movements of the C64 joystick(s). Usually Power64 will find a smart mapping, but sometimes it is better to adjust the configuration by hand (using the "USB Joystick Configuration" button.
Note: Sometimes MacOS will suddenly display an extreme increase in CPU load when the joystick as been wildly moved. The CPU load will even remain high after the joystick has come to a rest again. The reason for this has not been fully investigated, but I assume that Apple's HID-Manager is to blame.

If there are two physical joysticks on the USB bus then it is possible to assign each of them to one C64 joystick port using the Joystick Options dialog. To do this set the USB Joystick entry for Port 1 to 'A', and the entry for Port 2 to 'B' (or vice versa, but not both to the same value). Now select 'Configure USB Joysticks' pick your first joystick from the row of devices on the left of the configuration dialog and assign the Joystick A Movement to the joystick and Joystick A Fire to the buttons (All icons are green). Now select the second joystick from the list on the left and assign Joystick B Movement and Fire to it (red icons). Now you can use both joystick simultaneously.

Even so the original C64 joystick has just one fire-button, Power64 provides an additional auto-fire button. Internally both buttons (fire and auto-fire) drive the same (virtual) line on the C64, but using two buttons it is easy to trigger both single shots and unleash bursts of bullets.

It is not possible to connect an original C64 joystick to the Mac without additional hardware, since the interfaces are just too different (passive 9 pin connector on the C64 joystick - active USB bus interface with its protocol on the Mac).

The company Speed-Link (www.speed-link.com) was for some time building the classical Competition Pro Joysticks (complete with original, high quality micro switches) with a USB interface for easy use with modern Macs (Product Code SL-6602 (classic black/red) or SL-6602-TBE (transparent blue/silver)). Unfortunatly this product has been discontinued and is no longer available from their site, however various vendors still have it in stock and/or you should be able to find used ones on ebay.

If you do not want to purchase an entire joystick or want to use your original old joysticks, interfaces that will perform the translation of protocols are available from several sources:

The C64 uses the same set of I/O Pins of CIA1 to detect both keyboard activity and joystick movement. Due to this hardware design some joystick movements cause the C64 to believe that keyboard activity has taken place. Therefore it is sometimes useful to deactivate a joystick.

Most keys that are accessible on the Macintosh keyboard have an equivalent on the C64 keyboard. Yet it is not desirable that every movement of the virtual joystick (caused by pressing a key on the Mac keyboard) indicates a pressed key to the C64. Therefore it is usually advisable to hide those keys that are used to simulate a joystick from the emulated C64. On the other hand care should be taken not to eliminate any 'important' keys. Usually it is a clever to choose the joystick keys from the numeric keypad, and keep them hidden from the emulated C64.
This is particularly important if you choose the Shift-, Option- or Control keys to control your joystick. Power64 supports these keys too, but unless you are using a PowerBook (and thus have no numeric keypad) their use is definitely not recommended.
To temporarily disable all joysticks deselect to Enable Joysticks menu item in the Option menu. Please note that this is a master switch. Enabling the joysticks using this master switch only enables those joysticks that are individually enabled in the Joystick Option dialog. The point of this menu item really is only to disable the joystick for short periods of typing if the joystick would otherwise hide important keys.

Some C64 games require a joystick in Port 1 while others will only work with the joystick in Port 2. Use the menu item Options/Swap Joysticks (Cmd-J) to quickly flip a joystick from Port 1 to Port 2 and vice-versa. Pressing the Option-key when selecting this menu item will cause the joysticks to be exchanged in all active emulators.

5.5.1 Sample Joystick Configuration for a Mac with one USB Joystick

Proper configuration of USB joysticks from the information given above has been the source of many problems for users of Power64. To alleviate the confusion we shall show a simple example configuration, for a Macintosh with just a single USB joystick here. If you wish to use two USB joysticks, please refer to the next section.

After you click on the "Joysticks..." item in the "Options" menu, the "Joystick Options" dialog appears. Set the USB Joystick selector to '-' (no USB Joystick) for Port #1 and to 'A' for Port #2. To be able to play dual-player games, where one player uses the USB Joystick and the other the keyboard, you should configure the keys for Port #1 according to your preferences (e.g. numeric keypad 4,5,6,8,0 or cursor keys+space or whatever is convenient to you). Be sure to set the keys for Port #2 to something different (e.g. all directions and fire to F13 or some other 'useless' key). Do not use the same keys that you are using for Port #1, otherwise every action of the keyboard player would also effect the joystick player.

Power64 Joystick Options Dialog for a single USB Joystick

Now click on "Configure USB Joysticks". The contents of the dialog that you will see depends on the type of joystick (number of axis and buttons) you have. Configure all input elements of your joystick to suitable actions for Joystick A (green icons). While you are doing this, you can verify that Power64 recognises your joystick. Try pressing a button and watch as the corresponding icon becomes highlighted.

Power64 USB Joystick Config - Port A

Click Ok twice to close both levels of the dialog, and you should be all set. Use the Joystick Demo (see chapter 7.3 Joystick Demo) to check that Power64 recognises your joystick. Remember that some games expect their joystick in port 1 while others expect it in port 2. Usually the only way to find out is trial-and-error. If a game does not recognize your joystick, or does strange things (e.g. reset itself or enter pause mode) just flip the joystick ports by pressing Cmd-J.

5.5.2 Sample Joystick Configuration for a Mac with two USB Joysticks

The following section shows how to set up Power64 when using two USB Joysticks. If you have just one USB joystick, please refer to the previous section.

After you click on the "Joysticks..." item in the "Options" menu, the "Joystick Options" dialog appears. Set the USB Joystick selector to 'A' for Port #1 and to 'B' for Port #2.

Power64 Joystick Options Dialog for two USB Joysticks

Now click on "Configure USB Joysticks". The contents of the dialog that you will see depends on the type of joystick (number of axis and buttons) you have. Use the Device popup-menu at the top of the dialog, to pick your first USB joystick. Configure all input elements of this joystick to suitable actions for Joystick A (green icons). While you are doing this, you can verify that Power64 recognises your joystick. Try pressing a button and watch as the corresponding icon becomes highlighted.

Power64 USB Joystick Config - Port A

Now use the Device popup-menu to pick your second USB joystick. Configure all input elements of this joystick to suitable actions for Joystick B (red icons).

Power64 USB Joystick Config - Port B

Click Ok twice to close both levels of the dialog, and you should be all set. Use the Joystick Demo (see chapter 7.3 Joystick Demo) to check that Power64 recognises your joystick. Remember that some games expect their joystick in port 1 while others expect it in port 2. Usually the only way to find out is trial-and-error. If a game does not recognize your joystick, or does strange things (e.g. reset itself or enter pause mode) just flip the joystick ports by pressing Cmd-J.

5.6 Mouse, Paddles & Light Pen

Power64 can use the mouse to emulate a Commodore 1351 mouse. The C1351 is a two button mouse. The left button is simulated using by the Mac mouse button, the right button can be accessed by holding down Shift while clicking.
A C64 program supporting mouse input will usually use a sprite to represent the mouse pointer. Power64 can attempt to automatically detect when a C64 program accesses the mouse and which of the (8 possible) sprites is used to represent the mouse cursor. Power64 will then attempt to link to C64 mouse cursor to the Mac mouse cursor so that they always move in unison. This helps prevent 'unexpected' results that can occur when the two mouse cursors move independently and a single click is evaluated once by the C64 and once by the Mac. If Power64's logic fails to discover which sprite is used as mouse cursor (e.g. because there are lots of sprites active on the screen, moving around independently) the correct sprite index can quickly be discovered (using human intelligence and pattern recognition) with the Power64 Monitor/Debugger: Use the command v vic to see which sprites are active and what their base addresses are and then use y BaseAddr to determine which one is the mouse cursor. When you enter that sprite in the mouse option dialog, Power64 will attempt to keep the Mac mouse and this sprite together. Since the both mouse pointers are now always at the same position clicking the mouse button will evoke a single result from the C64, and not one result from the C64 and an additional (generally unintended) from the Mac (for the same mouseclick!).
Power64 offers two ways to emulate a mouse. It can either emulate a real, analog C1531 mouse. This is most convenient to use, since it fully takes into account the current speed of the mouse movement, making it easy to cover wide distances quickly while still retaining the ability for slow high-precision movement. Unfortunatly this requires that the C1531 mouse is supported by the C64 program in question, a feature that is unfortunatly offered only by a few programs.
On the other hand almost all C64 games support joysticks. Power64 can use the Mac mouse to emulate a C64 joystick (in either port 1 or port 2) based on the either the absolute position of the Mac mousepointer on the C64 window (i.e. if the mouse pointer is in the upper area of the screen the joystick is pushed up) or such that a C64 specific sprite is made to follow the mouse pointer. This feature is particulary useful for adventure games such as ZakMcKracken where you have to point and click on items to form sentences. Note that even so you are using a mouse to enter your moves it is still a joystick that is emulated. Thus there is only one fixed speed at which the cursor can move and you will often experience a significant gap between the Mac mouse cursor and the C64 cursor sprite lagging behind (at its maximum speed). This is a general problem of joysticks being used to control cursors and cannot be fixed by Power64. Please also note that this feature is designed for 'slow' adventure type or strategy games. It will not work well for high speed action games.

Usually Power64 displays the Mac mouse cursor by crosshairs (rather than the usual arrow) when a C64 mouse is active. If the thin crosshairs produce still too much distraction it is possible to reduce the visibility of the Mac mouse even more by selecting Hide Mac Mouse when C64 mouse is active.

In the rare cases when Power64 is unable to keep the two pointers together (e.g. because the C64 program uses raster interrupts to recycle the mouse pointer sprite for different purposes at other screen locations) it helps to choose Black Frame in the Video Options. That way the stray clicks of the Mac mouse do at least not cause any unexpected actions in the MacOS or other Mac applications.
The mouse movement is transmitted using analog values and the paddle connectors. Therefore it is impossible to use both the mouse and paddles at the same time.
Power64 offers optimized mouse support for GEOS. Read chapter 8 for more details.

Every mouse cursor has a 'hot spot' that indicates the tiny spot that is really 'meant' by the cursor e.g. the tip of an arrow, or the intersection point of crosshairs. Power64 can usually detect this point of a C64 mouse sprite and align it to the Mac's mouse hot spot, but sometimes it is necessary to manually determine the correct location.

Some programs internally double the mouse speed in X and/or Y direction. Moving the mouse by one mickey (the smallest unit of mouse movement) moves the mouse cursor by two pixels. To achieve synchronisation between the C64 and the Mac mouse even for these programs, Power64 can scale the mouse movement too.

As stated above the C1531 mouse has two buttons, while the Mac mouse has just one. For most GUIs the left mouse button is the primary button while the right button invokes secondary features. Therefore Power64 translates (simple) clicks with the Mac mouse button to left-clicks of the C64 mouse, and requires the user to hold down the shift-key while clicking (tricky) to emulate a right-click of the C64 mouse. If your Mac mouse has two (or more) buttons, the second button of the Mac mouse will be directly used to emulate the second button of the C64 mouse. Some C64 programs use inverse logic and assign the primary functions to the right button while the left button provides only rarely used features. To make the handling of such programs easier Power64 can exchange the two buttons and translate plain Mac click to C64 right-clicks and shift-click to left-clicks.

Alternately Power64 can use the mouse to simulate a pair of paddles. Each paddle can be controlled by the horizontal or vertical position of the mouse on the Macintosh screen.

Note that the original C64 supports two pairs of paddles, one in each game port. In Power64 the paddles are always connected to both ports. Unless a game was designed to use two pairs of paddles at the same time this should not cause any problems.

Power64 can also use also use the mouse to simulate a lightpen. As there are few C64 applications that support a lightpen this feature is not activated by default. Use Options/Mouse, Paddles&Light pen to enable the lightpen.

Note that it is not possible to select an area of the virtual screen for copying (Edit/Cut or Edit/Copy) while the Mac mouse is used to simulate a C64 mouse, paddles or a lightpen.

5.7 Floppy Disk

Power64 can simulate up to four Commodore 1541 single sided floppy disk drives on each simulated Commodore 64. You can use common *.D64 and the technically superior, but rarely used *.X64 file format as well as ZipCoded files (see Andix E.3, E.4 and E.5 for details on the file formats). In addition to that Power64 can use *.G41 disk images for high precision emulation of a 1541 disk drive. Power64 can read all these disk image files, even if they are compressed using ZIP, GZ or LHA. There is no need to expand the archives before reading the disk. This saves Macintosh hard disk space and makes CD-ROMs with ZIP-coded *.D64 files very convenient to use. Please note that Power64 can only write non-compressed or GZ-compressed files but not ZIP/LHA archives. Therefore all disk images that were loaded from a compressed ZIP/LHA file are write protected. Use Devices/Disk Drive #x/Change Disk Image Type to create a writable, uncompressed copy. Alternately you can click on the lock icon in the directory window to make the disk writable. Power64 will ask for a new filename when the disk is unmounted.

The original C1541 is a very intelligent device, that features its own MOS 6502 CPU, 16KByte of ROM, 2KByte RAM and some I/O circuitry to control the floppy drive hardware. Most of the time the M6502 just sits idle and waits for a new command. When such a command comes some ROM code is executed and the M6502 sits idle again. It is rather inefficient to spend lots of Macintosh CPU time to fully simulate the M6502 on the other hand it is necessary for best compatibility.
Therefore Power64 offers two modes of Floppy emulation: A ROM level emulation that is fast, but does not support some special tricks and a CPU level emulation that is extremely compatible, but this compatibility does of course include the original 1541 speed. To switch between these two modes of emulation use Devices/Disk Drive #x/Complete Floppy 1541 Emulation (Cmd-E).
To reduce the Macintosh CPU load, CPU level emulation is only available for the first two of the possible four drives (devices #8 and #9).

Using the ROM level disk emulation Power64 replaces the ROM routines of a 1541 with PowerPC code that display the same behavior, but can be executed much faster. The supported ROM routines include both LOAD and SAVE for programs and access to sequential, relative and random access files. Power64 also supports all the common floppy commands, such as NEW, COPY, RENAME, SCRATCH, VALIDATE, INITIALIZE, POSITION, MEMORY-READ/WRITE, BLOCK-READ/WRITE, BUFFER-POINTER, BLOCK-ALLOCATE/FREE, U1, U2, UI and UJ. Only the commands MEMORY/BLOCK-EXECUTE are not supported, as these would require a the true emulation of the M6502. Of course there is also a channel for error messages.

The original Commodore 64 used a rather inefficient serial protocol to transfer data to and from the disk drive, and thus achieved a transfer rate of about 256 Byte/sec. In ROM level emulation mode Power64 does not emulate this protocol, but rather simulates the transfer at a byte level. Thus it achieves a speed of 250 KByte/sec making it possible to load a game without having to go for a coffee break. The drawback of this approach is that all programs that implement their own fast-loader routines will fail. Often they will not fail at once, but correctly load their first file, display some intro screen and only after that, when they attempt to load their other parts from disk, will they crash.
Most games will work using the ROM level disk emulation. Only if a game crashes in this mode or the error message 'COMMAND NOT EMULATED' appears in that disks directory window should you switch to Complete 1541 Floppy Emulation.

Using CPU level floppy emulation Power64 completely simulates the floppy disk drive. This makes it possible to run custom programs (such as fast loaders, copy protection or any program that wishes to use the extra CPU for parallel processing) on the floppys M6502 CPU or transmit data to the C64 using a custom protocol. While this gives a significant boost to compatibility, it unfortunately also faithfully emulates the extended coffee breaks necessary for loading any larger program.

In addition to the 1541 floppy disk drive Power64 can also emulate a 1571 or 1581 disk drive using *.D71 and *.D81 disk imges. (see Andix E.7 and E.8 for details on the file format). This drives only became available after the C64 had already passed the top of its commercial success, and have, despite their large storage capacities never reached the same level of popularity as the 1541. Therefore they were also not exploited for copy protection and/or fastloaders at the same level of detail that was used on the 1541. If a program supports the 1571/1581 it generally uses the original C64 ROM routines to access the disk. Therefore Power64 supports only fast floppy emulation for the 1571 and 1581. Complete Floppy Emulation is only available (or necessary) for the 1541.

Beware: If you use the same disk simultaneously on several simulated Commodore 64, then each C64 will use its private copy of the disk. If you write a new file with one C64 it will not appear on the other C64. When both C64 write to the their copy of the disk, then the changes of that C64 whose window was closed first will be lost when the second C64 unmounts its disk. There is no concurrency control!
Pressing the Option-key while unmounting a disk causes Power64 to discard all changes made to the disk.

It is not yet possible to connect the Macintosh to a real 1541 disk drive. I would like to encourage dedicated Mac programmers and hardware freaks to try their skill on this problem.

Power64 offers powerful tools for the manipulation of files on a D64 image. Please read section 4.3 File Management for details.

5.8 Hard Disk

In addition to the regular C1541 floppy disk drive Power64 can use a folder of the Macintosh hard disk as a virtual disk drive for the C64. You can use both common file formats *.P00 and *.C64 (see Andix E.1 and E.2 for details on the file format).
Power64 can also read files *.P00 and *.C64 files that where compressed using ZIP or GZ.
The hard disk is designed to mimic a C1541 floppy disk drive. You can LOAD and SAVE programs and view the directory. Yet it is obvious that a hard disk is technically quite different from a 1541. Therefore all tricks, that rely on details of the 1541 construction, such as block level access are not possible with a simulated hard disk. Even so it would technically be feasible the author has chosen not to implement any commands to copy, rename or delete files as this can easily be done using the Macintosh Finder and protects the Mac hard disk against wild C64 programs.

Power64 offers powerful tools for the manipulation of C64-files. Please read section 4.3 File Management for details.

5.9 C64 Programs in a ZIP Archive

Storing lots of C64 programs in a Mac folder can easily lead to clutter. Lots of small files also eat a lot of space one the hard disk (especially on HFS-formatted disks and CD-ROMs). Therefore it is sometimes advisable to collect all these files in a ZIP Archive to gain a clearer perspective and save space. Power64 can read files from a ZIP archive just like from a folder of a Mac hard disk. Write access to a ZIP archive is not available in Power64.
If you plan to create your own ZIP archives please take care that your ZIP program (e.g. ZipIt) does not attempt to wrap your C64 programs in MacBinary (or AppleSingle, AppleDouble, HQX etc.) or trys to 'fix' the 'linefeeds' of the binary (not text!!) C64 program (thereby definitely breaking it for good). If you use ZipIt make sure that both the MB (MacBinary) and the LF (LineFeed) option are turned off.

5.10 Tape & Lynx Files in a Tape Drive

Power64 supports Tape Image Files in the common *.T64 and Lynx file format (see Andix E.8/E.9 for details of the file formats). While the original Datasette tape drive used with the Commodore 64 was extremely slow (about 50 Byte/sec), the tape emulation is the fastest way to get a file into the emulated Commodore 64 (about 30 MByte/sec once the tape is mounted).
Power64 can read tape image files, even if they are compressed using ZIP, GZ or LHA. There is no need to expand the archives before reading the tape. Please note that Power64 can only write non-compressed and GZ-compressed files, but not ZIP/LHA archives. Therefore all tape images that were loaded from a ZIP/LHA compressed file are write protected. Use Devices/Tape Drive/Change Tape Image Type to create a writable copy. Alternately you can click on the lock icon to make the tape image writable. Power64 will ask for a new filename when the tape is ejected.

The tape emulation of Power64 supports both LOAD and SAVE for programs as well as readings and writing sequential data files. New files are added at the end of the tape. If a file of that name already existed, the old file is only overwritten if duplicate filenames on tapes are not permitted in the Options/Device Option dialog. Otherwise two files with the same name coexist (just like on a real tape)

On an original Commodore 64 you need to press Play/Record to read/write data from/to a tape. This is done automatically by Power64 as soon as a tape is mounted.

There is also no need to rewind a tape. Whenever the end of tape has been reached Power64 will automatically rewind to the beginning.

If you are no longer sure what files are stored on a tape, you can use LOAD"$",1 to load the directory of the tape. This is a special feature of Power64 that is not found on a real Commodore 64. Power64 implements the directory as a special file that it dynamically creates at the end of the tape image. Thus when the emulated Commodore 64 searches for the file "$" it will first find all other files stored on the tape and print their names in order to inform you of the progress of the search. Thus you will in fact see the directory twice; once as the Commodore 64 reports the progress of its search, and once when you list the loaded file.

When the *.T64 file format was new, there was no documentation about its internal workings. This lead many programmers to guess what the file format might look like, and write their own converter tools. Unfortunately many of them made some errors which leads to the fact that many *.T64 files in circulation have an erroneous format. When Power64 detects such a file it will automatically fix the problem and display a dialog box informing you of the problem.

On a regular Commodore 64 the key combination Shift/Run could be used to simulate the key sequence "LOAD <Enter> RUN <Enter>" and load the first file on a tape. This will not always work in Power64. Power64 permits you to select a default device for LOAD and SAVE other than device 1 (the tape) (see 5.13 Disk & Tape Options for details). If the default device is set to a floppy disk (or hard disk), then typing LOAD will attempt to load from there, which in turn will report a missing filename error. To load the first file from a tape you will then need to type LOAD"",1.

As mentioned above, the tape drive was extremely slow on the real C64. Therefore, there were many programs that used their private tape access code to accelerate loading from tape. As the simulation of the tape in Power64 is based on the system-ROM functions for tape access, these programs are likely to crash on Power64.

Beware: If you use the same tape simultaneously on several simulated Commodore 64, then each C64 will use its private copy of the tape. If you write a new file with one C64 it will not appear on the other C64. When both C64 write to the their copy of the tape, then the changes of that C64 whose window was closed first will be lost when the second C64 unmounts its tape. There is no concurrency control!
Pressing the Option-key while unmounting a tape causes Power64 to discard all changes made to the tape.

It is not yet possible to connect the Macintosh to a real tape drive (e.g. via the audio input). I would like to encourage dedicated Mac programmers to try their skill on this problem.

Power64 offers powerful tools for the manipulation of files on a T64 image. Please read section 4.3 File Management for details.

5.11 Tape & Lynx Files in a Disk Drive

Power64 also offers the possibility to use *.T64 or Lynx files in a disk drive. While this might seem queer at a first glance, many games that can be found in a Lynx file expect to be loaded from disk. As there is no harm in mounting a tape image on a disk drive it is even Power64's default mode of using tape images.

The tape disk is designed to mimic a C1541 floppy disk drive. You can LOAD and SAVE programs and view the directory. Even some of the basic 1541 Commands such as NEW, VALIDATE, SCRATCH, COPY or RENAME are available when for T64 or Lynx files are mounted on a disk drive, making it a good platform for maintenance work. Yet it is obvious that a tape disk is quite different from a 1541, and therefore all tricks, that rely on details of the 1541 construction, such as block level access are not possible with a simulated tape disk.

5.12 TAP Tape files in a Tape Drive

In addition too T64 and Lynx tape images Power64 also supports raw tape images using the T64 file format (see Andix E.10). Using TAP files, many fine details of the tape drive can be emulated, including the various kinds of turbo-tape algorithms. Power64 can read tape image files, even if they are compressed using ZIP, GZ or LHA. There is no need to expand the archives before reading the tape.

Technically there is no fixed internal structure to a TAP image file, but Power64 uses some smart heuristics to detect those chunks of data that were written using the original C64 ROM routines, and to distinguish data areas and empty places on the rest of the tape. Those areas, that Power64 can interpret can be loaded instantly like from T64 images. Data stored in a propriatary format has to be interpreted by a suitable C64 program. This is in general faster than loading data stored in original C64 format (about 110 byte/seconds peak, due to extensive error correction about 50 byte/second average), but will hardly exceed 200-500 bytes/second (depending on the algorithm used). Loading a game will therefore usually take several minutes. Use Power64's Turbo-Boost feature to accelerate the C64 while loading (Options/Turbo-Boost - Cmd-B).

TAP images are completely write protected. This write protection can not be removed by Power64. In addition to that it is not possible to use drag & drop to copy files from a TAP image to a different drive (or vice versa).

On a real tape drive it is necessary to press the Play key before data can be read. Power64 will automatically do that as necessary. In addition to that it is possible to manually fast forward or rewind the tape using buttons in the bottom row of the directory window. Clicking on an entry in the directory will wind the tape to a position two seconds before that entry, so that the read head of the tape drive will be at the correct position for reading after the tape-motor has brought the tape to full tape-access speed (skipping some tape in the process of accelerating).

5.13 Disk & Tape Options

Default Device for Load and Save:
On an original C64 the default mass storage device is the cassette tape drive (device #1). On the other hand, most games for emulators come in D64 disk format. Thus it can be advantageous, to choose a different device (e.g. the primary disk drive - device #8) as the default device. This eliminates the need to type the device number after every LOAD or SAVE statement.
Generally it is best to use the setting 1-8-9. With this setting Power64 will first check the tape drive (device #1) for an inserted tape. If it finds one, Power64 will attempt to load from/save to the tape. Otherwise it will check the primary disk drive (device #8) and the secondary disk drive (device #9) for inserted disks. Since the tape and disk drive are rarely used at the same time, Power64 will generally find the correct device automatically. The setting 8-9-1 is the same as 1-8-9 with the exception that the disk drives are checked first and the tape drive second.

Show Warning for Full Floppy 1541 Emulation:
C64 Software that requires complete Floppy 1541 Emulation will generally crash without a useable error message when it is run in Power64 with fast floppy emulation. To make it easier to spot the source of such trouble, Power64 can display a warning message when a C64 program attempts to use the 1541 in a way that is not supported by the fast 1541 emulation. It is then up to the user to either ignore this warning and continue loading with fast floppy emulation (hoping for the best) or the reset the C64 and restart the loading process with full floppy emulation enabled.

Intelligent Floppy 1541 Emulation:
Games that require a complete Floppy 1541 emulation usually do not use the floppy CPU all the time. Rather they load some data with their built in fastloaders and than the floppy sits idle again. Power64 can attempt to determine when the floppy is idle and suspend the emulation for such times. While the algorithm, that determines when the floppy is unused is indeed quite smart, it is still possible to fool it with the correct piece of software, so it might be necessary to turn if off for certain games.

Autom. Turbo Boost for Full 1541 Emulation:
Loading a game takes quite a while when Full 1541 Emulation is enabled (because a game uses a special fastloader or copy protection). Power64 offers a special Turbo Boost mode, that will cause the emulation to run as fast as the Mac CPU will take it (rather than limiting its speed to that of a original C64). If Autom. Turbo Boost for Full 1541 Emulation is enabled, Power64 will automatically enable Turbo Boost mode, whenever a game accesses an emulated 1541 floppy drive (speeding up loading times considerably) and disables it again when the game is done loading (making the game playable).
Warning: Some games use fancy disk access code that interweaves gameplay with disk access. The disk activity leads Power64 to the faulty assumption that Turbo Boost mode should be engaged (making the game unplayable). Disable Turbo Boost for Full 1541 Emulation for these games.

Mount Tape/Lynx Images on Disk Drives:
Power64 can mount T64 and Lynx files both on tape and disk drives. Logically (and for reasons of authenticity) these file types belong to the tape drive. On the other hand some Lynx (rarely T64) files will only work if they are mounted on a disk drive. Depending on this option Power64 will mount a tape image file either on the tape drive or a disk drive. This setting applies only when the file is loaded via Drag&Drop or Cmd-T. It is always possible to specify a different drive by mounting the tape image by selecting the Mount Tape command for the appropriate device.

All Files on a Tape are of Type 'PRG':
Unfortunately many T64 games that are available from the internet are damaged. Power64 attempts to fix the file as good as possible. In particular Power64 has to guess the type of all files on the tape image. Use this feature to override Power64's logic and cause all files to be 'PRG'. This is by far the most common file type and therefore a good guess. While a file must be of type 'PRG' to load it by double clicking in the directory it is still possible to load a file of a different type by manually typing the required load command.

Show a Warning for Damaged T64 files:
When Power64 mounts a damaged T64 file it can display a warning message to the user. Fortunately Power64 features a rather intelligent repair algorithm that manages to fix almost all problems, so you if you consider this alert a nuisance rather than useful information you might as well turn it off.

Permit Duplicate Filenames on Tapes:
On an original C64 tape there is no central directory structure. Data is simply stored at the current tape position and it is the users job to wind the tape to a location wisely so that no two files overlap. Thus there is no problem if two files bear the same name. Power64 can simulate this behaviour and simply add each newly saved C64 file to the end of T64 or Lynx file, or it can check if a file of the same name already exists, and if so delete the old file automatically.

Intelligent Datasette Emulation:
The data on a TAP image is usually (at least in part) stored in standard C64 tape format, that is read and written by the original C64 ROM routines, while others might be stored in a more efficient proprietary format. Power64 can read the data that was stored in standard format, and, after a LOAD command, place it in the C64s RAM immediately, rather than executing the slow C64 code to read the tape. This drastically improves performance without hampering compatibility and is therefore strongly recommended.

Write Enable all Disk/Tape Images:
When Power64 reads a disk/tape image, that can not be written back to the place that it was read from (e.g. from a CD-ROM, a write protected floppy or from a ZIP archive), Power64 will automatically write protect the disk/tape. This write protection can be removed by clicking on the lock icon in the drives directory window, or can be removed from the start by selecting 'Write Enable all Disk/Tape Images'. When such a modified disk/tape is removed its drive, Power64 will ask for a new filename to store it to.
It is also possible to write-protect/enable disk and tape images by clicking at the lock icon in the directory window.

Adjust Type/Creator to Power64:
Every file on the Macintosh has a Type and Creator. This information is used by the Finder to decide which application to launch when the user opens a document. If you mount a tape or disk image that has no Type/Creator information, Power64 can add it. This is useful when the you've downloaded lots of ZIP encoded files from the Internet that have no notion of Type/Creator and substitute useless information. On the other hand, it is not proper Mac style to mess with the Type/Creator codes. Therefore, Power64 can be configured to add the information, ask first, or not do it at all. Power64 distinguishes between files that have been configured for Frodo (another C64 emulator available also for the Mac) and files that have not been configured for any known emulator.

Use Type/Creator for File Type Classification:
To determine the type of a file Power64 always attempts to look into the file first. If it can not detect a known header (some file formats unfortunatly do not provide an identifyable header), it can base its judgement either on the file name and the extensions or on the MacOS Type/Creator information. Using Type/Creator is good practice for MacOS and therefore recommended, but some sources (e.g. DOS CD-ROMs) do not provide Type/Creator information and looking at the filename is necessary (but not good style on the MacOS, that generally permits the user 100% freedom in the choice of a filename).

Drive Status LEDs:
To keep an eye on the floppy disk (and hard disk) activity of a C64 select Devices/Drive Status LEDs (Cmd-L; Use Opt-Cmd-L to display the LEDs in all C64 windows). This will cause Power64 to display two symbols per enabled disk drive in the bottom left corner. The first symbols stands for the floppy LED. If it is off (gray) the floppy drive is idle. A green LED indicates a read access, a red LED a write access and a yellow LED stands of an open file without read or write activity. The second symbol indicates the floppy error status; a green check means Ok, a red cross indicates an error.

5.14 Directory Options

Automatically Open Directory when...:
When a device is connected to Power64 it can automatically open a window to display the directory of the device. By double-clicking on a program it can automatically be loaded and/or run. See the next paragraph for details.
Note: Even when these options are not selected they can be enforced by holding down the Option-Key when attaching the device.

Double-Click on Directory executes:
Power64 can automatically load and run a game when the user clicks on the program file in the directory window. Choose if you want to load or load and run the game. Pressing the Option Key while double-clicking on a filename will always produce Load"File",8 no matter what option has been selected. Note: Power64 simulates the keypresses for the necessary commands. This will produce the desired effect if the emulated C64 waits for key input at the BASIC prompt. If a different program is already running when the user clicks on the filename, this program will receive and process the keyboard, possibly causing interesting effects.

Mount hard disk on every New C64:
Power64 can mount a standard hard disk on device #8 and/or #9 whenever it created a new C64 emulator window. This is makes it especially convenient to load a game from a collection of CBM/P00 games. It also gives every C64 application a drive to write data to. If a hard disk is mounted on a new C64 Power64 can also automatically display the directory. This is independent from the Automatically Open Directory when… described above.

5.15 Printer

Power64 supports up to two virtual printers per emulated C64. The data written to each C64 printer is not printed on the Macintosh printer, but redirected to a Macintosh file. From there it can easily be read into any Macintosh program for postprocessing, reading and possibly printing.

Power64 supports three printer modes:
In Text Only mode Power64 translates all printed characters from the CBM character set to the Macintosh character set. If no translation exists, the corresponding character is simply dropped. In Text with Hex-Graphics mode Power64 substitutes those characters that represent graphic bitmaps by their hexadecimal number. In Binary mode, no translation takes place at all. A byte from the C64 is directly stored in the file.

The printer files are called 'C64 Printer - dd.mm.yyyy (x)' where dd.mm.yyyy is the current date and x is a counter. Click on Select Print-File Folder to choose the folder in which these files are to be stored.

To get better performance Power64 maintains internal buffers for the printer output. These buffers are flushed when the emulator window is closed. If you want to use the printer files without having to close the emulator window, use Devices/Reset Printer #x to flush these buffers at any time. Any new data sent to that printer will then be written to a new file.

5.16 System ROM Patches

Some features built into the system ROMs of the original Commodore 64 are not useful with an emulator or may not be to some peoples liking. Using the ROM Patches dialog (via the menu item Options/ROM Patches) you can adjust the following features:

Kernal ROM:
Over the years Commodore made minor changes to the C64 Kernal ROMs. There were three releases: Rev. A was built into the very early C64s. Rev. B was used in 1982/83. Rev. C was the final version. The only difference you might ever notice is the way the color RAM is erased when clearing the screen; Rev. A does no clear it at all, Rev. B set all characters to the background color and Rev. C sets everything to the cursor color.

Fast Reset (Skip RAM Test):
A real Commodore 64 executes thorough RAM test on power up and at every reset. This is used to find hardware RAM errors, and to determine to the amount of RAM available for BASIC. Unfortunately this test takes about 3 seconds. On an emulated Commodore 64 there is no need to check the RAM for errors as the Macintosh has already done so at its power up, and the amount of BASIC RAM is known a-priori, thus the RAM test can be skipped without any harm, saving the 3 seconds.

Honor Cartridge-ID on Reset:
The Commodore 64 ROM can be expanded by the use of ROM cartridges. This was used for games, as well as tools like Simon's BASIC. The cartridge ROM is mapped into the memory area $8000-$9FFF (8 KByte cartridge) or $8000-$BFFF (16 KByte).
During the reset routine the Commodore 64 checks for the magic string "CBM80" at the address $8004-$8008. If the magic string is present the Commodore 64 concludes that there is a cartridge present, (even so it might as well be the RAM that happens to contain these values) and performs a jump to ($8000). Thus the code in the cartridge always gets the chance to start its game or run whatever initialization the tool requires. On the other hand this feature can be used to write programs that can not be terminated even by reset.
When the Honor Cartridge-ID on Reset box is check the emulator will check for the magic string just like on a real Commodore 64. If the box is not checked, the magic string will never be found (even if it is present in memory). Note that some games require that the string be found, thus it is not recommended to turn this feature off. To force a Hard-Reset it is possible to override the Honor Cartridge-ID on Reset using the Option-Key. If this key is pressed while the reset routine is executed the Cartridge ID will never be honored.

Honor Cartridge-ID on NMI (Non Maskable Interrupts):
The same magic string that enables the code in a cartridge to take over during reset (see above) also permits the cartridge to control the effect of NMIs. Thus the Restore key can be used for special purposes by the cartridge.
When the Honor Cartridge-ID on NMI box is check the emulator will check for the magic string just like on a real Commodore 64. If the box is not checked, the magic string will never be found (even if it is present in memory). Note that some games require that the string be found, thus it is not recommended to turn this feature off.

Enable Emulator Detection:
Wolfgang Lorenz developed a method that makes it possible for C64 software to determine whether it is running on a real Commodore 64 or an emulator. On a conforming emulator the value of $DFFF is either $55 or $AA and is toggled between these two values at every read access. For more details on this topic see the program 'Where Am I' listed in Appendix F. Checking the Emulator Detection box will make Power64 conform to the emulator detection standard.

Font ROM:
The C64 character set, as shipped in the C64 font ROM contains two 'bugs'; graphic characters (#101 ($65) and #103 ($67)), that are defined differently in the ROM that in the C64 documentation. Power64 can either use the original C64 fonts (offering maximal compatibility) or fix the font ROM (for accuracy to the paper specs).
Either way, the C64 features a character set of rather bold characters. If you prefer a lighter character set, you can also select the VC20 fonts. Note that not only the characters, but also the graphic symbols are slimmer. This can cause some games, that employ character graphics, to look queer.

Default Colors: (Text / Background / Frame)
On a real Commodore 64 text is usually displayed in light blue on a dark blue screen surrounded by a light blue frame. Some people might disapprove of these colors, so there is a possibility to select a different set of default colors. Note that the Text and Background color must be different to produce a readable image.

GEOS Support:
Power64 offers special support for GEOS, the Graphic Environment Operating System from GeoWorks. Floppy access is accelerated and there is a seamless interaction of C64 and Mac mouse. For more details please read chapter 8.

5.17 Cheat Options

Many games use sprites to render friends, foes and shots and the screen and rely on the the VideoICs ability to detect collisions between two sprites or a sprite with the background image in hardware. When such a collision is detected the game takes appropriate action, e.g. when a collision of the 'hero'-sprite and the 'laserbeam'-sprite is detected the hero faces an untimely demise.
Power64 offers the ability to disable this sprite collision detection at a fine grain level. Sprite/Sprite and Sprite/Background collision detection can be turned on/off for each sprite separately. Thus it is possible to detect collisions of the hero with a bonus point, while at the same time eliminating collisions of the hero with a foe.
Please note that this does not work with all games. Some game programmers did not rely on the VideoIC's hardware collision detection, and prefered to do their own collision detection in software. Spotting (and disabling) this software collision detection code is very tricky and can only be done by an skilled human with lots of experience. Power64 (and its poor artifical intelligence) is unable to perform such a feat.


Home First Prev Contents Next Last Top of Page

Source: http://www.infinite-loop.at/Power64/Documentation/Power64-ReadMe/05-Commodore_C64.html
Power64 Homepage: http://www.infinite-loop.at and http://www.salto.at - EMail:
© Roland Lieger, Goethegasse 39, A-2340 Mödling, Austria - Europe
Last Changed: Feb. 29, 2008
Valid HTML 4.01!