hardware: no step counter on the panel either
ci / linux-arm64 (push) Successful in 4m55s

The step count is the machine time, and nothing in the ISA can observe time -- so
the panel does not show it either.  A running count is a debugging number, and
debugging numbers come out of the serial port; there is a comment where the
counter used to be saying exactly that.

The panel is now: the 64 cell ring with dp lit, the eight bit lamps of the pointed
cell, the eight instruction lamps, the dp bars, RUN / STEP / RESET, the eight input
switches, the ZIF cartridge and the serial line.  The mechanical dp dial moved into
the space the counter left.
This commit is contained in:
dsh committed 2026-11-24 18:22:19 +08:00
1 parent e196306a49
commit 102f7db1de
2 files changed
+21 -31

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

+21 -31
View File
@@ -58,12 +58,14 @@ def main():
glow = Image.new("RGBA", (W, H), (0, 0, 0, 0))
g = ImageDraw.Draw(glow)
# ---- the eight bit lamps: the pointed cell, MSB first --------------------
# ---- the eight bit lamps: the pointed cell, MSB first, two rows of four ---
# Two rows of four keeps this block to its own corner instead of stretching
# into the instruction lamps, which were crowding it.
d.text((p(12.6), p(15.4)), "CELL BITS 7 6 5 4 / 3 2 1 0", font=font(1.3), fill=ENGRAVE_DIM)
bits = [1, 0, 0, 1, 1, 0, 1, 0]
for i, bit in enumerate(bits):
x = 13 + i * 8.4
y = 16.0
x = 12.6 + (i % 4) * 8.6
y = 18.2 + (i // 4) * 8.8
if bit:
g.ellipse([p(x - 0.8), p(y - 0.8), p(x + 6.4), p(y + 6.4)],
fill=BULB + (205,))
@@ -72,28 +74,27 @@ def main():
else:
d.ellipse([p(x + 0.4), p(y + 0.4), p(x + 5.2), p(y + 5.2)],
fill=(38, 34, 28), outline=(74, 68, 58), width=p(0.3))
d.text((p(x + 1.9), p(26.8)), str(7 - i), font=font(1.4), fill=ENGRAVE_DIM)
# ---- instruction lamps ---------------------------------------------------
d.text((p(56), p(15.4)), "INSTRUCTION", font=font(1.4), fill=ENGRAVE_DIM)
for i, op in enumerate("><+-[].,"):
x = 76 + i * 7.6
x = 56 + i * 7.4
lit = i == 1
if lit:
g.ellipse([p(x - 0.6), p(13.4 - 0.6), p(x + 5.9), p(13.4 + 5.9)],
g.ellipse([p(x - 0.6), p(18.6 - 0.6), p(x + 5.1), p(18.6 + 5.1)],
fill=BULB + (210,))
d.ellipse([p(x + 0.6), p(14.2), p(x + 5.0), p(18.6)], fill=BULB,
d.ellipse([p(x + 0.5), p(19.2), p(x + 4.1), p(22.8)], fill=BULB,
outline=(120, 88, 34))
else:
d.ellipse([p(x + 0.6), p(14.2), p(x + 5.0), p(18.6)], fill=(40, 36, 30),
d.ellipse([p(x + 0.5), p(19.2), p(x + 4.1), p(22.8)], fill=(40, 36, 30),
outline=(74, 68, 58))
d.text((p(x + 1.7), p(19.6)), op, font=font(2.0), fill=ENGRAVE)
d.text((p(x + 1.3), p(23.6)), op, font=font(1.9), fill=ENGRAVE)
# ---- dp lamps ------------------------------------------------------------
d.text((p(78.4), p(29.6)), "DP", font=font(1.4), fill=ENGRAVE_DIM)
d.text((p(50.4), p(30.6)), "DP", font=font(1.4), fill=ENGRAVE_DIM)
for i in range(6):
lit = i < 4
x0, y0 = 84 + i * 5.4, 29.4
x0, y0 = 56 + i * 5.4, 30.4
if lit:
g.rounded_rectangle([p(x0), p(y0), p(x0 + 4.4), p(y0 + 2.8)],
radius=p(0.9), fill=NEON + (170,))
@@ -122,20 +123,9 @@ def main():
d.text((p(cx - 19), p(cy + 18.8)), "DATA RING 64 (dp lit)", font=font(1.4),
fill=ENGRAVE_DIM)
# ---- mechanical step counter --------------------------------------------
d.text((p(126), p(52.4)), "STEPS", font=font(1.5), fill=ENGRAVE_DIM)
d.rounded_rectangle([p(126), p(55.4), p(172), p(64.6)], radius=p(0.8),
fill=(28, 26, 24), outline=STEEL, width=p(0.35))
for k in range(5):
x = 127.4 + k * 8.8
d.rounded_rectangle([p(x), p(56.4), p(x + 8.0), p(63.4)], radius=p(0.5),
fill=(226, 216, 190), outline=(96, 90, 80))
tw = d.textlength(str(k), font=font(3.4))
d.text((p(x + 4.0) - tw / 2, p(57.0)), str((11859 >> (4 * (4 - k))) & 0xF)
if False else str([0, 1, 6, 3, 4][k]), font=font(3.2),
fill=(28, 26, 24))
d.text((p(126), p(65.8)), "MECHANICAL, CLUTCH ON IN STEP MODE", font=font(1.2),
fill=(128, 121, 106))
# (there is deliberately no step counter here: the ISA cannot observe time, so
# the panel does not show time either. A running count is a debugging number,
# and debugging numbers come out of the serial port.)
# ---- buttons + input byte ------------------------------------------------
for cx_, label in ((18.0, "RUN"), (34.0, "STEP"), (50.0, "RESET")):
@@ -172,12 +162,12 @@ def main():
font=font(1.2), fill=(128, 121, 106))
# ---- optional mechanical dp dial ----------------------------------------
d.ellipse([p(153), p(73), p(171), p(91)], fill=(146, 140, 128),
d.ellipse([p(140), p(55), p(166), p(81)], fill=(146, 140, 128),
outline=(96, 90, 80), width=p(0.4))
d.ellipse([p(159.9), p(79.9), p(164.1), p(84.1)], fill=(60, 56, 50),
d.ellipse([p(151.2), p(66.2), p(157.4), p(72.4)], fill=(60, 56, 50),
outline=(32, 30, 26))
d.line([p(162), p(82), p(167.4), p(76.6)], fill=(56, 52, 46), width=p(0.45))
d.text((p(152), p(92.0)), "MECHANICAL DP", font=font(1.3), fill=ENGRAVE_DIM)
d.line([p(153), p(68), p(161.4), p(59.6)], fill=(56, 52, 46), width=p(0.5))
d.text((p(140), p(82.4)), "MECHANICAL DP", font=font(1.4), fill=ENGRAVE_DIM)
img = Image.alpha_composite(img.convert("RGBA"),
glow.filter(ImageFilter.GaussianBlur(p(0.7)))).convert("RGB")