Help in resizing the screen height display ( Y-axis )
Moderator: ZSNES Mods
-
- New Member
- Posts: 9
- Joined: Mon Mar 25, 2013 9:11 pm
Help in resizing the screen height display ( Y-axis )
I am trying to lower the Y-axis resolution to compensate the stretching it makes when you play on a 16:9 monitor ( I don't mind if I lose some lines at the top and bottom of the screen ), I used to do this with the Height size adjustment on old monitors, but since the LCD era I can no longer manually adjust the size of the screen's height display.
So far I haven't been successful in narrowing where Zsnes calculates the display output in the source, can someone help me, thanks!
So far I haven't been successful in narrowing where Zsnes calculates the display output in the source, can someone help me, thanks!
Re: Help in resizing the screen height display ( Y-axis )
so you're trying to use the correct aspect ratio with the top and bottom clipped?
Why yes, my shift key *IS* broken.
-
- New Member
- Posts: 9
- Joined: Mon Mar 25, 2013 9:11 pm
Re: Help in resizing the screen height display ( Y-axis )
Kind of, though its impossible to reach 4:3 because then you will clip the image too much, so I only want to fine tune the Y-axis a little, I know there is an option that let you play at the 4:3 Aspect ratio on a widescreen monitor by having letterboxes at the right and left sides of the screen, so I prefer the earlier approach. Also there are some games that benefits from this, namely Final Fight 2 where you get black stripes at the top and bottom already. I have been doing this on other emus with good results (ePSXe and Magic Engine). I am just having a hard time replicating this on Zsnes, so any help is appreciated.
-
- New Member
- Posts: 9
- Joined: Mon Mar 25, 2013 9:11 pm
Re: Help in resizing the screen height display ( Y-axis )
Here is some update of what I am trying to do:
Original Image Display
Resized Image Display
I did this in Snes9x 1.53 by changing some code in the render.cpp source:
inline void SetRect(RECT* rect, int width, int height, int scale)
{
rect->left = 0;
rect->right = width * scale;
rect->top = -48;
rect->bottom = ((height - (GUI.HeightExtend?0:15)) * scale)-64;
}
But I have no idea how can I do this in Zsnes
Original Image Display
Resized Image Display
I did this in Snes9x 1.53 by changing some code in the render.cpp source:
inline void SetRect(RECT* rect, int width, int height, int scale)
{
rect->left = 0;
rect->right = width * scale;
rect->top = -48;
rect->bottom = ((height - (GUI.HeightExtend?0:15)) * scale)-64;
}
But I have no idea how can I do this in Zsnes
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Re: Help in resizing the screen height display ( Y-axis )
Probably because all the render stuff is in assembly. Have fun storming the castle !Marcelo_20XX wrote:But I have no idea how can I do this in Zsnes
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- New Member
- Posts: 9
- Joined: Mon Mar 25, 2013 9:11 pm
Re: Help in resizing the screen height display ( Y-axis )
I have some knowledge of assembly, its much harder to do this that in C++ and I agree with you, but, just give me a hint where should I look and I will have fun storming the castle. I actually changed some code but the image just got moved not resized like in Snes9x. Thanks for any advice
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Re: Help in resizing the screen height display ( Y-axis )
I couldn't point it out even if I wanted, it's all over the place. Oh, also don't forget that overscan modifies vertical stuff too.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Buzzkill Gil
- Posts: 4294
- Joined: Wed Jan 12, 2005 7:14 pm
Re: Help in resizing the screen height display ( Y-axis )
What Grinvader is trying to say is... ZSNES is not even clean, well-documented assembly. It's a Lovecraftian nightmare of spaghetti code and ad-hoc design.
KHDownloadsSquall_Leonhart wrote:DirectInput represents all bits, not just powers of 2 in an axis.You have your 2s, 4s, 8s, 16s, 32s, 64s, and 128s(crash course in binary counting!). But no 1s.
-
- New Member
- Posts: 9
- Joined: Mon Mar 25, 2013 9:11 pm
Re: Help in resizing the screen height display ( Y-axis )
Hmmm...I see, thanks both of you for the replies, closest I got was at looking this part in copyvwin:
Process2xSaIwin:
mov ebx,hirestiledat+1
cmp byte[GUIOn],1
je .loopabi
cmp byte[newengen],0
je .loopabi
mov ebx,SpecialLine+1
.loopabi
mov [InterPtr],ebx
; add edi,[VESAAddr]
%ifdef __UNIXSDL__
mov dl,223
%else
mov dl,[resolutn]
sub dl,1 ; Compensate for top/bottom line + 2 lines in 2xSaI
%endif
mov [lineleft],dl
mov dword[esi+512],0
mov dword[esi+512+576*2],0
mov ebx,[vidbufferofsb]
add ebx,288*2
I changed this value in the hope of reducing the top and bottom, but I didn't get the desired effect, it just cropped the display of the bottom part of the image
Process2xSaIwin:
mov ebx,hirestiledat+1
cmp byte[GUIOn],1
je .loopabi
cmp byte[newengen],0
je .loopabi
mov ebx,SpecialLine+1
.loopabi
mov [InterPtr],ebx
; add edi,[VESAAddr]
%ifdef __UNIXSDL__
mov dl,223
%else
mov dl,[resolutn]
sub dl,1 ; Compensate for top/bottom line + 2 lines in 2xSaI
%endif
mov [lineleft],dl
mov dword[esi+512],0
mov dword[esi+512+576*2],0
mov ebx,[vidbufferofsb]
add ebx,288*2
I changed this value in the hope of reducing the top and bottom, but I didn't get the desired effect, it just cropped the display of the bottom part of the image
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Re: Help in resizing the screen height display ( Y-axis )
Marcelo_20XX wrote:Hmmm...I see, thanks both of you for the replies, closest I got was at looking this part in copyvwin:
I changed this value in the hope of reducing the top and bottom, but I didn't get the desired effect, it just cropped the display of the bottom part of the imageCode: Select all
Process2xSaIwin: mov ebx,hirestiledat+1 cmp byte[GUIOn],1 je .loopabi cmp byte[newengen],0 je .loopabi mov ebx,SpecialLine+1 .loopabi mov [InterPtr],ebx ; add edi,[VESAAddr] %ifdef __UNIXSDL__ mov dl,223 %else mov dl,[resolutn] sub dl,1 ; Compensate for top/bottom line + 2 lines in 2xSaI <<<< %endif mov [lineleft],dl mov dword[esi+512],0 mov dword[esi+512+576*2],0 mov ebx,[vidbufferofsb] add ebx,288*2
Code: Select all
tags for your visual comfort.
I forgot to mention that pretty much every filter has its own code like that. This is the part that handles 2xSaI. As you can see, there's port-dependant hardcoded shit in there. Fun times !
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)