Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
#108376 - 01/09/17 05:08 PM Variable size screens in MAME?  
Joined: Mar 2015
Posts: 29
fulivi Offline
Member
fulivi  Offline
Member

Joined: Mar 2015
Posts: 29
Hi,

I've a question for someone who knows the video/rendering sub-system of MAME.
The current hp9845b driver switches between the two possible video modes (text & graphics) by calling the "configure" function of screen class and supplying the various raw parameters.
This way I get both modes to have the correct resolution and line/frame timings.
The problem is that the output window doesn't change its size between the two modes whereas in the real machines the two visible areas had different sizes. Text mode have a resolution of 720x375 pixels, its area is 23.62cm wide by 12.29 cm tall on screen.
Graphic mode have 560x455 resolution and covers a 20 x 16.25 cm area.
So the question is: is it possible to simulate something like this in MAME while keeping the timings the same as in the real machines?
I haven't investigated the question very deeply but maybe there's something in the screen class that allows the output screen to be rendered only in a rectangular "viewport" of the whole screen area.
This way I could have a 720x455 screen and draw just the text/graphic part of it, the rest would be filled with black.
Thanks for your help.
--F.Ulivi

#108383 - 01/09/17 09:26 PM Re: Variable size screens in MAME? [Re: fulivi]  
Joined: Mar 2001
Posts: 15,753
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,753
USA
Yes, it's possible to change the complete screen parameters and have it work. The PlayStation driver can at any moment flip into any one of (256, 320, 512, 640) H x (224, 240, 448, 480) V.

#108385 - 01/09/17 09:40 PM Re: Variable size screens in MAME? [Re: R. Belmont]  
Joined: May 2009
Posts: 1,602
Just Desserts Offline
Very Senior Member
Just Desserts  Offline
Very Senior Member

Joined: May 2009
Posts: 1,602
Originally Posted By R. Belmont
Yes, it's possible to change the complete screen parameters and have it work. The PlayStation driver can at any moment flip into any one of (256, 320, 512, 640) H x (224, 240, 448, 480) V.


That wasn't the question. While the PlayStation driver can at any moment flip into any of those modes, the overall video timings are still identical, and at least in principle, should display in exactly the same screen area on the same monitor.

By contrast, fullvi is talking about changing resolutions and also changing the perceived size of the overall frame on the same monitor, which I'm pretty sure we don't currently support. We'd have to have some concept of physical emulation of a monitor, which we don't right now.

#108386 - 01/09/17 09:57 PM Re: Variable size screens in MAME? [Re: fulivi]  
Joined: Jul 2015
Posts: 33
anikom15 Offline
Member
anikom15  Offline
Member

Joined: Jul 2015
Posts: 33
According to your screen dimensions, they aren't exactly equal to the proportions of the resolutions, so having a 720x455 area and padding with black wouldn't give you the proper proportions.

That assumes that your screen dimensions are actually correct of course.

#108387 - 01/09/17 10:27 PM Re: Variable size screens in MAME? [Re: fulivi]  
Joined: Mar 2001
Posts: 15,753
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,753
USA
The timings can also be changed, assuming the aspect ratio is the same.

We support Super VGA cards that can sync from 15 kHz CGA up to 31.whatever and well beyond.

#108388 - 01/09/17 11:19 PM Re: Variable size screens in MAME? [Re: fulivi]  
Joined: Jul 2015
Posts: 33
anikom15 Offline
Member
anikom15  Offline
Member

Joined: Jul 2015
Posts: 33
That's the thing though. According to OP the aspect ratios are different.

#108389 - 01/10/17 12:01 AM Re: Variable size screens in MAME? [Re: fulivi]  
Joined: Mar 2001
Posts: 15,753
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,753
USA
Well, no, they're both 4:3 on the same monitor, it's just one doesn't fill as much area.

So in text mode you'd have borders top and bottom, and in graphics mode they'd be left and right.

#108390 - 01/10/17 12:21 AM Re: Variable size screens in MAME? [Re: fulivi]  
Joined: Jul 2015
Posts: 33
anikom15 Offline
Member
anikom15  Offline
Member

Joined: Jul 2015
Posts: 33
That makes sense to me.

#108713 - 02/02/17 05:24 PM Re: Variable size screens in MAME? [Re: fulivi]  
Joined: Mar 2015
Posts: 29
fulivi Offline
Member
fulivi  Offline
Member

Joined: Mar 2015
Posts: 29
Hi,

I've been investigating this question a bit more.
It seems to me that the functionality I'm looking for is not supported in MAME now (i.e. the whole area of a screen_device is the visible area being refreshed at frame rate).
So the choice would be between altering the timings to have a (fake) 720x455 screen that's only filled in the relevant text/graphic part or keeping the timings and have a non-faithful rendering of the screen image.
But I think I found a workaround. I could play with the x/y stretch & offset to achieve the wanted effect.
For example, if I want the 720x375 text mode, I set the y stretch to 375/455 and the y offset to center everything.
For the graphic mode I would set the x stretch & offset.
I can hear someone of you screaming at me at this point that those parameters are not meant to be (ab)used this way... smile
Or is it a valid idea? I would need to change the screen & renderer interface a bit in order to be able to set these parameters dynamically, of course.
Thanks.
--F.Ulivi

#108715 - 02/02/17 08:32 PM Re: Variable size screens in MAME? [Re: fulivi]  
Joined: Jul 2011
Posts: 42
pakoman Offline
Member
pakoman  Offline
Member

Joined: Jul 2011
Posts: 42
Originally Posted By fulivi
Hi,

I've a question for someone who knows the video/rendering sub-system of MAME.
The current hp9845b driver switches between the two possible video modes (text & graphics) by calling the "configure" function of screen class and supplying the various raw parameters.
This way I get both modes to have the correct resolution and line/frame timings.
The problem is that the output window doesn't change its size between the two modes whereas in the real machines the two visible areas had different sizes. Text mode have a resolution of 720x375 pixels, its area is 23.62cm wide by 12.29 cm tall on screen.
Graphic mode have 560x455 resolution and covers a 20 x 16.25 cm area.
So the question is: is it possible to simulate something like this in MAME while keeping the timings the same as in the real machines?
I haven't investigated the question very deeply but maybe there's something in the screen class that allows the output screen to be rendered only in a rectangular "viewport" of the whole screen area.
This way I could have a 720x455 screen and draw just the text/graphic part of it, the rest would be filled with black.
Thanks for your help.
--F.Ulivi


Maybe is not what you're looking for, but have you tried GroovyMame?. It can output native resolutions/refresh rates and changes and creates modelines on the fly.

Last edited by pakoman; 02/02/17 08:32 PM.
Page 1 of 2 1 2

Who's Online Now
2 registered members (reenigne, shattered), 21 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,439
Posts109,445
Members4,766
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.038s Queries: 15 (0.016s) Memory: 5.0164 MB (Peak: 5.2397 MB) Zlib enabled. Server Time: 2017-11-24 07:17:27 UTC