Stircrazy69 / pcsx2

Automatically exported from code.google.com/p/pcsx2
0 stars 0 forks source link

gsdx scaler for rama #470

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
i can't attach a file to comments so i make a new issue... rama i have
tested now round 30 games and i can't find a error. think the scaler works
fine ;)

Original issue reported on code.google.com by dh...@gmx.de on 13 Nov 2009 at 12:10

Attachments:

GoogleCodeExporter commented 9 years ago
uhh ohh... tested and tested and now a error: in the game bolt, upscaler set the
width over 12000 (4x mode) for the first logo image (only that image) and then 
scale
all normal... damn! change the line

int n_width = r.right * m_upscale_multiplier;

to

int n_width = min(r.right * m_upscale_multiplier, 4096);

and all is ok ;)

Original comment by dh...@gmx.de on 13 Nov 2009 at 6:49

GoogleCodeExporter commented 9 years ago
Alright, testing this now. Thanks for wrestling with it :p

Original comment by ramapcsx2 on 13 Nov 2009 at 9:27

GoogleCodeExporter commented 9 years ago
This works pretty well :)
It still fails on valkyrie profile 2 (that game is evil), and sometimes it goes 
to
double the horizontal resolution when it wouldn't need to. Also using the full
display rect as a base is quite a bit of overhead again (often 15xx * 9xx, when 
it
should be 1280*896), so I'm attaching a patch with some changes.
Tell me what you think :p

Original comment by ramapcsx2 on 13 Nov 2009 at 11:07

Attachments:

GoogleCodeExporter commented 9 years ago
if(n_height <= GetDeviceSize().y + n_mod)  << this should probably be just < ? 
Seems
to work fine now :)

Original comment by ramapcsx2 on 13 Nov 2009 at 11:45

GoogleCodeExporter commented 9 years ago
overhead is known, i have accepted (is a little overhead) while some games set 
wrong
resolution (to small)... ok, this can be fixed a first i would see whether the 
way is
right. i come now from sleep and need coffee ;) i test and then give a 
feedback...

Original comment by dh...@gmx.de on 13 Nov 2009 at 3:20

GoogleCodeExporter commented 9 years ago
ohh and the wrong double of height comes temporary when a scene changed without
output of graphic (thats what i have seen by logging)... can u confirm?

Original comment by dh...@gmx.de on 13 Nov 2009 at 3:29

GoogleCodeExporter commented 9 years ago
Hold on, currently trying to scale using scissoring. This would be very 
correct, if
it works out :p

Original comment by ramapcsx2 on 13 Nov 2009 at 3:35

GoogleCodeExporter commented 9 years ago
ok, i wait for it... i hope this works, otherwise i have the follow result: if 
width
is corrected (with (r.right-r.left)) breaks Animaniacs - The Great Edgar Hunt. 
this
game set a wrong resolution (512 is set and needed is 640). so i think we 
living with
a little overhead or we check the game crc. problem: unknown which games set a 
wrong
resolution (by me is Animaniacs the only at the moment). if(n_height <=
GetDeviceSize().y + n_mod) is correct with overhead, without is if(n_height <
GetDeviceSize().y + n_mod) correct... a if scissoring works then is this solved 
;)

Original comment by dh...@gmx.de on 13 Nov 2009 at 4:11

GoogleCodeExporter commented 9 years ago
Alright, here's part 3. Could be it's a bit bloated, but it works fine for me.
Also added the ffx-2 ntsc info (the pal one might need new detection values).

Original comment by ramapcsx2 on 13 Nov 2009 at 9:36

Attachments:

GoogleCodeExporter commented 9 years ago
ok, i test it, add the pal values...

Original comment by dh...@gmx.de on 13 Nov 2009 at 10:14

GoogleCodeExporter commented 9 years ago
ok rama, the negativ message is: we have overhead! overhead from exactly 1 
pixel per
line ;) change this: 

n_width = max( (int)m_context->SCISSOR.SCAX1 +1, (int)TEX0.TBW*64 );

to 

n_width = max( (int)m_context->SCISSOR.SCAX1, (int)TEX0.TBW*64 );

and all works perfect! the only is: gabest has say, he is not sure that
(int)TEX0.TBW*64 ) is right... don't ask who, i have it seen in the code last 
night
but i can't say who at the moment... fact is: the scaler works very good and i 
think
we can use it ;) cool, my first achievement with c++ (not only mine, yes i 
know),
nice ;) i'm a delphi programmer and c++ is a bit new for me... i think this can 
into
the svn and we wait for response... what is the next? ;) on the other side:
interesting is the overhead of 1 pixel per line... in the height is all ok but 
in the
width. have gabes right? is the (int)TEX0.TBW*64 ) not so correct? what will 
better
work if this is corrected? hmmm, a lot of testing i can see on the horizon...

Original comment by dh...@gmx.de on 13 Nov 2009 at 11:10

GoogleCodeExporter commented 9 years ago
uhh ohh, i forgot: the change for pal in the ffx-2:

if (m_game.title == CRC::FFX2 && n_height == 1150 || n_height == 832) // ffx-2 
video
playback hack part 1 (part 2 in GSTextureCache.cpp)

to

if (m_game.title == CRC::FFX2 && n_height == 1024 || n_height == 832) // ffx-2 
video
playback hack part 1 (part 2 in GSTextureCache.cpp)

sorry ;)

Original comment by dh...@gmx.de on 13 Nov 2009 at 11:15

GoogleCodeExporter commented 9 years ago
Yeah well, this is all very hacky after all :p
I'll go over it once more, then put it on the svn.
The long term solution for all this is in the work (someone is rewriting the 
whole
scaler, so it will always be right).
Until then, this here seems to do nicely :)

TEX0.TBW*64 *should* be right, but since some games (especially fmv) use odd 
drawing
areas, it also can fail.

Original comment by ramapcsx2 on 14 Nov 2009 at 12:22

GoogleCodeExporter commented 9 years ago
ohh, not svn! animaniacs is broken again! the start of the game is ok, game 
works
good but many scenes have a to little width (many video scenes, but not all and 
the
menu) :( i log and search the problem.... damn damn damn! this game is a 
brother of
valkyrie, all the same evil ;)

-

and an another problem: if i play a pal game who i can select ntsc mode, the 
bottom
area flickers... all this is not present in my code, i think, the overhead from 
my
code is correct... u must see: a game can have a another resolution as the 
resolution
from the ps2 output, the ps2 corrected this by output and my code use the output
resolution as basis for scale and so is the basis for scale always right (after 
all
the tests i think so)... i have not another statement at the moment for the
problems... the only what i see is: with my code is the output correct, no to 
litte
screens and no flickering and the little overhead is acceptable or even right 
if the
programmer from the games have not set all correct while the ps2 it does by
output..... Tell me what you think.

Original comment by dh...@gmx.de on 14 Nov 2009 at 12:36

GoogleCodeExporter commented 9 years ago
Your code worked in most games, because the extra width and height were often 
enough.
Not so for vp2.
I think it'll be better if you find out what animaniacs uses, and add it to the 
max()
lists :p

Original comment by ramapcsx2 on 14 Nov 2009 at 1:16

GoogleCodeExporter commented 9 years ago
hmm this solves not the other problems with your code: megaman x8 -> flickers at
bottom if i use ntsc (most pal games give this as an option at start), ico 
blends
wrong graphic at bottom and left (pal and ntsc mode)... i have snapshots here:

ico with my code:
http://img188.imageshack.us/img188/3248/icomycode.jpg

the same with your:
http://img697.imageshack.us/img697/4332/icoyourcode.jpg

megaman x8 with my:
http://img188.imageshack.us/img188/4884/mx8mycode.jpg

megaman x8 with your (a video would be better a i think u can see what i will 
say):
http://img258.imageshack.us/img258/8527/mx8yourcode.jpg

i think the end of way is far away ;)

Original comment by dh...@gmx.de on 14 Nov 2009 at 3:23

GoogleCodeExporter commented 9 years ago
Ok, more issues then :p
Using your suggestion is a speed hit, when 90% of games don't even need it.
I'd rather figure out how to cover the 10% problematic games :)

(Also, I'm currently busy trying to fix scaler issues, updated might be slow. )

Original comment by ramapcsx2 on 14 Nov 2009 at 4:13

GoogleCodeExporter commented 9 years ago
Sorry this isn't helpful to the issue, but does this issue cover the problem 
with
Gitaroo Man [PAL] being stretched off screen? r1873 of GSDX only stretches off 
screen
a little bit (doesn't hinder playing) but then r2404 of GSDX stretched almost 
half of
the picture off screen.

r1873 menu
http://img193.imageshack.us/img193/2055/gm1ws.jpg

r2404 menu
http://img694.imageshack.us/img694/8505/gm2lf.jpg

r1873 gameplay (see the top of the arrows on the success bar at the top of the
screen, and the score on the bottom left, along with the "attack" on the bottom 
right
being slightly cut out)
http://img715.imageshack.us/img715/3084/gm3.jpg

Original comment by aj...@hotmail.com on 3 Mar 2010 at 5:56

GoogleCodeExporter commented 9 years ago
This is related, yeah. Although it also looks like the scissoring area is now 
way off.
With some more talented coders, we might be able to tackle this bug once more :p

Original comment by ramapcsx2 on 3 Mar 2010 at 6:10

GoogleCodeExporter commented 9 years ago
Issue 370 has been merged into this issue.

Original comment by Jake.Stine on 28 Jun 2010 at 10:40