samkusin/clemens_iigs

Fast Disk Emulation

Closed this issue · 0 comments

When the app is reading or writing from any disk on the IWM, turn on 'fast emulation'. Apple IIx has notoriously slow disk access due to the nature of the hardware. This is especially evident when starting ProDOS 16 or GS/OS. Most emulators support a form of fast disk emulation.

'Fast Emulation' means executing as many instructions on the emulated machine as possible within a certain frame delta. Right now the emulator roughly caps instruction execution time to match the desired machine speed (1.023 or 2.8 Mhz). Fast emulation will instead run the machine at the fastest possible Mhz.

Details

NOTE: The below bullet points are a first pass at designing a fast disk emulation mode. They are subject to change based on experimentation/debugging.

To enable fast emulation the all following conditions must be met:

  • The IWM must be on
  • Interrupts must be disabled
  • There must be a disk in the currently enabled drive
  • Any of the disk stepper/control or read/write registers are accessed

Fast emulation will remain enabled until any of the conditions are met:

  • The IWM turns off
  • None of the IWM read or write registers have been accessed within 1/30th of a second (this will need some experimentation.)
  • Reset, or power cycle/off
  • Interrupts are enabled
  • Access to the A2 speaker (and possible while Ensoniq playback is on.)