I'm mostly interested in taking screenshots of Playstation games, and I'm wondering how do I remove that Horizontal overscan that the screenshots have?
On the resolution management option, I have selected "Hardcore debug mode", because I can take pixel perfect native resolution screenshots. However, all the screenshots come out with black bars on the side. I checked "Clip Horizontal Overscan" and it reduced the black bars, but they still show a little.
Games that are supposed to be 320x240 come out as 330x240 due to the black bars (after clipping).
Any way to completely remove that or is it possible for the emu author to include an option to remove them?
Just to clarify, I'm talking about screenshots only. If the emu author wants the black bars to be there while playing, I don't mind. But I would like a way to remove the black bars from the screenshots.
I don't think anyone will ever do this.
Given that theres so many different differing black bars between various consoles and games, I think the only way I would ever implement this would be by an 'auto-crop screen shot' function which would scan for continuous bar areas and remove them. This would be annoying in many cases and would default to off. I've never heard of a feature like that before in any emulator.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
You could look into IrfanView for batch cropping of your screenshots. I assume you plan to take lots because otherwise it wouldn't be a big deal to crop them manually.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
I understand, but I'm not talking about all consoles, just the PS1. When you load a PS1 game, there's specific emulator option that appears just for that system, it could be included just there.
The ideal would be an option to clip the overscan completely, instead of just 75% of it. Scaning for black bars after the screens have been taken can cause problems since some games have native black bars and I wouldn't want those removed. I'm all for native stuff.
That's because no emulator takes native (framebuffer) screenshots with overscan added to them :)
Like I said before, I don't mind if the overscan shows while playing, I'm talking about screenshots specifically.
I tried Megaman X6, because I know it has different resolutions. Cutscenes are 512x240, normal gameplay is 320x240.
But with the overscan stuff, the H-res is artificially bigger.
Derakon wrote:
You could look into IrfanView for batch cropping of your screenshots. I assume you plan to take lots because otherwise it wouldn't be a big deal to crop them manually.
Correct, I plan on taking a lot of images. I wouldn't mind batch cropping, except the overscan stuff is not the same size on both sides, so I can't just side-crop as easily if the black bars were the same size.
feos wrote:
I see, but I'm talking specifically about screenshots. There's already an option to clip (remove) the overscan, but it doesn't remove it completely.
All I'm requesting is an option to remove the overscan 100%, not 75%.
I'm talking about all consoles. I'm not going to add a hack to the screenshot code just for PS1. Besides that, every mode in every game is changing the resolution settings. Games are putting content in "overscan" sometimes and leaving gratuitous empty spots other times. Chrono Cross is fiddling with the video registers to wiggle the screen within the overscan area during some earthquake effects.
Even if I analyzed the mednafen code to find a way to determine what was "overscan", which I'm not going to do, it would still be unreliable. Moving that information out of the PSX core and to the point where a screenshot can do it is architecturally outrageous.
"No emulator takes framebuffer screenshots with overscan added to them": Overscan isn't "added". Overscan is a natural consequence of more precise emulation. Emulators without that overscan are bugged.
You don't understand. Overscan isn't as simple as pointing at black and saying "I don't want that." With this, I am done talking about overscan.
If you're about to do millions of screencaps of a single game, you need to invest in a process. I can write a program in about 5 minutes that will crop every file I drag onto it to a fixed rectangle. Imagemagick can do it out of the box.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Regarding overscan, there's interesting situation. Some platforms rely on overscan and adjust ingame resolution so that it looks right with game screen + overscan stretched to TV resolution. If you just stretch ingame screen, it won't work.
http://tasvideos.org/forum/viewtopic.php?t=15855
But here's a problem: I know no other emulator cores than psxhawk that emulate overscan in the first place.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Ok, here's the thing:
I'm not really interested on how games looked on a CRT or if they compensated or adjusted the visuals to "look right" on a CRT. I'm just interested in what the framebuffer outputs (even the native weird resolutions). Which is why I would like to remove the artificial overscan the emulator is adding to the screenshots.
The emu already has an option to do that, but it doesn't remove the overscan completely.
I understand some games have native borders on the top/bottom or left/right, those are fine because those were added intentionally.
But then you have games that are (for example) 320x240, which fill the screen/window nicely, but the emulator is adding additional borders to it. That's what I want to remove.
OK, since you're never ever going to get a special screenshot mode, what you actually want is another PSX "resolution management" option called "ReyVGM's Undo Mode" which undoes a bunch of hard and cutting edge work mednafen does to emulate a stable television picture. I'll file that under todo: never, mostly because nobody's going to be mangling mednafen sources to the degree required to achieve that any time soon. In the meantime, use imagemagick.
OK, since you're never ever going to get a special screenshot mode, what you actually want is another PSX "resolution management" option called "ReyVGM's Undo Mode" which undoes a bunch of hard and cutting edge work mednafen does to emulate a stable television picture. I'll file that under todo: never, mostly because nobody's going to be mangling mednafen sources to the degree required to achieve that any time soon. In the meantime, use imagemagick.
Zeromus, no need for sarcasm. I know Fusoya and Golbez killed your first form, but let bygones be bygones.
Like I've said several times, but everyone seems to be ignoring: the emulator already has an option to clip the very same overscan I'm talking about! The problem is, it doesn't clip 100% of it.
If the option is already there, what's the harm in making it clip the entire overscan instead of just a part of it?
Joined: 11/13/2006
Posts: 2822
Location: Northern California
ReyVGM wrote:
Like I've said several times, but everyone seems to be ignoring: the emulator already has an option to clip the very same overscan I'm talking about! The problem is, it doesn't clip 100% of it.
If the option is already there, what's the harm in making it clip the entire overscan instead of just a part of it?
zeromus wrote:
Given that theres so many different differing black bars between various consoles and games, I think the only way I would ever implement this would be by an 'auto-crop screen shot' function which would scan for continuous bar areas and remove them. This would be annoying in many cases and would default to off. I've never heard of a feature like that before in any emulator.
I know you've read this quote, because you quoted it yourself and misunderstood it entirely. PSX games vary in resolution, often changing several times in-game, and there's never going to be an option that accounts for the varying black bars that come with these different resolutions. That would require far too much work and effort for something that only you want, and even if someone was willing to work on it, I doubt it'd live up to your expectations.
Just manually crop the screenshots if the black bars are consistent. Batch cropping in IrfanView would require a thousand times less effort than making sure every single edge case in the PSX library works with this option.
TASvideos Admin and acting Senior Judge 💙 Currently unable to dedicate a lot of time to the site, taking care of family.
Now infrequently posting on BlueskywarmCabin wrote:
You shouldn't need a degree in computer science to get into this hobby.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
http://rghost.ru/6VJHrrvqW
Patch inside.
Honestly, this can as well be used officially, like when we publish screenshots, we'll have to crop them for the site to accept. Or will we? Anyways, my tweak makes previously clipped show up under unclipped now, and new clipped now is clipping everything extra. Because I think old unclipped mode wasn't needed.
Note: BIOS screen is shifted differently and it still has a few black pixels, but games are probably good.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
If the option is already there, what's the harm in making it clip the entire overscan instead of just a part of it?
It's been done the way it's been done for reasons I don't know but I assure you ryphecha has studied it more than you have. The harm would be: flouting those reasons.
The amount of "overscan" is kind of arbitrary I think, the concept is generally ill-defined. NTSC may specify it but games may disobey it and consoles may stretch it. Therefore the amount of overscan chosen originally for mednafen was some kind of compromise which cuts out as much as is safe in most cases, I would assume.
It's cool that feos found some knobs to twist, and that he found something it doesn't work right for within the first 2 seconds of the console being booted. Primo example of what I'm talking about there. There will be other cases.
Maybe I could add an option to the display options that will let you crop any console's video by a specified amount.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
I haven't tested more than a single game, but it may be that even though the gameplay screen is 320x240-ish, picture may start from different pixel of the existing black border. And overscan here is just to make it be seen entirely, regardless if game's choices. The core adds 16*some percentage pixels at the beginning, but games may very well start their drawings at different pixels.
So feel free to test.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
http://rghost.ru/6VJHrrvqW
Patch inside.
Honestly, this can as well be used officially, like when we publish screenshots, we'll have to crop them for the site to accept. Or will we? Anyways, my tweak makes previously clipped show up under unclipped now, and new clipped now is clipping everything extra. Because I think old unclipped mode wasn't needed.
Note: BIOS screen is shifted differently and it still has a few black pixels, but games are probably good.
Thanks!
The BIOS is shifted because that's a high res screen.
From the tests that I've done (3 games so far), for games with 320x240 or 320x480 displays, with the "Clip Horizontal Overscan" option enabled, the displays always have a +10 overscan excess. 8 additional lines on the left and 2 on the right, for a resolution of 330x240
With your patch, for those resolutions, it removes that 10+ excess, but it eats up one vertical graphical line to the right, while leaving a single overscan line to the left.
If you wish I can keep updating you as I test more games with different resolutions. There aren't that many as far as I know: 256x240, 320x240, 320x480, 512x240, and 640x480 for logos and stuff.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Core's option to clip overscan clips a fixed amount of pixels, and it previously was leaving extra 10 of them. I made it leave exactly 320 pixels. Now what can really be optional is how much to offset the image to the right, which was 7 and I made it 5. It's basically a single digit value I guess, 2 digits max, but it'd make things adjustable and arguably correct (as long as one considers 320 (or whatever was designed) with no black bars correct).
I mean, other consoles might not need it if the core doesn't intentionally add overscan and then clip it. Are there the ones that add it at all? I recall A2600...
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
You can see in latest revisions I'm attempting to screw around with this. Currently my efforts have revolved around snipping the wanted data out of the larger NTSC framebuffer mednafen generates. I've got that working pretty well, but the code is very dirty, and I may have to dump it some day. I'm not very happy with it, but I'm following the experiment through to the end and I learned some stuff about how mednafen's put together I needed to learn anyway.
It's not entirely clear how this should work for interlaced modes. If you want to see the actual framebuffer that could be arranged, but it will alternate between lower-resolution fields for interlaced modes. If you want the higher resolution interlaced image, then it needs to be interlaced separately (not going to happen) or the snipping approach needs to be used.
The code to just literally dump the framebuffer would be far simpler. There are some conceivable downsides, besides the interlacing thing: some games may be rewriting part of the framebuffer after it's scanned out, and some games may be changing the framebuffer mid-frame (split screen maybe, or with a NES-style status box). There are probably at least twice as many things which would be inconceivable until you saw a game do it. (some PCE games are even changing resolutions mid-frame)
I may add code to drag the framebuffer out later, but it would be part of a VRAM view debugging tool.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
I'm having hard time imagining someone needing interlaced framebuffer for video or images. Interlaced is for TVs, and when it's not, it's for geeks. And geeks can develop their own geeky tools :P
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Guys I would like to apologize if my comments seemed rude or demanding, it was not my intention.
@feos . I guess the way mednafen handles the graphic display and how it "hardcodes" the overscan makes it difficult to achieve what I would like and what other emulators already do without issues. Sadly other PSX emus are not as robust as Bizhawk.
I tried your patch on more games and unfortunately sometimes the 10+ overscan is 8-2, other times is 7-3, or even 10-0. So it will be unrealistic for me to ask you to keep working on this since every single game will be different.
@zeromus
VRAM tool for PS1? Great, that will be much appreciated :)
Any chance of also adding a Layer disabling option? I know it doesn't work for polygons, but it can work to turn off text boxes and HUDs from the screen.
As for screenshots, I'm strongly in the camp to keep screenshots as pure and native as possible. If the PS1's framebuffer creates a half resolution graphic (like a lot of Namco's title screens), then that's the correct resolution for that screenshot.
I know companies expected that to be stretched/scaled automatically by the TV screen, and I know it was never meant to be seen at half resolution. But the screenshot should never be artificially scaled to full resolution.
I mean, I wouldn't mind the option for people that don't care about native/framebuffer resolutions, but for people that like to take lots of screenshots, or rip sprites, or make maps, or even for historic/documentation purposes; having native screenshots is a must.
And yes, of course I could use other emulators that give me just that (PsxJin, Epsx, PSCX, etc), but like I mentioned before, those emulators lack a lot of great options Bizhawk has added.
I know this is a community mostly focusing on TASing, so screenshots are not really an interest or priority. I understand wanting to display graphics a certain way or certain feel for playing the game or making a TAS. The overscan/stretching/filtering/interlaced stuff is just fine if you're just playing the game, or looking for a CRT feel (or whatever). But for screenshots, they should be left native just like every other emulator does already.
If someone wants to capture a stretched overscanned filtered image, they can use printscreen or fake it with GIMP/Photoshop like Feos mentioned before.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
http://rghost.ru/7JnPLTp9Y
PS: we do care about screenshots and avi.
PPS: I never mentioned photoshop :P
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
there arent layers on the psx.
screenshots of an interlaced screen would not be artificially scaled to full resolution. I'm not sure you know what you're talking about at all. In an interlaced screen, the framebuffer contains only half the visible graphics. The next instant, it will contain the other half of the visible graphics. Whatever you mumble about unfaithful screenshots of a mode is illogical, unless you understand that without using mednafen's interlacing you'll need to apply your own interlacing from two framebuffer captures.
Yeah I know what interlaced is. I just mixed things up and started thinking about games with weird resolutions like 320x480 and thought you were implying something about stretching the screenshot's final form.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Haven't you tested the hell out of my second upload yet?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.