Commit Graph

1453 Commits

Author SHA1 Message Date
bryanthaboi f600677874 Merge pull request #2007 from laaledesiempre/fix/main-thread-jitter
fix(core): cut per-frame allocation churn and GC pressure on the main loop
2026-08-30 21:38:09 -04:00
bryanthaboi b7c342ab28 Merge pull request #2006 from laaledesiempre/fix/pokeport-audio-rate
fix(audio): honor POKEPORT_AUDIO_RATE in chip synth
2026-08-30 21:38:06 -04:00
laaledesiempre 3659252a88 fix(audio): honor POKEPORT_AUDIO_RATE in chip synth
The sbc/portmaster launcher exports POKEPORT_AUDIO_RATE=22050 and
docs/linux-arm-sbc.md describes it as halving synthesis CPU on
Cortex-A53 handhelds, but nothing in the engine read it: ChipSynth
always rendered at 44100 Hz, and snapTicks baked that rate in as the
integer rational 1470/512 (so once the rate does change, music plays
at half tempo/pitch unless snapTicks follows).

Read the env var at module load (validated to 8000-48000, 44100
fallback) and make snapTicks rate-aware.  At 44100 the new form is
arithmetically identical to the old one
((ticks*44100 + 7680)/15360 == (ticks*1470 + 256)/512), so desktop
behavior is unchanged.

Tested on an RG351MP (RK3326, dArkOS): correct music tempo and pitch
at 22050 Hz, halved synthesis work on the audio worker.
2026-08-30 20:57:02 -03:00
laaledesiempre a4bbcc10ab fix(core): cut per-frame allocation churn and GC pressure on the main loop
On weak single-core handhelds (RK3326/RG351MP) the main thread sits at
100% CPU, so every millisecond of jitter drops a frame: constant
stuttering while walking even at PERFORMANCE LOW with all mods off,
while average CPU usage stays unchanged.  Three sources of per-frame
garbage and pause on the hot path:

- Game:step / Game:logicSpeed passed inline closures to ModRuntime.call,
  allocating a fresh function 60 times per second.  Hoist both to
  module-level locals; behavior is identical.
- Game:update advanced the incremental collector every rendered frame.
  Space it to every 4th frame: the explicit frees the comment refers
  to still do the heavy lifting, collection stays incremental, and the
  stepping itself stops competing with the 16.6ms frame budget.
- checkEmergencyQuit called love.joystick.getJoysticks() (a fresh
  table) twice per frame to guard a 5-second hold combo.  Cache the
  joystick list and refresh it once per second; a 1s hotplug delay is
  irrelevant against a 5s hold.

Tested on an RG351MP (RK3326, dArkOS, v0.2.41): eliminates the
constant walking stutter with all mods off, and with 11 mods
re-enabled.  Average CPU is unchanged (the cost was variance, not
load), which matches the diagnosis.
2026-08-30 20:56:51 -03:00
bryanthaboi 17f36f48e4 Merge pull request #2000 from bryanthaboi/dev v0.2.42 2026-08-30 19:47:12 -04:00
bryanthaboi e2c021c4d0 Merge pull request #1999 from 1Jamie/audio-pitch-fix 2026-08-30 19:05:56 -04:00
1jamie e97def0c4f revereted attaching game spe3ed to sound.setRate so that audio plays the
same reguardless of speed
2026-08-30 16:51:18 -05:00
github-actions dfa7861091 chore(ios): update app-repo.json [skip ci] 2026-08-30 14:31:58 -04:00
bryanthaboi 3d3a9ba4b6 Merge pull request #1995 from bryanthaboi/dev v0.2.41 2026-08-30 14:19:21 -04:00
bryanthaboi c18fe7db50 Merge pull request #1918 from colsonrice/feat/gen2-export-map-objects 2026-08-30 14:05:46 -04:00
bryanthaboi ccd3abb3b3 Merge pull request #1984 from bryanthaboi/feat/uri-launch-args 2026-08-30 14:04:38 -04:00
bryanthaboi 104cdfc60f Merge pull request #1993 from 1Jamie/perf-adjust 2026-08-30 13:51:01 -04:00
1jamie a1adeb4676 Enhance PresentProbe and PresentSync for improved frame pacing and sync detection
- Updated PresentProbe to measure inter-present cadence accurately, ensuring that ambiguous signals default to FrameCap.
- Refined classification logic to prioritize stable cadence over unreliable hardware gating, enhancing the robustness of frame pacing.
- Adjusted PresentSync documentation to clarify probe isolation and its implications for sync confirmation.
- Improved test cases to validate the new cadence-based gating logic across various platforms, ensuring consistent behavior in frame pacing.
2026-08-30 12:11:56 -05:00
Adrian Castro 1e8713781d refactor(ios): clarify webclip identifiers 2026-08-30 18:45:42 +02:00
Adrian Castro 7795a6fd3e refactor(ios): rename app clips to web clips 2026-08-30 18:45:42 +02:00
Adrian Castro 2f1cfb43f5 fix(ios): deliver webclip profiles through local server 2026-08-30 18:45:42 +02:00
Adrian Castro 18cf2257a8 fix(ios): capture launch options before scene creation 2026-08-30 18:45:42 +02:00
Adrian Castro 4f3f9221d3 fix(ios): hook optional scene URL callbacks 2026-08-30 18:45:42 +02:00
Adrian Castro 72b4179cf6 fix(ios): capture launch URLs before scene setup 2026-08-30 18:45:42 +02:00
Adrian Castro 00a2486555 feat: add URI launch options and unified platform builds 2026-08-30 18:45:42 +02:00
1jamie 07071e334c Refine VSync detection and FixedStep logic for improved frame pacing
- Updated PresentSync to accurately measure present() block time, ensuring that the probe does not misclassify sync status due to FrameCap sleep artifacts.
- Enhanced FixedStep to implement a hard ceiling on catch-up debt, preventing input starvation during high-speed scenarios.
- Adjusted logic in Game and Game2 to utilize the new catchupLimit function for setting maxAccum, ensuring consistent behavior across speed multipliers.
- Improved test coverage for PresentProbe and PresentSync to validate the new logic and edge cases.
2026-08-30 11:29:43 -05:00
1jamie f82f565cae Fix to vsync measuring and detection and fixes fixestep so it snaps wallclock dt before applying speed
the display sync stuff i added was probing whether vsync was actually working, but it was measuring the wrong thing. during the probe we software-cap at 60 for safety, and the probe was looking at the gap between frames... which includes the sleep 😅 .....  so it always looked like sync was fine even when the driver was ignoring it. on something like the ally x on windows thats a real problem. vsync says on, probe says gated, we lift the cap and snap logic to the panel hz, then youre basically uncapped. at 2–4x that turns into hitching, dropped frames, dropped input, that weird half second freeze. speed swapping wasnt desyncing the driver, it was just making the bad path hurt more.
the solution is just we time present() itself now, not the gap after it, this way the warmup sleep cant fake a pass. if sync is unclear or broken we just stay on a capped 60 and dont snap logic. Also fixed fixedstep so it snaps wall clock dt before applying speed, so in general the 2-4x speed swaps dont screw the pacing math anymore
2026-08-30 11:12:19 -05:00
github-actions 2b62ccac4b chore(ios): update app-repo.json [skip ci] 2026-08-30 10:26:14 -04:00
bryanthaboi 0cf543d597 Merge pull request #1988 from bryanthaboi/dev v0.2.40 2026-08-30 10:13:19 -04:00
bryanthaboi 308605fd61 CLOSES #1944, CLOSES #1952, CLOSES #1967, CLOSES #1968, CLOSES #1969, CLOSES #1970, CLOSES #1972, CLOSES #1974, CLOSES #1975, CLOSES #1976, CLOSES #1977, CLOSES #1978, CLOSES #1979, CLOSES #1980, CLOSES #1981, CLOSES #1982, CLOSES #1983, CLOSES #1985, CLOSES #1986 2026-08-30 10:09:50 -04:00
bryanthaboi 5c850d670e CLOSES #1938, CLOSES #1940, CLOSES #1941, CLOSES #1943, CLOSES #1945, CLOSES #1946, CLOSES #1948, CLOSES #1949, CLOSES #1950, CLOSES #1953, CLOSES #1955, CLOSES #1957, CLOSES #1960, CLOSES #1961, CLOSES #1962, CLOSES #1963, CLOSES #1964 2026-08-30 08:04:35 -04:00
Colson Rice 532972de59 Carry the map's object state when a Gen 2 export moves maps 2026-08-29 21:27:25 -04:00
github-actions 2adc61a27f chore(ios): update app-repo.json [skip ci] 2026-08-29 21:03:40 -04:00
bryanthaboi f90c3370e8 Merge pull request #1966 from bryanthaboi/dev v0.2.39 2026-08-29 20:49:53 -04:00
bryanthaboi 08717916a8 Merge pull request #1965 from 1Jamie/perf-adjust 2026-08-29 20:46:57 -04:00
1jamie 2f6c5527f6 Add PresentSync integration for improved VSync handling
- Introduced PresentSync module to manage display synchronization.
- Updated love.run() to handle display changes and resizing events with PresentSync.
- Enhanced FrameCap logic to accommodate PresentSync requirements.
- Modified VSync to report effective states and handle driver quirks.
- Updated options menus to reflect PresentSync availability and restrictions.
- Added tests to validate PresentSync functionality and its interaction with VSync settings.

should address issue #1910 and issue #1958
2026-08-29 19:43:25 -05:00
github-actions 5b3295262c chore(ios): update app-repo.json [skip ci] 2026-08-29 09:22:22 -04:00
bryanthaboi 73d004d47e Merge pull request #1942 from bryanthaboi/dev v0.2.38 2026-08-29 09:07:20 -04:00
bryanthaboi cba47b04e8 CLOSES #1928, CLOSES #1929, CLOSES #1930, CLOSES #1931, CLOSES #1933, CLOSES #1934, CLOSES #1935, CLOSES #1936 2026-08-29 09:00:17 -04:00
github-actions 44254387cf chore(ios): update app-repo.json [skip ci] 2026-08-29 07:26:18 -04:00
bryanthaboi 16f30120f5 Merge pull request #1937 from bryanthaboi/dev v0.2.37 2026-08-29 07:09:35 -04:00
bryanthaboi 36ad59bdbb CLOSES #1590, CLOSES #1592, CLOSES #1625, CLOSES #1657, CLOSES #1698, CLOSES #1699, CLOSES #1700, CLOSES #1843, CLOSES #1875, CLOSES #1898, CLOSES #1902, CLOSES #1905, CLOSES #1906, CLOSES #1907, CLOSES #1908, CLOSES #1909, CLOSES #1912, CLOSES #1915, CLOSES #1917, CLOSES #1919, CLOSES #1920, CLOSES #1921, CLOSES #1922, CLOSES #1923, CLOSES #1924, CLOSES #1925, CLOSES #1926, CLOSES #1927 2026-08-29 06:59:38 -04:00
github-actions 7cca7d64d9 chore(ios): update app-repo.json [skip ci] 2026-08-28 16:00:05 -04:00
bryanthaboi fc56b9b05f Merge pull request #1914 from bryanthaboi/dev
further online junk
v0.2.36
2026-08-28 15:44:36 -04:00
bryanthaboi 71200f21dc further online junk 2026-08-28 15:43:13 -04:00
github-actions 20d8e51799 chore(ios): update app-repo.json [skip ci] 2026-08-28 15:29:41 -04:00
bryanthaboi 51d75cbca5 Merge pull request #1913 from bryanthaboi/dev
asdfasdfasfasf
v0.2.35
2026-08-28 15:12:21 -04:00
bryanthaboi 8b9c8fe416 Merge branch 'dev' of https://github.com/bryanthaboi/gen1recomp into dev 2026-08-28 15:07:56 -04:00
bryanthaboi 20b1ecf4aa fixing trades again 2026-08-28 15:07:54 -04:00
github-actions e5a4f3a28b chore(ios): update app-repo.json [skip ci] 2026-08-28 14:44:01 -04:00
bryanthaboi 94dc03d334 Merge pull request #1911 from bryanthaboi/dev
online fixerion
v0.2.34
2026-08-28 14:27:26 -04:00
bryanthaboi 2123bb007a Merge pull request #1903 from AverageConsumer/codex/gen2-deferred-caller-id-latest
fix(gen2): preserve caller identity for deferred phone calls
2026-08-28 14:18:10 -04:00
bryanthaboi 8ad755af06 online bugs 2026-08-28 14:15:51 -04:00
github-actions dec34b00bc chore(ios): update app-repo.json [skip ci] 2026-08-28 12:51:02 -04:00
bryanthaboi da3454ab15 Merge pull request #1904 from bryanthaboi/dev
big freaky style with a twist of skrrrrrrrrrrrt
v0.2.33
2026-08-28 12:34:28 -04:00