Delay/Latency Test (Audio/Video) for: Android, C64, MacOS

As the discussion with the new The C64 Mini regarding the joystick delay got bigger and bigger, I wanted to know more about it. On YouTube you could watch some delay tests, which were made with the help of video recordings. What I wanted, however, was automatic electronics that showed me the time in milliseconds. For video and audio separately.

And here is my solution, an universal “Delay Test” for Android, C64 and MacOS with an Arduino Leonardo board:

(In this picture you can see an  ODroid C2 hardware based C64 Emulator)


(this is an old C64-II, connected to a FBAS LCD Screen)


(and here is “The C64 Mini” triggered over the original USB Joystick Board)


With this Delay-Test Board you can measure Audio and Video delays for each of your Systems (Android, C64 and MacOS). The Arduino Sketch file (.hex) and the Delay-Test Apps for Android (apk), C64 (.prg) and MacOS (.app) you can download down below as a “Delay Test Package”.

A delay of 100-150 ms is absolutely ok. I have no problems with Pitfall II or Blue Max and it feels like realtime. Without a few optimizations on the emulator, I had a delay of 250-300 ms, which is then not so great.

The C64 Mini has a Video Delay of ~110 ms, which is perfect. But the Audio delay is a little bit bigger: ~280 ms. So Audio is a little bit late. Maybe the manufacturer can lower the Audio Buffer.


How it works:

The principle is actually quite simple. Via an Arduino pin or the USB interface, a trigger signal (Digital Output High/Low A2 Pin, USB Joystick, USB Keyboard, USB Mouse or USB Midi) is sent from the Arduino board to the system, which activates the delay test app and outputs a tone, as well as changing the background color from black to white. These signals are then transmitted to the Arduino Board via the audio cable and the light sensor and the time that has elapsed between the transmitted trigger signal and the incoming audio and light signal is measured.

Hint: For an USB Midi Delay Test you do not need a delay test app on the target system. For this purpose, a midi sequencer is sufficient, which emits a sound on incoming midi signals, which is then measured by the Arduino board.

Android: Some Android devices produce an audio level of 20-60 even if they do not output an audio signal, then you need a “Golvery Ground Loop Noise Isolator” which you have to switch between to reach an output level of 0.


What you need:

  • 1 x Arduino Leonardo
  • 1 x TSL 2561 (Light Sensor)
  • 1 x OLED 1306 Display 128×64 (I2C)
  • 2 x Buttons
  • 1 x Audio Stereo Jack


What you have to do:

  • Download the Software-Package (down below)
  • Transfer the Arduino Hex file into the Arduino Leonardo
  • Connect the OLED with the Arduino Pins: SCA, SCL, 3,3V, GND
  • Connect the TSL 2561 Sensor with the Arduino Pins: SCA, SCL, 3,3V, GND
  • Connect the Audio Jack Pins with the Arduino Pins (A0, GND)
  • Connect the 2 Buttons with the Arduino Pins (D11, GND, D12, GND)
  • Install one of the Delay-Test apps on the target system
  • Connect the Arduino USB, Audio-Jack and Light Sensor with target system


Power up the Arduino Board, ready to measure





The Arduino-Sketch you can download here: