nesdev.com
http://forums.nesdev.com/

MahNES Library Released - Emulator using SDL_Audio now
http://forums.nesdev.com/viewtopic.php?f=3&t=9664
Page 2 of 2

Author:  HLorenzi [ Sat Jan 12, 2013 7:34 pm ]
Post subject:  Re: MahNES Library Released

blargg wrote:
A permissive license encourages voluntary collaboration among developers who use it. The others rely on forced collaboration and have involved terms which must be followed, which turns away some developers who prefer voluntary collaboration and simplicity. Neither will cause collaboration where there's lack of interest or potential; the best way to get people helping is to form a group of people who want to work on the software. The idea is to focus on making the software valuable, rather than on worrying about how others put it to use.


So you're saying it's "best" to use the strong copyleft, as noted above? The GNU Lesser just says proprietary software should distribute the library, if they change it. I didn't really understand your point, sorry. :)

Author:  blargg [ Sat Jan 12, 2013 8:19 pm ]
Post subject:  Re: MahNES Library Released

I guess my point was to figure out why you wouldn't use a liberal license like the BSD family, and whether the costs of a more restrictive one are worth the benefits. If you haven't dealt with licensing before, then there's not a lot you can do besides do your best to choose one and then gain experience with how it is.

Author:  Dwedit [ Sat Jan 12, 2013 9:48 pm ]
Post subject:  Re: MahNES Library Released

Can you build a x86 compatible version of the emulator? I'd like to test it out.

Author:  HLorenzi [ Sun Jan 13, 2013 11:18 am ]
Post subject:  Re: MahNES Library Released

Dwedit wrote:
Can you build a x86 compatible version of the emulator? I'd like to test it out.


I think the problem is just the DLL -- I'll try to find the 32-bit version. That OpenAL website is... really messy.

I could not verify what version the DLLs I found are, so I can only ask you to download the official installer, and hope that it detects 32-bit systems. http://connect.creativelabs.com/openal/ ... alinst.zip

I am also recompiling the source explicity as 32-bit (or, at least, I think it will), just to be sure. But it's a bit unstable now, freezes randomly when going to the gallery. But that's a problem with the program, not the emulation.

Author:  Dwedit [ Sun Jan 13, 2013 2:02 pm ]
Post subject:  Re: MahNES Library Released

I already tried a different OpenAL32.dll, it was a slightly different version number, and the emulator crashed.

Author:  HLorenzi [ Sun Jan 13, 2013 6:54 pm ]
Post subject:  Re: MahNES Library Released

Dwedit wrote:
I already tried a different OpenAL32.dll, it was a slightly different version number, and the emulator crashed.


OK, now I've been able to get rid of that OpenAL thing, and switched to SDL, which was even easier to set up (but I'm still getting used to it, so there may be sound crackling or whatever). I've also corrected the freezing bug in the emulator. Would you be so kind as to download it again? :)

blargg wrote:
I guess my point was to figure out why you wouldn't use a liberal license like the BSD family, and whether the costs of a more restrictive one are worth the benefits. If you haven't dealt with licensing before, then there's not a lot you can do besides do your best to choose one and then gain experience with how it is.


So far I've changed it to a BSD license. I just want it to be as free as possible.

Author:  Dwedit [ Sun Jan 13, 2013 11:08 pm ]
Post subject:  Re: MahNES Library Released - Emulator using SDL_Audio now

MahNES is crashing because you're calling fclose on a null pointer.
This happens if there is no existing file named "MahNES Settings.txt"

Author:  HLorenzi [ Mon Jan 14, 2013 2:45 pm ]
Post subject:  Re: MahNES Library Released - Emulator using SDL_Audio now

Dwedit wrote:
MahNES is crashing because you're calling fclose on a null pointer.
This happens if there is no existing file named "MahNES Settings.txt"

You know, I just love it when something works on my computer for who-knows-what reason, and when someone tries to run it, I look like a noob. I'm really sorry about this, fclose() was mistakenly just after I closed brackets... Hopefully there are no other errors now.

Also, that was spot-on. How did you find out...?

Author:  Dwedit [ Mon Jan 14, 2013 3:25 pm ]
Post subject:  Re: MahNES Library Released - Emulator using SDL_Audio now

Ollydbg is a powerful tool.
It reported the "access violation - read from address 000000C" from inside MSVCRT.DLL, and let me look down the stack to see the code that called the function. The code pointer sitting on the stack was 0040EFD5.
I saw that it was a call to fclose, so I set a breakpoint there, and restarted the program.
Then I saw it was trying to call fclose with a null pointer.
Then I looked at the debug window, and everything you need to know is right there:
Attachment:
ollydbg.png
ollydbg.png [ 10.99 KiB | Viewed 1212 times ]

Author:  blargg [ Mon Jan 14, 2013 4:06 pm ]
Post subject:  Re: MahNES Library Released - Emulator using SDL_Audio now

Since your code is portable, it should be easy to run with valgrind. That'll point right to the line of code where you do things like fclose(NULL).

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/