Skip to content

Add OpenJKDF2 port for Star Wars Jedi Knight: Dark Forces II.#2499

Open
juanvillacortac wants to merge 10 commits into
PortsMaster:mainfrom
juanvillacortac:openjkdf2-port
Open

Add OpenJKDF2 port for Star Wars Jedi Knight: Dark Forces II.#2499
juanvillacortac wants to merge 10 commits into
PortsMaster:mainfrom
juanvillacortac:openjkdf2-port

Conversation

@juanvillacortac

@juanvillacortac juanvillacortac commented Jun 10, 2026

Copy link
Copy Markdown

Native aarch64 GLES port for PortMaster handhelds; requires original game files.

Game Information

Submission Requirements

CFW Tests

Ensure your game has been tested on all major CFWs:

  • ArkOS
  • dArkOS
  • AmberELEC
  • ROCKNIX
  • muOS
  • Knulli
  • Crossmix (Optional)

Resolution Tests

Test all major resolutions:

  • 480x320 — 3:2 aspect ratio tested (Optional)
  • 640x480 — internal render resolution
  • 720x480 — 3:2 aspect ratio tested (rg34xx)
  • 720x720 (RGB30) (Optional)
  • Higher resolutions (e.g., 1280x720)

File Structure

   openjkdf2/
  ├── port.json
  ├── README.md
  ├── screenshot.jpg
  ├── cover.png
  ├── gameinfo.xml
  ├── Star Wars Jedi Knight - Dark Forces II.sh
  └── openjkdf2/
      ├── openjkdf2.aarch64
      ├── libs.aarch64/libopenal.so
      ├── licenses/LICENSE.openjkdf2.txt
      ├── licenses/LICENSE.openal.txt
      ├── jk1/          (user copies GOG/Steam files here)
      ├── mots/         (optional MOTS expansion)
      ├── conf/
      └── logo.png

python3 tools/build_release.py --do-check passes locally.

Notes

  • Not RTR — user must own the game and copy JKDF2 assets to openjkdf2/jk1/ (GOG or Steam).
  • aarch64 only — no armhf support.
  • Native GLES 3 (no GL4ES); SDL2 from system, OpenAL bundled.
  • Optional Mysteries of the Sith via openjkdf2/mots/ and in-game Expansions & Mods menu.
  • Handheld QoL: D-pad movement, inventory on Activate, etc.
image image image

Native aarch64 GLES port for PortMaster handhelds; requires original game files.

Co-authored-by: Cursor <cursoragent@cursor.com>

@tabreturn tabreturn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Game appears to be missing AmberELEC and ROCKNIX testing (according to your checklist)?

Comment thread ports/openjkdf2/port.json
Fix Linux case-sensitive game data installs, add ROCKNIX launch tweaks and
startup diagnostics, refresh the aarch64 binary, and align port.json with
PortMaster v4 requirements.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move shared launch logic to .openjkdf2.launch.inc so EmulationStation only lists the two game wrappers, add the optional MOTS launcher with metadata, and ship an engine build with corrected menu letterbox and small-screen scaling.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread ports/openjkdf2/README.md Outdated
Comment thread ports/openjkdf2/README.md Outdated
Comment thread ports/openjkdf2/Star Wars Jedi Knight - Mysteries of the Sith.sh
Comment thread ports/openjkdf2/README.md Outdated
juanvillacortac and others added 3 commits June 11, 2026 09:32
Move shared launch logic to openjkdf2/launch.run with a full PortMaster header and $directory GAMEDIR, thin wrappers that exec into it, and openjkdf2.gptk so gptokeyb only handles Select+Start quit without remapping SDL controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Dia <lothk113@gmail.com>
@juanvillacortac juanvillacortac requested a review from Dia2809 June 11, 2026 16:28
juanvillacortac and others added 4 commits June 12, 2026 09:59
Inline PortMaster shell template into both wrappers, move Linux helpers to helpers.inc, remove launch.run, fix gptokeyb gptk unmaps, and rebuild binary with SDL_WINDOW_OPENGL plus ES driver hints for ROCKNIX Wayland.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ship an updated aarch64 binary that reads handheld policy at runtime instead of compile time.

Co-authored-by: Cursor <cursoragent@cursor.com>
Engine build 9889aa77: 2-MRT lite shader, fused scene composite, Mali
crash fixes, and handheld viewport corrections for stable performance.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match jkdf2/port launcher logic without OPENJKDF2_TRACE; default full
internal resolution on 720x480-class handhelds now that GLES perf
optimizations are stable on Mali-G31.

Co-authored-by: Cursor <cursoragent@cursor.com>
@juanvillacortac

juanvillacortac commented Jun 12, 2026

Copy link
Copy Markdown
Author

OpenJKDF2 port — release update

New build for Star Wars Jedi Knight: Dark Forces II. For now I'm hoping this is the last release in this round — I'm pretty happy with how it turned out. All that's left on my side is testing on ROCKNIX; on KNULLI (RG34XX SP, Mali-G31) it's running great.

Main takeaway: the game now runs very smoothly at full internal SSAA (1.0) — no need to downscale resolution on an H700.

Engine optimizations (GLES):
Lite shader with 2 render targets when SSAO is off (less per-pixel work in the 3D world)
Single-pass scene compositor (was two passes before)
• Lighter framebuffers (no position/normal G-buffer when SSAO is disabled)
Mali fixes: correct GL symbol loading, VBO uploads without driver stalls, handheld viewport fix for menus/overlays
• Cached shader uniform locations (no per-frame glGetAttribLocation spam)

In practice: similar RAM usage (~400 MB), better FPS, clean pause menu, and SSAA 1.0 is playable on the RG34XX SP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants