MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

Shiro
MAME Fan
Reged: 02/11/21
Posts: 6
Send PM


How to set a custom window size for a game in Mame?
#391798 - 09/05/21 02:02 AM


In the emulator I can only see 2 windowed display options: start maximized, and non-maximized. Maximized covers almost the whole computer screen, and non-maximized only displays it at its tiny native resolution. I'd like to set a custom size which would be a multiple of the game's native res. Let's say the game in question is 320x224; so if I were to choose a 2x size, it'd display as 640x448, 3x would be 960x672 and so on. That way the window wouldn't be too big nor too small.

Is it possible to set sizes like that? if Mame can't do it natively, then maybe an external program that can customize the emulator window? (In that case it'd need to be Linux compatible, since it's what I'm using).



Dullaron
Diablo III - Dunard #1884
Reged: 07/22/05
Posts: 6125
Loc: Fort Worth, Tx
Send PM


Re: How to set a custom window size for a game in Mame? new [Re: Shiro]
#391800 - 09/05/21 02:20 AM Attachment: Screenshot (199).png 101 KB (0 downloads)


> In the emulator I can only see 2 windowed display options: start maximized, and
> non-maximized. Maximized covers almost the whole computer screen, and non-maximized
> only displays it at its tiny native resolution. I'd like to set a custom size which
> would be a multiple of the game's native res. Let's say the game in question is
> 320x224; so if I were to choose a 2x size, it'd display as 640x448, 3x would be
> 960x672 and so on. That way the window wouldn't be too big nor too small.
>
> Is it possible to set sizes like that? if Mame can't do it natively, then maybe an
> external program that can customize the emulator window? (In that case it'd need to
> be Linux compatible, since it's what I'm using).

mame -window -v -r 352x256 -switchres dkong

Here is the command. Change it to whatever. Ignore the reports on the screen. That from using the bgfx I'm using. Showing you the size of the window.

[ATTACHED IMAGE - CLICK FOR FULL SIZE]

Attachment



W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB



Shiro
MAME Fan
Reged: 02/11/21
Posts: 6
Send PM


Re: How to set a custom window size for a game in Mame? new [Re: Dullaron]
#391809 - 09/05/21 08:13 PM


Thanks man, worked like a charm.



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


Re: How to set a custom window size for a game in Mame? new [Re: Shiro]
#391812 - 09/06/21 05:58 AM


> Thanks man, worked like a charm.

Please be aware that there are multiple aspect ratios at play here: The Display Aspect Ratio (DAR), Source Aspect Ratio (SAR), and Pixel Aspect Ratio (PAR).

In this day and age, the Display AR and Source AR are identical, which gives a square (1:1) Pixel AR.

That the vast majority of arcade games didn't use resolutions that resulted in a square Pixel AR, and equally, the relevant artwork was designed with whatever PAR the game had in mind so that anything intended to be displayed as a circle or square would show "true".

A horizontal-orientation game with a resolution of 320x240 has a SAR of 4:3, or 1.3333~, which allows for perfectly square pixels on standard arcade CRT monitors, which themselves had a DAR of 4:3. To calculate PAR, you divide the DAR by the SAR. In this case, 1.3333/1.3333 gives you 1, meaning that the resulting on-screen pixels are perfectly square. Your intended configuration works fine in this case.

Meanwhile, a horizontal game with a resolution of 320x224 has a SAR of 10:7, or 1.428571~, but is still being shown on a CRT with a DAR of 1.3333~. This gives a resulting PAR of 0.9333~, or pixels that are slightly wider than they are tall.

With the above example, the PAR is still close enough to 1 that you might not necessarily notice it.

But let's use the quintessential example of Capcom's CPS-2 hardware, which hosted quite a number of revered fighting games and other classic 2D titles from the 90's. It operated at a resolution of 384x224, for a Source Aspect Ratio (SAR) of 1.714285~. The system was always intended to be displayed on a standard 4:3 monitor. Dividing it out, we get a Pixel Aspect Ratio (PAR) of 0.7777~, which means the pixels are almost 25% shorter than they are wide - or, if you prefer, they're almost a third wider than they are tall.

Perhaps you're a chubby-chaser. Could be that you have a friend for Fat Chun-Li. Hey, we don't kink-shame around here, if that's your thing then go off, fam. But it just seems a bit weird to go out of your way to want accurate emulation by way of MAME, then throw it all out the window when it comes to what you're seeing with your eyes, is all.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

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