← All SNES demos

Bisection Oracle

Algorithms & Data

Each query highlights the cells visited by bisection. A successful lookup flashes its landing cell; an unsuccessful lookup flashes the row.

Self-running — no controller input required.

Verify fidelity checks the recorded result against 0x7FF5.

Source bsearchviz.cbsearchviz.h in wbniv/llvm-mos-65816

What you see

Each query highlights the cells visited by bisection. A successful lookup flashes its landing cell; an unsuccessful lookup flashes the row.

What is checked

The C library's bsearch calls a comparison function and returns a pointer into the original array, or null. The test checks the callback results, pointer-to-index calculation, and absent-key cases.

Compiler stress-test #147. The downloadable ROM and browser player use the same verified artifact.