Code Monkey home page Code Monkey logo

xnes's Introduction

Build:
Install emscripten and make sure emcc is in your $PATH.
./buildall
see output for compiled results.

snem port is outdated, can only be compiled by a very old version of emscripten.
I might update it in future but snes9x seems to be fast enough for modern devices.

snes9x port requires emscripten 1.36+

snes9x is build with sound by default. comment out -Dsound in snes9x/sdl/buildhtml to disable sound.

More information:
http://tjwei.github.com/xnes  # Demo and information (brought your own roms)

Blog posts (Tradition Chinese)
http://weijr-note.blogspot.tw/2012/06/javascript-snes-emulator-wip.html # Orginal version (6/22/2012)
http://weijr-note.blogspot.tw/2012/08/js.html                   # more videos
http://weijr-note.blogspot.tw/2012/08/coscup-2012.html          # COSCUP slides

xnes's People

Contributors

jancborchardt avatar jasmith79 avatar tjwei avatar trafficwise 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xnes's Issues

Saving

How do we save for this emulator or has it not been added just yet?

Not an issue, just seeking guidance

Trying to get this set up, and I must be an even bigger noob than I thought. Can somebody try to "dumb htis down" for me? I have emscripten SDK installed on my centos 6, along with what it said would be all relevant packages (python, nodejs, default-jre), I extract everything from the github, execute the ./buildall and

OUT=../../output
OBJECTS="../apu/apu.cpp ../apu/SNES_SPC.cpp ../apu/SNES_SPC_misc.cpp ../apu/SNES_SPC_state.cpp ../apu/SPC_DSP.cpp ../apu/SPC_Filter.cpp ../bsx.cpp ../c4.cpp ../c4emu.cpp ../clip.cpp ../controls.cpp ../cpu.cpp ../cpuexec.cpp ../cpuops.cpp ../dma.cpp ../dsp.cpp ../dsp1.cpp ../dsp2.cpp ../dsp3.cpp ../dsp4.cpp ../fxinst.cpp ../fxemu.cpp ../gfx.cpp ../globals.cpp ../memmap.cpp ../obc1.cpp ../ppu.cpp ../reader.cpp ../sa1.cpp ../sa1cpu.cpp ../sdd1.cpp ../sdd1emu.cpp ../seta.cpp ../seta010.cpp ../seta011.cpp ../seta018.cpp ../snes9x.cpp ../spc7110.cpp ../srtc.cpp ../tile.cpp sdlmain.cpp sdlinput.cpp sdlvideo.cpp sdlaudio.cpp"
INCLUDES="-I. -I.. -I../apu/"
CCFLAGS="-U__linux -O3 -DLSB_FIRST -fomit-frame-pointer -fno-exceptions -fno-rtti -pedantic -Wall -W -Wno-unused-parameter -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DHAVE_MKSTEMP -DHAVE_STRINGS_H -DHAVE_SYS_IOCTL_H -DHAVE_STDINT_H -DRIGHTSHIFT_IS_SAR -Wno-c++11-extensions"

emcc -O3 -s EXPORTED_FUNCTIONS="['_main', '_set_frameskip', '_set_transparency', '_run', '_toggle_display_framerate', '_S9xAutoSaveSRAM' ]"
-s FORCE_FILESYSTEM=1
--shell-file xnes9x_shell.html
-o $OUT/snes9x.html
-DUSE_SDL
-DHTML $INCLUDES $CCFLAGS $OBJECTS
-lm -lSDL -s TOTAL_MEMORY=50331648
-DSOUND
Traceback (most recent call last):
File "/usr/bin/emsdk-portable/emscripten/1.37.28/emcc", line 9, in
if sys.version_info.major == 2:
AttributeError: 'tuple' object has no attribute 'major'

real 0m0.073s
user 0m0.030s
sys 0m0.026s

Stops there, and there's nothing in the output folder? I know this isn't really in the scope of what this section is for but I'm not realy sure where else to ask. Can somebody please point me in the direction I need to be? Would very much appreciate it. Thank you.

Feature request..? (zip support)

I am sorry if this is not the correct place to put this. I have never participated on github as an actual member before (I've only downloaded things). That said, you should add zip support dude. Should be pretty easy to do, right? You might say you don't want to put that load on the server, but how much load would unzipping the occational NES game really be..? The ROMs are what, like 32k or something? Lots of people keep their ROMs in massive zip-filled folders. NES ROMs zip quite nicely ;p

Compiling without windows

I'm trying to compile on windows and so it returns me

/usr/bin/env: ‘python2’: No such file or directory
You can help me with this?

Mobile

This emulator doesn't work properly on mobile.

main LoopQuit Event

After a game like super mario world starts and passes the dialog, the emulator crashes the webpage giving this error.
start main LoopQuit Event. Bye.
SDL_Quit called (and Ignored)

Crackling sound issue

For some reason the sound is always having crackling noise, In some games are much more that the others, but the noise is always there.

Change the joypad buttons

I'm trying to customize the buttons of the joypad, however it returns me that when trying to insert the tag, I suppose it would be for that.

native_set_joypad_state = Module._native_set_joypad_state
         joy1state = 0x80000000
         native_set_joypad_state (joy1state)

Return this:
Uncaught TypeError: native_set_joypad_state is not a function

I'm using as a base as the example with sound, in Sound4 folder

How can I change the buttons? are a bit confusing to me

SNEM Sound ?

Using -DSOUND with SNEM has errors because it seems to need the Allegro library. Please advise how to build SNEM with sound?

Missing LICENSE

Hi,
Great work!
However, would be nice to have a license added.
Regards,
Kajos

Mobile performance.

Performance is tantalizingly close to acceptable on chrome for android on a decent-ish phone (with sound), any way other than building without sound to tweak it faster (simulating threads with workers?) or just wait for the hardware/browser to get better?

Use JS-based joypad inputs?

I'd like to modify this project two ways and then incorporate into https://github.com/8enmann/webtendo

  1. Allow JS to fire key events. Modify sdlinput.cpp and the build config to expose S9XReportButton or an abstraction of it to JS. Then call it from JS with the appropriate args. Where's the documentation for how to construct an ID to pass into S9XReportButton, assuming no mapping has been made? If a mapping has been made I assume it's as simple as using (mod << 16 | ksym | type == keydown) as you do in sdlinput.cpp.

  2. Support 2 controllers. I saw in sdlinput.cpp that you call with command "Joypad1 X" as the s9xcommand_t. Perhaps it's as simple as passing in "Joypad2 X" instead? What if I don't use a mapping, or do I have to?

Let me know if I'm on the right track. Thanks!

Can't Compile

Hi.
I downloaded the xnes source code but I am not able to compile using emscripten but I can not. I do not know if it has anything to do with the emscripten version. Could you show me a step by step?

snes9x.js non-min file?

Hi,

This isn't really an issue, but I thought others might have the same question so I opened an issue.

Is there a way we can get a non-min version of the snes9x.js file? When I run the buildall command using emscription I'm getting a minimized javascript file, if possible I would like the full version so I can better see where things blow up in the emulator, or the ability to tweak it.

Glitches out on iOS

Hey, for some reason this emulator glitches out on mobile safari and then crashes. Will there ever be a fix for this?

Low memory

When I am on mobile phone it says low memory when I try to play one

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.