dborth / snes9xgx

Snes9x GX - Port of Snes9x for Wii
http://wiibrew.org/wiki/Snes9x_GX
Other
438 stars 64 forks source link

Seiken Densetsu 3 glitchy - screen flashes with every text box (hi-res text?) #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load up a Seiken Densetsu 3 ROM patched with Neill Corlett's English 
translation.
2. Once you start the game, each time a dialog box pops up, the entire 
screen flashes for a second.
3.

What is the expected output? What do you see instead?
The flashing shouldn't be there.  I did some googling (and looking on 
tehskeen), and it looks like Seiken Densetsu 3 uses "high resolution" 
(512x384) mode when rendering the text, causing the flashing.  However, it 
looks like some other emulators (mostly on PC) didn't have this issue; 
maybe even other versions of snes9x?  Unsure.

What version are you using?
snes9x-gx 006+ r139.

Please provide any additional information below.

US NTSC Wii, RCA Video cables (Yellow, Red, White), CRT Television.

Original issue reported on code.google.com by hcho...@gmail.com on 29 Oct 2008 at 1:50

GoogleCodeExporter commented 9 years ago
For what it's worth, I've confirmed this with a pre-patched rom as well as a 
Japanese 
rom that I patched myself.

Original comment by hcho...@gmail.com on 29 Oct 2008 at 1:52

GoogleCodeExporter commented 9 years ago
stuff I've garnered from snes9x forums:

"When a text box appears, the game is using a hi-res mode, which affects all 
magnification filters and disables them."

"this is due to the filters only scaling and filtering to 512x448, and Hi-res 
is 
either 512x224, 256x448, or 512x448 (low res is 256x224). the filters have to 
scale 
in both directions.  Seiken Densetsu 3, as well as Seiken Densetsu 2 (Secret of 
Mana) 
uses Hi-Res for the text, to fit more on screen. this disables the filters."

Original comment by hcho...@gmail.com on 29 Oct 2008 at 2:43

GoogleCodeExporter commented 9 years ago
"This is strictly a problem of the double buffering option. Technically double 
buffering should already be done by default.. (I thought it was supposed to do 
triple 
buffering if possible)... it is a good idea to avoid that option at the moment."

Original comment by hcho...@gmail.com on 29 Oct 2008 at 2:46

GoogleCodeExporter commented 9 years ago
Oh, I'm also using "Original Mode" video rendering.

Original comment by hcho...@gmail.com on 29 Oct 2008 at 2:47

GoogleCodeExporter commented 9 years ago
I have component cables, and I don't use original mode. So this isn't something 
I 
can verify or fix.

Original comment by dborth@gmail.com on 30 Oct 2008 at 8:00

GoogleCodeExporter commented 9 years ago
I just checked, and everything works fine (no flashing) when I use either 
filtered or
unfiltered video mode.  Essentially, only Original mode has the flashing, 
though this
is not the case in Secret of Mana 1 (everything works fine there in original 
mode).  

What's the possibility of having per-game video settings?  Is that even 
feasible?

Original comment by hcho...@gmail.com on 30 Oct 2008 at 11:41

GoogleCodeExporter commented 9 years ago
Well, then I can safely say the cause of this is that original mode operates in 
256x224 (224p) or 256x448 (448i). The SNES actually supports 4 modes. We would 
need 
to add the other two original modes, 512x224 and 512x448 - and detect when it's 
needed to switch to these modes.

Maybe michniewski will do this =)

Original comment by dborth@gmail.com on 30 Oct 2008 at 4:57

GoogleCodeExporter commented 9 years ago
should be fixed.

Original comment by michniew...@gmail.com on 31 Oct 2008 at 7:33

GoogleCodeExporter commented 9 years ago
michniewski - I tried r143, and the screen flashing is gone in SD3.  Thanks! 
However, I have noticed one issue with the new original video rendering modes 
in the
game - when text appears on the screen, the video image seems to expand a few 
pixels
on either side (get wider; characters / screen art gets wider by a few pixels). 
 Once
the text box disappears, the screen contracts back to normal.  Any thoughts?  I
haven't found this to happen on any other games, just SD3.

Original comment by hcho...@gmail.com on 31 Oct 2008 at 11:47

GoogleCodeExporter commented 9 years ago
I noticed this issue in Secret of Mana also, should be fixed now ...

ALso, the problem you are mentionning is probably due to resolution width 
switching
also, I know the resolution mode is changing in SD3 when textbox are drawn

Original comment by ekeeke31@gmail.com on 1 Nov 2008 at 12:36

GoogleCodeExporter commented 9 years ago
On a side note, as tantric said, there are 4 modes on  snes:

256x224
256x448 (interlaced)
512x224  (hi-res)
512x448 (hi-res interlaced)

There are four additional mode but they are only effective for PAL display 
(because
normal NTSC TV only display 224 or 448 interlaced lines  from the 480 NTSC 
standard,
whereas PAL TV can show up to 264 or 528 interlaced lines from the 576 PAL 
standard)

256x239
256x478 (interlaced)
512x239  (hi-res)
512x478 (hi-res interlaced)

we actually only support 256x224, 256x239, 512*448 and 512*478, also note that 
PAL
games using the 239/478 vertical resolution will appear crushed if you do not 
switch
the Wii in PAL mode to be able to see the extra lines.

what happen is that 512x224 or 512*239 will be dowscaled to 256 pixels EFB and 
then
strecthed to 640 pixels by VI, which coul result in some pixels loss I imagine

Original comment by ekeeke31@gmail.com on 1 Nov 2008 at 12:46

GoogleCodeExporter commented 9 years ago
ekeeke, do you mean the screen contraction should be fixed, or the flashing 
should be
fixed?  The flashing was fixed by the inclusion of the additional original 
video mode
resolutions, but as far as I know, no fix has been checked in to fix the 
expansion
and contraction of the stuff on the screen.  :)

Original comment by hcho...@gmail.com on 1 Nov 2008 at 12:46

GoogleCodeExporter commented 9 years ago
so, is SG3 a PAL game or a NTSC game?  I'm unsure, given it's a japanese rom,
essentially...

Original comment by hcho...@gmail.com on 1 Nov 2008 at 12:50

GoogleCodeExporter commented 9 years ago
flashing was another issue and was fixed by  michniewski by deleting the 
framebuffer
clearing when switching between modes

SD3 is a NTSC game, the strecthing problem could be fixed by using a 512 pixels 
wide
EFB in original mode also (256 pixels mode will be upscaled to 512 by GX this 
way)

Original comment by ekeeke31@gmail.com on 1 Nov 2008 at 2:00

GoogleCodeExporter commented 9 years ago
hchorey - as eke-eke says, the additional modes haven't been added yet. when 
they 
are this will be fixed.

Original comment by dborth@gmail.com on 1 Nov 2008 at 5:33

GoogleCodeExporter commented 9 years ago
I was wrong, 512x??? video modes are correctly supported in snes9xGX, the EFB 
width
is updated to 512 pixels when the SNES display width changes

However, I still think it's better to ALWAYS use a 512 pixels wide EFB since
upscaling from 256 to 640 using only the VI could generate some weird artefacts 
sometime.

Regarding the problem with strectched pixels, I don't know why this happen: 
does this
only happen in the last revision ? if so, maybe it's because VIDEO_WaitVSync() 
is not
called after changing the VI mode.

Original comment by ekeeke31@gmail.com on 1 Nov 2008 at 7:22

GoogleCodeExporter commented 9 years ago
I just tested 006, and I don't _think_ that the expansion/contraction issue was
present in that build... hard to tell, because the screen is flashing, but i'm 
pretty
sure it's only in this new build.

Original comment by hcho...@gmail.com on 1 Nov 2008 at 10:01

GoogleCodeExporter commented 9 years ago
how do things look in r144?

Original comment by dborth@gmail.com on 3 Nov 2008 at 11:13

GoogleCodeExporter commented 9 years ago
Wow, r144 is quite the regression, in this case.  The original video mode 
results in
zoomed-in looking images in _all_ games now, even after multiple "reset zooms." 
 I
never had this issue in previous builds, so whatever happened is certainly in 
the
changes made to video.cpp in r144.  Filtered video mode looks fine.

Original comment by hcho...@gmail.com on 4 Nov 2008 at 1:34

GoogleCodeExporter commented 9 years ago
the massive zooming is in both the vertical and the horizontal.  reverting to 
r143
brought original mode back to normal.

Original comment by hcho...@gmail.com on 4 Nov 2008 at 1:49

GoogleCodeExporter commented 9 years ago
ok, you forget to change something  in video.cpp:

if (tvmodes[i]->efbHeight == vheight) {
                                // FIX: ok?
                                tvmodes[i]->fbWidth = vwidth;   // update width -
some games are 512x224 (super pang)
                                break;
                        }

fbWidth should not be changed anymore

anyway, I'm going to upload a better working solution, I've played Secret of 
Mana
yesterday and original mode was perfect, no flashing and correct aspect ratio 
;-)

Original comment by ekeeke31@gmail.com on 4 Nov 2008 at 9:02

GoogleCodeExporter commented 9 years ago
on a side note, my corrections about YOrigin were wrong: in original modes, the
correct calculation is indeed (max_height/2 - vi_height/2)/2

still not sure why but otherwise you got slightly shifted display 

Original comment by ekeeke31@gmail.com on 4 Nov 2008 at 1:19

GoogleCodeExporter commented 9 years ago
fixed in r145

Original comment by ekeeke31@gmail.com on 4 Nov 2008 at 7:11

GoogleCodeExporter commented 9 years ago
ekeeke - r146 fixes the issue - sometimes.  within the first 5 minutes of 
testing it,
sometimes snes9x-gx gets confused which of the original filters to use on some 
games.
 Switching to filtered mode, then unfiltered, then back to original in-game will
sometimes cause the original mode to be "zoomed in" and pixelated, which caries 
over
to other games.  

I had this happen in Star Fox, at which point i tried to reset the game and got 
a
"Cannot Determine Save State Type!  press A" error (which I found strange). 
Resetting the game again caused scratchy sound errors, and snes9x locked up when
trying to exit to loader.  had to hard reset the system.  works ok now, but 
haven't
done further testing.

Original comment by hcho...@gmail.com on 4 Nov 2008 at 10:50

GoogleCodeExporter commented 9 years ago
Ok, in r146, if I reset my preferences then choose Original video mode and 
start up
SD3, the graphics on the load screen (Squaresoft) and on the title screen are 
large
and pixelated.

Once I choose "start new game," the graphics look correct.  Resetting the game 
leads
to correct viewing of the load and title screen.  I could be completely wrong, 
but it
looks like the code logic determining which resolution of Original video mode 
to use
is buggy, sometimes loading the incorrect one until something triggers it to 
use the
high-res mode.

Original comment by hcho...@gmail.com on 4 Nov 2008 at 11:37

GoogleCodeExporter commented 9 years ago
the "cannot Determine Save Type" error followed by massive slowdown and lockup 
is a
complete different issue I fear, I got it too myself once and is much more 
probably
related to SDCARD access (mounting ?) that are done each time you enter/leave 
the menu

about the issue when switching between filtered/original modes, are you by any 
chance
using the zoom feature ? You should reset zoom and see if that helps

I will have another look on the last issue (SD3 specific), this is becoming 
quite
annoying

Original comment by ekeeke31@gmail.com on 5 Nov 2008 at 9:36

GoogleCodeExporter commented 9 years ago
Zoom feature is off for me, by the way;  I've never used it, and hitting 'reset 
zoom"
doesn't do anything.

Original comment by hcho...@gmail.com on 5 Nov 2008 at 11:47

GoogleCodeExporter commented 9 years ago
I tested r145 again and:

1) SD3 works perfectly in all rendering modes, no bad stretching during title 
screen
or whatever, the display width remains constant
2/ switching between rendering modes during game play works perfectly too

I don't know what's going on for you, be sure you correctly updated to last
revision.. or try r145 if that helps. 

I did not test r146 changes but it should only affects screen width in menu and
unfiltered/filtered modes (on a side note, dborth, I'm still not sure if 
upscaling to
679 pixels wide is a good idea for 4:3 TVs, we are gonna miss some pixels)

Also, if you can, please provide some screen captures

Original comment by ekeeke31@gmail.com on 5 Nov 2008 at 1:44

GoogleCodeExporter commented 9 years ago
I'll try r145 and attempt to get some screen captures when I get home from work 
later
this afternoon.  :)

Original comment by hcho...@gmail.com on 5 Nov 2008 at 2:21

GoogleCodeExporter commented 9 years ago
eke-eke - if hcorey's only issue is that sometimes switching between original 
and 
filtered or back leads to a 'zoomed in' effect - I think we can consider THIS 
issue 
closed. The 'zoom' problem (although it probably has nothing to do with the 
zooming 
feature, and just the screen not updating scaling) has been reported by others 
on 
tehskeen long before this (back to 005 or 004 I think). I'm marking this issue 
as 
fixed, and we'll open a new one for the other issue.
As for the widescreen fix, I should probably wrap it in if( 
CONF_GetAspectRatio())
I got that from dhewg's scummvm, and it's also in many other projects.

Original comment by dborth@gmail.com on 5 Nov 2008 at 5:25

GoogleCodeExporter commented 9 years ago
Actually, I compiled the latest revision and experimenced the same result: 
vertical &
horizontal scaling get weird when changing between origina & filtered/unfiltered

probably a last minute change, I think I have an idea

Original comment by ekeeke31@gmail.com on 5 Nov 2008 at 7:44

GoogleCodeExporter commented 9 years ago

Original comment by dborth@gmail.com on 19 Nov 2008 at 7:19

GoogleCodeExporter commented 9 years ago
Please, add a video option to disable high-res modes like on the desktop 
version: it allows the game to consistently use filters and not look ugly 
during the text display.

Original comment by sined...@gmail.com on 24 Mar 2013 at 10:45