MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

Rlan
MAME Fan
Reged: 08/31/18
Posts: 2
Send PM


Recording pixel-perfect videos via MAME.
#378367 - 08/31/18 08:43 AM


G'day!

So I like making GIFs from old games, and I want to make more GIFs from old arcade games - this usually means capturing direct footage via an Emulator, and then cutting and exporting it.

What I need is direct capture of an arcade game, running at the correct, initial resolution it's meant to run at, most likely in a window. However, Mame is extremely fickle when it comes to this.

Some programs, like MameUI64, have their own direct AVI output program, and this works! Well.. for the most part.



See, some games, like SegaSonic Popcorn shop here, when they are loaded up on the initial MAME screen, claim to be running at a resolution at 256x224. In reality, it's actually closer to 300x224, but since it's basing its recording on the initial number, it's cut out!

When trying to run the game in a window and record via something like FRAPS, the resolution is a complete crapshoot. I just want to tell it to run at a very exact, specific resolution, but it's a nightmare to work out.

So I'm asking - What is the best way to capture pixel-correct video of an arcade game in Mame. Is there a way to change this initial number in a ROM somewhere to fix this resolution bug? What's the deal?

Any help would be appreciated.

Edited by Rlan (08/31/18 08:46 AM)



MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 2261
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: Rlan]
#378368 - 08/31/18 10:27 AM



> See, some games, like SegaSonic Popcorn shop here, when they are loaded up on the
> initial MAME screen, claim to be running at a resolution at 256x224. In reality, it's
> actually closer to 300x224, but since it's basing its recording on the initial
> number, it's cut out!

Use the standard command-line version, not MAMEUI. Use the -snapsize option to explicitly specify the capture resolution.

If the game changes resolution during the run rather than just on bootup, you're largely out of luck, because that's how the AVI container format works, and is not anything MAME can control.



Rlan
MAME Fan
Reged: 08/31/18
Posts: 2
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: MooglyGuy]
#378369 - 08/31/18 11:21 AM


Ah, thank you! Admittedly it's been a long time since I used regular MAME, so I always tried using MAMEUI and Plus. This seems to have worked, cheers



MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 2261
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: Rlan]
#378370 - 08/31/18 11:45 AM


> Ah, thank you! Admittedly it's been a long time since I used regular MAME, so I
> always tried using MAMEUI and Plus. This seems to have worked, cheers

Happy to help! I'm sure the snapsize option is exposed somewhere in MAMEUI's settings, I just only know the command-line options immediately off hand.



Haze
Reged: 09/23/03
Posts: 5245
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: Rlan]
#378373 - 08/31/18 12:52 PM


>
> So I'm asking - What is the best way to capture pixel-correct video of an arcade game
> in Mame. Is there a way to change this initial number in a ROM somewhere to fix this
> resolution bug? What's the deal?
>

it's not a bug, MAME shows you the default resolution of the video chip, in some cases the chips can be reprogrammed to display different modes (think how many modes your PC can display)

avi files can't handle resolution / framerate changes mid-stream.

as stated, you can force an avi resolution with -snapsize 320x224, although it might still scale depending on the system (lo-res gets scaled to mid-res) and for games with framerate changes you'll end up with desynced audio.

hard truth is the concept of a 'resolution' is nowhere near as simple as it might seem, some games use multiple resolutions on different lines of the same screen, some different layers (think Galaxian and its starfield) so MAME has to approximate it all somehow to concepts people understand. Right now MAME is missing the overscan areas for most of these systems too, which while the games can't control the pixels in on a per-pixel basis, is still part of the video output of the machine, the modes people talk about are a massive over-simplification that MAME has perpetuated over the years.



> Any help would be appreciated.



RobbbertModerator
Sir
Reged: 08/21/04
Posts: 3204
Loc: A long way from you
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: Rlan]
#378375 - 08/31/18 01:43 PM


>



AJR Hacker
MAME Developer
Reged: 02/01/16
Posts: 144
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: Haze]
#378377 - 08/31/18 03:20 PM


> it's not a bug, MAME shows you the default resolution of the video chip, in some
> cases the chips can be reprogrammed to display different modes (think how many modes
> your PC can display)

"Default resolution" is essentially an arbitrary choice, and not used by all MAME drivers. I think "maximum resolution" or even "maximum bandwidth" might be a more appropriate standard for screen configuration, but those might be rather misleading for systems with ludicrous hi-res video modes which are only very rarely used, such as the ECS Amiga's 1280x256.

> hard truth is the concept of a 'resolution' is nowhere near as simple as it might
> seem, some games use multiple resolutions on different lines of the same screen, some
> different layers (think Galaxian and its starfield)

Galaxia is more problematic than Galaxian in this regard, since the hardware's video circuits have dot clocks that aren't even multiples of each other. The MAME driver fails to properly account for this, which is why the game runs too fast.

> the modes people
> talk about are a massive over-simplification that MAME has perpetuated over the
> years.

Here's one further wrinkle. MAME's current model for emulating CRTCs is to take the software-programmed parameters and try to make a screen mode out of that. This works most of the time for switching screen modes, but there are some programs that engage in serious CRTC abuse, rewriting the parameters many times per frame. Some BBC Micro games do this, and the (currently unemulated) QVT-201 video terminal appears to implement smooth scrolling this way.



Foxhack
Furry guy
Reged: 01/30/04
Posts: 2409
Loc: Spicy Canada
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: Rlan]
#378381 - 08/31/18 06:27 PM


> G'day!
>
> So I like making GIFs from old games, and I want to make more GIFs from old arcade
> games - this usually means capturing direct footage via an Emulator, and then cutting
> and exporting it.
>
> What I need is direct capture of an arcade game, running at the correct, initial
> resolution it's meant to run at, most likely in a window. However, Mame is extremely
> fickle when it comes to this.
>
> Some programs, like MameUI64, have their own direct AVI output program, and this
> works! Well.. for the most part.
>
>
> See, some games, like SegaSonic Popcorn shop here, when they are loaded up on the
> initial MAME screen, claim to be running at a resolution at 256x224. In reality, it's
> actually closer to 300x224, but since it's basing its recording on the initial
> number, it's cut out!
>
> When trying to run the game in a window and record via something like FRAPS, the
> resolution is a complete crapshoot. I just want to tell it to run at a very exact,
> specific resolution, but it's a nightmare to work out.
>
> So I'm asking - What is the best way to capture pixel-correct video of an arcade game
> in Mame. Is there a way to change this initial number in a ROM somewhere to fix this
> resolution bug? What's the deal?
>
> Any help would be appreciated.

I would suggest not using MAME because of the resolution changes.

What I do is I set up MAME then I use an external program, like ShareX, to take captures of the area where MAME is every x seconds, and then build a gif file out of those snapshots.



ICEknight
MAME Fan
Reged: 07/06/15
Posts: 166
Send PM


Overscan cropping new [Re: Haze]
#378409 - 09/02/18 12:02 AM


> Right now MAME is missing the overscan areas
> for most of these systems too, which while the games can't control the pixels in on a
> per-pixel basis, is still part of the video output of the machine

Speaking of unemulated overscan, I was wondering... are the latest supported games in MAME always rendering the whole video output?

Also, is there a list of games and systems that have had their display cropped beforehand... or a list of those which display it fully, if they happen to be the exception?

I'm asking because I see in this pic (which I found here) that CPS1 games also had some overscan area that's not being displayed in MAME.



Haze
Reged: 09/23/03
Posts: 5245
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: ICEknight]
#378417 - 09/02/18 12:54 PM


> > Right now MAME is missing the overscan areas
> > for most of these systems too, which while the games can't control the pixels in on
> a
> > per-pixel basis, is still part of the video output of the machine
>
> Speaking of unemulated overscan, I was wondering... are the latest supported games in
> MAME always rendering the whole video output?
>
> Also, is there a list of games and systems that have had their display cropped
> beforehand... or a list of those which display it fully, if they happen to be the
> exception?
>
> I'm asking because I see in this pic (which I found here) that CPS1 games also had
> some overscan area that's not being displayed in MAME.

most arcade stuff got cropped, most home stuff didn't

apparently people hate uncropped images, and use it as a stick to beat emulators with, even if in some cases it's important it looks glitchy to people.

nobody has a comprehensive list, especially not for arcade systems, because nowhere near the level of research has been done on them.

the screenshot you post isn't the best example anyway because it shows what happens with certain monitors when CPS1 games set the background colour (they glitch out and produce that gradient) moreso than anything else (with the brand of monitors the games officially shipped with that problem doesn't occur)



ICEknight
MAME Fan
Reged: 07/06/15
Posts: 166
Send PM


Re: Overscan cropping new [Re: Haze]
#378418 - 09/02/18 01:44 PM


> > > Right now MAME is missing the overscan areas
> > > for most of these systems too, which while the games can't control the pixels in
> on
> > a
> > > per-pixel basis, is still part of the video output of the machine
> >
> > Speaking of unemulated overscan, I was wondering... are the latest supported games
> in
> > MAME always rendering the whole video output?
> >
> > Also, is there a list of games and systems that have had their display cropped
> > beforehand... or a list of those which display it fully, if they happen to be the
> > exception?
> >
> > I'm asking because I see in this pic (which I found here) that CPS1 games also had
> > some overscan area that's not being displayed in MAME.
>
> most arcade stuff got cropped, most home stuff didn't
>
> apparently people hate uncropped images, and use it as a stick to beat emulators
> with, even if in some cases it's important it looks glitchy to people.

Thing is, the current cropping isn't enough for systems like the NES, Neo Geo and specific arcades, anyway. It's probably the only aspect in MAME that currently doesn't seem to be aiming for accuracy.

As I pointed out in MAMEtesters, it would be possible to avoid people complaining about having extra borders (or even noticing that anything has changed) by adding a "crop overscan" option that's turned on by default, something like this (along with a "screen x/y offset" option):



They may even think that something has been done to "fix the NES", as seen in the mockup.



Haze
Reged: 09/23/03
Posts: 5245
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: ICEknight]
#378419 - 09/02/18 01:53 PM


> > > > Right now MAME is missing the overscan areas
> > > > for most of these systems too, which while the games can't control the pixels
> in
> > on
> > > a
> > > > per-pixel basis, is still part of the video output of the machine
> > >
> > > Speaking of unemulated overscan, I was wondering... are the latest supported
> games
> > in
> > > MAME always rendering the whole video output?
> > >
> > > Also, is there a list of games and systems that have had their display cropped
> > > beforehand... or a list of those which display it fully, if they happen to be the
> > > exception?
> > >
> > > I'm asking because I see in this pic (which I found here) that CPS1 games also
> had
> > > some overscan area that's not being displayed in MAME.
> >
> > most arcade stuff got cropped, most home stuff didn't
> >
> > apparently people hate uncropped images, and use it as a stick to beat emulators
> > with, even if in some cases it's important it looks glitchy to people.
>
> Thing is, the current cropping isn't enough for systems like the NES, Neo Geo and
> specific arcades, anyway. It's probably the only aspect in MAME that currently
> doesn't seem to be aiming for accuracy.
>
> As I pointed out in MAMEtesters, it would be possible to avoid people complaining
> about having extra borders (or even noticing that anything has changed) by adding a
> "crop overscan" option that's turned on by default, something like this:
>
>
> They may even think that something has been done to "fix the NES", as seen in the
> mockup.

The artwork based adjustments make it much more difficult to get proper unfiltered video tho, even if people force snap sizes and the like because the artwork system does not work on pixels, but fractions of the image meaning you immediately get non-integer maths.



ICEknight
MAME Fan
Reged: 07/06/15
Posts: 166
Send PM


Re: Overscan cropping new [Re: Haze]
#378422 - 09/02/18 05:58 PM


> The artwork based adjustments make it much more difficult to get proper unfiltered
> video tho, even if people force snap sizes and the like because the artwork system
> does not work on pixels, but fractions of the image meaning you immediately get
> non-integer maths.

Well, the units in the cropping option could be pts or something else that would be compatible with the artwork system.

I really think that something like this could help MAME achieve better (best?) video output accuracy, distancing itself even more from other emulators that favor looks and convenience over accuracy, while managing to keep the more "casual" userbase happy/quiet about it.



anikom15
Instigator/Local CRT Guru
Reged: 04/11/16
Posts: 287
Send PM


Re: Recording pixel-perfect videos via MAME. new [Re: Haze]
#378446 - 09/04/18 06:43 AM


I’m honestly not sure what the right solution to this is, but certainly the uncropped image should be accessible.



ICEknight
MAME Fan
Reged: 07/06/15
Posts: 166
Send PM


Re: Overscan cropping new [Re: ICEknight]
#378485 - 09/07/18 04:30 PM


> Well, the units in the cropping option could be pts or something else that would be
> compatible with the artwork system.


More specifically, they could be the units that were changed here to "fix" this BTANB:

Code:

-	MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8)
+ MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 255-16)




Haze
Reged: 09/23/03
Posts: 5245
Send PM


Re: Overscan cropping new [Re: ICEknight]
#378486 - 09/07/18 04:41 PM


> > Well, the units in the cropping option could be pts or something else that would be
> > compatible with the artwork system.
>
>
> More specifically, they could be the units that were changed here to "fix" this
> BTANB:
> -MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8)
> +MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 255-16)

AFAIK those units don't exist once you reach the presentation stage tho, as the artwork layer can compose mulitple screens and other elements of multiple resolutions.

again we're back to this concept that 'pixels' don't really exist, it's just a product of how quickly an output signal changes.


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 733 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1401