Commit Graph
14 Commits
Author SHA1 Message Date
shenandshen a6c3655e21 Android: track disjoint mip layouts and add Vulkan validation tools 2026-10-15 18:53:45 -07:00
shenleiandClaude Opus 5.5 8eb294e7e0 Merge upstream v1.0.15 into android-port
Conflicts resolved: hle_audio.c keeps the AAudio downmix on Android and takes
upstream's 5.1 downmix on Apple; hle_nvn.c keeps mtl_queue_flush / ADPF pacing
on Android. Android translates synchronously on the submit thread for now (the
Vulkan backend's fence also counts readback commits); Vulkan gets no-op
mtl_host_latch / mtl_host_apply; compat adds pthread_attr_set_qos_class_np.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:07:20 +09:00
jhaizhou b94670c795 v1.0.15: shell is now build input (.zip), launch self-check for incomplete packages and devices without Metal 3, graphics translation on its own thread, save with the pause menu open, wide-iPhone item tooltip and Chronicle rewards fixes 2026-10-15 04:32:15 +08:00
jhaizhouandseedds e2a0c9a9b5 NPC speech restored (explicit 5.1 to stereo downmix); graphics memory pools made resident only on first GPU use (about 0.5 GB less held); render targets written through a format-changing view attached with that format, sRGB swapchain presented through a non-sRGB view (#36); bloom / FXAA texture-slot rewrites mark bindings dirty; Mac App plays sound and fills 16:10 screens
The render-target view issue (#36) was found and diagnosed by seedds on another port built from this repository, who also proposed the fix direction.

Co-authored-by: seedds <3463322+seedds@users.noreply.github.com>
2026-10-14 21:46:55 +08:00
shenleiandClaude Opus 5.5 1ceeeaba77 Android: NaN-free float color outputs against the top-of-screen flicker blocks; TBDR clears; mprotect ENOMEM fix
- Shader translator (Vulkan pack only): pixel shaders store 0 instead of NaN in
  float color outputs (XLATE_NAN_OUT=0 disables). ps_foliage occasionally writes
  NaN pixels on Adreno; the downsample / bloom chain spread them into blocks.
  Float min/max/clamp use NMin/NMax/NClamp like Maxwell FMNMX / .SAT
  (XLATE_NAN_MINMAX=0 disables).
- Vulkan backend: pending full clears become loadOp=CLEAR (DM_NVN_TBDR=0
  disables); TBDR / store profile stats; per-batch command pools and query reset.
- Trace diagnostics: NaN / Inf scan of float targets (DM_VK_NANSCAN_PS,
  DM_VK_NANSCAN_BOX), burst readback of the top rows (DM_VK_BURST*).
- nvn_dirty: protection unit max(pagesize, 16K) to stay under the VMA limit
  (mprotect ENOMEM crash); log the process mapping count.
- Upload-MB stat underflow fix; t_vk_perf test fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:36:26 +09:00
shenleiandClaude Opus 5.5 3c25cd89fc Android: move the shell to dm/android and the Vulkan backend to dm/gfx/vulkan
Mirror the iOS layout instead of nesting Android inside dm/host:
- dm/android/app       GameActivity app (manifest, java, res, build_apk.sh)
- dm/android/Sources   front_app.c, touch_app.c, front_headless.c
- dm/android/Makefile  entry point (apk / lib / install / headless / tests);
                       rules in build.mk (was dm/host/Makefile.android),
                       run with dm/host as cwd; outputs in dm/android/build/
- dm/android/tests     t_vk_perf
- dm/gfx/vulkan        nvn_vk.c and friends, next to the Metal backend

Only include paths, build paths and docs change; no code changes.
The Mac / iOS source lists do not pick up gfx/vulkan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:59:36 +09:00
shenleiandClaude Opus 5.5 4d91f80bae Android port (Adreno): Vulkan backend, GameActivity app, touch HUD, lifecycle, minimap quest goals
- host/android: Vulkan replay backend (nvn_vk.c) with pipeline/descriptor caching, ADPF,
  AChoreographer present link; Linux compat layer; Makefile.android (headless dmhost + APK lib)
- android/app: GameActivity shell without Gradle (build_apk.sh), AAudio output, touch HUD port
  (touch_app.c + TouchOverlay.java, three layers: body / joystick / minimap goals),
  lifecycle save-on-background like iOS, art_from_ipa.py for touch / HUD / mapgoal art
- touch: shared touch controls moved from ios/Sources to dm/touch
- patch_nso.py Android ruleset, dmsh_vk.py shader pack, DM_TOUCH_PRODUCT defaults
- hle_audio: AAudio resume waits through STARTING and reopens once on failure
- .gitignore: local resources/ (original game data) never committed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:55:05 +09:00
jhaizhou feb2bb9fdc Greater Rift minion life fix (#23); Mac click-to-walk and keyboard key names; older-API declaration de-duplication 2026-10-14 05:22:34 +08:00
jhaizhou d9e95c3381 Older systems: iOS 18+ / macOS 15+ via the older-API build; floating left stick; runeword required level; Mac keyboard, mouse and docs; clearer older-device dialog 2026-10-14 01:49:25 +08:00
jhaizhou 2eb5758771 Turn snap-back smoothing and gamepad turning feel (r42); close several slow memory accumulations; Mac App mouse, language switch and warm-up list 2026-10-13 22:00:06 +08:00
jhaizhou 6a2474d917 Native macOS App (first version): dm/tools/mac_app.sh, docs/MAC.md
The Mac host can now be packaged as a double-click macOS App with keyboard, mouse and gamepad input, saves under Application Support, a first-launch resource-folder picker and save-before-quit. dm/tools/mac_app.sh builds it after ./setup.sh; by default the package carries no derived content and points at this machine's build outputs, so it runs only on the Mac that built it and needs only a local ad-hoc signature.

Nobody has played this version by hand yet; what was verified was run unattended. See docs/MAC.md.
2026-10-13 16:49:19 +08:00
jhaizhou ef9b1ff137 Gamepad pause menu row order; close an ordering race in dirty-page tracking
- Gamepad pause menu: "Options" and "Game Difficulty" swap places. With a gamepad the cursor rests on the centre row when the menu opens, and pressing confirm right away used to change the difficulty setting. Touch layout is unchanged.
- Graphics layer (preventive): setting a page read-only now marks it BUSY until mprotect has landed, so an unprotect-before-write from another thread can no longer leave a page read-only with state NONE. Adds the unit test t_dirty_race, which stages the interleaving deterministically.
2026-10-13 14:57:34 +08:00
jhaizhou 7041472185 Give the game's main heap more headroom; add heap readouts to the memory log line (#18)
The game carves out a fixed ~3.08 GB and its main heap was left with roughly 100-180 MB free on entering a game, down to a few tens of MB while changing maps. When an allocation fails there, the original code writes through the null result. The pool reported to the game is now 512 MB larger, which turns one-to-one into main heap headroom; untouched heap pages do not count toward resident memory.

The periodic memory line now also logs the main heap total / free / largest allocatable block and, on iOS, the distance to the system memory limit.

Measured in the iOS package on a Mac; devices with 6 GB of RAM have not been measured yet.
2026-10-13 11:31:47 +08:00
jhaizhou 46578a2b5d Initial public release 2026-10-12 16:51:08 +08:00