Neoriris Seven Segment Bit Code

The Neoriris clock tower face uses a seven-bit segment mask. It looks like binary, but it is not a normal base-2 number. Each bit is an on/off…

Executive Summary

The Neoriris clock tower face uses a seven-bit segment mask. It looks like binary, but it is not a normal base-2 number. Each bit is an on/off command for one named segment of a seven-segment display.

Neoriris Seven-Segment Bit Code

The Neoriris clock tower face uses a seven-bit segment mask. It looks like binary, but it is not a normal base-2 number. Each bit is an on/off command for one named segment of a seven-segment display.

The canonical bit order is:

text
abcdefg

That means a mask is read left to right as:

text
bit 1 -> a -> top
bit 2 -> b -> upper right
bit 3 -> c -> lower right
bit 4 -> d -> bottom
bit 5 -> e -> lower left
bit 6 -> f -> upper left
bit 7 -> g -> middle

1 means the segment is lit/active on the corrected display face. 0 means the segment is dark/inactive.

Segment Layout

The display uses standard seven-segment names:

text
      a
   -------
  |       |
f |       | b
  |   g   |
   -------
  |       |
e |       | c
  |       |
   -------
      d

The mask 1111110, for example, turns on a, b, c, d, e, and f, and leaves g off. That draws 0.

Why This Is Custom Binary

Ordinary binary assigns positional numeric weights such as 64, 32, 16, 8, 4, 2, and 1. The clock tower mask does not use those weights for display meaning.

For the tower:

text
1111110 is not "126" in display logic.
1111110 means "segments a b c d e f are active; segment g is inactive."

The string is still binary-shaped because each segment has two states. The value is a compact custom glyph code, not an arithmetic number.

Canonical Character Table

These masks are implemented in ClockTowerDisplayController.maskForValue().

| Character | Mask | Lit segments | Notes |
| --- | --- | --- | --- |
| 0 | 1111110 | a b c d e f | All outer bars, middle off |
| 1 | 0110000 | b c | Right side only |
| 2 | 1101101 | a b d e g | Top, upper right, middle, lower left, bottom |
| 3 | 1111001 | a b c d g | Top, right side, middle, bottom |
| 4 | 0110011 | b c f g | Upper left, middle, right side |
| 5 | 1011011 | a c d f g | Top, upper left, middle, lower right, bottom |
| 6 | 1011111 | a c d e f g | Like 5 plus lower left |
| 7 | 1110000 | a b c | Top and right side |
| 8 | 1111111 | a b c d e f g | Every segment |
| 9 | 1111011 | a b c d f g | Like 8 minus lower left |
| A / a | 1110111 | a b c e f g | Hex-style A |
| B / b | 0011111 | c d e f g | Lowercase-style b, because uppercase B does not fit cleanly |
| C / c | 1001110 | a d e f | Open right side |
| D / d | 0111101 | b c d e g | Lowercase-style d |
| E / e | 1001111 | a d e f g | Open right side with middle |
| F / f | 1000111 | a e f g | Like E without bottom |
| - | 0000001 | g | Middle dash |
| _ | 0001000 | d | Bottom underscore |

Commands That Use The Code

The corrected face path accepts either a preset character or a raw seven-bit mask:

text
/sol clock <0-9|A-F|-|_|7-bit> [seconds]
/sol tower face <7-bit>

Examples:

text
/sol clock 5
/sol clock A
/sol clock 1011011
/sol tower face 1111011

/sol clock accepts characters and masks. If a duration is supplied, it temporarily paints the face before the clock behavior resumes.

/sol tower face accepts only a seven-bit mask. It writes the corrected visible face directly.

Raw Hardware Bits Versus Corrected Face Masks

The tower has two related seven-bit paths:

text
/sol tower bits <7-bit>
/sol tower face <7-bit>

/sol tower face is the reliable corrected display driver. It maps abcdefg directly to the visible face cells. Use this path for digits, letters, dash, underscore, and hand-painted masks.

/sol tower bits controls the original floor bit levers. Those levers are part of the historic redstone hardware and are active-low/cross-coupled in the recovered machine. In ClockTowerDisplayController.setBits(), a visible bit value of 1 is applied by setting the corresponding lever unpowered, while 0 is applied by powering it:

text
mask bit 1 -> lever powered false
mask bit 0 -> lever powered true

That inversion is why the control surface separates raw bit levers from the corrected face painter.

Coordinates And Segment Order

The corrected display controller maps the seven face segments to piston/wool cells in this order:

| Segment | Meaning | Face cells |
| --- | --- | --- |
| a | top | row x=148..150, y=121 |
| b | upper right | column x=151, y=118..120 |
| c | lower right | column x=151, y=114..116 |
| d | bottom | row x=148..150, y=113 |
| e | lower left | column x=147, y=114..116 |
| f | upper left | column x=147, y=118..120 |
| g | middle | row x=148..150, y=117 |

The source order of those cells is the source of truth for the bit order:

text
FACE_SEGMENTS[0] = a
FACE_SEGMENTS[1] = b
FACE_SEGMENTS[2] = c
FACE_SEGMENTS[3] = d
FACE_SEGMENTS[4] = e
FACE_SEGMENTS[5] = f
FACE_SEGMENTS[6] = g

Reading A Mask By Hand

To decode 1011011:

text
a b c d e f g
1 0 1 1 0 1 1

The active segments are a, c, d, f, and g. That is the preset for 5.

To encode a new glyph:

  1. Draw the character using the seven named segments.
  2. Write 1 for every segment that should be on.
  3. Write 0 for every segment that should be off.
  4. Keep the order exactly abcdefg.

Example: a middle dash lights only g.

text
a b c d e f g
0 0 0 0 0 0 1

The mask is 0000001.

Consumers

The same abcdefg mask is used by:

When these surfaces disagree, the Java controller order above is canonical.