Skip to content

Treat every MK2 board as an Elite, whatever revision it reports (#819) - #916

Merged
chrisgleissner merged 1 commit into
GideonZ:masterfrom
enver-haase:fix/elite-board-mk2
Sep 17, 2026
Merged

chrisgleissner merged 1 commit into
GideonZ:masterfrom
enver-haase:fix/elite-board-mk2

Conversation

@enver-haase

Copy link
Copy Markdown
Contributor

Closes #819.

isEliteBoard() answers from a revision table that has no entry for 0x10 — the TI HDMI board that became the C64U — so a board reporting it is told it is not an Elite. On the MK2 that is always wrong: nothing this function gates is revision dependent there. It hides the SID socket shunts and the joystick swapper, and both are present on every MK2 board.

@GideonZ's call in the issue: "The if U64 == 2 return true sounds like the best thing to do." That is what this does. The MK1 branch is the same code as before, moved under #else and not otherwise touched, so a U64 == 1 build decides exactly as it did — including the 0x14 case that reads C64_PLD_JOYCTRL to tell the two variants apart.

Not measured on hardware, and why

The defect needs a board reporting 0x10. Mine reports 0x17, for which isEliteBoard() already answered true, so there is nothing on my machine that changes. I offered in the issue to prove this red then green by forcing the revision; having built it, I think that offer was worth less than it sounded. A forced revision proves the branch, not the device, and I would rather say so than dress it up as a hardware result.

If somebody has a 0x10 board, the check is one line in the menu: the joystick swapper is selectable after this change and greyed out before it.

A second thing, while this file is open

On the MK2 isEliteBoard() gates only config items, through cfg->disable(). That sets setEnabled(false) — and the REST layer never reads that flag, neither in the listing nor on write. route_configs.cc iterates st->items and renders every one of them.

So on a 0x10 board the joystick swapper would have been greyed out in the menu and still readable and settable over PUT /v1/configs/.... That is independent of this change and survives it. Whether disable() is meant to reach the API is yours to say; I have not touched it here.

Built

make u64ii_no_esp in ghcr.io/gideonz/riscv, from a tree with every output/ and result/ under target/ removed first: 461 files, exit 0, no warning from product.cc.

make u64 and make u64_no_esp cannot run in that image at all: the MK1 BSP wants nios2-elf-gcc, which is not in it — the self-hosted runner supplies it by mounting /opt/build-tools. Unmodified master fails at the same file with the same error, so this is the image and not the change. CI builds u64_no_esp, so the MK1 path is covered by this PR's own run rather than by anyone's promise.

isEliteBoard() answers from a revision table that has no entry for 0x10, the TI
HDMI board that became the C64U, so a board reporting it was told it is not an
Elite. On the MK2 that is always wrong: nothing this function gates is revision
dependent there. It hides the SID socket shunts and the joystick swapper, and
both are present on every MK2 board.

Gideon's call, in GideonZ#819: "The if U64 == 2 return true sounds
like the best thing to do." That is what this does. The MK1 branch is the same
code as before, moved under #else and not otherwise touched, so a U64 == 1 build
decides exactly as it did.

Not measured on hardware, and it cannot be from here: the defect needs a board
reporting 0x10, and mine reports 0x17, for which isEliteBoard() already answered
true. Forcing the revision would prove the branch rather than the device, which
is a different claim than the one the issue asked for.

Built: `make u64ii_no_esp` in ghcr.io/gideonz/riscv from a tree with every
output/ and result/ under target/ removed first -- 461 files, exit 0, no warning
from product.cc. `make u64` cannot run in that image at all: it wants
nios2-elf-gcc, which is not in it, and unmodified master fails at the same file
with the same error.
@chrisgleissner
chrisgleissner merged commit f8c4215 into GideonZ:master Sep 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

isEliteBoard() excludes board revision 0x10 (C64U V2.5, TI HDMI) — intentional?

2 participants