Repository navigation
settings: share /VMS checks between launch and the Installed Extension page - #68
Merged
SensoriumEmbedded merged 6 commits intoOct 26, 2026
Merged
Conversation
…xtension page The page copied find(), refresh() and preflight() and had drifted: it skipped the module-payload and client-bank CRC passes, so a package with a bad CRC showed launchable and then failed at launch. VmRegistry now owns the folder rule, the bounded /VMS walk and verify(), and find(), refresh(), preflight() and the page all call them. SDSlotFilled moves to Teensy.ino beside its other caller; SD.begin already muxes DAT3 back, so the pin needs no restore of its own. The page keeps rows for the reasons and the last launch when many packages are listed, and counts any it still has to cut. The docs say what '!' covers.
The page redrew with a full read of every package's module and client banks. It now checks sizes and headers only; launch still verifies every CRC.
kfox
marked this pull request as ready for review
October 21, 2026 19:49
SensoriumEmbedded
requested changes
Oct 22, 2026
SensoriumEmbedded
left a comment
Owner
There was a problem hiding this comment.
Thanks for putting the page and the launch on one /VMS scan.
Memory: on the TR+, RAM1 variables are unchanged and ITCM code grows 80 B net; the TR is unchanged. Both of these are worth doing before merging:
- The
walk<>template's FLASHMEM doesn't hold for every instance.walk<>is declared FLASHMEM, but the instancerefresh()uses (388 B) still lands in ITCM, along with veneers forreadManifestandvm_path_component. A plain FLASHMEM function in place of that lambda avoids it. SDSlotFilledlost its FLASHMEM in the move toTeensy.ino, and its callers aren't timing-critical.
With those, it's ready.
Hardware testing still to do: for one of us to possibly get to before release
The PR says the firmware wasn't compiled. CI built both targets at this head, and so did I.
- the Installed Extension page:
- with more than 8 packages (the
+N morerows) - with a bad-checksum module, which should be listed, then refused at launch
- with the card pulled and reinserted
- with more than 8 packages (the
- power-up autolaunch with and without a card, now that
CheckLaunchSDAutogoes throughSDSlotFilled()
Thanks again.
kfox
marked this pull request as draft
October 26, 2026 14:52
# Conflicts: # Source/Teensy/Teensy.ino
walk<> was a FLASHMEM template, but the instance refresh() uses landed in ITCM (388 B), with veneers for readManifest and vm_path_component. walk now takes a FLASHMEM visitor function and a context pointer. SDSlotFilled gets back the FLASHMEM it had before it moved to Teensy.ino.
Each draw that finds no begun card restarts it, and the menu's last read can still be open then, so it ends that read first as SDFullInit and MenuChange do.
Contributor
Author
|
Thank you for the review and the measurements! I merged current main (5f16876) into this PR. Main now has
Memory, TR+ main image: ITCM code is 198,632 B on main, 198,696 B at the merge before these fixes, and 198,312 B now, 320 B under main. RAM1 variables are unchanged (214,212 B). The TR builds too. |
kfox
marked this pull request as ready for review
October 26, 2026 15:33
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.
Follow-up to the Installed Extension package list (ced99da), from its review.
Background. On a TR+, an installed extension (for example an emulator) opens file types like
.nesor.a26. Each file type is registered by a small folder in/VMSon the SD card. Two parts of the firmware read those folders:The page is meant to show what a launch would do. Before this PR each one had its own copy of the folder scan and the checks, so they could disagree: the page could list a folder as fine and the launch then refuse it.
What changes
VMRegistry.h), so what the page marks is what the launch does.SDSlotFilled(), used by both the page andCheckLaunchSDAuto.SDBegin(), so an SD read left open is ended before the card restarts, as it is inSDFullInitandMenuChange./VMSscan andSDSlotFilled()stay out of ITCM. The scan takes aFLASHMEMvisitor function rather than being a template, becauseFLASHMEMon a template does not reach every instance.+N morerow, and shows a+N more notesrow if the explanations don't fit.General_Usage.mdandTR_Host_Extensions.mdnow say what the!mark covers.Verified:
node tools/verify-extensions.mjspasses, including new cases for a bad-checksum module and for many folders. Both targets build. On the TR+, ITCM code in the main image is 320 B smaller than on main (198,632 to 198,312 B) and RAM1 variables are unchanged. The card-detect pin behavior was not tried on a board.