Converting X68000 ADPCM Samples Into Editable WAV Files

The Sharp X68000 has a distinctive sound that comes from more than its FM synthesizer channels. Its ADPCM hardware adds sampled drums, speech, effects, and short musical phrases, often stored in game archives, utility disks, or application-specific data files. To edit those sounds on a modern computer, the original 4-bit data must be decoded with the correct assumptions about sample rate, nibble order, and storage format.

This process is less straightforward than opening an ordinary audio file. X68000 ADPCM is commonly stored as raw compressed sample data rather than as a complete WAV container. A converter therefore needs to know where the sample begins and ends, how bytes are arranged, and which playback rate the original software expects.

A careful conversion preserves the original material while producing a standard PCM WAV file for Audacity, Ocenaudio, ffmpeg, or a digital audio workstation. The best workflow keeps an untouched copy of the extracted bytes, records every conversion setting, and treats the first successful decode as a reference rather than an opportunity to overwrite the source.

Understand The X68000 Audio Format

Many X68000 systems use an OKI MSM6258-compatible ADPCM sound device. It stores each audio sample in 4-bit code values, with two ADPCM samples packed into every byte. This reduces disk and memory requirements, which was valuable for games and music tools, but it also means the data cannot be interpreted as ordinary 8-bit or 16-bit PCM.

ADPCM stores changes between samples rather than their full amplitudes. The decoder maintains a predicted signal level and an adaptive step size, then reconstructs the waveform from each four-bit code. If the wrong decoder is used, the result may sound like harsh noise, rapidly changing clicks, or a distorted version with an incorrect volume envelope.

The hardware format also differs from modern compressed audio such as IMA ADPCM in a WAV file. Both use four-bit codes, but their prediction rules, step tables, and packing conventions are different. Selecting “IMA ADPCM” in a general audio application will usually not decode an X68000 raw sample correctly.

Identify Raw Sample Boundaries

Before decoding, determine whether the file contains only ADPCM payload or includes a header. A game resource may place a sample inside a larger archive, while a music driver may store address and length fields around the compressed bytes. Some files contain several samples consecutively, with no obvious audio signature.

A useful first step is to inspect the file in a hex editor. Repeating values, small metadata fields, terminators, and alignment padding can reveal the structure. Search for references in the game executable or driver when possible. An address table may show the start and end of each sound, even when the sample itself has no header.

Do not assume that every byte in a resource is audio. A short header, loop information, or padding byte can shift every following nibble. That kind of offset error often produces a recognizable sound at the beginning followed by severe corruption. Extract the suspected payload to a separate file and preserve the original archive unchanged.

The sample length may be expressed in bytes, decoded nibbles, or playback ticks. Since one byte generally contains two ADPCM codes, a length measured in decoded samples is not interchangeable with a byte count. Confirm the convention used by the source software before setting the extraction range.

Choose The Correct Playback Parameters

The sample rate is a critical part of conversion. X68000 software may use rates associated with the hardware clock and timer configuration, commonly around 15.6 kHz, but the exact value can vary by driver or application. A decoded sample with the right codec but the wrong rate will play too quickly, too slowly, or at the wrong pitch.

The original program may reveal its rate through driver documentation, initialization code, playback commands, or timer values. If that information is unavailable, decode the same bytes at several plausible rates and compare the result with the sound as heard in an emulator or on real hardware. Voice and percussion are particularly useful references because timing and pitch errors are easy to notice.

Channel count is usually straightforward: many ADPCM effects are mono. However, a resource may contain two independent samples intended for separate playback, or it may be interleaved data from a custom engine. Do not create a stereo WAV merely because the source file is large. Stereo duplication adds no information and can obscure the original format.

The comparison below shows which settings should be treated as evidence, which can be tested by listening, and which must be retained in project notes.

Parameter Common X68000 Situation What A Wrong Setting Sounds Like How To Verify
Codec MSM6258-style 4-bit ADPCM Harsh noise or unstable distortion Compare decoder documentation and emulator output
Packing Two 4-bit codes per byte Metallic, broken, or reversed timbre Test high-nibble and low-nibble order
Sample rate Often near 15.6 kHz, but driver-dependent Incorrect speed and pitch Inspect timer setup or compare playback timing
Channels Frequently mono Unnecessary file size or misleading stereo image Check the playback routine and resource layout
Start offset May follow a header or table Clicks, noise, or missing attack Inspect neighboring bytes and metadata
End position May use explicit byte count Trailing noise or clipped decay Compare with in-game playback and loop data

Decode ADPCM Into PCM

A reliable conversion has two separate stages: decode the four-bit stream into linear PCM, then write that PCM into a WAV container. Keeping those stages conceptually separate makes troubleshooting easier. If the waveform is wrong, investigate the ADPCM decoder. If the waveform is correct but the file will not open, investigate the WAV writer or file parameters.

The decoder must implement the MSM6258-style state machine rather than a generic ADPCM variant. It reads a nibble, derives a signed difference from the current step size, updates the predicted sample value, clamps that value to the permitted range, and adjusts the step index according to the nibble. The exact nibble order matters. Some tools process the high nibble first; others expect the low nibble first.

A small conversion script can be useful because it makes the assumptions visible. It should accept an input offset, byte length, sample rate, nibble order, and output path as explicit options. It should also record those values in a sidecar text file or filename. Silent defaults are dangerous when several X68000 games use slightly different resource layouts.

If a ready-made converter is used, verify its output with a known-good sample. Compare duration, waveform shape, peak level, and playback speed against an emulator. A valid decode will generally produce a smooth waveform with recognizable attacks and decays, even if its amplitude is low. A file full of alternating extreme values usually indicates the wrong codec or an incorrect start offset.

Build A Clean WAV Master

Once the ADPCM bytes have been decoded, write a simple PCM WAV master before applying any restoration. A 16-bit signed mono WAV at the source sample rate is a practical interchange format. It is widely supported and provides enough resolution for editing, visualization, and later conversion without forcing an unnecessary resampling step.

Do not normalize immediately. The original sample may have a deliberately conservative level because the X68000 mixer applies its own gain. First inspect the waveform for clipping and silence. If the peak is low but clean, increase gain on an edited copy. If the waveform is already clipped, normalization cannot restore information that was lost in the original data.

Remove leading or trailing silence only after saving a full-length reference file. Shortening the sample can alter playback timing, and some games expect a precise duration or loop point. For sound effects, trimming a few unused samples may be harmless; for music phrases or speech, the boundary may be part of the intended performance.

When resampling, choose a high-quality sample-rate conversion method and keep the original-rate WAV. Modern production rates such as 44.1 kHz or 48 kHz are convenient for mixing, but they should be derived from the archival decode. A 15.6 kHz source does not gain new detail by being resampled, although the larger output rate may be required by a contemporary project.

Check The Result Against Original Playback

Listening tests are essential because a file can be technically valid while still being wrong. Play the converted WAV beside the same effect in an emulator or on an original X68000. Match the starting point, duration, pitch, and apparent loudness. Differences in emulator mixing or speaker hardware are less important than a consistent change in timing or timbre.

Useful symptoms point toward specific causes. A sound that is exactly twice as long or half as long may have a sample-rate or nibble-count problem. A sound with correct timing but a strange metallic character may use reversed nibble order. A sudden click at the beginning often means the extraction starts inside a header or misses the decoder’s initial state.

The initial ADPCM predictor state can also affect the first few samples. Some playback routines begin from zero, while others retain or specify a state. Most short effects become recognizable quickly, but a speech sample or low-frequency tone may expose a mismatch. Document whether the converter assumes a zero predictor and whether the original driver initializes other decoder registers.

Keep diagnostic renders alongside the final files. A waveform screenshot, hexadecimal extraction range, decoder version, and parameter log can save hours when revisiting an old project. The same preservation habits used for hardware repair and disk imaging apply to audio resources: retain the evidence, then create convenient working copies.

For broader project notes, hardware observations, and ongoing X68000 preservation work, the site’s project diary provides useful context for documenting experiments alongside their results.

Edit Without Losing The Source

After a clean decode has been verified, use the WAV as a source for editing. Audacity and similar editors can cut silence, remove clicks, adjust gain, and export to contemporary formats. Work from a duplicated file, keeping the original-rate master untouched. This protects the archival version when an aggressive filter or mistaken trim needs to be reversed.

For clicks caused by extraction boundaries, zoom in and inspect the first and last waveform cycles. A short fade-in or fade-out can hide an artificial discontinuity, but it should not be used to conceal a damaged decode. If the click occurs inside the sound, return to the raw bytes and test whether the apparent boundary is actually a block transition or an incorrectly included metadata field.

Avoid heavy noise reduction on small ADPCM effects. Quantization noise and grain may be part of the original character, while broad filtering can remove attacks and consonants. For voice, a gentle high-frequency reduction may improve listening comfort; for drums, it can make the transient noticeably dull. Export a processed listening copy while preserving an unprocessed reference.

Record the source filename, extraction offset, byte count, codec, nibble order, predictor assumptions, sample rate, channel count, and any edits. A compact metadata file next to each WAV is enough. Future users can then reproduce the conversion instead of treating the edited audio as an unexplained artifact.

Preserve Reproducible Conversion Records

A useful archive contains more than finished WAV files. Keep the original disk image or resource archive, the extracted binary, the conversion script or tool version, and a plain-text log of the settings. Use stable filenames that distinguish raw data, decoded masters, and edited derivatives.

Checksums can confirm that the source has not changed between machines or backup sessions. A hash for the original archive and another for the extracted sample establishes a clear relationship between the preserved material and the working file. This is especially valuable when several versions of a game or driver circulate with similar names.

When sharing a converted sample, describe it as a decode rather than an original replacement. Include the source platform, suspected driver, sample rate, and any uncertainty about boundaries. If a parameter was inferred by comparison rather than found in documentation, say so. Transparent uncertainty is more useful than false precision.

The finished WAV should make the sound accessible, while the raw resource and conversion notes preserve the technical history behind it. That balance serves both editors who need a familiar format and researchers who may later discover a more accurate interpretation of the original playback routine.

Recommended Conversion Practices

  • Preserve the original disk image, archive, and extracted ADPCM bytes before editing anything.
  • Verify the MSM6258-compatible decoder, nibble order, start offset, and byte length independently.
  • Compare playback at several plausible sample rates against an emulator or real X68000 hardware.
  • Save an untouched PCM WAV master before trimming, filtering, normalization, or resampling.
  • Record every conversion parameter and checksum in a plain-text project log.

A well-documented WAV conversion turns an obscure X68000 resource into an editable audio asset without separating it from its source. Decode one sample, compare it carefully with original playback, and publish the raw data, settings, and resulting WAV together whenever rights and project scope allow. That practical record gives future enthusiasts a dependable starting point for restoring the platform’s sampled sound.

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.