Nesalizer WIP on github

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
ulfalizer
Posts: 349
Joined: Fri Mar 08, 2013 9:55 pm
Location: Linköping, Sweden

Nesalizer WIP on github

Post by ulfalizer » Thu Sep 26, 2013 6:44 pm

In case anyone's interested, I've put a WIP of the emulator I'm working on on GitHub: https://github.com/ulfalizer/nesalizer.

Currently Linux-only and lacks a GUI and save states, so not really worth using yet, but I might get some testing out of it at least if I'm lucky. :)

User avatar
ulfalizer
Posts: 349
Joined: Fri Mar 08, 2013 9:55 pm
Location: Linköping, Sweden

Re: Nesalizer WIP on github

Post by ulfalizer » Thu Sep 26, 2013 7:34 pm

It uses blargg's blip_buf by the way, and syncs audio to video by adjusting the pitch slightly to maintain a preset audio buffer fill level. The parameters for the latter are hardcoded at the moment, and the approach probably isn't optimal. Should try James' approach.

User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Re: Nesalizer WIP on github

Post by James » Fri Sep 27, 2013 7:31 am

ulfalizer wrote:lacks save states, so not really worth using yet
Boo! Save states are for cheaters! :lol:
get nemulator
http://nemulator.com

User avatar
ulfalizer
Posts: 349
Joined: Fri Mar 08, 2013 9:55 pm
Location: Linköping, Sweden

Re: Nesalizer WIP on github

Post by ulfalizer » Fri Nov 29, 2013 12:23 am

Now supports rewinding, and also does a proper reversal of the audio as a gimmick.

Thanks to Blargg for helping me find a neat way to do this with blip_buf!

A demonstration is available on Youtube. It slaughters the video quality a bit, so I also put it on Dropbox. I picked a game where I was sure to die a lot. :P

User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Re: Nesalizer WIP on github

Post by miker00lz » Fri Nov 29, 2013 1:15 am

Good work! Playing Mega Man 2. My main box here is Windows so I had to do a little hacking around in the code, especially the timing code since there is no clock_nanosleep or timespec in Win32... but all seems good.

Image

User avatar
ulfalizer
Posts: 349
Joined: Fri Mar 08, 2013 9:55 pm
Location: Linköping, Sweden

Re: Nesalizer WIP on github

Post by ulfalizer » Fri Nov 29, 2013 1:21 am

miker00lz wrote:Good work! Playing Mega Man 2. My main box here is Windows so I had to do a little hacking around in the code, especially the timing code since there is no clock_nanosleep or timespec in Win32... but all seems good.
Thanks, and cool that you took the time to port it :beer:! I suspected there wouldn't be much platform-specific stuff in there besides the timing code.

Sound stable? Rewind working?

User avatar
ulfalizer
Posts: 349
Joined: Fri Mar 08, 2013 9:55 pm
Location: Linköping, Sweden

Re: Nesalizer WIP on github

Post by ulfalizer » Fri Nov 29, 2013 1:25 am

What environment did you use by the way? Cygwin? If you have a patch ready I could add it along with some instructions in the README for a Windows build. :)

User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Re: Nesalizer WIP on github

Post by miker00lz » Fri Nov 29, 2013 1:43 am

How do I use the rewind function? Sound seems very stable so far, yeah.

I used MinGW. I'll provide a patch tomorrow some time. I just used SDL timing stuff as a quick crutch to get it working, but the proper way to do it for better accuracy would be to use the Windows performance counter, so I should change that first!

User avatar
ulfalizer
Posts: 349
Joined: Fri Mar 08, 2013 9:55 pm
Location: Linköping, Sweden

Re: Nesalizer WIP on github

Post by ulfalizer » Fri Nov 29, 2013 1:57 am

miker00lz wrote:How do I use the rewind function? Sound seems very stable so far, yeah.
Hold R.
miker00lz wrote:I used MinGW. I'll provide a patch tomorrow some time. I just used SDL timing stuff as a quick crutch to get it working, but the proper way to do it for better accuracy would be to use the Windows performance counter, so I should change that first!
Thanks!

Did you use MSYS? The Makefile isn't exactly friendly to cmd.exe. :P

Last I looked into the SDL timing functions the resolution seemed very poor, so it's interesting that you managed to get it working decently at least.

User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Re: Nesalizer WIP on github

Post by miker00lz » Fri Nov 29, 2013 2:02 am

Yep, MSYS. :)

SDL timing res is pretty poor you're right, there is an occasional slight pause in the gameplay because of it but for the most part it works smoothly.

Rewind works perfectly! Nice.

User avatar
ulfalizer
Posts: 349
Joined: Fri Mar 08, 2013 9:55 pm
Location: Linköping, Sweden

Re: Nesalizer WIP on github

Post by ulfalizer » Fri Nov 29, 2013 2:39 am

Good to hear!

User avatar
ulfalizer
Posts: 349
Joined: Fri Mar 08, 2013 9:55 pm
Location: Linköping, Sweden

Re: Nesalizer WIP on github

Post by ulfalizer » Sat Dec 07, 2013 9:10 am

Now has PAL support. High Hopes and Quantum Disco Brothers run fine.

Should get around to adding a GUI soon to make it a bit more usable... :P

Post Reply