User Tools

Site Tools


benchmarks
Translations of this page:


BENCHMARKS ON RETROCOMPUTING

The purpose of this article is to show, with respect to the supported platforms by MIDRES library, what is the average data transfer speed when reading a file sequentially from a random access storage (disk drive) using the standard C library1). The platform is then tested using models among those provided by the emulator, with the same process and the same dimensions.

PREMISE

This essay was born due to the need to expand the memory accessible to the software to reproduce isomorphic videoclip (IAV), so that it could be seen and exploited both from a real hardware machine and from an emulator.

The current version of the software already runs on all platforms and it uses (if available) a memory expansion. Currently, the only one available and documented is the REU for the Commodore 64/128. This provides an additional RAM memory with paged access and (on emulators) it is possible to “preload” a memory image from outside the emulator, which will then be accessible by any program (BASIC, C or ASM) that will go into execution later.

Having done a search on various Facebook groups for memory expansion models of the Commodore 264 line, I reluctantly discovered that this concept is not very common on Commodore (and other) 8-bit computers. Which is why I decided to check if accessing a disk device was fast enough to be seen as a memory “expansion”.

METHODOLOGY

First of all, a simple empty data file was produced, of sufficient size to be able to read blocks in sequence. To produce this file it was sufficient to use the utility dd of the Linux operating system, executed with these options:

 dd if=/dev/zero bs=1024 count=25 of=zdata.dat

The options are:

  1. if=/dev/zero : filename of the data source file to be produced (/dev/zero is a special file that generates an unlimited series of “zero”);
  2. bs=1024 : size of the block to generate (1024 bytes);
  3. count=25 : number of blocks to generate (25);
  4. ofs=zdata.dat : name of the destination file of the produced data.

With this command a 25 KB file was generated.

Then, I wrote a short program in C which takes care of making three (3) sequential readings of this file, each time using a doubled block size (compared to the previous one).

In particular, the following dimensions were used:

  1. 256 bytes
  2. 512 bytes
  3. 1024 bytes
  4. 2048 bytes

Time is measured using the internal clock called jiffy clock. This timer is incremented at a specific frequency by the system and, by counting the number of increments, the elapsed time can be measured with some approximation.

Since the number of “ticks” of the jiffy clock is a multiple of the screen refresh rate, it is possible that the time measures may not be “whole”. That is, the duration of 1 second could be approximated to, for example, 960 milliseconds or 1025 milliseconds.

To overcome this approximation, a reference measurement was performed for 1 second using the mr_wait command, to guarantee the initial calibration: this involved the extraction of a specific multiplication factor, which then was applied to all the results.

Finally, the MIDRES library's makefile has been adapted to generate a disk image for each platform that has a device of this type, and for each type of device that the emulator allows to simulate.

HARDWARE COMBINATIONS' TESTED

Below is a list of all the combinations generated:

  1. Commodore 64 (c64);
    1. Disk Drive C=1541 (*.d64); disk image
    2. Disk Drive C=1571 (*.d71); disk image
    3. Disk Drive C=1581 (*.d81); disk image
  2. Commodore 128 (c128);
    1. Disk Drive C=1541 (*.d64); disk image
    2. Disk Drive C=1571 (*.d71); disk image
    3. Disk Drive C=1581 (*.d81); disk image
  3. Commodore 16 (c16);
    1. Disk Drive C=1541 (*.d64); disk image
    2. Disk Drive C=1571 (*.d71); disk image
    3. Disk Drive C=1581 (*.d81); disk image
  4. Commodore PLUS/4 (plus4);
    1. Disk Drive C=1541 (*.d64); disk image
    2. Disk Drive C=1571 (*.d71); disk image
    3. Disk Drive C=1581 (*.d81); disk image
  5. Expanded Commodore VIC-20 (vic-2024);
    1. Disk Drive C=1541 C=1540 (*.d64); disk image
    2. Disk Drive C=1571 (*.d71); disk image
    3. Disk Drive C=1581 (*.d81); disk image
  6. ATARI 8 bit (atari);
    1. Disk Drive with single density disk (90 KB); disk image
    2. Disk Drive with extended density disk (130 KB); disk image

Each of these disk images were then loaded onto the emulator, thus letting it automatically identify the format and size of the media, and the relative benchmark was launched.

RESULTS

This diagram summarizes, briefly, the test's results:

Between the slowest configuration (VIC-20 expanded with a C=1571) and the fastest one (C=128 with C=1581) there is a ratio of 1:4, with the maximum speed of about 1653 bytes per second. The C=128 is still the computer that presents the best performance by direct comparison.

The Commodore 1541 proves to be one of the best of those produced by Commodore, while the fastest of all remains the ATARI drive.

The Commodore 128 is the best performing home computer model ever, followed by the ATARI computer. The worst remains, however, the VIC-20.

SOURCES AND DATA

POWERED BY

1)
The source code was compiled using cc65 compiler version 2.18 (git 0981c02). The results of this test may change if you use other versions and/or other compilers. For the purpose of measurement, MIDRES sources are fully portable to other compilers, being written in pure C
benchmarks.txt · Last modified: 2021/02/27 17:12 by spotlessmind1975