diff --git a/hardware/panel-mockup-vintage.png b/hardware/panel-mockup-vintage.png index 92c386c..453fea1 100644 Binary files a/hardware/panel-mockup-vintage.png and b/hardware/panel-mockup-vintage.png differ diff --git a/hardware/panel_mockup_vintage.py b/hardware/panel_mockup_vintage.py index aa38131..037f9b8 100644 --- a/hardware/panel_mockup_vintage.py +++ b/hardware/panel_mockup_vintage.py @@ -133,28 +133,37 @@ def main(): fill=(200, 90, 62) if lit else (52, 31, 27), outline=(78, 43, 37), width=p(0.2)) - # ---- column 3: the data ring ------------------------------------------- - cx, cy, r = CX[2] + 28.0, ROW[0] + 9.0, 17.5 - d.ellipse([p(cx - r), p(cy - r), p(cx + r), p(cy + r)], outline=(52, 57, 62), - width=p(0.25)) - for i in range(64): - a = -math.pi / 2 + 2 * math.pi * i / 64 - px, py = cx + r * math.cos(a), cy + r * math.sin(a) - lit = i == 33 - rr = 0.78 if lit else 0.44 - if lit: - g.ellipse([p(px - rr * 2.0), p(py - rr * 2.0), p(px + rr * 2.0), - p(py + rr * 2.0)], fill=NEON + (215,)) - d.ellipse([p(px - rr), p(py - rr), p(px + rr), p(py + rr)], fill=NEON) - else: - d.ellipse([p(px - rr), p(py - rr), p(px + rr), p(py + rr)], - fill=(62, 31, 26)) - a = -math.pi / 2 + 2 * math.pi * 33 / 64 - d.line([p(cx), p(cy), p(cx + r * math.cos(a)), p(cy + r * math.sin(a))], - fill=(198, 162, 96), width=p(0.35)) - d.text((p(CX[2] + 1.0), p(cy + r + 2.6)), "DATA RING 64 · dp lit", - font=font(1.35), fill=ENGRAVE_DIM) - + # ---- column 3: the 64 cells as a lamp matrix ---------------------------- + # The memory is an unbounded line in the ISA ("> and < just move), and this + # machine implements it as a ring of 64 cells. The matrix shows all 64: one + # lamp per cell, showing that cell's LSB -- the only bit biz and rnz look at -- + # and the pointer blinks, like a cursor, so dp is visible without a number. + head(d, CX[2], 23.6, "DATA 64 · LSB PER CELL") + mx, my, pitch, lrad = CX[2] + 2.0, ROW[0] - 1.0, 5.4, 1.75 + pattern = [0x9C, 0x71, 0x23, 0xC8, 0x4E, 0x96, 0x3B, 0xA5] + for row in range(8): + for col in range(8): + idx = row * 8 + col + bit = (pattern[row] >> (7 - col)) & 1 + x = mx + col * pitch + y = my + row * pitch + if idx == 33: # the pointer: hollow, blinking + g.ellipse([p(x - lrad * 1.9), p(y - lrad * 1.9), + p(x + lrad * 1.9), p(y + lrad * 1.9)], + fill=NEON + (150,)) + d.ellipse([p(x - lrad - 0.5), p(y - lrad - 0.5), + p(x + lrad + 0.5), p(y + lrad + 0.5)], + outline=NEON, width=p(0.5)) + elif bit: + g.ellipse([p(x - lrad * 1.4), p(y - lrad * 1.4), + p(x + lrad * 1.4), p(y + lrad * 1.4)], fill=BULB + (185,)) + d.ellipse([p(x - lrad), p(y - lrad), p(x + lrad), p(y + lrad)], + fill=BULB, outline=(122, 90, 34), width=p(0.22)) + else: + d.ellipse([p(x - lrad), p(y - lrad), p(x + lrad), p(y + lrad)], + fill=(38, 34, 28), outline=(70, 65, 55), width=p(0.22)) + d.text((p(CX[2] + 2.0), p(my + 8 * pitch + 1.6)), + "8 x 8 · LSB OF EACH CELL · POINTER BLINKS", font=font(1.25), fill=ENGRAVE_DIM) # ---- row 2: controls ---------------------------------------------------- for cx_, label in ((18.0, "RUN"), (34.0, "STEP"), (50.0, "RESET")): d.ellipse([p(cx_ - 4.6), p(58.5 - 4.6), p(cx_ + 4.6), p(58.5 + 4.6)],