Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasm Implementation #2312

Closed
wants to merge 5 commits into from
Closed

Wasm Implementation #2312

wants to merge 5 commits into from

Conversation

Dimkar3000
Copy link

Hello I spended about a week on trying to implement everything that is needed to the wasm target. I exported a lot of function and everything that can be exported and I know how to do, I have already done it. The Changes to your CmakeLists.txt where taken almost copy and paste from your private repo that had an implementation working, you probably whould take a look at that. issue reference

It seams that at somepoint I had the liberto.c file open and my auto formatting tool took a shot at it, I didn't touch in any other way and it doen't have any real changes.

Now If you know how you could implement exporting the save state and loading it beacause I didn't understand how. I also didn't care to implement a way to load and unload cheats.

My code is very straight forware as I wanted to finishing this fast because I won't have much time to go through and fix many things. 4 files is all of the implementation, plus the CmakeLists.txt changes.

I hope this will provide you with all you need to properly implement this feature. As a matter of fact I used this branch to implement a gui on my own. It lives here and you can try it. It is written is Svelte which I know maybe not be what you want but it proves that my port works.

@endrift
Copy link
Member

endrift commented Sep 22, 2021

Uh, I hate to break it to you but there's already an open issue for this (#1296) and a branch on my personal fork (https://github.com/endrift/mgba/tree/feature/wasm) that are relatively old at this point. The primary reason it hasn't been merged yet is the lack of a reasonable front end.

E] Actually, I see you were already aware of those and referred to them. As such, I'm not sure what this PR adds.

@Dimkar3000
Copy link
Author

mostly function that one kan use to interact with the system from javascript. Look at pre.js Look at exports.c where I create them. For example: Every key has a getKey,setKey,press,releaseFunction, there are functions to mute, unmute, setVolume, as well as function to halt the game and continue .

I also implemented the forwaring a little bit differently to not get warnings from chrome.

As I said above, this is based on your work and I just added a bit more stuff and fixed some bugs.

@endrift
Copy link
Member

endrift commented Nov 13, 2021

I am not taking PRs to merge the wasm branch into master at this time. If you want to file a PR, file it against the wasm branch on my personal repo.

@endrift endrift closed this Nov 13, 2021
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