Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Mar 2015
Posts: 64
Likes: 1
F
fulivi Offline OP
Member
OP Offline
Member
F
Joined: Mar 2015
Posts: 64
Likes: 1
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

Joined: Mar 2001
Posts: 16,910
Likes: 56
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,910
Likes: 56
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.

Joined: May 2009
Posts: 2,032
Likes: 66
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 2,032
Likes: 66
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.

Joined: Jul 2015
Posts: 37
A
Member
Offline
Member
A
Joined: Jul 2015
Posts: 37
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.

Joined: Mar 2001
Posts: 16,910
Likes: 56
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,910
Likes: 56
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.

Joined: Jul 2015
Posts: 37
A
Member
Offline
Member
A
Joined: Jul 2015
Posts: 37
That's the thing though. According to OP the aspect ratios are different.

Joined: Mar 2001
Posts: 16,910
Likes: 56
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,910
Likes: 56
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.

Joined: Jul 2015
Posts: 37
A
Member
Offline
Member
A
Joined: Jul 2015
Posts: 37
That makes sense to me.

Joined: Mar 2015
Posts: 64
Likes: 1
F
fulivi Offline OP
Member
OP Offline
Member
F
Joined: Mar 2015
Posts: 64
Likes: 1
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

Joined: Jul 2011
Posts: 48
Member
Offline
Member
Joined: Jul 2011
Posts: 48
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

Link Copied to Clipboard
Who's Online Now
0 members (), 20 guests, and 0 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,085
Posts119,077
Members5,014
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com