Search found 22 matches

by gblues
Mon Nov 16, 2009 5:12 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

You don't have to make another patch. Trust me on this. You think my code is that bad, eh? :lol: No, but seriously it would obviously be pointless to integrate my code if the work has already been done in the private SVN. I'm mainly doing this for my own personal benefit, but I figured someone else...
by gblues
Fri Nov 13, 2009 5:14 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Yeah, the patch in the OP isn't the best, although it is functional. I'm working on something more portable--putting path-related string literals into MSVC's TEXT() macro (and porting the TEXT() macro for DOS/Linux) and then using an "#ifdef UNICODE" test to choose between char * and wchar...
by gblues
Fri Nov 06, 2009 6:30 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

So now that I have my code working, I am now attempting to merge it back in to the main codebase in a way that does not break the Linux and MS-DOS builds. To that end, I've put together a Virtual PC environment running Ubuntu 9.10. I also had to bring in code changes from this thread to get it to bu...
by gblues
Fri Nov 06, 2009 6:18 am
Forum: ZSNES Talk
Topic: ZSNES 1.51b Experimental Linux Binaries
Replies: 56
Views: 98168

I have not tested them. But RPMFusion, from Fedora, has: - To fix the bindir/mandir problem: http://cvs.rpmfusion.org/viewvc/rpms/zsnes/devel/zsnes-1.51-Makefile.in.FIX.BROKENESS.patch?root=free&view=log - To fix the FORTIFY_SOURCE problem: http://cvs.rpmfusion.org/viewvc/rpms/zsnes/devel/zsnes...
by gblues
Fri Oct 30, 2009 4:37 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

What is the difference between SHGetKnownFolderPath and SHGetFolderPath, other than the former requiring Vista? Under-the-hood API stuff most likely. In fact, in Vista/7 SHGetFolderPath is just a wrapper for SHGetKnownFolderPath(). I haven't researched the reason for halting the old API. It's proba...
by gblues
Thu Oct 29, 2009 11:09 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Well, DirectX didn't fail, although it doesn't capture the mouse properly inside VPC. I found the source of the problem--turns out the dynamic linking wants to resolve all symbols referenced, even if they're never actually called. Yeah, this is my first foray into this kind of thing, shut up. :P Any...
by gblues
Thu Oct 29, 2009 6:27 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Hmm, well I discovered a couple issues with my work: 1) My build dynamically links with msvcrt9.dll which means it will fail spectacularly on systems that don't already have it. 2) Even with the appropriate runtime library, it doesn't work at all in XP, despite my attempts to preserve XP compatibili...
by gblues
Tue Oct 27, 2009 3:45 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Simple, %appdata%\zsnes\ will automatically write to the current users roaming profile. Good job reading the thread. :roll: The problems with using %appdata% have already been covered. %appdata% is consistent regardless of language. UTF-16 characters don't get translated into the %appdata% variable...
by gblues
Tue Oct 27, 2009 2:09 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Well, if there's interest in a 1.52 or 1.6 release with my code, I can get started on un-breaking the other builds. I haven't yet done anything regarding the configuration file location discussed earlier in the thread, but that's a simple enough modification now that all the changes are in place. I ...
by gblues
Mon Oct 26, 2009 7:22 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

You could have done some wchar_t <-> UTF-8 translation to keep the strings as 8-bit, but then it probably would have been harder to find the places where those strings are used. I chose to make everything wchar_t for a couple different reasons: 1) SHGetKnownFolderPath() resolves to a wchar_t, so us...
by gblues
Mon Oct 26, 2009 7:11 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Just a brief status update. I've completed my first pass into wchar_t territory. This basically boils down to changing the zsnes global path variables (ZCfgPath, ZStartPath, etc) to wchar_t, watching what breaks, and making changes/writing new routines as necessary; wash, rinse, repeat until the com...
by gblues
Mon Oct 26, 2009 6:55 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Squall_Leonhart wrote:Simple, %appdata%\zsnes\
will automatically write to the current users roaming profile.
Good job reading the thread. :roll: The problems with using %appdata% have already been covered.
by gblues
Fri Oct 23, 2009 11:38 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

I understand what it's doing--base 94 is very efficient at encoding binary numbers into ASCII characters (94 printable characters)--but I wasn't understanding why the config loader was using it. After analyzing my config file and the code, I've come to the conclusion that the code is simply doing mo...
by gblues
Fri Oct 23, 2009 5:51 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Well, since the paths are stored in the configuration files, I've found I will need to update the config file to use UNICODE format, and the file i/o routines accordingly. So I'm going to be delving into parsegen.cpp. Can anyone shed light on what exactly char_array_pack() and char_array_unpack() ar...
by gblues
Wed Oct 21, 2009 4:28 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

heres an idea... don't use program files for emulators. omg! the logic is astounding. Let's pretend you've got a windows system with a user account for you and your brother. You both want to use ZSNES. Where do you suggest putting it so that both you and your brother can play it? Yeah. Program File...
by gblues
Mon Oct 19, 2009 8:06 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

That sounds ridiculously complex >_< Although if you're willing to add all that, it sounds really great. You will get people upset if they can't have their config in the same folder (USB / Portable Executable users). I did when I only hid them under %APPDATA%. Many people seem to think the settings...
by gblues
Mon Oct 19, 2009 4:52 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Hah. Even Microsoft doesn't follow its own UI guidelines. See Office for the most egregious example :) Well, that doesn't invalidate the guideline; Apple likes to break its own UI conventions too, although they tend to be more consistent against their guidelines than Microsoft in general. I happen ...
by gblues
Mon Oct 19, 2009 2:10 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

Probably best to stick with SHGetFolderPathA for now. Also, another thing to consider is supporting both multi-user and single-user modes. An explanation of how I do it and why is here . Well, unfortunately your implementation of single-user mode violates Microsoft's application guidelines that com...
by gblues
Mon Oct 19, 2009 6:09 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

I'm more concerned about having to rewrite any ASM code that deals with those paths. Anyway, I'm interested in sharing my modifications, both in the new functionality and in the work I did getting it to build in the MS Visual Studio IDE. Obviously since the code is under the GPL there is nothing sto...
by gblues
Sun Oct 18, 2009 11:31 pm
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

I've updated my custom build to store SRAM, save state, and sound (SPC) data in the user profile instead of alongside the ROM or in the ZSNES directory. I wrote a couple helper functions; one checks the version of shell32.dll so I know whether to use SHGetKnownFolderPath or SHGetFolderPath. The othe...
by gblues
Sun Oct 18, 2009 3:32 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

So something like this? void cfgpath_ensure(const char *launch_command) { ZCfgPath = malloc(PATH_SIZE); if( ZCfgPath ) { ZCfgAlloc = true; if( !SUCCEEDED( SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, ZCfgPath) )) strcpy_s(ZCfgPath, PATH_SIZE, ZStartPath); else { PathAppend(ZCfgPath, TEXT("zsne...
by gblues
Sat Oct 17, 2009 8:03 am
Forum: Development
Topic: ZSNES 1.51 on Win32 patch to make Vista/7 friendly
Replies: 59
Views: 43081

ZSNES 1.51 on Win32 patch to make Vista/7 friendly

I know ZSNES 2.0 is under construction, but I've got an improvement for 1.51 that I'd like to share. When I was setting up ZSNES on my new Vista laptop, I was annoyed that it wouldn't save its configuration file if I put ZSNES in C:\Program Files (because Vista blocks writing to the application dire...