|
Joined: Jan 2006
Posts: 3,691
Very Senior Member
|
Very Senior Member
Joined: Jan 2006
Posts: 3,691 |
I was pretty sure I had already tried the "topmost-per-pixel" approach, and indeed when I applied it again, I ended up with the following image I remembered from my past tests: the "lighted" tile is OAM0 and I thought (when I first tried this solution) it was a priority problem causing it to appear above BG2B. This time, thanks to AWJ, I knew priorities were fine, so I looked for other possible causes. In particular, toggling off the color math, I obtained this i.e. color math is the effect responsible for darkened/lightened images... long story short, the way I implemented sprite priorities was properly disabling color math whenever the sprite had palette 0-3, but it was not enabling it again if the sprite was covered by a BG with color math enabled. Fixing this stupid bug, sprites are finally correct known graphics issues still present: - hires mosaic is slightly wrong (and it cannot be fixed without partially rewriting hires rendering, however it should be barely noticeable) - some tiles get corrupted after a while (R-Type 3) - TMNT has strange coloured rectangles partially covering texts in the intro... - pseudo-hires is still missing (I think I have it working, as the following snap shows but I'd like to test screens with Dr.DNA trivia before officially adding it... does anyone know how to reach one of these trivia screen in Jurassic Park?)
|
|
|
|
Joined: Jan 2006
Posts: 3,691
Very Senior Member
|
Very Senior Member
Joined: Jan 2006
Posts: 3,691 |
ok. I managed to find a Dino Trivia screen (god, I always hated this game! ;)). the effect in MESS looks as follows (with pseudo-hires implemented): definitely close to the image byuu posted some time ago (left: tv/bsnes, right: emu with no pseudo-hires, bottom: emu with pseudo-hires)
|
|
|
|
Joined: Jan 2006
Posts: 3,691
Very Senior Member
|
Very Senior Member
Joined: Jan 2006
Posts: 3,691 |
thanks to half an hour of coffee break, I implemented blargg's & byuu's average routine for hires/pseudo-hires pixels. once I have cleaned up a bit the code [1], this will be added as an option for the user, to more accurately reproduce the tv blurring the same way as bsnes does. MESS screen: [1] direct use of byuu's code does not work in this case, because we don't output pixels in order and I would like to avoid any additional drawing step (which could slightly hit performances)
|
|
|
|
Joined: Mar 2001
Posts: 17,215 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,215 Likes: 234 |
Nice
|
|
|
|
Joined: May 2004
Posts: 1,772 Likes: 34
Very Senior Member
|
Very Senior Member
Joined: May 2004
Posts: 1,772 Likes: 34 |
Nice It looks better.. but unless it's part of the SNES chip it should be part of the MESS video output, not part of the system emulation. Many Megadrive games benefit from similar, but it's definitely not part of the genesis VDP. Polluting the emulation code with hacks to make the video emulation look nicer isn't really progress. If it is part of the SNES chip, then, yes, very nice :-)
Last edited by Haze; 03/24/10 04:57 PM.
|
|
|
|
Joined: Mar 2001
Posts: 17,215 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,215 Likes: 234 |
Yes, well, until someone submits this mythical video output filter code this is the way to go (marked as "hack" of course).
|
|
|
|
Joined: Jan 2006
Posts: 3,691
Very Senior Member
|
Very Senior Member
Joined: Jan 2006
Posts: 3,691 |
well, as byuu explained once, it's part of the way a real tv would diplay snes output: a tv would not be able to separately show the 512 pixels present in hires or pseudo hires mode (i.e. no alternate columns as in the first screen, but only a blended mix of the two as in the second one).
iirc, it's something related to phosphors in a crt tv, but I guess he can better argument the need for this (completely unrelated to ntsc filter, though)
of course, this will be an option in the Driver Configurations and won't be present for NSS or bootlegs in MAME... and it will be marked as an hack in the code (it is also pretty much isolated in the last step of the drawing, so it does not obfuscate the way we document SNES drawing behaviour)
EDIT: also, let me stress that this "averaging" code is not a filter to improve the appearance and make the games look better, but it is the best way to make the LCD output similar to the expected tv output when the SNES outputs 512 half-pixels in place of the usual 256 pixels... still an optional hack, and marked as such, but without altering the way things should appear.
|
|
|
|
Joined: May 2009
Posts: 2,214 Likes: 382
Very Senior Member
|
Very Senior Member
Joined: May 2009
Posts: 2,214 Likes: 382 |
well, as byuu explained once, it's part of the way a real tv would diplay snes output: a tv would not be able to separately show the 512 pixels present in hires or pseudo hires mode (i.e. no alternate columns as in the first screen, but only a blended mix of the two as in the second one). Err, perhaps not, but that would only be due to the dot pitch of the phosphor mask, not anything inherent to the NTSC signal carrying the video signal itself, yes?
|
|
|
|
Joined: May 2004
Posts: 1,772 Likes: 34
Very Senior Member
|
Very Senior Member
Joined: May 2004
Posts: 1,772 Likes: 34 |
EDIT: also, let me stress that this "averaging" code is not a filter to improve the appearance and make the games look better, but it is the best way to make the LCD output similar to the expected tv output when the SNES outputs 512 half-pixels in place of the usual 256 pixels... still an optional hack, and marked as such, but without altering the way things should appear. How is it not so, it sounds EXACTLY like a filter to improve the appearance of the games and make them look better on an LCD screen. If you wired the SNES up to a good enough quality TV I guess you'd see something like the unfiltered shots. Just because it isn't increasing the resolution and adding fake pixels doesn't mean it isn't a filter, in this case it's bluring pixels into fake pixels instead. Both are image enhancement filters. I'm just not convinced that the build-up of these things in drivers is a good thing, efforts should be concentrated on improving MAME's ability to filter the output from the drivers instead, which will probably involve convincing Aaron to make the existing filter system more flexible, and maybe allowing drivers to provide additional metadata to it, so that it can better apply effects on lines where fake pixel doubling has occured etc. It would be nice if things like the NTSC filter were available to anybody who wanted to use them, on any driver. It's a decent filter and a lot more useful than burn-in simulators... Actually doing the filtering in the drivers seems incorrect. I said the same about 'LCD flicker filters' for Gameboy etc. and I'll say the same for this. What motivation is there to do it properly if all the drivers hack in their own implementations?
|
|
|
|
Joined: Jan 2006
Posts: 3,691
Very Senior Member
|
Very Senior Member
Joined: Jan 2006
Posts: 3,691 |
let's put it like this: if I were only blurring pseudo-hires pixels it would be a very bad hack (and I would have rejected it). by equally blurring all 512 pixels modes, it is still an hack (and as such is turned off by default), but not so bad anymore imho, because it still describes the way TV would output the image
now, concerning general filter support in the core, it's not like there are thousands of devs which could add the necessary support into the core. I believe there are maybe 2 or 3 which could, and probably they won't care about incorrect and driver-specific workarounds, if they ever come to implement the support...
in the meanwhile, it's like with other screen artifacts: driver-specific workaround are probably better than nothing.
|
|
|
3 members (Kale, 2 invisible),
507
guests, and
1
robot. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,320
Posts121,930
Members5,074
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|