Conversation
|
I think I'm going to use the Bitwise extension for testing, or is there a better extension? |
|
I just realized there is no need for an |
Not a Turbowarp extension, but the "Music:" extension with instruments and drums might be easy (apart from the actual audio playback, lol) |
|
Well the issue with that is this is for custom extensions. I think built-in extensions will be handled differently. EDIT: I'm implementing Bitwise rn anyway so I'll just use that. |
|
@NateXS, may I ask why you're using an enum for opcodes instead of just storing them as strings. EDIT: asking because it means I need to set up a special system specifically for custom extension blocks. |
Mostly for performance, although I don't think it gave any noticable improvements to be honest. |
|
Yeah, it would, probably do that on the |
|
I meant to say "used" not "loaded" but... I don't want to force push, so I guess it's just going to be that now. |
|
I'm going to need to take a small break from this PR because my CMake setup just decided to completely break itself (I'm using CMake for the TurboWarp Extension Ports). |
|
I just realized that file extension code is useless 'cause a lot of this is platform dependent... |
|
I like how GitHub told me there were conflicts, and they couldn't be fixed by the web editor and when I merged it locally there were no conflicts... |
|
currently untested because I'm on vacation and Cemu is just not working...
|
After looking into it, 3DS support is going to require a major rewrite of the extension blocks system... Also, extensions are going to be designed to made primarily with C after the change. EDIT: I've looked more into what I'm going to need to do to get this to work on 3DS, and I can only reasonably say that there's a roughly 60/40 (in favor of the 3DS) that I can support it. I hope I can get libffi to work on the 3DS because I think that's the only way this will be possible. |
|
I think I'm going to end up with a pointer pointing to a pointer pointing to a pointer pointing to a string... (for lists) EDIT: This is probably going to be leaking a lot of memory at first. |
|
NEVERMIND. THE HOMEBREW DISCORD IS AMAZING AND THEY'VE HELPED ME FIGURE OUT AN ALTERNATIVE SOLUTION USING ALLOCATOR MAGIC AND OVERRIDING THE NEW OPERATORS. EDIT: I've begun implementing this, I'll hopefully have a version for you to test some time in the next few days (I'm still on vacation). |
@DevelopCMD, sorry I didn't state my reasoning for not supporting JS extensions very well earlier. The main issue is that JavaScript extensions hook directly into |
|
This is actually really painful to work on, if I can't at least get it working on Wii U (and make it a Wii U specific feature), I'm going to migrate to an interpreted language like JavaScript or Lua. EDIT: actually, if it doesn't work, I'll just make extensions statically linked, so they'll need to be built directly in. |
|
Ok, due to the fact that we have (and will have) so many platforms, I think I'm going to switch from using dynamically loaded libraries to using WASM with https://github.com/wasm3/wasm3, that means a major refactor. EDIT: i've been trying to compile wasm3, it seems to have a few issues with devkitpro. So I might try a few other libraries like https://github.com/bytecodealliance/wasm-micro-runtime |
|
OK, so I think I'm going to close this PR due to the fact that this implementation of custom extensions is not very portable and incredibly hard to create. This does not mean I am completely scrapping custom extensions, it just means they're being put on hold for a little while until I can figure out the best way to create an alternative implementation that is more portable. |
Extension Repository
Warning
This PR is currently being rewritten to use WASM instead of dynamically loaded libraries, this was chosen instead of creating a new PR so we can reuse parts of this PR. This will severely limit the scope of what this PR can do (and therefore what extensions can be made) but many features will be possible to replace.
Note
Unlike with other PRs this one is going to completely incompatible (won't even compile) until that platform is checked off in the checklist. There are also going to be points in this PR where backtracking is done to make it even possible to port to another platform; during these times it is possible that this entire branch will not work and not compile at all for any platform.
Note
Wii, GameCube, and Switch all seem to be impossible to support with this because there are no homebrew libraries for dynamic libraries.
Note
A lot of the files marked as changed in this PR are only due to a minor change in the
.clang-formatfile.Checklist
WASM Checklist
This is the checklist for rewriting this PR to use WASM instead of dynamically loaded libraries.