Next: Peripheral settings, Previous: Sound settings, Up: Settings and resources [Contents][Index]

### 6.10 Drive settings

These settings are used to control the hardware-level emulation of the Disk drives. When hardware-level emulation is turned on, only drives 8 and 9 are being emulated.

The following settings affect both drives:

- “Enable true drive emulation” enables the (slow) hardware-level emulation of the drives for maximum compatibility. This must be turned on for any of the following settings to have effect.
- “Drive sync factor” specifies the speed of the drive’s CPU. This can be used to help loading certain programs that have trouble with the default PAL setting (for example, programs designed for NTSC machines). The ratio is calculated as follows:

      sync_factor = 65536 * clk_drive / clk_machine

  where `clk_drive` and `clk_machine` are clock speeds in MHz. The menu lets you choose between the PAL and NTSC values, and also lets you specify whatever value you want. Be careful when changing it, though, because a wrong value can break things and even corrupt disk images.

The following settings, instead, are specific of each drive:

- “Drive model” specifies the model of the drive being emulated. Warning: This will reset the drive.
- “Enable parallel cable” enables emulation of a SpeedDOS parallel cable; if you switch this option on and replace the original Commodore ROMs with SpeedDOS-compatible ones, you can speed up loading/saving times.
- “Idle method” specifies which method the drive emulation should use to save CPU cycles in the host CPU. There are three methods:
  - Skip cycles: Each time the serial line is accessed by the C64, the drive executes all the cycles since the last time it ran. If the number of elapsed cycles is larger than a certain value, the drive discards part of them.
  - Trap idle: The disk drive is still emulated upon serial line accesses as with the previous option, but it is also always emulated at the end of each screen frame. If the drive gets into the DOS idle loop, only pending interrupts are emulated to save time.
  - No traps: Like “Trap idle”, but without any traps at all. So basically the drive works exactly as with the real thing, and nothing is done to reduce the power needs of the drive emulation.

  The first option (“Skip cycles”) is usually best for performance, as the drive is emulated as little as possible; on the other hand, you may notice sudden slowdowns (when the drive executes several cycles at once) and the LED status is never updated (because it would not be possible to do correctly so). Moreover, if the drive tries to get in sync with the computer in some weird way and the computer does not access the serial line for a long time, it is possible that some cycles are discarded and the sync is lost. Notice that this hack will have no effect on performance if a program continuously reads from the IEC port, as the drive will have to be fully emulated in any case (some stupid programs do this, even when they don’t actually need to use the drive).

  <P>

  The second option (“Trap idle”) is usually a bit slower, as at least interrupts are always emulated, but ensures the LED state is always updated correctly and always keeps the drive and the computer in sync. On the other hand, if a program installs a non-standard idle loop in the drive, the drive CPU has to be emulated even when not necessary and the global emulation speed is then much slower.

- “40-track image support” specifies how 40-track (“extended”) disk images should be supported. There are three possible ways:
  - “Never extend” never extends disk images at all (so if a program tries to write tracks beyond the 35th, it is not allowed to do so);
  - “Ask on extend” prompts the user as soon as a program tries to write tracks beyond the 35th, and the user can then choose whether he wants the disk image to be extended or not;
  - “Extend on access” simply extends the disk image as soon the program needs it, without prompting the user.

Next: Peripheral settings, Previous: Sound settings, Up: Settings and resources [Contents][Index]