Treat every MK2 board as an Elite, whatever revision it reports (#819) - #916
Merged
Merged
Conversation
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
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #819.
isEliteBoard()answers from a revision table that has no entry for0x10— 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
#elseand not otherwise touched, so aU64 == 1build decides exactly as it did — including the0x14case that readsC64_PLD_JOYCTRLto tell the two variants apart.Not measured on hardware, and why
The defect needs a board reporting
0x10. Mine reports0x17, for whichisEliteBoard()already answeredtrue, 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
0x10board, 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, throughcfg->disable(). That setssetEnabled(false)— and the REST layer never reads that flag, neither in the listing nor on write.route_configs.cciteratesst->itemsand renders every one of them.So on a
0x10board the joystick swapper would have been greyed out in the menu and still readable and settable overPUT /v1/configs/.... That is independent of this change and survives it. Whetherdisable()is meant to reach the API is yours to say; I have not touched it here.Built
make u64ii_no_espinghcr.io/gideonz/riscv, from a tree with everyoutput/andresult/undertarget/removed first: 461 files, exit 0, no warning fromproduct.cc.make u64andmake u64_no_espcannot run in that image at all: the MK1 BSP wantsnios2-elf-gcc, which is not in it — the self-hosted runner supplies it by mounting/opt/build-tools. Unmodifiedmasterfails at the same file with the same error, so this is the image and not the change. CI buildsu64_no_esp, so the MK1 path is covered by this PR's own run rather than by anyone's promise.