Commit Graph
174 Commits
Author SHA1 Message Date
Dejvino a5921032d7 Trackball: poll every iteration, count all pulses, accelerate
The crosshair crawled one 14px segment per tick because the ball pins
were sampled only once per game frame (33 ms) and just compared to the
previous level: a fast roll completed whole pulse cycles between reads,
so most edges were dropped and at most one step per frame was applied.

Now pollTrackball() runs in the loop() hot path (~1 ms apart) and counts
every edge into per-direction accumulators; applyTrackball() consumes
them once per frame, moving the cross steps * CROSS_STEP and capping at
CROSS_MAX_STEP (48 px/frame) — slow roll = fine steps, hard flick =
the cursor flies across the screen, arcade-style. Accumulation is
disabled outside PLAYING/BANNER and the first read is primed so the
power-up pin levels don't count as steps.

Emulator: mouse wheel now simulates ball pulses (6 edges per notch,
drained one toggle per iteration) for desktop testing.
2026-11-11 06:25:06 +01:00
Dejvino 0f85c75331 Missile Command: arcade rules, crafts, trail system v2, emulator wave skip
Game (examples/MissileCommand):
- Trails rewritten as an analytic flight path (pos is a pure function of
  distance travelled): paint and erase replay the exact same pixels, so
  blinking trails leave zero residue. Smart bombs wiggle (S-curves) with
  deterministic paths; erase band widened to a symmetric 7px so the ±1px
  Bresenham slope jitter between paint/erase endpoints can never leak
  paint ink (verified zero strays across dense frame captures).
- 2600 look: bright steady missile head dot with a flashing trail
  (shared blink phase), trails vanish on death/impact; AA rockets stay
  moving dots.
- Arcade rules: bomber planes (100x mult) and satellites (250x mult)
  cross the sky dropping bombs; max 3 city kills per wave; bonus cities
  at every 10k kept in reserve and deployed between waves; battery
  silos rebuilt and replenished at each wave start (they no longer stay
  dead across levels); center battery fires fast rockets, sides slow.
- Wave-start attack alarm (four falling tones, once); volume U/V/M with
  OSD; sound task zeroes the I2S DMA ring when the queue drains so a
  finished sound's tail no longer loops forever.

Emulator:
- --wave N flag to skip straight to a wave for quick testing
- --dump-interval N rolling frame captures (seq%05d.bmp)
- shim: uxQueueMessagesWaiting added
2026-11-10 23:42:01 +01:00
Dejvino 45ffa87425 Trails: match erase width to draw width, bright flashing missile head
- Enemy missile trails now drawn 3px thick via drawThickLine() with a
  bright head dot (white) that flashes against the trail color every
  couple of frames, like the Atari 2600
- eraseBombTrail() uses a thicker erase band than the draw (5px, 7px for
  wigging smart bombs) plus a 2px tip circle, so no trail residue is
  left behind when a missile dies or impacts
2026-11-10 22:11:33 +01:00
Dejvino d4e6b4e6be Add Missile Command game for T-Deck + desktop emulator
Game (examples/MissileCommand):
- Classic Missile Command: 6 cities, 3 batteries x 10 missiles,
  escalating waves, smart bombs, score multiplier, session high score
- Trackball aims, press/tap fires, keyboard A/S/D selects battery,
  screen tap aims+fires
- Rendering: incremental TFT_eSPI drawing (persistent enemy trails that
  vanish on death, no AA-rocket trails, explosion circles that repair
  terrain, ghost-free crosshair)
- Sound (sound_engine.cpp): non-blocking I2S task on core 0; wave-start
  alarm of four falling tones (like the original), sweeps/noise effects,
  U/V/M keyboard volume control with OSD, master volume scaling

Emulator (emulator/):
- SDL2 host that compiles the unmodified sketch against shim headers
  (Arduino, TFT_eSPI->framebuffer, GT911 touch, I2C keyboard, I2S->SDL
  audio); arrow keys emulate the trackball, --autoplay/--frames/--dump
  flags for headless smoke tests
2026-11-10 22:06:41 +01:00
lewisxhe 9aac147a31 Update factory firmware 2026-11-03 17:25:43 +08:00
lewisxhe 173cea69e3 Update factory firmware 2026-11-03 09:19:29 +08:00
lewisxhe 2027dee791 Update firmware page 2026-10-27 09:46:25 +08:00
lewisxhe 1dddf6e0d3 Update README 2026-09-29 14:41:24 +08:00
lewisxhe 980269291b Update factory 2026-09-08 11:03:10 +08:00
lewisxhe d0d202b456 Update README 2026-09-03 11:09:09 +08:00
lewisxhe 274ddaa0d0 fix arduino ide build error 2026-07-21 15:23:30 +08:00
lewisxhe 5939aca72e fix factory gps bug 2026-05-15 10:46:26 +08:00
lewisxhe 7fd1056431 Add grove model 2026-05-11 14:27:27 +08:00
lewisxhe 651631d789 Update README 2025-12-24 08:57:26 +08:00
lewisxhe 4087b04e3f Update README 2025-12-22 16:41:38 +08:00
lewisxhe 366af63a2b Update README 2025-12-22 16:30:43 +08:00
lewisxhe 306c6cb83b Update fw 2025-11-13 09:55:11 +08:00
lewisxhe 1030f90e1d Added fw 2025-11-12 14:53:56 +08:00
lewisxhe ac871c78be Update Meshtastic firmware 2025-10-28 09:28:00 +08:00
lewisxhe b83fa31a73 Update README 2025-10-21 10:13:47 +08:00
lewisxhe 13d822798b Added ant datasheet 2025-10-07 13:40:14 +08:00
lewisxhe e041323369 Added i2s tone https://github.com/Xinyuan-LilyGO/T-Deck/issues/99#issuecomment-3329099006 2025-09-25 08:54:23 +08:00
lewisxhe ba3855440b Added gps sch https://github.com/Xinyuan-LilyGO/T-Deck/issues/98 2025-08-05 11:22:09 +08:00
lewisxhe bd6fbc4a0b Update README 2025-06-20 14:24:19 +08:00
lewisxhe e2aeb7e8ac Update firmware 2025-06-20 14:20:19 +08:00
lewisxhe c1982c983c Factory example add keyboard set brightness method 2025-06-20 14:19:56 +08:00
lewisxhe 12f12f8cd6 ESP32C3 Keyboard firmware add revision notes 2025-06-20 14:19:20 +08:00
lewisxhe a107982e04 Factory example recording GPS completion takes time 2025-06-20 10:10:54 +08:00
lewisxhe a84522e8c4 Update READMEhttps://github.com/Xinyuan-LilyGO/T-Deck/issues/90#issuecomment-2980116659 2025-06-18 08:51:29 +08:00
lewisxhe ec2dfd955d Update README https://github.com/Xinyuan-LilyGO/T-Deck/issues/88 2025-06-16 16:04:16 +08:00
Lewis HeandGitHub ef0868fc71 Merge pull request #87 from kilrah/keyboard_raw
Add new commands to allow reading raw key states
2025-06-12 17:13:55 +08:00
Kilrah 1eb6fb0ebd Add new commands to allow reading raw key states 2025-06-11 21:58:37 +02:00
lewisxhe 2ef9f07627 Update README 2025-06-06 17:18:11 +08:00
lewisxhe 975e485d32 Added mesh fw v2.6.11 fixed touch 2025-06-06 17:11:21 +08:00
lewisxhe faf8dd034a Added mesh-ui v2.6.8 2025-05-12 14:29:22 +08:00
lewisxhe babfe1972c Fixed typo https://github.com/Xinyuan-LilyGO/T-Deck/issues/81 2025-04-07 09:59:43 +08:00
lewisxhe 9e68cc8206 Update README 2025-04-01 16:30:03 +08:00
lewisxhe 65c60427fa Update README 2025-03-31 17:16:54 +08:00
lewisxhe abdd781f32 Merge branch 'master' of https://github.com/Xinyuan-LilyGO/T-Deck 2025-03-31 16:09:29 +08:00
lewisxhe 46a8b8767f Added T-Deck mesh device-ui fw 2025-03-31 16:09:26 +08:00
Lewis HeandGitHub 879de3b205 Merge pull request #77 from hreikin/patch-1
Fix ledc error reported over serial on boot.
2025-03-17 09:54:40 +08:00
Michael HaslamandGitHub 11d463ceda Fix ledc error reported over serial on boot. 2025-03-16 00:10:11 +00:00
lewisxhe 4d0cc4dc6e Update README 2025-03-07 10:37:18 +08:00
lewisxhe b96b6c13d4 Added ant datasheet 2025-02-28 17:23:49 +08:00
lewisxhe a120b94749 Fixed GPS Checksum 2025-02-22 15:40:19 +08:00
lewisxhe 0e054c071e Update fw 2025-02-15 14:05:16 +08:00
lewisxhe 057ad4480a Update example 2025-02-06 14:30:47 +08:00
lewisxhe 1faddb5d24 Fixed examples https://github.com/Xinyuan-LilyGO/T-Deck/issues/72 2025-01-20 11:31:13 +08:00
lewisxhe 49c28ae68e Update keyboard fw 2024-12-25 09:25:04 +08:00
lewisxhe 94e88996b4 Update T-Deck keyboard example 2024-12-25 09:24:52 +08:00