Announcing relaunch of Nezulator - now written in Javascript

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Announcing relaunch of Nezulator - now written in Javascript

Post by Zelex » Sat Apr 30, 2011 6:35 am

Relaunch has none of the the old code that I wrote over 10 years ago. New code based off of jsNES, but with a ton of improvements to make it lots faster, uber fast 2x zooming, fixed a bunch of bugs, expanded mapper support, and google search integrated for lots of roms w/out the legal hastle! :)

http://zelex.net/nezulator

w00t!

User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: Announcing relaunch of Nezulator - now written in Javasc

Post by cpow » Sat Apr 30, 2011 7:35 am

Zelex wrote:Relaunch has none of the the old code that I wrote over 10 years ago. New code based off of jsNES, but with a ton of improvements to make it lots faster, uber fast 2x zooming, fixed a bunch of bugs, expanded mapper support, and google search integrated for lots of roms w/out the legal hastle! :)

http://zelex.net/nezulator

w00t!
I get about 8-10FPS running SMB1 on my Intel core i5 @ 2.6GHz. Is this expected?

User avatar
tokumaru
Posts: 11766
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Sat Apr 30, 2011 8:35 am

I guess speed largely depends on the browser you're using. It probably runs much faster on Chrome, since it compiles JavaScript IIRC.

3gengames
Formerly 65024U
Posts: 2276
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames » Sat Apr 30, 2011 8:39 am

58-60Fps is what it says for me on Chrome 10, but it still runs very choppy. Good job though. Although, I think a interface like jsNES would be nicer. ;) :D

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Sat Apr 30, 2011 10:24 am

Yeah, definitely run in chrome. Firefox and Opera are over twice as slow -- and believe me that this emulator pushes the boundaries of what is possible in javascript. Its a really... really slow language.

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Sat Apr 30, 2011 10:26 am

I'm working on some changes to squeeze out another 5 fps or so, but it makes a world of difference for my laptop. Hopefully be done this weekend sometime :)

User avatar
tokumaru
Posts: 11766
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Sat Apr 30, 2011 10:29 am

I got around 6fps in Firefox but a perfect 60 in Chrome. The sound was badly out of sync though, but I didn't even expect it to have any sound. How did you implement sound with JavaScript anyway? This is pretty amazing.

User avatar
Kasumi
Posts: 1292
Joined: Wed Apr 02, 2008 2:09 pm

Post by Kasumi » Sat Apr 30, 2011 10:32 am

Nezulator wrote:A is Z
B is X
Nope. A is X. B is Z.

tepples
Posts: 22018
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Sat Apr 30, 2011 10:35 am

tokumaru wrote:I got around 6fps in Firefox
Firefox 3 or Firefox 4?
tokumaru wrote:How did you implement sound with JavaScript anyway?
This page might explain: make a .wav file, base64 encode it as a data: URI, and put it in an <audio> element. The other way is to use an experimental browser-specific audio stream API.

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Sat Apr 30, 2011 10:54 am

Kasumi wrote:
Nezulator wrote:A is Z
B is X
Nope. A is X. B is Z.
woops. my bad. fixing now

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Sat Apr 30, 2011 11:05 am

tokumaru wrote:I got around 6fps in Firefox but a perfect 60 in Chrome. The sound was badly out of sync though, but I didn't even expect it to have any sound. How did you implement sound with JavaScript anyway? This is pretty amazing.
Chrome and Firefox have a raw sound api that allows you to do it. It also uses a flash based fallback if your not in firefox. (currently implementing the chrome api). The flash based fallback is why the sound is delayed a bit. Working on implementing the chrome api soon.

3gengames
Formerly 65024U
Posts: 2276
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames » Sat Apr 30, 2011 11:42 am

Cool. I'm surprised nobody has made a decent emulator for the NES specifically for Chrome and put it on the Chrome Experiments page. I forgot to mention earlier but I also had delayed sound, but apparently you know.


And it'd be nice to add the buttons WSADGHKL as Up,Down,Left,Right,Select,Start,B,A. It's a lot more natural to play that way. :) And a option to select a file on your computer to play would be needed, as....well...the search sucks. Typed in Mario and the first result was: NES****DiskDude!x¡* *√óÄ Ä* ܪpá*ä*áäæê.......That's not good.
Last edited by 3gengames on Sat Apr 30, 2011 11:53 am, edited 2 times in total.

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Sat Apr 30, 2011 11:46 am

3gengames wrote:Cool. I'm surprised nobody has made a decent emulator for the NES specifically for Chrome and put it on the Chromium projects. I forgot to mention earlier but I also had delayed sound, but apparently you know.


And it'd be nice to add the buttons WSADGHKL as Up,Down,Left,Right,Select,Start,B,A. It's a lot more natural to play that way. :)
Thats a good idea! I wonder if its hard to put it up there?

User avatar
Bregalad
Posts: 7890
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Sat Apr 30, 2011 1:07 pm

My $2 : Making an emulator for a specific browser is, in my opinion as dumb as making a game for a specific emulator.
Life is complex: it has both real and imaginary components.

3gengames
Formerly 65024U
Posts: 2276
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames » Sat Apr 30, 2011 1:14 pm

You're right....lets use IE6 as the basis for all web development and not move forward with open source and high quality 21st technology. But I think we are mainly talking HTML5 tech, not just Chrome alone.
Last edited by 3gengames on Sat Apr 30, 2011 1:17 pm, edited 1 time in total.

Post Reply