Repository navigation
firmware: the GEOS boot image is built per target, ready for GEOS 128 - #75
Conversation
Each GEOS target now names its own TR disk driver, the start-up runs that set its date and time, and where its boot file keeps the C128 reset key. GeosBuildBootImage reads the boot file, swaps the transport, breaks the reset key and sets the clock. GeosBuildBootPrg wraps that image in GEOS 64's BASIC stub, as before. GEOS 128 sets the clock and the date in one 44-byte run, behind a store of zero that the patched run takes over to load X. Its 1581 driver keeps NewDisk after ReadBlock. The transport swap no longer requires the routines it replaces to lie inside the run it overwrites, since one left outside is only unused. The checks that nothing it leaves alone points into the run stay. CONFIGURE is turned off for any auto-exec file whose name contains CONFIG, which catches GEOS 128's "128 CONFIGURE", "128 CONFIG 2.0r" and "64 CONFIG 2.0r". GEOS 64's boot PRG and patched disk are byte-identical to before on the stock GEOS 64 D81.
SensoriumEmbedded
left a comment
There was a problem hiding this comment.
Thank you for splitting the boot image out per target, with GEOS 64's output byte-identical it reads as pure preparation for the 128.
Memory: +192 B of RAM1 code (ITCM) on both boards, with variables, stack and RAM2 unchanged and flash moving by under 1 KB. The two helpers below account for it (182 B; the rest is alignment).
There is one thing I'd like you to look at before merging.
1. Geos64SetDate and Geos64SetTime landed in ITCM (Source/Teensy/GEOS/GeosBoot.h:236 and :243)
Before this PR the GEOS 64 clock patch was inlined into FLASHMEM LaunchGeos, so it lived in flash. Now that the two helpers are reached through the GeosClockRun function pointers they're emitted out of line, and without a FLASHMEM of their own they go to ITCM: 14 B and 168 B, on both the TR and the TR+.
Suggested fix: mark both FLASHMEM static void ... (inline suggestions attached). They run only from the launcher in the main loop, never from an interrupt, and GeosDiskPatch.h already defines FLASHMEM empty for the host harnesses, so the tests build unchanged. Saves 182 B of ITCM per board.
Travis's review of SensoriumEmbedded#75: the GEOS 64 clock helpers keep FLASHMEM now that they are reached through function pointers.
Prepares GEOS 64's boot image code for GEOS 128, with no change to what GEOS 64 does. The GEOS 128 launch is #76, stacked on this one.
Each GEOS target now names its own TR disk driver, the start-up run that sets its date and time, and where its boot file keeps the C128 reset key.
GeosBuildBootImagereads the boot file, swaps the disk transport, breaks the reset key and sets the clock;GeosBuildBootPrgwraps that image in GEOS 64's BASIC stub as before.Verified
npm testcover the per-target patching.Reviewed at medium, and the review's fix commit at low.