View unanswered posts | View active topics It is currently Sat Jan 19, 2019 2:14 am



Reply to topic  [ 9 posts ] 
Secondary Monitor (patch by mysoft) 
Author Message
New Member

Joined: Fri May 09, 2014 1:34 am
Posts: 4
Reply with quote
Post Secondary Monitor (patch by mysoft)
ok, i wanted to play zsnes on my secondary monitor... since zsnes doesnt support that
i had to forcefully make it work, and so i did... but since zsnes seems to do a lot of stuff
that doesnt work properly while on secondary monitor (ALL related to moving window)
then i can make it work only fullscreen...

there is still people interested in that? while the new version that probabily will have support for that
doesnt come along?

thanks :)


Fri May 09, 2014 5:28 am
Profile
Buzzkill Gil

Joined: Wed Jan 12, 2005 7:14 pm
Posts: 4229
Reply with quote
Post Re: Secondary Monitor (patch by mysoft)
I... wait a sec... did you just dig in, solve your problem on your own, and then come in offering to help others instead of not doing anything, assuming it was our job to fix your problems, and then disappear into the mist?
You are my hero. Would that the world was full of people like you.


I'm sure someone is interested in the patch, though I can't say I am(For multiple reasons, including the fact that I don't have space for dual monitors right now. It's a barbaric lifestyle, I tell you what. ).

_________________
Squall_Leonhart wrote:
Quote:
You have your 2s, 4s, 8s, 16s, 32s, 64s, and 128s(crash course in binary counting!). But no 1s.
DirectInput represents all bits, not just powers of 2 in an axis.


KHDownloads


Sun May 11, 2014 4:33 pm
Profile
New Member

Joined: Fri May 09, 2014 1:34 am
Posts: 4
Reply with quote
Post Re: Secondary Monitor (patch by mysoft)
ok, so here it is:
Image

just extract the .7z onto zsnes folder.... and run the MonitorConfig executable
it will then have the option to ENABLE the patch (it modifies zsnesw.exe)
or disable the patch (it will restore zsnesw.exe to it's original state)
how to use is pretty simple just select monitor and resolution (for fullscreen)
and for windowed you're locked to use the monitor (desktop) size...
which is the recommended setting anyway :)
since while in windowed mode... you can't move the window anyway...

hopefully i didnt forgot anything :)

here are the downLoad links:
https://drive.google.com/file/d/0B2Dy5Jj3MfB3WUI2LXpqdUI5ZFU/edit?usp=sharing
or...
http://www.mediafire.com/download/ol9684xi9yvl18c/ZSnes-MonitorConfig.7z

Have Fun... e feel free to report any bug :)


Mon May 12, 2014 8:08 pm
Profile
Regular
User avatar

Joined: Wed Sep 22, 2004 3:46 am
Posts: 278
Location: Tromaville
Reply with quote
Post Re: Secondary Monitor (patch by mysoft)
Wait you actually went and made it? That's really cool.

I'd be testing it out myself, but I don't have two monitors. Anyway like Gil said, I'm pretty sure someone here is going to love you for it.


Tue May 13, 2014 8:55 pm
Profile
Trooper
User avatar

Joined: Tue Jan 08, 2013 12:24 pm
Posts: 417
Reply with quote
Post Re: Secondary Monitor (patch by mysoft)
That's pretty fucking impressive man. You're like the polar opposite of slore even though I felt bad for the guy. I only have one monitor too(that I use with my PC) but making your creation public like that is definitely cool.


Tue May 13, 2014 11:39 pm
Profile
Zealot
User avatar

Joined: Sat Jul 02, 2005 2:01 am
Posts: 1076
Reply with quote
Post Re: Secondary Monitor (patch by mysoft)
So, how does it work? Source code would be nice.

_________________
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae


Wed May 14, 2014 3:32 am
Profile WWW
New Member

Joined: Fri May 09, 2014 1:34 am
Posts: 4
Reply with quote
Post Re: Secondary Monitor (patch by mysoft)
paulguy wrote:
So, how does it work? Source code would be nice.


in case anyone cares.... :P

ok, so it changes a DLL in zsnesw.exe (shell32.dll) to make zsnesw load my DLL instead (MULTMON.dll) that's more friendly to AV's instead of injecting into the app or something.... (and zsnesw only has one function from that shell32.dll so i just had to wrap it)

then it DETOURS.... DirectDrawCreateEx function... so that i can select a DISPLAY device to use (as the emulator is heavily tied to a single display device). all the info about resoluton and which display device to use (by partial name) is stored on zsnesw.cfg (i reused one of the graphic pack PATH's to store the display name... sorry if you would require that... i didnt wanted to save setting on registry or create a INI file just for a single setting).

so now i can move the window to the secondary screen and it will work... but if you're on windowed and try to move it will move on the main display... i couldnt really fix that, so instead i just "blocked" moving, by make it thinks the size of the screen is the same as the size of the window (by Detouring GetSystemMetrics). also i had to ClipCursor to reside inside the window only (otherwise when you leave the window it doesnt easily go back. because the zsnes emulates the mouse cursor inside it's window in a different way that again was not friendly to the secondary monitor.)

and last if you change the window (alt+tab) or something, i then disable the mouse clipping to the window, so you can use a different program hehee also if the window is moved to a different place, i will move it back to the correct display, because otherwise it will hang the emulator.

last... but not really necessary for this hack, i just had it for myself and ended being released along.... i detoured the DirectDraw::WaitForVerticalBlank... and "emulated" it slight different, so that waiting for vsync will not use 100% of a core (by using DirectDraw::GetScanLine), and that way allowing the emulator to work more smoothly with vsync even at "RealTime" priority without being too hard on the system.

i will update the third post to include the source code, since you asked... (and sorry if my explaining was too technical hehehe), it's made in Freebasic (which gives a hint on why i avoided just modifying zsnesw source or something (maybe?)), just need to clean up the code a bit, is still in a "hurry" state eheheh :P


Wed May 14, 2014 11:59 am
Profile
Zealot
User avatar

Joined: Sat Jul 02, 2005 2:01 am
Posts: 1076
Reply with quote
Post Re: Secondary Monitor (patch by mysoft)
Nah I got it. I wonder if other direct draw applications have this same problem and can be fixed similarly. It'd have to be made a bit differently to be a bit more universal I guess. I suppose dxgl does the job though.

_________________
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae


Wed May 14, 2014 5:58 pm
Profile WWW
New Member

Joined: Fri May 09, 2014 1:34 am
Posts: 4
Reply with quote
Post Re: Secondary Monitor (patch by mysoft)
paulguy wrote:
Nah I got it. I wonder if other direct draw applications have this same problem and can be fixed similarly. It'd have to be made a bit differently to be a bit more universal I guess. I suppose dxgl does the job though.


heh yeah... as dxgl is emulating the dx without being direclty tied to hardware... (which is good and bad at same time), however i assume for windows 8.1 where that stuff is (creeply?) emulated dxgl is probabily wonderful! (when it works :P)


Wed May 14, 2014 7:41 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 10 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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.