Skip to content

feat: disc asset embedding and DVD API emulation#17

Merged
KaiserGranatapfel merged 4 commits intomainfrom
feature/lua-web-server-rework
Feb 11, 2026
Merged

feat: disc asset embedding and DVD API emulation#17
KaiserGranatapfel merged 4 commits intomainfrom
feature/lua-web-server-rework

Conversation

@KaiserGranatapfel
Copy link
Owner

Summary

  • FST extraction: Parse GameCube disc filesystem tables to extract all game assets (textures, models, audio) from ISO/GCM/RVZ uploads
  • GCFS archive format: Pack extracted files into a custom zstd-compressed archive (game/assets.bin) with per-file compression for efficient lazy decompression
  • DVD API emulation: Implement DVDOpen, DVDRead, DVDClose, DVDGetLength, DVDInit in the runtime SDK so recompiled games can load assets via the standard GameCube DVD interface
  • Asset embedding pipeline: New embed_assets pipeline stage generates game/src/assets.rs with include_bytes! so the compiled binary is fully self-contained
  • Also includes: Lua web server binding rework, Ghidra ReOxide improvements, full runtime/GX engine, audio/video systems, Lua-driven UI, and HTML template migration

Test plan

  • cargo build compiles successfully
  • cargo clippy --all-targets --all-features -- -D warnings passes clean
  • Upload an ISO/GCM via web UI → logs show "Extracted N files from disc filesystem" and "Built GCFS archive"
  • game/assets.bin created with non-zero size after disc upload
  • game/src/assets.rs generated with include_bytes! reference
  • Compiled binary is significantly larger than 8MB (includes embedded assets)
  • Runtime logs show "DVD filesystem initialized" on startup
  • DVDOpen/DVDRead calls succeed for files that exist in the disc image

🤖 Generated with Claude Code

KaiserGranatapfel and others added 4 commits February 11, 2026 15:43
Extract the first .dol file from uploaded zip archives before
processing, so users can upload zipped ROMs directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace hardcoded Rust route handlers with Lua business logic layer,
merge the two-step upload+recompile flow into a single drag-and-drop
action, and replace 1-second polling with Server-Sent Events.

- Extract JSON<->Lua conversion into gcrecomp-lua/src/convert.rs
- Add LuaEngine::set_package_path() for configurable module loading
- Update routes.lua with update_status() calls and handle_list_targets()
- Rewrite server.rs with broadcast channel and AtomicBool recompile lock
- Rewrite routes.rs: upload triggers Lua recompile via spawn_blocking,
  SSE endpoint replaces polling, config/targets delegated to Lua
- Rewrite index.html with drag-drop zone and animated pipeline stages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…utable

- Fix multipart parsing by iterating fields by name instead of assuming
  order; connect SSE after upload response to avoid interference
- Add game title input and target platform selector (Linux/Windows/macOS)
  to the UI; pass both through to the Lua pipeline
- Add compile stage: after pipeline generates Rust source, build the game
  crate with cargo and produce a named executable (game_title.exe etc.)
- Serve output/ directory for binary downloads with a download button
- Add game/src/recompiled.rs placeholder and mod declaration in main.rs
- Make UI more robust: file type validation, filename badge, scrollable
  error display, disabled state during processing, clear error dismissal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ulation

Add FST extraction from GameCube disc images, zstd-compressed GCFS archive
building, a virtual filesystem, and DVD API emulation (DVDOpen/DVDRead/DVDClose)
so recompiled game binaries are fully self-contained with all disc assets.

Also includes web server Lua binding rework, Ghidra ReOxide backend improvements,
and HTML template migration to Lua.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cursor
Copy link

cursor bot commented Feb 11, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 31.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@KaiserGranatapfel KaiserGranatapfel merged commit 3ce450f into main Feb 11, 2026
1 of 12 checks passed
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.

1 participant