nbarkhina / n64wasm Goto Github PK
View Code? Open in Web Editor NEWA web based N64 Emulator
Home Page: https://www.neilb.net/n64wasm/
License: MIT License
A web based N64 Emulator
Home Page: https://www.neilb.net/n64wasm/
License: MIT License
When I updated my Ipad to 17.4 I went to my remixed emulator of yours and it started to lag much more than last time. I even tried yours, but it still resulted into a really laggy experience. I don’t know if it’s the update or if it’s something else. I use it on safari if your wondering, I’m would like not to use another browser because according to my knowledge, you can’t use PWA for other browsers.
Great work here, this really works well.
I have been trying to put together a web based emulator frontend and would like to use a libretro based core for n64.
Looking over the code it looks like you swapped to SDL2 vs libretros glsym_es #include <SDL2/SDL_opengl.h>
. Now I am not sure if this is even possible, but could you give me any pointers as to how to compile this into a bc file compatible with the libretro api/frontend? (standard emmake make -f Makefile platform=emscripten
and emmake make -f Makefile.emscripten LIBRETRO=parallel_n64
)
I got https://github.com/libretro/parallel-n64 to compile with some makefile tweaks, but it just aborts after loading a rom.
[libretro INFO] Microcode 0 - RSP SW 2.0X (Super Mario 64)
libretro.js:141 [libretro INFO] microcheck: old ucode: 2, new ucode: 0
libretro.js:141 exception thrown: RuntimeError: unreachable,RuntimeError: unreachable
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[949]:0x3cdd3
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[3536]:0x122b6e
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[2731]:0xeafed
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[2775]:0xf0035
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[4930]:0x1752b6
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[4931]:0x175351
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[1925]:0x9ffcf
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[1924]:0x9fe42
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[4915]:0x1742fc
at http://localhost:8000/data/parallel_n64_libretro.wasm:wasm-function[4916]:0x17437c
There is also this https://m4xw.net/retroarch/ based on some old mupen64 code, but it does not really function. I suspect your swap to SDL2 is gonna be needed, but I am not sure how to fit these puzzle pieces together and make a working core. In general in way over my head and wanted to reach out to you to just see if this would even be plausible. The goal being to have your n64 core changes run with the standard module init and interactive menu baked into the current emscripten libretro builds.
Outside of just save states would it be possible to implement "cmd_savefiles" as a callable function to dump sram like you have with Retroarch Emscripten builds?
When I tried this out on my laptop, it was pretty smooth on majoras's mask. But when i switched to chromebook, the results were less than stellar. It was constantly dropping at all times to 5-10 fps every time I move. Can you try to make it at least playable for the chromebook and other older devices?
I am currently playing on a chromebook and am trying to play a game called the new tetris, but for some reason it just cant read the stick and dpad inputs (im using a keyboard, i use arrow keys for dapad and nothing happens same for cstick controls), all the other button controls work, just not dpad or stick
is it possible to make a reset button? if so, will you implement it?
Hi!
Is there a way to programmatically trigger buttons and sticks?
The only way I managed to trigger commands was by forcing myApp.mobileMode = true
on Load, and manually calling mobilePressSelect()
and mobileReleaseSelect()
.
Hi, is this supposed to work on this page? https://www.neilb.net/n64wasm
I'm getting this when I browse and/or drag and drop "Super Mario 64 (U) [!].v64" onto that page?
is there a way to boost the fps on the game to make it run faster?
Hi!
When I found your code, I was happy to see it is still actively being developed! I've managed to build it on a headless Ubuntu 20.04 machine and access it from a browser on my network using nginx. It worked really great!
While testing it in a self-hosted scenario, I stumbled upon some missing features that I think would be absolutely great for anyone wanting to self-host your emulator:
The points above could really bring the self-hosted n64 emulation to another level. With these features, I would be interested in making a docker image of your project, with your permission.
Of course, those are just suggestions. If none of them are going in the direction you had in mind for your project, feel free to close this issue :).
I am playing ocarina of time and it does not save when I try to let it, is there a way to forcefully save it?
Issue on iPadOS 17.3.1
Using Chrome Browser
and i am trying to find the setting GPU process WebGL but i dont find it
How can I get it to work when I host it, I'm working on some edits using replit, i have it hosted onto a replit built in subdomain, when I go to the actual emulator html file (your main emulator site) it doesnt display any buttons. I have made changes but they are minor changes (also when i try to download on replit the files come up as 0 kb so that is a bit annoy.) Everything is still pointing to the correct spot but I did remove it from wwwroot as that wasn't working either. See screenshots for more info.
Hi.
I noticed when you use the gameshark codes and try to load a game, it doesn't load. Even if I open it in a new tab, or disable the code. I just want to change the color of Mario. But the game no like that. I inspect and it shows a bunch of errors. Please help. I am also confused where do I even put the code? Adress or Value? How do you even use it tbh?
Any fixes?
How do you unlock the aspect ratio of canvas so I can stretch the canvas based on the windows size I want to fill up the entire screen like https://lrusso.github.io/Nintendo64/Nintendo64.htm . You have to change the file extension of your roms to .n64, it will not accept it otherwise.
Hi! When I build the project and run it, my roms will never start no matter what I do. I went on the demo site and loaded my ROMs and they worked fine there, anyone know what I'm doing wrong?
Can use the Switch N64 wireless controller with iPad, but cannot map in settings. Not with keyboard or joypad. Would love to see this support added to get the full N64 experience!
Skyemu has a cool little feature where if you add a bookmark to the home screen it will remove the search bar.
I got no clue how it works but it would be nice for mobile users
(also dark mode would be nice lol)
I am wondering if it's possible to change resolution on the emulator inside the browser, So if somewhere were to copy the code and wanted to make the output image clearer, how would I do that?
Instead of having to upload a game, I'd like to make it automatically load and start playing the game from a preset file URL.
I know you can add roms to romlist.js, but that's not exactly what I need. I want it to load the game URL automatically into the emulator and never have the option to choose a game (whether that's via upload or romlist.js).
I'm wondering if this is a built-in feature, and if it isn't, how could I modify it to work like this? I'm worried about changing anything because there's so much that it'll probably break something.
Thanks in advance!
OS: MacOS Ventura
Browser: Chrome
Controllers (Both connected via Bluetooth):
When I go to remap and test a button only one of the controllers works.
With the setup above, when both are connected only the Dualshock 4's input works in the remap keys, my 8bitdo controller is ignored, then when I disconnect the DS4 the 8bitdo's button presses then starts to work in the remap dialog.
Further to this, I assume there are supposed to be 2 tabs in the remap section, I only see one - despite the controllers being connected and tested in the browser on gamepad-tester.com which I used to rule out OS related issues.
Hi, thanks for making this awesome emulator! I do have two issues, however. One is that I cannot access the D-pad keys on a keyboard. Adding keyboard controls for the D-pad the next time you update the emulator would be very much appreciated. Another thing you can improve about the emulator is to give players the option to save states in a file on their computer. My computer is set up so that save states are wiped whenever I restart the computer. Any way you could do that?
pretty new to this stuff, sorry if dumb question
Hello, congratulations for such a great project! I was wondering, how can I set the dithering and filtering mode? and how can enabled/disable the sound? I saw on other n64 emulators that are running in a low resolution (I guess for a better performance) is this possible with the n64wasm emulator?
Best regards,
Leonardo
Is it possible to enable a second controller?
Occasionally the virtual stick will get stuck in one position after flicking it a bit and will not be able to be moved until you reload the page additionally mobile is missing a few buttons that are needed in some games (all the c buttons, both l and r, and the d pad) I don't know if those are available but just off by default but either way the layout of the buttons should be able to be changed from the menu when in a game.
Hello. I had a quick question about overall game play. I was loading up a OoT randomizer just to see what the seed had to offer. I loaded it up and had a steady fps while making a save file. The sound was a little bugged but I figured that was just normal. So after I loaded up the file it got from 60fps and dropped to like 20-30 fps. Whenever I moved 10 fps was gone and I couldn't stand it. Idk if its just me or if it the game, code, the site itself, etc. I also tried a regular game with no randomizer on. Same problems. I tried other games than OoT, same problem occurred. I was hoping you could look into this and if people are having these same problems please comment blow.
Just wanted to share my solution for a php backend, can make a PR if youd like to include it here, included configs for apache and IIS, can make a nginx config too
Heyo! 👋
I’ve been experimenting with your website a bit to make it more mobile-friendly [check at https://majesticwafer.github.io/N64Wasm/], and I was trying out an 2xBRZ filter on the canvas. It doesn’t seem to work, and you obviously have a lot more knowledge about coding than I do, so do you think we could work together to make your and my website more filter- and mobile-friendly?
Best regards,
Wafer
Is it possible to host this on Netlify?
I am on Safari, and whenever i boot up a game, there isn’t any audio. I dont know why.
When I updated my Ipad to 17.4 I went to my remixed emulator of yours and it started to lag much more than last time. I even tried yours, but it still resulted into a really laggy experience. I don’t know if it’s the update or if it’s something else.
Instead of clicking two save and load state buttons, I could use the game instead. All of the games have a built in save option like OOT or SM64. How would you go by saving that way. I feel like it could help with accidentally clicking save state when loading a game so your progress is not erased.
Multiple controller support via websockets and screen mirroring would be interesting to implement.
Hi
As the title explained, I searched (KeyboardEvent) globally, but still, find nothing.
Could you just please describe where this function is defined?
After the beginning cutscene Ocarina of Time crashes and cannot be played
f
Alternatively, just a way to access the game RAM directly?
I've been playing this rom hack of the Super Mario 64 game and in a certain level some textures just appear as white, but other emulators the texture is colored. This is not something only on this rom hack, it's also on another one. The first two are the same game(Return to Yoshi's Island DEMO 64) and the last 2 are a different game(That Time I Became Friends With The Royal Scuttlebug Family And Fell From Space, Yeah the long name is intentional). I think this has something to do with vertex colors because you can still see the grass texture, it's just white. The ones that do have color I used the ParaLLel RetroArch core.
I am wondering where inside the module script you start emulating the blurring of textures. I am scrapping the other issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.