little-scale — LSDJ Tuning Tables (2009)

author little-scale (Sebastian Tomczak)
date 2009-03-22
article blog post; four sentences of prose around two hex-editor screenshots — the numbers are only in the images, read at /s1600/
created 2026-08-31 · updated 2026-08-31

Four sentences and two pictures, and the pictures are the post. They show where lsdj's pitch tables live in the ROM — the prerequisite for every rom-retuning job that follows on this blog.

Key claims#

  • lsdj carries two pitch tables, not one, and they sit back to back. Read from the screenshots: lsdj 3 8 9.gb, 1,048,576 bytes, opened in Hex Fiend in **OVERWRITE MODE**. The GB / GBC / GBA table is "216 bytes selected at offset 27,962"; the Super Game Boy table is "216 bytes selected at offset 28,178". 28,178 − 27,962 = 216, so the second block begins exactly where the first ends: $6D3A and $6E12.
  • 216 bytes = 108 notes × 2, little-endian 11-bit period values for the game-boy-apu. The first table's visible bytes are 2C 00 9C 00 06 01 6B 01 C9 01 23 02 77 02 C6 02 12 03 56 03 9B 03 DA 03 16 04 … — decoded through Pan Docs' f = 131072 ÷ (2048 − v) that is 65.41, 69.28, 73.39, 77.79, 82.38, 87.32, 92.50, 97.96, 103.86, 109.78, 116.51, 123.42, 130.81 Hz: plain 12-TET from C2 (arithmetic done here, values read from the image).
  • Why the Super Game Boy needs its own table: the SGB1's APU runs about 2.4 % fast (game-boy-apu, from pan-docs), so the same sounding pitch needs a different period value. The SGB block's visible bytes are 00 00 6F 00 DC 00 42 01 A3 01 …; against a clock 2.4 % above 4.194304 MHz the four values after the first — 111, 220, 322, 419 — give 69.29, 73.42, 77.76 and 82.39 Hz, the same C#2–E2 as the standard table, recomputed.
  • The lowest note is clipped on the SGB. That first SGB entry is 00 00, the smallest value the register takes; a C2 at 65.4 Hz would need a negative period value at the faster clock, so it is unreachable. The Game Boy's floor of 64 Hz for a pulse channel is 65.5 Hz on an SGB1.
  • The top of both tables collapses. The last entries run … F6 07 F6 07 F7 07 F7 07 F8 07 F8 07 F9 07 F9 07 F9 07 FA 07 FA 07 FA 07 FB 07 FB 07 FB 07 FC 07 — consecutive semitones sharing one period value. The 11-bit register simply runs out of resolution before the table runs out of notes (game-boy-apu states this qualitatively: "pitch resolution is fine at low values and coarse near the top").
  • The KiGB caveat, in his own words: "regardless of emulator settings, KiGB only reads from the SGB table, not the standard one." So a retuned ROM tested in KiGB is testing the wrong 216 bytes — patch both.
  • Credits: "Special thanks to Nitro2k01 for his help and double checking the KiGB bug… Special thanks to Abrasive for the idea of course as well" (nitro2k01, abrasive).
  • He links a video of LSDj running at 15-TET (youtube.com/watch?v=HnvuVSAnfJQ; not fetched).
  • The only comment is 10k — Tom Gilmore, who supplies the idea behind the underclocking retune four months later: "Can Tom get a copy?"

Practical takeaways#

  • Patch both 216-byte blocks at $6D3A and $6E12, or the tuning changes on a DMG and not under an SGB (and not in KiGB, which reads only the second).
  • The offsets are ROM-version specific: these are for 3.8.9. A commenter on the companion post reports v4.0.5 "some of the coding was different" and a cart that would not boot.
  • Anything you want below 65 Hz on a pulse channel is not expressible; the table's top octaves are already quantised into unison.

Notable quotes#

"A quick note that regardless of emulator settings, KiGB only reads from the SGB table, not the standard one."

Relevance to the wiki#

This is the address the whole alternative-tunings cluster hangs on, and the first source in the wiki that shows lsdj's pitch data as data.

To verify#

  • The window title reads lsdj 3 8 9.gb; whether that is the stock 3.8.9 ROM or one he had already edited is not stated.
  • The SGB clock figure used for the arithmetic above is the 2.4 % from pan-docs via game-boy-apu, not a number little-scale gives.

Pages touched#

alternative-tunings · rom-retuning · lsdj · game-boy-apu · game-boy · nitro2k01 · abrasive · little-scale

source file wiki/summaries/s-little-scale-lsdj-tuning-tables.md · graph