palm-client: a saved Slot link is restored at launch while the OS reports a module (checked without touching the bus), so the closed-app check and its wake use the module; with the slot empty it stays off, as before, so a launch can't reset the Visor

This commit is contained in:
rich committed 2026-11-08 19:18:31 -05:00
1 parent f53f851b0e
commit e86b14e440
2 files changed
+7 -5

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ The app is C for GCC 2.95 (prc-tools-remix) and PilRC, against the Palm OS 3.5 S
- During any launch, `SysCurAppDatabase` returns the launched app, not the one in front. To tell whether the app is open, use a feature (`BgSetAppOpen`).
- The channel and contact databases open lazily. `ChannelsOpen` is only called by `ChannelsRefresh` and `ConvosBuild`. Paths that skip those must open the databases themselves, or every lookup quietly fails.
- With no module in the slot, accessing the Springboard slot's address space is a bus error that resets the Visor. Check `HsCardAttrGet(hsCardAttrHwInstalled)` first. Slot is deliberately not restored at launch.
- With no module in the slot, accessing the Springboard slot's address space is a bus error that resets the Visor. Check `HsCardAttrGet(hsCardAttrHwInstalled)` first (`SbSlotState`). A saved Slot link is only restored at launch while the OS reports a module.
- `StrPrintF` hex output printed zeros. Use `TxtHex` (ui/text.c).
- The Visor's clock is local time with no time zone. Everything stored and sent is UTC via the app's UTC-offset preference (`SessionNow`, `SessionLocalPalm`).
- 68k is big-endian; the companion protocol is little-endian. Assemble LE fields byte by byte (see `protocol.c`).
+6 -4
View File
@@ -28,6 +28,7 @@ void AppLoadPrefs(void)
AppPrefs prefs;
UInt16 size = sizeof(prefs);
Int32 west;
UInt32 base, csSize;
SoundsLoad();
MutesLoad();
@@ -36,11 +37,12 @@ void AppLoadPrefs(void)
if (PrefGetAppPreferences(VM_CREATOR, VM_PREFS_ID, &prefs, &size, true) != noPreferenceFound &&
size == sizeof(prefs) && prefs.version == VM_PREFS_VERSION) {
/*
* Slot isn't restored: with no module in the slot, the first bus read
* at csSlot0 is a bus error and resets the Visor, and the Home form
* auto-connects at launch, so a saved Slot made every launch reset.
* Slot only while the OS reports a module: with the slot empty, the
* first bus read at csSlot0 is a bus error that resets the Visor, and
* the Home form auto-connects at launch. SbSlotState doesn't touch the
* bus. The closed-app check needs Slot restored to use the module.
*/
if (prefs.port != VM_PORT_SBLORA)
if (prefs.port != VM_PORT_SBLORA || SbSlotState(&base, &csSize) == SB_SLOT_READY)
TransportSetPort(prefs.port);
SessionSetUtcOffset(prefs.utcOffset);
return;