Giter Site home page Giter Site logo

nbarkhina / n64wasm Goto Github PK

View Code? Open in Web Editor NEW
610.0 10.0 118.0 12.81 MB

A web based N64 Emulator

Home Page: https://www.neilb.net/n64wasm/

License: MIT License

Makefile 0.09% Shell 0.06% C++ 56.60% C 40.75% HLSL 0.01% HTML 1.33% Assembly 0.08% Python 0.13% Objective-C 0.01% Perl 0.05% CMake 0.02% Scilab 0.71% Pawn 0.04% M4 0.03% QMake 0.01% GLSL 0.06% TypeScript 0.02% JavaScript 0.01% PHP 0.01% Dockerfile 0.01%
n64 emulator webassembly

n64wasm's People

Contributors

kimboslice99 avatar nbarkhina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

n64wasm's Issues

IpadOS 17.4 update makes the emulator laggy.

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.

Compiling a libretro compatible core

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.

Sram dump to indexdb

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?

Chromebook emulation

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?

chromebook dpad/stick issues

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

Programmatically trigger buttons?

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().

fps

is there a way to boost the fps on the game to make it run faster?

Possible enhancements for self-hosted scenario?

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:

  1. Store game saves on server-side disk and not just in the browser. I think, if I understand it well, that webassembly does not allow accessing the client disk directly, but what about writing to the server's disk? In a self-hosted scenario, all saves could be kept on the server, accessible from any browser.
  2. (More of a precision to 1) The ability for games to save directly on server's disk rather than saving "states".
  3. The ability to disable the "load from file" game in the settings. In a self-hosted scenario, I much prefer having my game library on the server and block any "file upload" feature for security reasons. Since the code already support loading a local game library, the ability to disable the upload feature would be great.
  4. Multiple controller (or keyboard) profiles for multiplayer support.

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 :).

Failed Build

What just happened here, and how do I fix it?
Screenshot_20240122-144511

Hosting my own version

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.

Screenshot 2022-03-10 9 54 08 AM

Screenshot 2022-03-10 9 52 34 AM

Screenshot 2022-03-10 9 54 28 AM

Screenshot 2022-03-10 9 50 58 AM

Screenshot 2022-03-10 9 52 46 AM

When using Gameshark codes, Game wont load.

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?

Buttons do not work even when the site is hosted

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?

Map Switch N64 Wireless controller

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 iPhone Home Screen bookmarks

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)

Question: Is there a built-in feature to automatically load and start the emulator from a preset file URL?

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!

2 controllers not working

OS: MacOS Ventura
Browser: Chrome
Controllers (Both connected via Bluetooth):

  • 8bitdo SF30 (Seen as an Xbox Controller)
  • Dualshock 4

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.

Screenshots of devices:
image
image

Save states via download

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?

Question about emulator settings

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

Mobile controls

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.

Problems with getting a steady fps

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.

A backend written in php

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

xBRZ Filter on Canvas

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

No audio

I am on Safari, and whenever i boot up a game, there isn’t any audio. I dont know why.

Slower due to Ipad iOS 17.4

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.

Different way for saving states.

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.

f

f

WebGL 2.0 does not have more advanced shaders.

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.
Screenshot 2024-06-13 174826
Screenshot 2024-06-13 175229
Screenshot 2024-06-13 175713
Screenshot 2024-06-13 180110

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.