Writing a Human68k utility to benchmark CPU and memory performance
Sharp’s X68000 is often identified by its processor badge, clock rate and amount of RAM, yet those labels do not explain why one machine feels faster than another. Bus layout, accelerator boards, memory organisation and software overhead all shape the result. A Human68k measurement program can give collectors a repeatable way to separate those effects instead of relying on impressions from a few games.
The utility should run as a native command-line program under Human68k, the operating system used on Sharp’s home computers. Its job is to time controlled CPU and memory workloads, verify that memory operations completed correctly, and publish results in a form that can be compared later. The output must state what was measured, how long it ran and which machine produced it.
That need is familiar to Australian hobbyists, who often acquire mixed X68000 systems through Gumtree, eBay and weekend swap meetings in Sydney, Melbourne and Brisbane. Boards may have spent years in cupboards or garages, and examples can differ in memory chips, accelerator hardware and power-supply condition. Sharing benchmark records gives these collectors a common reference while preserving practical knowledge about the platform.
Define the measurement contract
A useful score begins with a precise claim. CPU throughput can describe completed arithmetic operations per second, while latency records the delay for one dependent operation. Sustained tests reveal behaviour over a longer interval; short bursts may favour a particular compiler schedule. Keep these ideas separate rather than compressing them into one impressive but ambiguous number.
Every record should identify the machine model, processor revision, nominal clock, fitted accelerator or coprocessor, memory configuration and Human68k version. A baseline profile then gives later runs a reference point. Results from an accelerated board should not be placed beside a stock machine without an obvious hardware label, because that invites invalid comparisons.
The report can be plain text, with one record per run, followed by an optional machine-readable export. Use explicit units such as milliseconds, operations per second, bytes per second and nanoseconds per access. Keep the core output ASCII and use conservative filenames, since the utility should work across a broad range of X68000 configurations.
Design repeatable CPU workloads
Start with a dependent integer loop because each result feeds the next, preventing the processor from completing the work out of order. It measures execution latency rather than raw instruction count. Include operations that expose the 68000 family’s characteristics, especially 32-bit arithmetic, shifting, multiplication, division and conditional branches. An assembly routine can pin down the instruction sequence when a compiler might otherwise substitute different code.
A second kernel should mix those operations in a repeatable pattern using a fixed data set and seed. Data-dependent branches make the workload more representative without making it unpredictable. Measure dependent and independent groups separately: the first shows the cost of a serial chain, while the second shows how much work the processor can sustain when some latency is hidden.
Repeat each kernel after a warm-up and publish the median together with the minimum, maximum and observed spread. Optional floating-point and accelerator routines need separate labels because the 68000 integer core and any add-in maths hardware are different execution engines. Existing Human68k examples and distribution practices are worth checking in the resource pages before source conventions or defaults are fixed.
Measure memory latency and bandwidth
Memory testing needs buffers of known size, alignment and address range. Confirm those properties after allocation rather than assuming Human68k exposes one flat pool on every X68000. A sequential-copy kernel can measure sustained transfer bandwidth by reading one non-overlapping buffer and writing another. Test several sizes, from a few kilobytes to a substantial portion of available RAM, and report the size with each result.
A pointer-chase test measures random-access latency. Each loaded address selects the next location, preventing the processor from fetching several independent values simultaneously. Add controlled strided reads and a working-set sweep to show how performance changes as the active region grows. Keep allocation, buffer initialisation and destruction outside the timed region; otherwise allocator overhead can dominate the intended measurement.
Correctness and speed must be linked. Fill buffers with several patterns, copy or transform them, then verify checksums and selected bytes after timing stops. A failed check invalidates the run rather than becoming a surprisingly fast result. For bandwidth, distinguish reads from mixed read-and-write activity and state whether the figure is a best case, median or sustained rate.
Work within the Human68k programming model
Human68k code must avoid assumptions that are harmless on a desktop but false on the X68000. Use the available Human68k C compiler or a suitable cross-toolchain, check the language’s actual type widths, and express byte counts with a verified 32-bit type when values can exceed 65,535. Do not assume a hosted C library, Unix command, floating-point unit or modern terminal is present.
The operating system’s memory manager may expose conventional and extended regions differently across configurations. Allocate through documented Human68k interfaces, record the returned range and keep source and destination buffers non-overlapping. Mark benchmark objects so the compiler cannot remove them, then make the final result visible through a volatile sink. Hand-written assembly is useful where precise instruction selection matters.
A simple command syntax could accept bench cpu, bench mem and bench all, with optional iteration and buffer-size arguments. Reject impossible sizes cleanly, release allocations on errors and write results without relying on interactive input. Separate the timer, workloads, allocator and report writer so each component can be tested, and keep the binary, sample output and exact build instructions together.
Build for stable X68000 systems
Use a clean boot for the baseline, leave the machine otherwise idle and record any background software. Sound, MIDI or disk activity can disturb a repeatable run, so close unrelated tasks. Run the suite several times and save every result. A consistent power supply matters too, since voltage instability may produce timing outliers long before it causes an obvious crash.
Build the timed routines with optimisation held constant, then document the compiler version and flags. Calibrate the platform timer by timing a known interval, measure timer-call overhead and check for rollover. If the timer is too coarse for a short kernel, either extend the loop or report its resolution explicitly. Absolute time is less trustworthy than a timer with a measured error bound and documented behaviour.
A stable display is part of the instrument. Faint or distorted characters can make a passing checksum look wrong, particularly on a CRT after long storage. For a C112 or C114 set, the C112 and C114 notes provide a useful restoration reference before results are judged.
Australian benches add an electrical difference: household supply is 240 V and Type I plugs are common, while many original Japanese X68000 power supplies expect 100 V. A correctly rated isolation transformer and Australian-compatible mains lead may be required. Never connect a 100 V supply directly to 240 V, and have mains work checked by someone competent rather than relying on trial and error.
Validate results on real hardware
Validate before trusting the figures. Compare one kernel with an independently measured interval, confirm that an increased iteration count produces a proportionate increase in elapsed time, and check that an incorrect checksum is rejected. Memory tests should survive repeated runs without changing their verdict. These checks expose timer mistakes, dead-code elimination and faulty buffer setup.
On an original machine, begin with the motherboard recap guidance and inspect the board before using it as a reference. Leaking or high-ESR capacitors can alter clock behaviour and memory stability, turning a hardware fault into a misleading score. Record whether capacitors, RAM, power supply or accelerators were changed.
Run on both a stock configuration and each interesting upgrade, but never compare them as if the hardware were identical. Check the clock against its nominal setting, note any turbo or cache controls and repeat after a cold restart. Another owner should be able to follow the procedure and obtain a result close to the published spread.
Publish reproducible results
Publish the source, benchmark version, compiler details, machine profile and sample output. A checksum for the executable lets users confirm that they ran the same release. Include the Human68k command used, elapsed time, repetitions and any failed checks. Store raw measurements alongside summaries so later analysis can reconsider the statistics instead of relying on a single headline figure.
Australian law deserves a simple design decision: keep the offline utility free of telemetry, names and email addresses. If a future hosted results page collects personal information and its operator is covered by the Privacy Act 1988, the Australian Privacy Principles should guide its handling practices. If the project becomes a paid download or hardware sale, consumer guarantees under the Australian Consumer Law also need consideration.
Documentation should state its limits plainly: timer granularity, visible memory range, compiler effects, thermal state and unsupported configurations. Clear licensing allows another enthusiast to verify, repair or extend the work. Community archives can then build a record of how particular X68000 boards behaved without turning one local test result into a universal specification.
| Measurement | Primary signal | Reported result | Main control |
|---|---|---|---|
| Dependent integer loop | Serial execution latency | Nanoseconds per operation | Chain prevents reordering |
| Mixed integer kernel | Sustained arithmetic throughput | Operations per second | Fixed seed and data set |
| Sequential copy | Transfer bandwidth | Bytes or megabytes per second | Non-overlapping aligned buffers |
| Pointer chase | Random-access latency | Nanoseconds per access | Every load determines the next |
| Pattern fill and copy | Memory correctness and write rate | Pass or fail, plus transfer rate | Checksums verified after timing |
| Repeated suite | Timing stability | Median and observed spread | Clean boot and controlled duration |
Build the first release with one dependent integer kernel, one sequential-copy test and one pointer-chase test. Run it on an unmodified machine, preserve the raw output and add features only after the baseline is repeatable. The immediate deliverable should be a compact package that another collector can compile, run and compare without needing the author to interpret the results.
Share that package and its test records with the X68000 community through X68K.NET and established hobby forums, including owners of accelerated and later processor boards. A reproducible utility will turn scattered impressions into evidence the whole community can reuse and keep.
Nereid-X Expansion Board
A personally-produced LAN+USB+Memory expansion board for Sharp X68000 series computers. Multiple production runs were offered, including a final batch and a later revival reproduction run.
Power Supply Repair
X68 power supply repair and modification services were offered by the site owner, with documentation shared through diary entries spanning 2001–2006.
Server & Networking
Notes on FreeBSD administration, ISP changes, server migration, and networking topics. The site itself ran on FreeBSD with the hns diary system and Namazu search integration.
Get in touch
X68K.NET connects Sharp X68000 enthusiasts through community links and shared projects. Reach out with questions about the Nereid project or X68 resources.