It is currently Sat Nov 18, 2017 2:29 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Nesalizer WIP on github
PostPosted: Thu Sep 26, 2013 6:44 pm 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
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. :)


Top
 Profile  
 
PostPosted: Thu Sep 26, 2013 7:34 pm 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
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.


Top
 Profile  
 
PostPosted: Fri Sep 27, 2013 7:31 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
ulfalizer wrote:
lacks save states, so not really worth using yet

Boo! Save states are for cheaters! :lol:

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 12:23 am 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
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


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 1:15 am 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 232
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


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 1:21 am 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
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?


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 1:25 am 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
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. :)


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 1:43 am 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 232
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!


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 1:57 am 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
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.


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 2:02 am 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 232
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.


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 2:39 am 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
Good to hear!


Top
 Profile  
 
PostPosted: Sat Dec 07, 2013 9:10 am 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group