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>
This commit is contained in:
shenlei
2026-10-14 14:55:05 +09:00
co-authored by Claude Opus 5.5
parent 5bc5a01087
commit 4d91f80bae
106 changed files with 7009 additions and 181 deletions
+22 -1
View File
@@ -21,9 +21,30 @@ def header(out_dir, mod):
h = {}
for line in open(f'{out_dir}/{mod}.fixups.tsv'):
if not line.startswith('#'): break
k, v = line[1:].split(); h[k] = int(v, 0) # 0x 开头为偏移,十进制为槽号 | A 0x prefix means an offset, decimal means a slot number
k, v = line[1:].split()
h[k] = v if k == 'ABI' else int(v, 0) # 0x 开头为偏移,十进制为槽号;ABI 为名字 | A 0x prefix means an offset, decimal means a slot number; ABI is a name
h.setdefault('ABI', 'apple')
return h
def slot_base(ins, i, hdr):
"""ins[i:] 是否为槽块基址前缀(patch_nso.emit_slot_base)→ (基址寄存器, 指令条数),否则 None。
apple:mrs xT, tpidrro_el0;linux-bionic:mrs xT, tpidr_el0 / ldr xT, [xT, #TP_SLOT_OFF]。
Whether ins[i:] is a slot block base prefix (patch_nso.emit_slot_base) → (base register, instruction count), else None.
apple: mrs xT, tpidrro_el0; linux-bionic: mrs xT, tpidr_el0 / ldr xT, [xT, #TP_SLOT_OFF]."""
if i >= len(ins) or ins[i].mnemonic != 'mrs': return None
T = ins[i].operands[0].reg
if hdr['ABI'] == 'apple':
return (T, 1) if ins[i].op_str.endswith('tpidrro_el0') else None
if not ins[i].op_str.endswith('tpidr_el0') or i + 1 >= len(ins): return None
l = ins[i + 1]
if l.mnemonic != 'ldr' or l.operands[0].reg != T or l.operands[1].mem.base != T or l.operands[1].mem.disp != hdr['TP_SLOT_OFF']: return None
return (T, 2)
def slot_base_words(hdr, reg):
"""槽块基址前缀的机器字(与 patch_nso.emit_slot_base 同)。 | Machine words of the slot block base prefix (same as patch_nso.emit_slot_base)."""
if hdr['ABI'] == 'apple': return [0xD53BD060 | reg]
return [0xD53BD040 | reg, 0xF9400000 | (hdr['TP_SLOT_OFF'] // 8 << 10) | (reg << 5) | reg]
def mod0(img):
m0 = struct.unpack_from('<I', img, 4)[0]
assert img[m0:m0 + 4] == b'MOD0'