Skip to content

ProjectDural v1.2.0-arm64 (ARM64 PortMaster)

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 23:39

ProjectDural v1.2.0-arm64 — Vulkan build no longer renders upside down

The standalone Vulkan runtime (vf2-vulkan.aarch64, ProjectDural-Vulkan-aarch64.zip) drew the
whole game vertically mirrored: the attract mode, the fighters, the sky and the 2D overlays ("PUSH
START BUTTON", "© SEGA 1994") all appeared head over heels. This release fixes it.

What was wrong

platform/arm64/gpu_vulkan.cpp composites the picture itself: the backdrop, mid, top and
side layers and the 3D compute target are each drawn as a textured quad by a precompiled SPIR-V
shader, which lays its corners out as dst + corner * dst_size for both the clip-space position
and the texture coordinate. px_to_ndc() — the display-pixel (top-left origin, +Y down) to
clip-space conversion — mapped py = 0 (the top row of the picture) onto y = -1, but SDL_GPU's
NDC has +Y up (SDL_gpu.h, Coordinate System). Every layer therefore landed mirrored about the
middle of the screen. The menus were unaffected because Dear ImGui builds its own projection.

The fix

Two lines in platform/arm64/gpu_vulkan.cpp, and the reasoning is in the comments beside them:

  • px_to_ndc() now emits the bottom edge of the rectangle (1 - (py + ph) / dh * 2), so the
    rectangle's top edge reaches the top of the screen.
  • The per-quad uniform pushes src_v + src_vh with a negative height, so texture row 0 (the
    picture's top) sits on the quad's upper edge. Flipping the rectangle alone was not enough: the
    sampler would still walk the texture upwards.

Verified by running the rebuilt binary under Wayland and capturing the frame: text upright, sky
above, floor below, and the 3D target aligned with the 2D layers. The ImGui ROM-required dialog
still renders upright (it never used this path).

Unchanged

Nothing else: no emulation, audio, input, netplay or shader changes. The OpenGL ES 2.0 PortMaster
build (vf2.aarch64 / ProjectDural-PortMaster-aarch64.zip) never had this bug — it maps to NDC
in its own vertex shader — so it is rebuilt unchanged from the same source. Zero ROMs and zero game
code.
Automated ROM-free AArch64 / OpenGL ES 2.0 / SLJIT PortMaster build of ProjectDural, for Anbernic RG34XX / Allwinner H700 (Mali-G31) and compatible ARM64 Linux handhelds, including the Powkiddy RGB30 (Mali-G52) and TrimUI Smart Pro (PowerVR GE8300).

Contents (Zero ROMs / Zero Game Code)

  • Virtua Fighter 2.sh (PortMaster launcher: starts the cores the 4-thread pipeline needs, pins the CPU governor to performance, prints a [sys] hardware line to log.txt)
  • projectdural/vf2.aarch64 (ARM64 Cortex-A53, SLJIT ARM64 i960 JIT, Core 2 SCSP sound worker, OpenGL ES 2.0, ARM64 NEON, max GLIBC_2.28, statically linked zlib & libc++)
  • projectdural/assets/backgrounds/select.png (painted 3:2 character select sides, CC BY 4.0)
  • projectdural/gamecontrollerdb.txt, PortMaster metadata, and licences

Quick Setup (BYOD)

  1. Extract ProjectDural-PortMaster-aarch64.zip into your handheld's ports/ folder.
  2. Copy your own legal MAME vf2.zip (Version 2.1) into ports/projectdural/roms/vf2.zip.
  3. Launch Virtua Fighter 2 — SLJIT compiles the i960 program to native ARM64 automatically on startup (no PC pre-build required!).

Report issues at https://github.com/DanimanX/ProjectDural/issues — ports/projectdural/log.txt plus the [sys] and [perf] lines there make a performance report actionable.