1 2
5 6
Post subject: Snes9x 1.43 improvement 15 by gocha
gocha
Any
Emulator Coder, Former player
Joined: 6/21/2006
Posts: 401
Location: Japan, Nagoya
Better quality, without losing compatibility. This topic has been obsoleted! Click here to see the new topic: SNES1.43 Emulator Development Download Sister: Snes9x 1.51 improvement (desync fix) Another Interesting One: Lua scripting in snes9x ---- Latest binary is available at: gocha's MediaFire root -> gocha's Snes9x binaries directory -> gocha's Snes9x source code directory Changes in 1.43+ v15.3: http://www.snes9x.com/phpbb2/viewtopic.php?t=4025 * Win32: Direct3D output (optional) * Win32: Fullscreen mode respects refresh rate setting (d3d only) * Win32: updated graphics option dialog, "local vid-mem" and "test mode" in display settings have been disabled. * Win32: ESC in fullscreen now exits fullscreen. * Win32: new filter: blargg's ntsc filter (three presets) Changes in 1.43+ v15.2: * Partly ported MovieNotifyIgnored feature from 1.51. Be careful, it doesn't work properly right after state load (it always assumes the input was read). Changes in 1.43+ v15.1: * Win32: Changed the behavior of Clear All to uncheck only certain player's macro. * Win32: Modified the behavior of load state around key macro. Changes in 1.43+ v15: * Fixed a problem that reset record worked differently between playing and recording. Apparently 1 frame delay had existed on movie play in older version. Thanks inichi. * Win32: Modified hotkey configuration, so that it can assign modifier itself (Shift, Alt, and Ctrl). Changes in 1.43+ v14: * Win32: Added ForceOutputSound option. The instant hack allows snes9x to output sound during avi recording, its sound quality is bad though. * Win32: Changed to keep fast-forward when the window is activated if toggled fast-forward mode is used. * Win32: Fixed position saving problem with multiple moniter. Changes in 1.43+ v13: * Win32: Added movie fast-forward function in the menu. * Win32: Removed bad fullscreen fix for the time being. As a result, the main screen will be lost when you change display settings via Display Properties. However, you can restore it by opening Display Configuration dialog. It's much better than crash. Changes in 1.43+ v12: * Fixed fatal bug of savestate which exists on v11 * Lua scripting (by DeHackEd). * Fixed bugs around input macro. * Improved joypad/background input around. * Win32: Sync Sound routine for AVI output (experimental). Changes in 1.43+ v11: Important Note: Do not use snes9x 1.43 v11beta17-v12beta7! There were some glitches in savestate! This terrible thing was fixed at improvement 12 beta 8! Most of the changes come from official Snes9x 1.51. Changes come from official 1.51 (emulation related): * Changed to use pseudo-hi-res if $2133&8 is simply set. It fixes water transparency issue of Kirby's Dream Land 3. Hope this change won't cause any movie desyncs. * Modified snapshot, but it's still compatible each other (removed GFX and added SHO). * Now uses NEW_COLOUR_BLENDING instead of OLD_COLOUR_BLENDING. * Other slight fixes. Changes come from official 1.51 (others): * Now uses .cfg file instead of Windows registry, and added some options that don't exist in older version. * Updated renderer and removed 8-bit rendering option. * Cheat search improvements. * Open ROM dialog bugfixes and speedup and facelift. * Better directory management, customizeable. * Changed default to truncate unnecessary input from movie. * Added sound channel mute (using the same function as used in 1.51. It's different from Upthorn's hack, actually). * Other various improvements. Other changes: * Added a simple macro feature. Though it's not very smart, it's somewhat useful. The macro feature's syntax is explained at lazymacro.txt. * Fixed hi-res and extended height avi output. It's somewhat different from 1.51. Even if you started avi recording with hi-res scene, video width won't be doubled. Or you can record avi with double scale for hi-res title, if you want (see config file). * Added "Skip To Frame" option for movie playback from nitsujrehtona's patch. * Changes for input ("Down Left" fix, "Turbo Down" fix, auto-fire for arrow keys). * "Snapshot inconsistent" detection. It's slightly changed from 1.51. * Changed for ROM name stored in movie to allow including katakana. * Fixed full-screen switching bug (hopefully). * Improved "Text in Image" option. Snes9x Watch (rev.13)
; removed snes9x-1.43+11.exe, it shouldn't be used!
I am usually available on Discord server or Twitter.
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Just so that people who aren't very good with changelogs know, this version includes reset recording, input display bug fix used for watching the published Super Metroid 100% run, and sound channels toggle patch by Upthorn, among numerous other fixes and additions. In other words, this is the single universal Snes9x 1.43 version to use for all purposes any of the previous versions were created.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
Maybe your memory watcher can be coded into this snes9x and maybe Geiger's debugging tools can be coded into this aswell
Tompa
Any
Editor, Expert player (2215)
Joined: 8/15/2005
Posts: 1941
Location: Mullsjö, Sweden
I just tried to record the first level of Super Return of the Jedi, and it worked out perfectly compared to 1.43 and 1.51. Didn't get a single desynch, awesome. The sound effects are still out of order. Specially the coins, I think that's the only error actually. Go go go!
upthorn
He/Him
Emulator Coder, Active player (391)
Joined: 3/24/2006
Posts: 1802
moozooh wrote:
Just so that people who aren't very good with changelogs know, this version includes ... input display bug fix used for watching the published Super Metroid 100% run.
Actually, it's probably backported the working input display from 1.51, because from what JXQ describes, it behaves differently than the bug fixed 1.43 that I made. In any case, nice work Gocha. It is good to see useful work being done on snes9x.
How fleeting are all human passions compared with the massive continuity of ducks.
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Instead of hacking furthermore a SOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOLD version of Snes9x, it will be better to fix the desync issue in 1.51 or help the snes9x team to work on their 1.52 version. Edit: Or at least, work on 1.50. The thing about 1.51 is that saving a state doesn't save everything. If someone work hard on savestates feature, he may find the solution. And better, we are 90% sure it's related to sound.
JXQ
Experienced player (761)
Joined: 5/6/2005
Posts: 3132
I am absolutely thrilled that these UI and other minor fixes are being applied to 1.43, more so than I would be to have 1.51's emulation corrected. Thanks very much, Gocha.
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
wow, I greatly appreciate this gocha :)
It's hard to look this good. My TAS projects
Former player
Joined: 12/27/2006
Posts: 532
Location: Göteborg, Sweden
I think I love you.
My published movies [03:45:05] <Naohiro19> Soulrivers: ... [03:45:19] <Soulrivers> ? [03:46:35] <Naohiro19> <Soulrivers> No! <Naohiro19> So? <Soulrivers> Yes! [03:46:48] <Naohiro19> joke
Experienced player (614)
Joined: 4/24/2005
Posts: 612
Much obliged, gocha. Some of the stuff listed is what I've been waiting for.
ventuz
He/Him
Player (125)
Joined: 10/4/2004
Posts: 940
Sounded nice, except I tested it. It still have screwy "listening for input" for gamepad. For example when you try push "button 1" for B or whatever.. it also accept "button 1" for LEFT or any other button randomly.
Tub
Joined: 6/25/2005
Posts: 1377
thanks for your work. Unfortunately, just like the previous releases, it doesn't compile on linux at all. so far I've got a couple of untested patches, but still digging up new compile errors. Is someone else already working on it, or should I continue trying? Since I'm off to bed now and probably won't work on it tomorrow, I'll just dump what I got. Joystick[] is declared in some windows header. Since I'm not familiar with that code, I just commented that part out on linux. Hope it's just some windows input code and not essential for linux - if it is, a whole lot of code from win32/ needs to be refactored & rewritten.
diff -uNr snes9x-improvement11-beta6-src_orig/gfx.cpp snes9x-improvement11-beta6-src/gfx.cpp
--- snes9x-improvement11-beta6-src_orig/gfx.cpp	2008-01-06 03:53:34.000000000 +0100
+++ snes9x-improvement11-beta6-src/gfx.cpp	2008-01-07 00:21:22.000000000 +0100
@@ -3519,7 +3519,11 @@
 	{
 		if((IPPU.Joypads[id] & 0xffff)
 			&& (S9xMovieActive() && S9xMovieControllers() & (1<<id)
-			|| !S9xMovieActive() && Joypad[id].Enabled))
+			|| !S9xMovieActive()
+#if !defined(__linux)
+			 && Joypad[id].Enabled
+#endif
+			 ))
 		{
 			singlePlayer = false;
 			break;
GETC_STREAM and GETS_STREAM are nowhere defined in the source, and google doesn't turn up anything like it either. Is reader.cpp even compiled on windows? If so, how does it work? I just replaced those with some implementations using read(). Unless I made a mistake, it'll be slow, but it'll work.
diff -uNr snes9x-improvement11-beta6-src_orig/reader.cpp snes9x-improvement11-beta6-src/reader.cpp
--- snes9x-improvement11-beta6-src_orig/reader.cpp	2007-04-29 02:51:18.000000000 +0200
+++ snes9x-improvement11-beta6-src/reader.cpp	2008-01-07 00:37:55.000000000 +0100
@@ -209,11 +209,34 @@
 fReader::~fReader(void){}
 
 int fReader::get_char(){
-    return GETC_STREAM(fp);
+    unsigned char ret;
+    if (!read((char *) &ret, 1))
+    	return EOF;
+    return (int) ret;
+
+    //return GETC_STREAM(fp);
 }
 
 char *fReader::gets(char *buf, size_t len){
-    return GETS_STREAM(buf, len, fp);
+		int c = 0;
+		unsigned int idx = 0;
+		while (idx < len - 1)
+		{
+			c = get_char();
+			if (c == EOF)
+			{
+				if (idx == 0)
+					return NULL;
+				break;
+			}
+			buf[idx++] = c;
+			if (c == '\n')
+				break;
+		}
+		buf[idx] = '\0';
+		return buf;
+		
+    //return GETS_STREAM(buf, len, fp);
 }
 
 size_t fReader::read(char *buf, size_t len){
someone forgot to adjust this function call when changing the signature, looks like this code hasn't been compiled on linux in a loooong time.
diff -uNr snes9x-improvement11-beta6-src_orig/sdd1.cpp snes9x-improvement11-beta6-src/sdd1.cpp
--- snes9x-improvement11-beta6-src_orig/sdd1.cpp	2008-01-03 08:57:00.000000000 +0100
+++ snes9x-improvement11-beta6-src/sdd1.cpp	2008-01-07 00:05:57.000000000 +0100
@@ -155,7 +155,7 @@
 		    Memory.SDD1LoggedDataCount, fs);
 	    fclose (fs);
 #if defined(__linux)
-	    chown (S9xGetFilename (".dat"), getuid (), getgid ());
+	    chown (S9xGetFilename (".dat", PATCH_DIR), getuid (), getgid ());
 #endif
 	}
 	Memory.SDD1LoggedDataCountPrev = Memory.SDD1LoggedDataCount;
now getting errors about multiple declarations, saving the include tracing for later.
m00
Former player
Joined: 11/13/2005
Posts: 1587
Although there's no proper Linux port, it seems to work just well under Wine. I only tested it quickly though, so there might be some problems that didn't occur during the test.
Joined: 9/30/2007
Posts: 103
I get a problem when I use it with Wine. When I start it, there's a notice about that I have no DirectSound enabled/installed (doesn't really bother me), and then.. nothing. The process starts, but the program is nowhere to be found. A shame, since this seems to be a good update.
Tub
Joined: 6/25/2005
Posts: 1377
I know it works with wine and actually I use it that way. I'd still like a native linux version, even if it's GUI-less.
m00
Active player (315)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
You see? It's all because of the turbo down glitch! Thank ME, bitches. heh... just kidding... nice work gocha. Do you think it's possible to implement 1.51 sound quality too?
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.
Joined: 10/24/2005
Posts: 1080
Location: San Jose
Thank you gocha! :D I'll be bold here. I would love some sort of basic-bot, built in interface to monitor ram values and control input. I'm not sure how much (if any) of arithmetic parser can be used for snes9x, but hopefully it's not too much work. Side note: one thing me and adelikat noticed was that basicbot for FCEU did not save the "best result" from a basicbot run, but rather displayed it on a GUI. Miau made a temporary fix for us and just dumped the "best" to a text file, leaving us to hex-edit in the "best" in case basicbot crashed, but at least we had something to work with :).
<agill> banana banana banana terracotta pie! <Shinryuu> ho-la terracotta barba-ra anal-o~
Joined: 10/3/2005
Posts: 1332
gocha wrote:
Though I am not sure if I will implement, please do not hesitate about showing your idea to add :)
Heh. You asked for it. ;) Hoe has written a frontend for running fcm/vbm files directly from explorer, which makes movie watching incredibly convenient. I don't know how complicated a task it would be, but could you add smv support for this tool?
Player (206)
Joined: 2/18/2005
Posts: 1451
Very nice work gotcha, thank you. The features, especially the memory watch adresses that now can be loaded like in 1.51 are very handy for every SNES TASer who can't run your memory watcher tool. I have a question: May I ask for a example of what "Movie play/record improvements" you did there? Changes in the movie engine often caused unexpected desync issues in the past (especially in ZSNES), so I just want to check whether such a possibility exists here. I hope not. :-) The only missing feature I could think of is to save all Snes9x settings into a .cfg file (like in Snes9x v1.51 already) instead in the registery. That way you could for example have multiple copies of Snes9x with individual settings for different purposes each, and therefore aren't forced to change them every single time. Do you plan to add this feature in one of the next versions? Other than that there is nothing else left to implent IMO. Good job!
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
My precedent message wasn't meant to be offensive but suggestive. Otherwise, it's pretty damn cool you are adding features. We were thinking of doing SCV4 with your final version. Also, it needs a reliable Linux port.
gocha
Any
Emulator Coder, Former player
Joined: 6/21/2006
Posts: 401
Location: Japan, Nagoya
Thank you for your comment! Snes9x improvement11 beta7: - Changed to not skip any frames with avi rendering. * Added "Skip To Frame" option from nitsujrehtona's patch (somewhat experimental). - Now "Text in Image" option works as "Do Not Display Text" option. - Changed to play sound while the window is inactive. - Changed to save frame count display setting, etc.
upthorn wrote:
Actually, it's probably backported the working input display from 1.51, because from what JXQ describes, it behaves differently than the bug fixed 1.43 that I made.
Right, if you like the old style rather than the current style, I can resume it.
Phil wrote:
Instead of hacking furthermore a SOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOLD version of Snes9x, it will be better to fix the desync issue in 1.51 or help the snes9x team to work on their 1.52 version.
Exactly. I tried to fix the desync issue of 1.51 a few days ago, but I couldn't see what's going. It's tough :(
ventuz wrote:
Sounded nice, except I tested it. It still have screwy "listening for input" for gamepad. For example when you try push "button 1" for B or whatever.. it also accept "button 1" for LEFT or any other button randomly.
That's odd. I'll try to fix this.
Tub wrote:
Unfortunately, just like the previous releases, it doesn't compile on linux at all.
Sorry, but I probably won't do anything for linux... I'm not familiar with it much. As Guybrush said, it seems to work well under Wine (tested beta6 a few days ago).
pirate_sephiroth wrote:
Do you think it's possible to implement 1.51 sound quality too?
I think it's not very easy. I wonder what will lose movie compatibility. For instance, does changing interpolation method lose movie compatibility?
DK64_MASTER wrote:
I'll be bold here. I would love some sort of basic-bot, built in interface to monitor ram values and control input. I'm not sure how much (if any) of arithmetic parser can be used for snes9x, but hopefully it's not too much work.
I'm interested in BasicBot. It looks like convenient, also seems to work as a macro input function too.
Saturn wrote:
May I ask for a example of what "Movie play/record improvements" you did there?
  • Reset recording
  • UI improvements (and changes for the function to get movie's information)
  • Check for inconsistent snapshot (algorithm is slightly changed from 1.51)
  • When playback reaches a movie's end, recording continues instead of the movie suddenly closing. (after recording)
  • Resume sync settings when playback reaches a movie's end
Dromiceius wrote:
Hoe has written a frontend for running fcm/vbm files directly from explorer, which makes movie watching incredibly convenient. I don't know how complicated a task it would be, but could you add smv support for this tool?
Saturn wrote:
The only missing feature I could think of is to save all Snes9x settings into a .cfg file (like in Snes9x v1.51 already) instead in the registery. That way you could for example have multiple copies of Snes9x with individual settings for different purposes each, and therefore aren't forced to change them every single time. Do you plan to add this feature in one of the next versions?
I think I'll try.
I am usually available on Discord server or Twitter.
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
gocha wrote:
Exactly. I tried to fix the desync issue of 1.51 a few days ago, but I couldn't see what's going. It's tough :(
Did you read that thread and what I posted on the Snes9x board? I gave links and how to reproduce the desync. It might help you.
Player (206)
Joined: 2/18/2005
Posts: 1451
gocha wrote:
  • Reset recording
  • UI improvements (and changes for the function to get movie's information)
  • Check for inconsistent snapshot (algorithm is slightly changed from 1.51)
  • When playback reaches a movie's end, recording continues instead of the movie suddenly closing. (after recording)
  • Resume sync settings when playback reaches a movie's end
Thanks. I don't think any of this changes do affect the recording engine itself, so there shouldn't be any new desync issues possible. Good to know.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Skilled player (1827)
Joined: 4/20/2005
Posts: 2161
Location: Norrköping, Sweden
Great to see some work is done on SNES9X! I'm wondering, would it be possible to implement a "memory poke" function, like in FCEU .16? For those who aren't familiar with FCEU, memory poke allows you to set a RAM address to a value of your choise, at any time. This is very useful in order to find RAM addresses for boss HP and your characters position, and all kinds of things. At this moment, the only way to test a RAM address in SNES9X is by giving it a new value is to use the cheat function, and this isn't very convenient...
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
Randil wrote:
would it be possible to implement a "memory poke" function, like in FCEU .16?
I was thinking the same thing, except more like vba. And a "go to" like in vba's memory viewer Also, what's happening about my suggestion of implementing debugging tools
1 2
5 6