Building a Human68k RAM bank diagnostic

A Human68k utility that claims to test all RAM banks must do more than walk through the memory reported by the operating system. The X68000’s physical RAM, CPU-visible address window and Human68k heap are related, but they are not identical. A dependable diagnostic needs an explicit bank map, controlled destructive writes and errors that identify both the failing address and the bank that owns it. Learn more about ネットワークでルーターのファームウェアを更新する前後に確認すべき設定項目のリスト.

The useful result is not a screen full of reassuring pass marks. It is a repeatable way to distinguish a weak memory cell from an address-decoder fault, a marginal power rail and a bank that was never selected. A small native program can offer a quick check, an exhaustive sweep, a single-bank run and a plain-text log, while refusing every address range not positively classified as testable RAM.

This kind of project fits the preservation work on X68K.NET: source code, tested bank maps and failure records remain useful long after an X68000 leaves daily service. Australian collectors often exchange boards at retro-computing gatherings around Melbourne and Sydney, while specialist listings on eBay’s Australian marketplace quote prices in AUD. A board imported from Japan may also pass through Australian customs with GST or brokerage charges, so provenance and careful packing matter as much as the circuit itself.

Why physical banks need a separate map

Human68k manages logical allocations, whereas an expansion card may contain several physical banks behind one CPU address aperture. Graphics, I/O and firmware also occupy addresses that are not ordinary RAM. The utility must know which bank is selected before it writes and must never infer bank ownership from a contiguous range returned by the operating system.

No single pattern proves much on its own, so choose methods that expose different fault mechanisms rather than repeating one friendly fill value. These destructive sweeps are more useful than read-only sampling, which cannot reveal a cell that fails only after a particular data pattern has been written.

Test method What it exercises Useful failure signal Limitation
All-zero and all-one sweeps Baseline cell state and broad stuck-at faults Entire words remaining high or low Misses alternating and coupled faults
Walking one and walking zero Each data bit independently One consistently stuck bit Requires many passes across a large bank
Checkerboard Dense bit transitions Pairwise bit coupling and weak cells A fixed pattern can hide systematic aliases
Address-unique values Address decoding and location consistency Two offsets behaving alike Values must differ across the tested width
Seeded pseudo-random data Broad data combinations and repeatable stress Intermittent mismatch tied to neighbouring cells The seed and generator must be recorded

The strongest result comes from combining the sweeps and repeating them. Read-only checks are useful for triage, but they cannot rule out a weak cell. A pattern that fails in every bank suggests a common address, timing or power problem; one isolated bank points more strongly towards that board or module. Report the sequence of patterns as well as the final status, since a later pass can accidentally hide an earlier failure.

Establishing a safe test baseline

Create a machine-readable descriptor for each physical bank: a stable identifier, CPU-visible base address, size, selection mechanism and any pages containing executable code or reserved data. Keep this separate from Human68k heap allocations. On a system that exposes several banks through one aperture, the descriptor should also record the exact switch procedure, initial state and addresses that must be skipped.

The Human68k memory-control values MMBASE and MMSIZE can help identify the DOS-managed region, and its allocation routines can show which logical blocks are occupied. Neither source proves that every installed physical bank is currently visible. If the target includes a Nereid-X expansion, bind any bank-selection operation to that board’s documented behaviour rather than guessed writes to an I/O address; save and restore the previous selection around each test.

Stabilise the machine before trusting any result. Marginal supply rails can imitate RAM errors, particularly when faults change as the equipment warms. The practical X68000 PSU recap guide is worth consulting before interpreting widespread failures. Australian mains provide 230 V at 50 Hz, while the X68000 and many Japanese peripherals were designed for 100 V. Use an appropriately rated step-down transformer with a safe Type I mains connection; a travel plug is not a voltage converter. Check fuse ratings, connector polarity and protective earth as well.

Designing patterns that expose memory faults

Use a progression that tests both simple and difficult states. Start with zero and one words, then walk a single set bit through every position and repeat with cleared bits. A 0x5555 and 0xAAAA checkerboard exercises transitions. Add address-unique values so each location receives a different word, then finish with a deterministic pseudo-random sequence. Use a documented seed: reproducibility is more valuable here than secrecy, and a repeatable sequence makes an intermittent fault comparable between machines.

Each sweep should write the entire selected bank, read it back and repeat after changing banks. Add a short delay between writing and verification, followed by warm and repeated passes. Use word accesses on even addresses and add byte-lane checks only when the board guarantees them. Do not rely on a compiler’s memset or memcmp for destructive testing; they may optimise, vectorise or compare in ways that hide the access you intended to exercise.

Classify the first mismatch before continuing. Exclusive-OR the expected and observed words to expose differing bits, note whether the same bit recurs and inspect neighbouring offsets for coupling. A fixed address can point towards decoding or address-line trouble, while a moving fault can indicate marginal timing or heat. Keep the original expected and observed values even when later passes succeed, because intermittent history often predicts a failure that a final pass would erase.

Implementing the utility in Human68k

Implement the tester as a native Human68k program, using an assembler for the bank-switching stub and either a Human68k-compatible C compiler or C for the reporting layer. Useful command-line operations include listing the bank map, running quick or full tests, selecting one bank and writing a log. The list operation should print every discovered bank and excluded range. A full test should require explicit acknowledgement before destructive writes, while the default mode remains conservative enough to prevent a mistyped bank number from selecting the wrong module.

Access each candidate cell through a volatile pointer and compare a fresh read with the value just written. The core check can remain simple, provided the reporter receives the original bank, offset, pattern and pass number:

unsigned short actual = *cell;
if (actual != expected) {
    report_mismatch(bank_id, offset,
                    expected, actual, pattern, pass);
    failures++;
}

The volatile qualifier prevents the compiler from hiding a read behind an assumed value. Preserve the expected word in an ordinary local variable rather than performing another read through the tested address, and ensure the reporting routine cannot change the selected bank. If the toolchain offers special memory barriers, use them only where the hardware requires them; the original 68000 has no internal cache capable of concealing the access.

Treat the bank selector as privileged code. Do not switch away from the bank holding the current stack or executable unless a resident trampoline can complete the operation safely. Mask interrupts only across the short switch-and-verify critical section, then restore the processor status and previous bank. A full test of every bank generally requires a boot diagnostic in protected memory or a board design that keeps the running program in a separate fixed bank.

Producing useful failure reports

Make the error report useful to someone who was not at the machine. Each line should carry a bank identifier, CPU address, offset within that bank, expected and observed values, pattern name, pass number and iteration count. Place hexadecimal values beside decimal offsets; a form such as BANK=03 OFFSET=00123456 EXPECTED=A5C3 ACTUAL=5AC3 immediately separates an address problem from a data-bit problem. Finish with totals for banks and words tested, errors found and banks skipped.

Many X68000 installations have no native Ethernet, so logs normally travel through a serial port, USB bridge or modern host. When a router forwards those results or reaches a preservation server, firmware changes can affect more than the router itself. On Australian NBN-connected homes, a network unit may sit in front of a personally managed router, making WAN mode, DHCP, address reservation and DNS worth preserving. The firmware update checklist is a useful companion before changing that equipment.

Stream the log rather than accumulating every failure in RAM, and cap repeated errors for one address while retaining the first and last observations. Provide ASCII output for Human68k-era displays and a machine-readable companion when storage permits. If the runtime cannot expose a conventional exit code, make the final summary line explicit: a zero error count must be visibly different from an aborted or incomplete test.

Deploying the diagnostic and preserving the work

Before field testing, establish a known-good baseline: a stable supply, known-good system software and unaltered firmware. A reversible firmware arrangement makes failures easier to interpret. The procedure for a socketed EPROM BIOS is relevant because it allows a known image to be retained and restored during experimentation, although replacing firmware is not itself a RAM test and should not be combined with destructive runs until it is proven.

Repeat the same bank sequence on a second known-good machine where possible. Compare cold and warm passes, quick and full sweeps, and results obtained with expansion cards installed or removed. Let the machine reach operating temperature without allowing a marginal component to become dangerously hot. Melbourne’s winter damp and Sydney’s summer heat make storage and ventilation genuine local concerns: use a dry, stable room and keep condensation away from the board.

Package the diagnostic as a preservation artefact rather than an opaque binary. Publish the source, assembler and compiler versions, bank descriptors, pattern order, random-number seed, known exclusions and sample output. Keep raw logs beside photographs of the tested configuration, and label every result with the machine’s serial number or an owner alias. A peer in Brisbane or Adelaide should be able to rebuild the tool, verify its assumptions and recognise whether a report came from the same hardware layout.

Build the smallest honest diagnostic you can test, publish its source and bank map, and invite owners of differently populated machines to return labelled results. Those shared observations turn a private memory checker into a durable X68000 preservation tool.

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.

A two-ink risograph print in muted slate-blue and charcoal on off-white paper, showing a stylized desktop computer monitor beside a circuit board with soft geometric trace lines, conveying a calm retro-computing workshop atmosphere. A two-ink risograph print in deep purple and dark grey on cream stock, depicting a compact expansion card with connector ports and subtle Japanese technical annotations, evoking a hobbyist electronics bench. A two-ink risograph print in teal and charcoal on warm white paper, showing a server rack silhouette with soft network-line motifs and a small weather icon, suggesting a personal server room corner.

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.