Skip to content

Repository files navigation

SWOTS — Switch While On The Subway

SWOTS is an experimental motion-cue overlay for Atmosphère and Tesla Menu. It draws animated edge dots from the Switch's handheld six-axis data.

Important

SWOTS is not a medical device and does not guarantee relief. Stop and rest if you feel unwell; seek medical advice for persistent or severe symptoms.

Requirements

Atmosphère, Tesla Menu, and nx-ovlloader. Building also requires devkitPro switch-dev.

Only handheld mode is supported. SWOTS deliberately ignores detached, wireless, and docked controller sources. Compatibility is still limited; see compatibility.

SWOTS starts on the console's built-in SevenSixAxisSensor and restores the original 640x360 render resolution with two RGBA4444 framebuffers. It keeps Console selected while opening and sampling a probe handle for the attached Handheld sensor, then switches only after the stream proves physical responsiveness and remains structurally valid for 600 ms. In hardware testing, a Handheld handle started by SWOTS on HOME, without a game having activated Handheld motion, advanced at roughly 200 Hz while returning the exact static (0,0,-1) acceleration and zero gyroscope placeholder. That HOME-only placeholder cannot qualify. The recorded game- activated Handheld stream was stable; after leaving that game, sustained return of the HOME placeholder falls back to Console after 800 ms. Both active sources replay every unseen HID history entry in chronological order; motion ingestion remains near 60 Hz even when an unchanged image is presented less often. This prevents the faster Handheld stream from collapsing to one latest sample and losing short acceleration impulses. Both sources use fused orientation: Console derives world vertical from its quaternion, while Handheld uses the stable third column of its fused direction matrix. Console subtracts a fixed 1 g baseline along that vertical. Handheld seeds its measured gravity magnitude immediately and tracks only its slow DC change. The resulting vertical linear acceleration passes through damped velocity and position states: the field first lags a translation, crosses during braking, then returns to center, while horizontal acceleration is ignored. Dynamic vertical travel has no small positional clamp. Fused screen tilt also supplies a smaller bounded vertical baseline shift. Gyroscope input counteracts horizontal body-centered turns in the same gravity frame but does not feed the vertical channel. High turn rates are compressed smoothly to avoid temporal aliasing of the periodic grid; slow turns retain their tuned mapping and turn travel is not position-limited. Horizon roll is applied last, so vertical motion remains aligned with real gravity when the screen is rolled. Strong motion briefly enlarges the dots before they ease back to the configured radius. A three-second anti-flapping cooldown applies, and sensor switches never change the 640x360 framebuffer. Console horizon compensation remains 100%; the Handheld fused-direction presentation retains its hardware-tuned 95% gain.

Install

  1. Verify the release ZIP with its published SHA-256.

  2. Extract it to the SD card root.

  3. Confirm these files exist:

    atmosphere/contents/4200000000007E09/exefs.nsp
    atmosphere/contents/4200000000007E09/toolbox.json
    switch/.overlays/SWOTS.ovl
    
  4. Restart the Switch.

  5. Open Tesla → SWOTS → Motion cuesOn.

The package must not contain boot2.flag; Tesla starts the renderer when needed.

Use

  • Configure opacity, dot radius, and a named swatch-based dot color in Tesla → SWOTS, then press B to save and return. Home, Power, the Tesla shortcut, and touch dismissal still cancel the draft.
  • Press B on the SWOTS main screen to close the overlay and resume cues.
  • Select Stop and return to Tesla to stop cues and return to Tesla.
  • The Tesla shortcut also opens and closes the overlay.
  • Off removes the cues and stops the renderer.
  • Settings can be saved while cues are On; the new values take effect when Tesla closes.
  • Cues respond only to physical motion of the handheld Switch, not the in-game camera or a detached controller.
  • While the screen is upright enough to define a horizon, the dot rows remain level with the real world as the Switch is rolled like a steering wheel.

Settings and logs: /config/swots/settings.cfg, /config/swots/renderer.log, and /config/swots/sensor.log.

See troubleshooting for 0x0000FC01, 0x00010801, missing cues, sensor problems, or Tesla conflicts.

Build and test

source scripts/env.sh
make setup-libtesla
make verify -j2
./scripts/deploy.sh /path/to/SWITCH_SD

Host tests do not need devkitPro:

env -u DEVKITPRO make test

Build and verify the release:

make dist -j2
cd dist
sha256sum -c SWOTS-v0.1.0.zip.sha256

The renderer uses a bounded 3 MiB heap, and make verify checks its ELF code plus 0x30000 main-thread stack against the late-launch startup budget. NPDM compatibility depends on the tested ffff0400 capability bytes. Changes to the memory budget, toolchain, permissions, VI, HID, or PM require hardware testing. The development lifecycle must stop sys-ftpd before starting SWOTS; the two System processes are not budgeted to coexist. Title ID: 4200000000007E09.

Upgrade or uninstall

Turn cues Off before replacing files. The overlay and renderer must come from the same release. Restart after upgrading; settings remain in /config/swots/settings.cfg. If upgrading from an internal development build, delete the obsolete switch/.overlays/SWOTS-Lab.ovl.

To uninstall, turn cues Off, restart, then delete:

atmosphere/contents/4200000000007E09/
switch/.overlays/SWOTS.ovl
/config/swots/ (optional)

Project

SWOTS is experimental software with broad legacy-compatible NPDM permissions. Use trusted builds and verify release hashes. See contributing, security, and third-party notices.

SWOTS is independent and is not affiliated with KineStop or Nintendo.

Licensed under GPL-2.0-or-later.

About

Motion-cue overlay for Atmosphère and Tesla Menu

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages