zaksabeast / 3ds-Plug-n-play

3ds sysmodule that runs webassembly plugins.
ISC License
10 stars 2 forks source link

Does not work with Luma builds that include 3gx support #1

Open mortenson opened 9 months ago

mortenson commented 9 months ago

šŸ‘‹ Hi there - I really like the idea of this project!

I followed the instructions for my N3DS, but the example plugin doesn't appear to be doing anything.

From reading : https://github.com/LumaTeam/Luma3DS/wiki/Optional-features

Enable loading external FIRMs and modules: When enabled, this option will look for FIRMs and sysmodules (builtins only!) in /luma/ and /luma/sysmodules to load from the SD card instead of the versions on NAND. Supported external FIRMs and sysmodules are: native.firm: NATIVE_FIRM, the main firmware. twl.firm: TWL_FIRM, used for DSiWare and DS games. agb.firm: AGB_FIRM, used for Gameboy Advance Virtual Console games. safe.firm: SAFE_FIRM, NATIVE_FIRM for the 3DS' Safe Mode. sysupdater.firm: name.cxi: Any builtin sysmodule can be loaded externally, i.e. fs.cxi, pm.cxi, loader.cxi, etc. External sysmodule loading is unavailable if loading a NATIVE/SAFE_FIRM older than 3.0.0. Note: If your FIRMs are NUS-encrypted, you must also include the corresponding cetk file, cetk, cetk_twl, cetk_agb, cetk_safe, and cetk_sysupdater respectively.

So maybe something changed and arbitrary sysmodules aren't loaded anymore? Thanks for the help!

mortenson commented 9 months ago

Also, as a random note, I liked your work on PokeReader and was wondering if an alternative to this loading method would be to have a 3gx plugin that then loads wasm, but I don't really have the knowledge to work on that.

zaksabeast commented 9 months ago

The 3gx fork of Luma wasn't compatible with this project. When those changes were merged into the official Luma project, this project stopped working with official Luma too. A few people looked into the issue and found the problem, but I forgot what the specific issue was. Given Citra also added 3gx support, I stopped working on this project and switched plugins to 3gx.

Also, as a random note, I liked your work on PokeReader and was wondering if an alternative to this loading method would be to have a 3gx plugin that then loads wasm, but I don't really have the knowledge to work on that.

Thank you! Reader has been fun.

It should be possible to convert this to a 3gx plugin or something similar like a tool that can bundle a wasm file with the runtime as a 3gx plugin. If there's enough people that want this I might build it at some point, but I'm not sure if there's enough desire for it at the moment.

I'll keep this issue open in case anyone else wonders what's going on (I thought I added a note the readme, whoops!), and in case anyone else expresses a desire to run wasm as a 3gx plugin.

mortenson commented 9 months ago

@zaksabeast Thank for the quick response! For now I'm trying to update https://github.com/Nanquitas/Luma3DS-Plugin-sample with the latest devkitpro/3gxtool, just having a terrible time trying to render anything to screen or to read any user input. Would be great to use Rust or otherwise have a "MVP" kind of plugin to start with. šŸ˜…

zaksabeast commented 9 months ago

When porting PokeReader to 3gx, it looked like any code related to 3gx plugins on GitHub was outdated. The more recent tools seem to be on GitLab instead: https://gitlab.com/thepixellizeross.

mortenson commented 9 months ago

Yeah, it's more that https://github.com/Nanquitas/Luma3DS-Plugin-sample didn't use ctrpluginframework so that was interesting to me - I kind of always prefer to "start from scratch" even if that means figuring out rendering myself.

I ended up caving and using ctrpluginframework though, for this plugin: https://github.com/mortenson/jisho-3gx