Post subject: SNES9x1.51 Emulator Development
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3576)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
See Also: SNES9x-rr 1.52 * SNES1.51 is one of the primary emulators used to record SNES TASmovies. It is being developed along side SNES1.43 (due to various bugs, emulation, and lag issues the two version have had reasons for maintenence). The src is maintained via svn at github: https://github.com/snes9x-rr It is linux & windows compatible. The win32 version compiles with VS2008. Any coding help is greatly appreciated. If interested, I can be PMed on the forums. Our bugs list is actively maintained, so any bug reports are greatly appreciated: http://code.google.com/p/snes9x-rr/issues/list Old project URL: http://github.com/TASVideos/snes9x-rr [Edited by AngerFist: Stickied per authors request]. [Edited by Ilari: Unstickied].
It's hard to look this good. My TAS projects
Joined: 7/27/2006
Posts: 24
svn does not compile with GCC 4.4 due to char* / const char* issues in unix/unix.cpp. Patch below fixes the error (it's only two lines that make trouble).
--- src/snes9x151-rerecording/unix/unix.cpp     2009-08-22 11:29:29.000000000 +0200
+++ src/snes9x151-rerecording-build/unix/unix.cpp       2009-08-22 11:34:12.000000000 +0200
@@ -1209,8 +1209,8 @@
 {
   *drive = 0;

-  char *slash = strrchr(path, SLASH_CHAR);
-  char *dot = strrchr(path, '.');
+  const char *slash = strrchr(path, SLASH_CHAR);
+  const char *dot = strrchr(path, '.');

   if (dot && slash && dot < slash)
   {

Former player
Joined: 12/5/2007
Posts: 716
Thanks for the report as I only have gcc 4.3.2. Gocha was faster than me in fixing it, so feel free to run svn up.
gocha
Any
Emulator Coder, Former player
Joined: 6/21/2006
Posts: 402
Location: Japan, Nagoya
I still have something to improve, but I decided to release a new version now. The current progress is much better than the last release. Downloads Changes
  • Desync fixes - Older/Official versions cannot read the new savestate.
  • Some minor fixes on sound code.
  • Fix flag checking of SuperFX code. (thanks: @757_ @homingA @33953YoShI)
  • Lua: added Lua from 1.43. some functions works buggy, and some functions are not implemented yet.
  • Win32: added Gens compatible RAM Watch and RAM Search. Old search is still left. You can convert old watchlist by using it.
  • Win32: added trace logger. (ported from bsnes, thanks byuu)
  • Win32: Merged OV2's new sound code.
1.43 vs. 1.51
  • For coders, 1.43 is much harder to manage than 1.51. One of big reasons is that, 1.43 has two different cores, C and ASM. That's why I've wanted to stop 1.43 development.
  • 1.51 runs slower than 1.43 (i.e. more lags), however, I don't know if 1.51 is slower than real hardware or not. If you find a game which obviously runs slower than bsnes does, just let me know. *2
  • At the moment, 1.43 wins against 1.51 in better Lua implementation. In 1.51, some functions are not implemented yet, and some functions work buggy. We need to improve it.
  • As far as I know, it has no desync causes (asynchronous sound mixing excluded). If you find one, just let me know, please.
Other Notes
  • Windows: Check Sync Sound before you start writing a video to AVI. It should improve sound resolution.
  • Windows: Do not set frequency to 32 kHz, before you start writing a video to AVI. That will cause a audio desync. Use 48 kHz instead.
_________________ *1 It's not added to the downloads section yet, since it's not quite easy to remove libs from the latest source code, and it makes compiling harder. *2 Unfortunately, .kkapture doesn't work well for bsnes v0.055. It works successfully when I choose BMP+WAV output, but it ends incompletely when I try to output AVI instead of BMP+WAV. :(
I am usually available on Discord server or Twitter.
Post subject: Re: Snes9x 1.51 v6 (svn113)
Emulator Coder, Skilled player (1311)
Joined: 12/21/2004
Posts: 2687
gocha wrote:
Also, a new sync flag is added to SMV. Most SMV editors might not care about the new flag byte. Be careful, or you might experience a desync.
This doesn't apply to 1.51. The flag is now logically there at that location, but it is unused and should be 0, and that's the same value that used to be there before, so I think there is no change here.
gocha wrote:
[*] Windows: Do not set frequency to 32 kHz, before you start writing a video to AVI. That will cause a audio desync. Use 48 kHz instead.
Is this just a bug in Snes9x? I think the real SNES uses 32 kHz, so that sample rate should sound more accurate, and I don't remember having audio sync trouble with changing the AVI output sampling rate in other programs.
Post subject: Re: Snes9x 1.51 v6 (svn113)
gocha
Any
Emulator Coder, Former player
Joined: 6/21/2006
Posts: 402
Location: Japan, Nagoya
nitsuja wrote:
This doesn't apply to 1.51. The flag is now logically there at that location, but it is unused and should be 0, and that's the same value that used to be there before, so I think there is no change here.
Oops, removed the line.
nitsuja wrote:
Is this just a bug in Snes9x? I think the real SNES uses 32 kHz, so that sample rate should sound more accurate, and I don't remember having audio sync trouble with changing the AVI output sampling rate in other programs.
AVI recorder tries to add samples at every frame. 32 kHz will cause audio desync since 32000 cannot be divided by 60.
I am usually available on Discord server or Twitter.
Post subject: Re: Snes9x 1.51 v6 (svn113)
Emulator Coder, Skilled player (1311)
Joined: 12/21/2004
Posts: 2687
gocha wrote:
AVI recorder tries to add samples at every frame. 32 kHz will cause audio desync since 32000 cannot be divided by 60.
That sounds like just a bug though. One can add any amount of audio samples per frame to an AVI. It does not need to divide evenly into anything in order to add up to the correct amount. (Not to emphasize this too much... it's not all that important.)
Tompa
Any
Editor, Expert player (2224)
Joined: 8/15/2005
Posts: 1943
Location: Mullsjö, Sweden
Seems like Super Return of the Jedi keeps getting worse with every version... This time it's back to the same issue that most of the input just disappears when I replay the movie. The day I'm able to TAS SRotJ I'm going to switch to 1.51, but for now I see no reason to not keep going with 1.43.
Post subject: Re: Snes9x 1.51 v6 (svn113)
Player (36)
Joined: 9/11/2004
Posts: 2631
gocha wrote:
nitsuja wrote:
Is this just a bug in Snes9x? I think the real SNES uses 32 kHz, so that sample rate should sound more accurate, and I don't remember having audio sync trouble with changing the AVI output sampling rate in other programs.
AVI recorder tries to add samples at every frame. 32 kHz will cause audio desync since 32000 cannot be divided by 60.
I've been experiencing this with 1.43, so I'm pretty sure it's a long standing issue. It gets pretty bad when dumping a long movie. For instance, the SMRPG movie wound up with the audio being over 6 seconds shorter than the video.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced player (642)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
I had a similar problem before, with 1.43. The remedy that I used was to change the avi dump framerate from 60 to 60.099 using virtualdub. Personally, I simply thought that this was an intended feature of the emulator, because that happened to be the framerate of the actual SNES console.
Measure once. Cut twice.
Joined: 1/22/2008
Posts: 319
Location: Brasil
i have a problem with my stbios, when i change the directorie, it says bios not found, but i cant change in the emulator the path, so to keep stbios working i cant chang the path. how can i change the bios director in snes9x-1.51-rerecording-svn-r51? sorry, but i didnt found by myself
Run..Run...Run.....
Emulator Coder, Skilled player (1311)
Joined: 12/21/2004
Posts: 2687
Go into Options > Settings from the menu and choose "BIOS Files" from the dropdown next to Directory, then click Browse and choose a new directory for it.
Joined: 1/22/2008
Posts: 319
Location: Brasil
thanks, one more question. im using the stbios in 1.51, how can i change to another bios. and why most of bios are in smc format not bin? thats my last question, thanks nitsuja.
Run..Run...Run.....
arflech
He/Him
Joined: 5/3/2008
Posts: 1120
I believe there are ROMs that have the Sufami Turbo BIOS appended to them, and those usually have SMC extensions, while the BIOS itself is STBIOS.BIN AFAIK the only reason for the SMC extension is so file associations can more easily be set up; for some reason most Genesis ROMs use the BIN (undifferentiated binary) extension rather than SMD or GEN, and the scene could have settled on BIN for SNES ROMs also and I'm glad it didn't.
i imgur com/QiCaaH8 png
Joined: 1/22/2008
Posts: 319
Location: Brasil
arflech wrote:
I believe there are ROMs that have the Sufami Turbo BIOS appended to them, and those usually have SMC extensions, while the BIOS itself is STBIOS.BIN
ye ye, i know that, but i got other 2 bios i want to test, (the action replay and the nes to snes adapter) and i stil config to the stbios, i think that is in reg edit because i already deleted the emulator folder and downloaded again and still stbios the in the same folder. i dont know how to change the bios just the directory where the file is located.
Run..Run...Run.....
arflech
He/Him
Joined: 5/3/2008
Posts: 1120
IMO it's in an INI file, but you should be able to go to Tools>Emulator>Settings... and then choose BIOS in the drop-down list and set that to the folder where the BIOS files are
i imgur com/QiCaaH8 png
Emulator Coder, Skilled player (1311)
Joined: 12/21/2004
Posts: 2687
arflech wrote:
for some reason most Genesis ROMs use the BIN (undifferentiated binary) extension rather than SMD or GEN
I think BIN and SMD are actually two different formats (the bytes inside an SMD file are shuffled around compared to those in an equivalent BIN file). So it's not just a matter of file associations with those. I don't know whether this same thing applied to SMC vs BIN files, though.
wicked wrote:
i dont know how to change the bios just the directory where the file is located.
It's quite possible that there is no way to change which filename it looks for in the directory, which would mean that the only way to change which bios it uses is to rename the bios you want it to use to "stbios.bin".
arflech
He/Him
Joined: 5/3/2008
Posts: 1120
I just noticed that snes9x 1.52 has been released; how hard would it be to shift the work on snes9x-rr 1.51 into an snes9x-rr 1.52 build? I noticed that the newest version doesn't recognize savestates from older versions, so the architecture may be wildly different...
i imgur com/QiCaaH8 png
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
(Changes are listed here)
arflech
He/Him
Joined: 5/3/2008
Posts: 1120
I saw some of those back when I used that very site to download Snes9x 1.52 but I don't know enough about the relationship between the changes and the addition of re-recording functionality
i imgur com/QiCaaH8 png
Joined: 4/29/2006
Posts: 70
I keep getting an error when the compiler reaches the -llua option. tried both: gxx-4.3 and gxx-4.4 The error message differs depending to which liblua library /usr/lib/liblua.so is symlinked to: The ones I've tried are liblua5.1, liblua50 and liblua40, all of which fail to compile and the configure line takes no lua-arguments.
Editor, Expert player (2372)
Joined: 5/15/2007
Posts: 3940
Location: Germany
http://dehacked.2y.net/microstorage.php/info/1436369046/earthbound%20sync.smv Earthbound (U) If you check certain spots that are out of bounds of the normal game map (see here or here) by pressing L, glitchy stuff occurs. Among the results are glitch warping, game crashing, text parsing until the debug menu comes up, BGM change and more... Movies that use this glitch won't sync at all in snes9x 1.43, but they will in snes9x 1.51. Now, the movie above is an exception. Try autofiring L at frame 34115 and sometimes it will glitch warp you to Dalaam at frame 38000 and sometimes it won't have any effect. If I record a movie that warps to Dalaam, it will always play back the same wrong result.
Joined: 5/12/2009
Posts: 748
Location: Brazil
Don't know if this is the right place for a question, so sorry if it's not. I'm trying to use Snes9x 1.51 to watch some movies and wips on the site and i just can't get the emulator to work. In fact, it usually opens for around 3 seconds but as soon as i try to do anything it just closes and creates a config_error file. Then it doesn't open at all unless i wait some minutes. But then the same happens every time. I tried all versions avaliable on the download page and even some not TAS versions but i get the same result. All versions of snes9x works fine for me except for this one. I'm using Windows 7, btw. Does anybody know what could be the problem?
Joined: 1/23/2012
Posts: 82
1.51 is deprecated. Snes9x re-recording has a 1.52 core now.
Editor, Expert player (2372)
Joined: 5/15/2007
Posts: 3940
Location: Germany
He says he wants to use 1.51 to watch movies and WIPs. Also, people still use the old emulators (SMW runners use 1.43 and there's the Kirby Super Star WIP on 1.43 also), depending on what works best for a given game. I don't know about a solution to this emulator crash problem, sorry.