Skip to content

feat: add Allagan Pocket emulator app - #37

Open
rockerudon wants to merge 1 commit into
XeldarAlz:masterfrom
rockerudon:feature/port-emulator-app
Open

feat: add Allagan Pocket emulator app#37
rockerudon wants to merge 1 commit into
XeldarAlz:masterfrom
rockerudon:feature/port-emulator-app

Conversation

@rockerudon

Copy link
Copy Markdown

What

Adds Allagan Pocket, a new emulator application available from the Arcade section of Aetherphone.

The app includes:

  • A library organized by supported systems
  • ROM import and folder scanning
  • Recently played games
  • Save and load states
  • Portrait menus and landscape gameplay
  • On-screen game controls
  • Configurable display filtering and aspect ratio
Captura de tela 2026-07-22 045550 Captura de tela 2026-07-22 045618 Captura de tela 2026-07-22 045634

Why

This adds a portable retro-gaming experience directly inside Aetherphone while following the existing app and phone UI structure.

How to test

  1. Build the project in Release mode:

    dotnet build src/Aetherphone/Aetherphone.csproj -c Release

  2. Load the Release build through Dalamud.

  3. Open Aetherphone with /phone.

  4. Navigate to Arcade.

  5. Open Allagan Pocket.

  6. Import a supported ROM or scan a ROM folder.

  7. Launch a game and confirm:

    • Video and audio work
    • On-screen controls respond
    • Landscape mode displays correctly
    • Save and load states work
    • Returning to the library works without errors

Checklist

  • dotnet build -c Release passes
  • Verified in-game: opened the phone and tested the affected app/screens
  • README is updated
  • Matches existing style and shared components

@XeldarAlz

Copy link
Copy Markdown
Owner

Hi. Thank you so much for your contribution. Since this is a big PR, I'll be reviewing it this weekend. Thank you for your patience.

@XeldarAlz XeldarAlz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice work on the libretro layer. The RETRO_HW_FRAME_BUFFER_VALID guard, printf-conversion scanner and atomic state writes are all things people miss first time.

Verified on 722034ac: dotnet build -c Release passes, dotnet test fails 3/96 (all new EmulatorSettingsTests).

Requesting changes. 8 blocking, 8 should-fix, 5 rules/nits, all inline.

Structural ones: EmulatorSession.cs:86 (emulation on the render thread) and PhoneShell.cs:137 (app lifecycle changed for every app).

Size: zip goes 10.2 MB to 39.0 MB, Cores/ is 28.8 MB of it. Shippable, so not gating, but 4x master against a 20 MB aim. Detail on the csproj comment.

Comment thread src/Aetherphone/Aetherphone.csproj Outdated
<Content Include="Sounds\*.mp3;Sounds\*.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Cores\*_libretro.dll;Cores\*-LICENSE.txt;Cores\*-SOURCE.txt;Cores\GPL-*.txt">

@XeldarAlz XeldarAlz Jul 25, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Should fix. Zip goes 10.2 MB (master) to 39.0 MB, Cores/ is 28.8 MB compressed. Measured from latest.zip.

Shippable, so not gating, but every user pays it on install and update. Cheapest cuts: SystemFiles/PPSSPP (~6 MB, mostly jpn0.pgf 3.5 MB + kr0.pgf 1.0 MB, and lang/+themes/+shaders/+ui_images/ only feed PPSSPP's own frontend which we never render), then ppsspp_libretro.dll (6.3 MB).

Longer term: fetch cores on demand into ConfigDirectory/Emulator/cores with a checksum manifest. Follow-up is fine.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Partly done. lang/, themes/, shaders/ and ui_images/ are gone; jpn0.pgf and kr0.pgf stay, which is right since games render with them. Cores/ is still 70.7 MB unpacked. Keeping this open for the on-demand fetch follow-up.

Comment thread src/Aetherphone.Tests/EmulatorSettingsTests.cs Outdated
Comment thread src/Aetherphone.Tests/EmulatorSettingsTests.cs Outdated
Comment thread src/Aetherphone/Core/Emulation/EmulatorSession.cs Outdated
Comment thread src/Aetherphone/Core/Emulation/Libretro/LibretroCore.cs
Comment thread src/Aetherphone/Apps/Games/GameBoy/GameBoyApp.cs Outdated
Comment thread src/Aetherphone/Core/Shell/ControlCenter.cs Outdated
Comment thread src/Aetherphone/Core/Shell/PhoneShell.cs Outdated
Comment thread src/Aetherphone/Core/Emulation/KeyboardInputCapture.cs
Comment thread src/Aetherphone/Configuration.cs Outdated
@rockerudon

Copy link
Copy Markdown
Author

Implemented the requested review changes and pushed the updates.
dotnet build -c Release passes and all 128 tests pass.
The branch is ready for another review.

@XeldarAlz

Copy link
Copy Markdown
Owner

Re-reviewed at ed8df6d5. dotnet test -c Release passes, 150/150.

All 7 blocking items verified fixed and resolved, plus every should-fix, rules and nit item. Two threads stay open: bundle size (follow-up) and the GPL-2.0-only vs AGPL-3.0 call, which is mine.

One thing left before merge: rebase on master, which is 53 commits ahead. Two conflicts, both pure drift:

@XeldarAlz

Copy link
Copy Markdown
Owner

@rockerudon friendly ping: only the rebase on master is left (conflict notes in my last comment). Push the updated branch and we can merge.

@XeldarAlz
XeldarAlz force-pushed the feature/port-emulator-app branch 6 times, most recently from 18e48ea to 2674067 Compare August 13, 2026 04:09
Allagan Pocket sits in the Games app and plays cartridges from 16 systems
through libretro modules: a library per system, ROM import and folder
scanning, recent games, save states, keyboard and controller shortcuts,
portrait and landscape gameplay, on-screen controls, and a layout editor
for placing the screen and each control.

No emulator module ships with the plugin. Opening a system whose module
is missing asks first, naming the size, then fetches just that module
from the libretro buildbot into the config folder and verifies it against
the CRC-32 the buildbot publishes in .index-extended. A Game Boy player
downloads 127 KB rather than every system's module, and PlayStation
Portable pulls the PPSSPP system files only when it is opened.

Landscape gameplay reuses the shell's existing rotation: apps ask for it
through IPhoneApp.WantsLandscape, which the camera now answers with its
own toggle, so there is one path rather than two.
@XeldarAlz
XeldarAlz force-pushed the feature/port-emulator-app branch from 2674067 to 4e0f8d0 Compare August 13, 2026 04:16
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