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>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3429c6c0a4
commit
3c25cd89fc
+8
-1
@@ -75,6 +75,10 @@ The game draws with NVN (the Switch graphics interface). `main` imports only one
|
||||
|
||||
The App compiles the sources of `host/` and `gfx/` in directly. The front-end interface `host/front.h` is implemented on the Mac by `host/front_mac.m` and on iOS by `ios/Sources/front_ios.m`. The rewritten module images are turned into embedded assembly by `ios/tools/gen_embed.py` and compiled into the executable; the iOS branch of `loader.c` does not copy code, it only maps these blocks back at their original relative positions. Touch controls and the user interface are also in `ios/`. See [ios/README.md](ios/README.md) for details.
|
||||
|
||||
### 6. Android shell (`android/`, Adreno devices only)
|
||||
|
||||
The same `host/` and `gfx/` sources are built with the NDK into `libd2r.so`, loaded by a GameActivity; the front-end interface is implemented by `android/Sources/front_app.c`, and the touch HUD is in `android/Sources/touch_app.c`. Graphics replay switches to Vulkan: `gfx/vulkan/nvn_vk.c` consumes the same commands recorded by `hle_nvn.c`. Differences in system interfaces are filled in by `host/compat/linux/`. See [android/README.md](android/README.md) for details.
|
||||
|
||||
## Directories
|
||||
|
||||
| Location | Contents |
|
||||
@@ -82,8 +86,9 @@ The App compiles the sources of `host/` and `gfx/` in directly. The front-end in
|
||||
| `PRODUCT` | The codename of the current rewrite build output, one line |
|
||||
| `tools/` | The rewriter `patch_nso.py`, the build output script `product.sh`, `dmx.py` for reading the game's resource storage, `casc_overlay.py` for rewriting the resource storage at build time, and a batch of code-reading and analysis scripts |
|
||||
| `host/` | The host: loading, system call and system library takeover, the Mac front end, in-game features; `host/tests/` holds the unit tests |
|
||||
| `gfx/` | The graphics layer: `nvn/` (interface layer and Metal replay), `tex/` (texture formats and deswizzling), `tools/` (shader translation chain), `tests/` |
|
||||
| `gfx/` | The graphics layer: `nvn/` (interface layer and Metal replay), `vulkan/` (Vulkan replay for Android), `tex/` (texture formats and deswizzling), `tools/` (shader translation chain), `tests/` |
|
||||
| `ios/` | The iOS App: `Sources/`, the project description `project.yml`, the build-and-install script `run.sh`, `tools/` (asset generation, smoke tests, UI regression), `tests/` |
|
||||
| `android/` | The Android App: `app/` (GameActivity, `res/`, packaging script), `Sources/` (front end and touch HUD), the build entry point `Makefile`, `tests/` |
|
||||
| `verify/` | Verification: the rewrite-equivalence regression `regress.sh`, the full acceptance run `accept.sh`, and the scripts and format descriptions its items use |
|
||||
| `data/` | Small data shipped with the repository: the registry of borrowed paths for the resource overlay. The startup prefetch list is not in the public repository: without it there is no prefetch, and startup skips one step of decoding ahead of time |
|
||||
| `i18n/` | The Chinese-English string table `ui_text.tsv`; `scan_literals.py` checks that all Chinese text the player can see goes through this table, with exceptions registered in `literal_whitelist.tsv` |
|
||||
@@ -128,6 +133,8 @@ Usage is `dmhost <build output directory> [module…] [-- game arguments…]`. `
|
||||
|
||||
**Unit tests**: `make -C dm/host/tests run`, `make -C dm/gfx/tests run`, `make -C dm/ios/tests test`.
|
||||
|
||||
**Build the Android package**: `make -C dm/android -j8` (output `dm/android/build/app/d2r.apk`); `make -C dm/android install` installs it onto the phone connected over adb.
|
||||
|
||||
**Build the iOS package**: `cd dm/ios && ./run.sh build`; to install on a device use `./run.sh install`. For signing configuration see the top-level README.
|
||||
|
||||
**Full acceptance run**: `dm/verify/accept.sh [--fast|--full]` runs rewrite equivalence, save-file comparison, the screenshot gate, unit tests, the iOS build, functional cases and more together. Besides the game files it also needs reference run data and standard save files, which are not provided with the repository; the emulator driver scripts used to obtain the reference run data are not shipped either, so the full acceptance run cannot be run with this repository alone.
|
||||
|
||||
Reference in New Issue
Block a user