Skip to content

Conversation

@KrutzOtrem
Copy link

@KrutzOtrem KrutzOtrem commented Feb 7, 2026

Scope

  • Adds local manual viewing from ROM-adjacent .manuals folder.
  • Adds pause-menu entry to open manual during gameplay.
  • Keeps gameplay session uninterrupted (open/close manual and return to game).

Manual Library

Manual support is provided by a dedicated shared library:

  • Runtime library: /mnt/SDCARD/.system/tg5040/lib/manual.so
  • Loaded by MinArch at runtime (dlopen), not statically embedded in MinArch core.
  • Contains PDF/manual logic only.
  • MinArch remains a host/collaborator via callback ABI (ManualHost).

Manual is searched at:

  • /mnt/SDCARD/Roms/<system>/.manuals/<name>.pdf

Controls

  • B: reset current page view first (zoom/pan), press again to close manual.
  • L1/R1: zoom out/in.
  • DPAD Up/Down: vertical pan.
  • DPAD Left/Right:
    • fit-height state: viewport jump / next-page-at-edge navigation
    • zoomed-in state: regular horizontal pan

@frysee
Copy link
Member

frysee commented Feb 7, 2026

Interesting idea. Not sure I understand the reasons to wrap it into another shared library and link statically to the actual dependency?

@KrutzOtrem
Copy link
Author

KrutzOtrem commented Feb 7, 2026

Mainly for maintenance (less code for minarch.c) and to compile (was easier for me). It's more of a boundary now. Also, we would have to add symbols and headers to minarch, which still does increase the size a bit (to 500 kb or so), even with a separate lib.

In short, over the past few weeks, my MinArch version was heavily filled with PDF internals. That caused the binary to balloon (from 270 KB to 38 MB) and made maintenance essentially impossible. I wasn’t able to refactor it cleanly, either, and was about to give up. I did recently separated the libmupdf, but still doubled the file size.

Currently, most of that code is isolated from minarch. It should also make it easier to disable the feature, or swap things around for other devices, if we need to, (plus easier to package). If necessary, we could split out libmupdf.so for dynamic linking.

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.

2 participants