The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Tiger-Heli on June 28, 2004, 07:09:04 am

Title: Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 28, 2004, 07:09:04 am
Hopefully the "experts" can explain this, b/c I'm baffled:

I tried running Gyruss with the new bezel artwork in NoNameMAME 0.80 (although this also happens with official 0.82u1) . . .

(Artwork is here (http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=54367&page=0&view=expanded&sb=5&o=&fpart=1), BTW).

With resolution at 800x600, -hws on, keep aspect on, and artwork crop and artwork fill edges on, the game worked, but there was about a 25 pixel (guesstimate) black horizontal border above and below the game.  With the same settings except -keep aspect off, the game filled the screen, but the "game screen" was squished horizontally (too narrow).

I figured "No problem, I'll just recrop the artwork to do what artworkfilledges does"  The native resolution is 224x256.  At 800x600, this scales to a 525x600 game screen.  So I redid the artwork and mask to 800x600 with a 524 pixel wide game screen and a 137 pixel wide bezel "border" on each side.

Then I ran the game with the new artwork and -artwork crop and -artwork filled edges turned OFF.  The game screen was the correct size, my side art was there, but there was a 60-pixel wide black border on either side edge of the screen.

I did a printscreen and pasted it into Gimp and found the following: The game screen is 600x450 pixels, not 600x525, also my artwork is displaying at 110-pixels wide (on each side) with a 60-pixel black border.

I then ran the game with no artwork and did a print-screen of the game info screen and the screen is definitely 447x600 pixels.  I verified with -cleanstretch set to "none" and "auto" and got the same results.

Now, THIS is REALLY weird - I also did an F12 snap of the game, and the image came out as 224x256 pixels, like it should.

What part of -keep aspect ratio am I missing??? (rectangular pixels??? j/k, but I am lost here!)
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 28, 2004, 11:02:16 am
Just did a test here and it appears that MAME uses 444x600 for all stretched games with -Keep aspect ratio on, for example:

Gyruss Native: 224x256
Mame should be:  525x600
MAME is: 444x600

Centipede Native: 240x256
MAME should be: 563x600
MAME is 444x600

1941 Native: 224x384
MAME should be: 350x600
MAME is: 444x600

Fire Shark Native: 240x320
MAME should be: 450x600
MAME is: 444x600

Actually, this kinda makes sense, as there was a universal bezel for vertical games, and not one for different resolutions, and not supposed to have black borders on each side, but it seems really inaccurate graphically.

Any ideas what I'm missing, or why MAME does this?
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: TheGatesofBill on June 28, 2004, 11:56:29 am
I believe you are forgetting to take aspect ratios into consideration.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 28, 2004, 12:08:33 pm
I believe you are forgetting to take aspect ratios into consideration.
No, that's my point - I have "keepaspectratio" selected, so at 600 pixels high, games with a different resolution should have a different width, but they don't appear to. . .
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: TheGatesofBill on June 28, 2004, 12:25:32 pm
Take a look at this with Centipede:

Native Resolution: 240x256
MAME Resolution: 563x600

Correct? No! We forgot one fact:

Aspect Ratio: 4:3

So, adjusting for the correct aspect ratio:

MAME Resolution: 450x600

Still not exactly what you are getting, but its only 6 pixels off.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 28, 2004, 12:59:28 pm
Take a look at this with Centipede:
Native Resolution: 240x256
MAME Resolution: 563x600
Correct? No! We forgot one fact:
Aspect Ratio: 4:3
So, adjusting for the correct aspect ratio:
MAME Resolution: 450x600
Still not exactly what you are getting, but its only 6 pixels off.
Ok, I guess I can buy into the fact that if I specify a 4/3 aspect ratio, that's what MAME is doing.

MAME did not used to do this, and I would have thought "-keepaspectratio" would prevent it -

But I tried with 1941 setting screen aspect ratio to 1:1 and got a 600x600 (596x600, but) pixel display, and I set aspect ratio to 12:7 (384x224) and got a "proper" 350x600 display.

Question - Is there an easy way to make MAME display vertically stretched to 600 pixels and horizontally to the games aspect ratio, other than calculating the ratio for 5,000 games and specifying that in the game's .ini file???
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: TheGatesofBill on June 28, 2004, 02:16:19 pm
Centipede's aspect ratio is 4:3.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 28, 2004, 03:19:18 pm
Centipede's aspect ratio is 4:3.
Nope - 256:240 reduces by 16 to 16:15   :P
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on June 28, 2004, 03:32:33 pm
there is a difference between mame's native resolution and the aspect ratio the game is displayed at.  Trust me, it look some mathimatical computation to do my hack.
If you look at mame's listinfo output it will tell you what aspect ratio the game was outputted at.  For the most part it was 4:3, standard resolution.  But the native resolution may not be at 4:3 and there for it gets stretched ot squished because of this.

A great example of this is Battle Toads.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 29, 2004, 07:20:17 am
Ok, I think I have a handle on what is happening now - Although I am having a difference of opinion on the MAME General Board (http://www.mame.net/cgi-bin/wwwthreads/showpost.pl?Board=mamegeneral&Number=149720&page=0&view=expanded&mode=threaded&sb=7#Post149720)

Here's the latest things I found out - Gyruss displays properly at 525x600 when I specify -screen_aspect of 8:7.

NOTE:  MAME wants Positive aspect ratios - i.e. a 1024x768 screen is correctly 4:3, if I flip it vertically - the screen is 768x1024 or 3:4, but for Gyruss, MAME wants an aspect of 8:7.

These are what I think needs to happen, although I'm not going to urge the Dev's to change it . . .

-keepaspect is improperly named and confusing.  The parameter does not preserve the games aspect ratio, as that seems to be defined by the -screen_aspect setting.  -2Dstretch (on/off) would be more accurate, as this really seems to determine whether the game is stretched in 2 dimensions or 1 dimension.

If we are only stretching the game in one dimension, there should be a -originalaspectratio setting that keeps the game at it's default resolution.

I don't think -artworkfilledges takes into account the -screen_aspect value if it is different from 4:3, but I am not sure what is going on here.  First, I am not sure why Gyruss displayed with black borders top and bottom, when I ran it at -screen_aspect 4:3 with -artworkfilledges turned on.  In Galaxian, -artworkfilledges works fine at -screen_aspect 4:3, but has black borders top and bottom when running at -screen_aspect 8:7 (which is what the game is designed for).

I can manually crop the artwork, and manually specify the -screen_aspect to match the game, but it would be nice if this could be done automatically for all games through .ini options.  

Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on June 29, 2004, 12:02:25 pm
You might be missing the point made on the mame general board and what I tried to explain here (read what Twisty said).  Why do you think is 8:7 proper for gyruss?  Is it because of the native game resolution of 256x224?  If so you are mistaken.  screen_aspect is essentially the aspect ratio of the monitor you are viewing the game at.  Goto a 16:9 TV with mame now at 4:3, see how everything is stretched.  Now put in 16:9 into the aspect ratio, ahhh, that's better.

I've tested the fill artwork on 4:3 and 16:9 monitors without a problem so far.

Ok, go look at battle toads now.  from listinfo:
video ( screen raster orientation horizontal x 512 y 224 aspectx 4 aspecty 3 freq 60.000000 )

512x224 is NOT 4:3.  That's the pixel resolution of the game, as Twisty said there is no fixed size for pixels.  But the game was shown on a 4:3 monitor so it was hardware stretched.

Now do this, run btoads in mame.  First take keepaspect and hwstretch turned off.  You are seeing the game in it's raw pixel size.   Now turn those two on.  Hey, now it looks like it did in the arcade, the text isn't squished, it looks pretty good.

That's what is going on.  Now what's going on when you specify 8:7 with artwork fill.  You are telling mame you are viewing the game on a 8:7 and mame does it's calculations to figure out how to fit the game screen to that resolution..  Now do this on your computer.  Run a game, like btoads, with hwstretch and keepaspect on.  But chance screen_aspect to 16:9.  What should happen.  You are telling mame you are going output to a 16:9 monitor.  the keepaspect and hwstretch will want to run the game at 4:3 as  specified in the listinfo output.  SO you should get black bars to the right and left as mame caclulated the output for a 16:9 picture with a 4:3 game screen in the middle.

How does this affect artwork fill.  Notice how you can still diplay 16:9 on your 4:3 monitor just that everything is squished.  This is because you are getting a 16:9 output from mame BUT your video card is squishing the signal to 4:3.   So what is happening when you specify 8:7 is the caclulations for an 8:7 screen are getting outputted to a 4:3 screen and weird stretching occurs.  That's probably why you get black bars at top and bottom.  I just ran that, yeah, that would be my guess at why that is happening.  It also does it without the artwork fill stuff on, the black bars are there when artwork is turned on without fill.  So it isn't the artwork fill code doing that, it's the other stuff I mentioned aobut aspect ratios.

Let me simplify this a little and show you something else that does this.  Have you ever looked at scanner resolutions?  many say something like 600x300dpi.
That means in a 1 inch square, along one direction is 600 dots and the other 300 dots.  Even though 600x300 isn't a square, the size of the pixels used for scanning create the square.  A simular thing is going on here.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 29, 2004, 02:37:04 pm
You might be missing the point made on the mame general board and what I tried to explain here (read what Twisty said).
Yep, I missed it (read but didn't understand)   It's a little bit clearer now, but still muddy . . .
Quote
Why do you think is 8:7 proper for gyruss?  Is it because of the native game resolution of 256x224?  If so you are mistaken.
Yep, that was why . . .
Quote
Ok, go look at battle toads now.  from listinfo:
How do I get -listinfo for a single game?  What does it show for Gyruss?
Quote
512x224 is NOT 4:3.  That's the pixel resolution of the game, as Twisty said there is no fixed size for pixels.  But the game was shown on a 4:3 monitor so it was hardware stretched.
512x224 would be a 16:7 aspect ratio.  So did the original arcade game display on a 16:7 wide screen monitor, or it was hardware stretched in the arcade to 4:3???
Quote
Now do this, run btoads in mame.  First take keepaspect and hwstretch turned off.  You are seeing the game in it's raw pixel size.  
At  -res 800x600,  and  -screen_aspect 4:3, I get a 510x450 game image.  (Essentially double the listed resolution vertically (double-scanned?))
Quote
Now turn those two on.  Hey, now it looks like it did in the arcade, the text isn't squished, it looks pretty good.
I get a 797x594 pixel image   essentially full screen.
Quote
Now do this on your computer.  Run a game, like btoads, with hwstretch and keepaspect on.  But chance screen_aspect to 16:9.
I get a 600x600 pixel screen   odd . . .

Just for kicks, I also ran with screen aspect 7:16.  I got a 200x800 pixel image (A 4:1 aspect instead of closer to 2:1  Odd . . . (I expected an 800x350 pixel image.  This is what I would have thought the native resolution should look like but it doesn't look like an arcade game would).

So if I am understanding things correctly, all vertical games at  -800x600 and -keepaspect display at 450x600 b/c they were originally run on a 4:3 monitor, basically?

I think the light just clicked on a little - it's kinda like if I run my monitor at 1280x1024, that's a 5:4 ratio, not 4:3 like 1024x768, but I can size the images to fit the screen, so the image dimensions are the same and an emulator displaying them should have the same proportions, right?
Quote
How does this affect artwork fill.  Notice how you can still diplay 16:9 on your 4:3 monitor just that everything is squished.  This is because you are getting a 16:9 output from mame BUT your video card is squishing the signal to 4:3.   So what is happening when you specify 8:7 is the caclulations for an 8:7 screen are getting outputted to a 4:3 screen and weird stretching occurs.  That's probably why you get black bars at top and bottom.  I just ran that, yeah, that would be my guess at why that is happening.  It also does it without the artwork fill stuff on, the black bars are there when artwork is turned on without fill.  So it isn't the artwork fill code doing that, it's the other stuff I mentioned aobut aspect ratios.
That's not what I'm seeing exactly, though - going back to my Gyruss question   If I run the game at 4:3 with no artwork, I get a 450x600 image.  If I run the game at 8:7 with no artwork, I get a 525x600 image, which matches the native resolution aspect ratio (could be wrong for the game, though).

Now this is where I initially got confused   If I run Gyruss with  -artworkfilledges  -screen_aspect 4:3, and  -keepaspect, I get an 800x512 image with black bars top and bottom.  Running it with  -keepaspect off, works, full screen, but the top of the game image is slightly off-screen.

If I run Galaxian (which is the same native resolution) at the same settings (-filledges, -keepaspect, -res 800x600 -scr_aspect 4:3), I get essentially a full screen image with no black borders.

I have a theory that Galaxian happens to have the side artwork borders set to the optimum size.  Some games have it too narrow, which gives black bars on either side of the screen (acceptable).  And Gyruss has the art too wide,  -artworkfilledges fits the game and the side art to the screen, and the game gets squished vertically.

If so, I think -fillededges needs to be changed so only the portion of the artwork nearest the game screen is shown, once the game is expanded vertically to fill the screen.

But it's only a theory.

Thanks for the education (again . . . >:-(   )
Quote
Even though 600x300 isn't a square, the size of the pixels used for scanning create the square.  A simular thing is going on here.
I'm slowly catching on . . .
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 29, 2004, 04:25:44 pm
I have a theory that Galaxian happens to have the side artwork borders set to the optimum size.  Some games have it too narrow, which gives black bars on either side of the screen (acceptable).  And Gyruss has the art too wide,  -artworkfilledges fits the game and the side art to the screen, and the game gets squished vertically.

If so, I think -fillededges needs to be changed so only the portion of the artwork nearest the game screen is shown, once the game is expanded vertically to fill the screen.

But it's only a theory.
BINGO !!!!

I did some experimenting and confirmed my theory:

Gridle also posted on the MAME forum that ALL single screen games should display at 450x600 pixels with a 4:3 monitor set to 800x600 screen resolution.

This means that the non-game area is 350 pixels and the border for one side of the bezel artwork should be 175 pixels or 175/800 = 21.875% of the screen width.

Opened the Galaxian artwork - The artwork is 1024 pixels wide and the side art is 222 pixels wide, so 222/1024 = 21.6796% which is why -artworkfilledges works almost perfectly for it.

Check the Gyruss artwork - The artwork is 1635 pixels wide and the side art is 416 pixels wide, so 416/1635 = 25.4435%.  Since the side art is wider than the screen allows, -artworkfilledges shrinks the screen vertically to make it fit.

Final Question: Artworkfilledges works perfectly for games where the side art border of the bezel (on each side) is less than 21.875% of the total bezel width.  What would it take (besides more money than I'll earn in my lifetime) to modify (or create a new option) which for artwork larger than 21.875%, would only show the artwork that was on the screen-side edge of the 21.875% limit?

(I can deal with the games being full-screen vertically and lopping off some of the side bezel artwork, I'm already lopping off the top and bottom bezel art !!!)

Thanks!!!
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on June 29, 2004, 07:55:04 pm
You might be missing the point made on the mame general board and what I tried to explain here (read what Twisty said).
Yep, I missed it (read but didn't understand)   It's a little bit clearer now, but still muddy . . .
Quote
Why do you think is 8:7 proper for gyruss?  Is it because of the native game resolution of 256x224?  If so you are mistaken.
Yep, that was why . . .
Which is wrong as you probably have figured out now.

Quote
Quote
Ok, go look at battle toads now.  from listinfo:
How do I get -listinfo for a single game?  What does it show for Gyruss?
You don't, at least not that I know of.

Quote
Quote
512x224 is NOT 4:3.  That's the pixel resolution of the game, as Twisty said there is no fixed size for pixels.  But the game was shown on a 4:3 monitor so it was hardware stretched.
512x224 would be a 16:7 aspect ratio.  So did the original arcade game display on a 16:7 wide screen monitor, or it was hardware stretched in the arcade to 4:3???
Exactly, it's stretched so to speak.  Like with the scanner example, the scanner scan at 600x300dpi, dots per inch.  It's still a square, equal length on each sides, but on direction is 600dpi and the other is 300dpi.  So the 300dpi direction gets "stretched" to make the square.  It's all about what shape and size the pixel is.  Don't assume a pixel is a square for the arcade games, it doesn't have to be.  The only way you'd get where the native resolution of a game is exactly 4:3 is IF the pixels were square.

Quote
Final Question: Artworkfilledges works perfectly for games where the side art border of the bezel (on each side) is less than 21.875% of the total bezel width.  What would it take (besides more money than I'll earn in my lifetime) to modify (or create a new option) which for artwork larger than 21.875%, would only show the artwork that was on the screen-side edge of the 21.875% limit?
I am confused on what you are asking.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Howard_Casto on June 29, 2004, 10:17:13 pm
Just for clarity....  to sum up sirp's point.

There are only about 4 valid aspect ratios for arcade games, which btw have absolutely nothing to do with the resolution.  

4:3 (pretty much everything)  16:9 (capcom titles, battletoads and a few others)  and one or two really odd aspects for games that spanned multiple monitors.  Of course these aspects are reversed for vertical games.  

Resolutions are confusing to some because they do justify the aspect on a vga monitor.... however on older, more analog, displays they mean virtually nothing.  

Hope that helps,

HAC
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on June 30, 2004, 12:31:18 am
16:9 (capcom titles, battletoads and a few others)

Hehe, old argument between HC and me.  I think Battletoads is meant for 4:3, at 16:9 the text is squished and other things look fugly.  But HC said he say a 16:9 battle toads, I assume that is a weird prototype.  I played on a real battle toads game quite abit in high school and it was 4:3.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 30, 2004, 03:22:36 pm
Quote
Final Question: Artworkfilledges works perfectly for games where the side art border of the bezel (on each side) is less than 21.875% of the total bezel width.  What would it take (besides more money than I'll earn in my lifetime) to modify (or create a new option) which for artwork larger than 21.875%, would only show the artwork that was on the screen-side edge of the 21.875% limit?
I am confused on what you are asking.
Ok - Try the following - (assuming 800x600 is set full screen in windows already), set -resolution 800x600, -swithchres=1, -screen_aspect = 4:3, -artworkfilledges on.

Run Galaxian - The game looks perfect because of the bezel proportions mentioned above.

Run Centipede - The game is full screen vertical and proper aspect ratio, but there are black vertical borders on the sides b/c the bezel art is narrow on the sides, but this is acceptable to me.

Run Gyruss - The game and art are displayed at 800x510, and there are 45 pixels of black border above and below the screen.  Presumably the aspect ratio is correct, but b/c -artworkfilledges uses the entire bezel artwork and b/c the artwork is too wide to fit in the remaining 43.75% of the screen width, the game is squished vertically.

Turn off -keepaspect and run Gyruss.  This is closer to what I am after.  The game is full screen vertically, and the artwork fills the screen horizontally.  However, the aspect ratio is wrong (the game is 400x600 pixels instead of 450x600) b/c the artwork renderer extends to the side edge of the bezel artwork.

NOTE:  This effect will be worse as the side border of the bezel image gets wider.

What I would like the function to do is display the Gyruss game image at 450x600, and the artwork at 175x600 on each side of the image (lopping off 25 pixels from the extreme right and left sides of the bezel art, in this case only.)
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on June 30, 2004, 04:36:15 pm
Okay, you may not be able to follow this, or it may help.

First - Galaxian is NOT perfect - with no artwork, the game measures 446x600 pixels instead of 500x600, with -artworkfilledges, the game measures approx 476x600, but the proportions seem to be correct so I don't see how this is.

Here is how to manually fix the art to get the same effect.  NOTE: width refers to the horizontal width of the image.  The artwork is rotated, so I am really meaning height in this case.  SirPoonga's calculator relies on the literal image (as it appears, so that is what is used).

Assume:
image is centered horizontally (bezel is same width on either side of image)
Z equals modified artwork width
Y equals game screen width on artwork (and is known)
X equals modified side bezel width on artwork

then

Z=2X+Y

and we want X/Z = .21875 so

X/(2X+Y)=.21875, or

X = .21875*(2X+Y), or

X = .4375*X + .21875*Y or

.5625x = .21875Y or

X = .388888 (repeating) Y  Substituting for Z, then

Z = 2X+Y, or

Z = 2*(.388888*Y) + Y, or

Z = 1.7777777777777777 (repeating) Y

Opening the gyruss art file,

The mask width is 792 pixels, so Z equals 1408 pixels.

The original bezel width is 1635 pixels, so the offset is (1635-1408)/2 or 113 (.5) pixels and the original bezel height is 1188 pixels (unimportant).

We crop both the artwork and the mask files to 1188x1408 with an offset of 113 and save.

Then the values from SirP's calculator for point 4 are 1188,1408
Point 5 is 176,304 and
Point 8 is 1140, 1100

Plugging these is and adding 2 to point 5 and losing 2 to point 8 to keep the image inside the screen, we get an artfile value of:

-0.1854,-0.3864,1.0521,1.3914

This works the same a Galaxian, the image with -keepaspect and -artworkfilledges is full-screen, and the game is 475x600.

I just would like to be able to do this without modding the art files.

FWIW!!!!!!




Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Howard_Casto on June 30, 2004, 08:23:21 pm
16:9 (capcom titles, battletoads and a few others)

Hehe, old argument between HC and me.  I think Battletoads is meant for 4:3, at 16:9 the text is squished and other things look fugly.  But HC said he say a 16:9 battle toads, I assume that is a weird prototype.  I played on a real battle toads game quite abit in high school and it was 4:3.

Nope, the operator had it adjusted wrong.  Operators don't read manuals so they pretty much adjust everything to 4:3 regardless of if it's the proper aspect.  
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 01, 2004, 12:32:23 am
Ok Tiger, I know all the calculations, I've done them several hundred times.  I still don't get whatyou are trying to do?
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on July 01, 2004, 06:39:16 am
16:9 (capcom titles, battletoads and a few others)

Hehe, old argument between HC and me.  I think Battletoads is meant for 4:3, at 16:9 the text is squished and other things look fugly.  But HC said he say a 16:9 battle toads, I assume that is a weird prototype.  I played on a real battle toads game quite abit in high school and it was 4:3.

Nope, the operator had it adjusted wrong.  Operators don't read manuals so they pretty much adjust everything to 4:3 regardless of if it's the proper aspect.  
Isn't it possible some Battletoads had wide-screen aspect monitors and some had standard, and the output was scaled to 4:3 or 16:9 by the operator depending on the monitor in the cabinet?
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on July 01, 2004, 11:26:49 am
Ok Tiger, I know all the calculations, I've done them several hundred times.  I still don't get whatyou are trying to do?
I think those were new slightly different calculations . . .

I'm not sure how to explain it more clearly -

Run Galaxian - The aspect ratio is approx the same with artwork on or off (445x600 off, 475x600 on).

Run Gyruss - The aspect ratio is 445x600 artwork off, approx 383x510 with keep aspect on, approx 400x600 with -keepaspect off.

Basically: -filledges shows the entire width of the bezel artwork, so if the bezel is WIDE compared to the game screen, the following problems occur:

if -keepaspect is selected, the width of bezel plus game screen is greater than the height of the game (by more than the 4:3 ratio (screen resolution, not game display  i.e the total display area is 800x600, the game display is usually 450x600.) so the game gets squished vertically with black horizontal bands top and bottom.

if -keepaspect is not selected, the -artworkfilledges still shows the edge-to-edge width of the bezel so the entire display is now full screen, but the game image gets squished horizontally to accomodate the wide bezel.

What I would like to see (works this way now except for games with wide bezels relative to the width of the game screen mask):

All games screen images display at 450x600 (with -800x600 resolution) with -artworkfilledges turned on or off.

The bezel artwork just fills in the remaining area without scaling.  For narrow bezel games (Centipede), there are black vertical borders, b/c the bezel is not wide enough.  That's ok.  For wide bezel games, instead of trying to fit the entire bezel in the game, -artworkfilledges should just show the portion of the bezel that fits the remaining screen area - cropping off the left and right outer edges.

Maybe 1943 will be a better example -

Run the game without artwork and it displays at 445x600, essentially 450x600.

Run the game with -artworkfilledges and -keepaspect, and the game and bezel gets squished vertical (total 800x550, game 411x550), the 4:3 aspect ratio is preserved, but the game is not full screen vertical.

Run the game with -artworkfilledges and no -keepaspect, and the game and bezel are full screen, but the game screen is displayed at 412x600, basically, the game gets squished horizontally to accomodate the wide bezel.

What I would like is a setting where the game will display at 450x600, and the remaining art will be cropped to fit in the remaining 175x600 on each side - so in the case of 1943, on the left side of the bezel, you might lose the red border outside of the yellow text area, or even the first few words closest to the left margin, but the game would be full screen vertical and proportional.

Hopefully you got it now!
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 01, 2004, 01:12:39 pm
sorry for the stupidity question, but I haven't dealt with this in awhile.  how are you getting the screen dimmensions?

Hmm, as far as I rmember artwork fill should crop the bezel too.  Man, I am going to have to download nonamemame now!  It might be a few weeks until you get an answer as I am on modem right now and I iwll have to download source and binaries and the development utils.  Unless someone wanted to make me a CD and send it to me :)
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on July 01, 2004, 01:20:20 pm
sorry for the stupidity question, but I haven't dealt with this in awhile.  how are you getting the screen dimmensions?
-800x600 is specified in MAME.  Gridle posted and we can calculate that if the game is 600 pixels tall, at a 4:3 aspect ratio, it should be 450 pixels wide.

For everything, else - I run MAME, hit PrintScreen, paste into Irfanview, and then select the area and look at the selection window dimensions.

For stuff without artwork, I use the border of the game info screen as black gamescreen on a black background would be tough to pick out.

It could be off by 4-5 pixels depending on how I place the selection window, but it's pretty close.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 01, 2004, 01:27:16 pm
Quote
Run the game without artwork and it displays at 445x600, essentially 450x600.
I assume you mean without keepaspect also?

So you are trying to display the games at native resolution (which isn't how they were displayed in the arcade) and have the cropped artwork to fill the screen?


woohoo, I got a friend of mine that will burn and mail me everything I need to look at this again :)
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on July 01, 2004, 02:27:38 pm
Okay, now I'm confused
Quote
Run the game without artwork and it displays at 445x600, essentially 450x600.
I assume you mean without keepaspect also?
Errrmm, no . . .  without -keepaspect ratio it would be 800x600 and badly stretched horizontally.

Set artwork off,
-resolution 800x600
-switchres 1
-keepaspect 1
-screen_aspect 4:3

The game Should end up 450 Wide by 600 pixels tall.  I measure 445x600, but that could be measurement error.

Quote
So you are trying to display the games at native resolution (which isn't how they were displayed in the arcade) and have the cropped artwork to fill the screen?
Errmmmm, no again!!  Forget the native resolution!  I am trying to get all the vertical games to display at 450x600 (with an 800x600 screen resolution) and have the cropped artwork fill the screen, rather than displaying the entire bezel side plate and squishing the game image.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 01, 2004, 05:06:24 pm
Ok, I understand now.  You have a 800x600 (4:3) horizontal monitor and you want a 3:4 vertical game area in the middle.  THat's where you get the 450x600 :)  3/4x where x = 600 is 450 :)  That leave 175 on each side for the artwork.  Hmm, It should work.

BTW, my artwork hack can be found here
http://free.hostdepartment.com/S/SirPoonga/hacks.html
actually, something's not right.  There's more to it than what is shown in that diff, did I miss a step when I made the diff.  I gotta talk to NoNameMame dude and see what he took.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 01, 2004, 05:34:05 pm
ok, there is a problem. I have to see what GateOfBill used, on my site it links to this diff file:
http://free.hostdepartment.com/S/SirPoonga/cropedges.txt

There's not much there, actually, that diff all it does is void artwork_crop if filledges is turned on.

If that were the case it would have been accepted into mame.  But what I did had a global variable and used a windows specific variable in mame.
Now, what it is suppose to be:
http://free.hostdepartment.com/S/SirPoonga/cropedges2.txt

As you see, alot more calculations are going on.  I don't know how that version on my website got there.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on July 01, 2004, 05:35:52 pm
Ok, I understand now.  You have a 800x600 (4:3) horizontal monitor and you want a 3:4 vertical game area in the middle.  THat's where you get the 450x600 :)  3/4x where x = 600 is 450 :)  That leave 175 on each side for the artwork.  Hmm, It should work.
You got it.  Well, it does pretty well work.  I don't understand why it jumps from 450 to 475 wide, but for narrow and medium side width bezels, it works fine.  For wider bezels, it takes the entire bezel width insted of cropping it.
Quote
BTW, my artwork hack can be found here
http://free.hostdepartment.com/S/SirPoonga/hacks.html
actually, something's not right.  There's more to it than what is shown in that diff, did I miss a step when I made the diff.  I gotta talk to NoNameMame dude and see what he took.
That doesn't mean much to me, so I can't help you there.

EDIT: I'm using something like NoNAME 082u1 or so, and it seems to work like I rememered it working
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 01, 2004, 05:50:32 pm
Once I get my hands on mame's source and development tools I will look into this again and see if I can clean the real code up.  I asked on mameworld's compiling board some questions.  I can't believe I linked the wrong file on my site, or even why the wrong file is there, it's named exactly the same as the once in my site backup, but the one in my site backup is the correct one. (which I renamed to cropedge2.txt for the above post)
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 02, 2004, 12:41:55 am
after several hours of downloading I got no name mame.  Yep, t's the wrong code.

basicallyy what is happening as you obviously stated is it is doing the full width of the bezel.  Actually, it's doing artwork_crop but only cropping the top and bottom, not the edges.

Now, if the actaul code is put in it should work (crosses fingers).  I will alert GofB about this and make sure I get a test exe before release.

I guess not too many people use this feature if the problem hasn't shown up until now :)
edit: btw, the game screen should still keep aspect, even with these changes, it's just not going to be 600 pixels high on screen.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: TheGatesofBill on July 02, 2004, 12:58:24 am
http://free.hostdepartment.com/S/SirPoonga/cropedges2.txt
Dead link...
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: TheGatesofBill on July 03, 2004, 12:30:35 am
SirP, please fix the link or send me the correct file, the next version of No Name MAME is waiting on you.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 03, 2004, 01:31:28 am
my bad, typo
http://free.hostdepartment.com/S/SirPoonga/cropedge2.txt
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: TheGatesofBill on July 03, 2004, 10:22:52 am
my bad, typo
http://free.hostdepartment.com/S/SirPoonga/cropedge2.txt

Quote
Forbidden
You don't have permission to access /S/SirPoonga/cropedge2.txt on this server.

Apache/1.3.29 Server at free.hostdepartment.com Port 80
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 03, 2004, 09:15:08 pm
copy and paste into a brand spanking new browser.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: TheGatesofBill on July 03, 2004, 11:27:46 pm
Okay, thanks. I'll toss the new code in asap and fire a version your way, or maybe just release it, depending on how lazy I am.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on July 05, 2004, 07:52:02 am
my bad, typo
http://free.hostdepartment.com/S/SirPoonga/cropedge2.txt
Got the file - but -

Hunk #2 failed at 208
1 out of 7 hunks failed.

This was with 0.84, but I got the same errors with 0.82u1.

82u1 compiled but artworkfilledges didn't work at all.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: TheGatesofBill on July 05, 2004, 03:57:20 pm
So go find the rej files and fix it.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on July 05, 2004, 04:07:09 pm
So go find the rej files and fix it.
Huh???
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: SirPoonga on July 05, 2004, 09:20:25 pm
Bill, do you get that same problem?  I will be re-looking at the code once I get the mame dev environment up.
Title: Re:Question on Hardware Stretch and -artworkfilledges (for SirP or others)
Post by: Tiger-Heli on July 10, 2004, 09:08:25 am
Bill, do you get that same problem?  I will be re-looking at the code once I get the mame dev environment up.
Anyone ever look into this.  I have the correct SirP code, but it won't compile (compiles but won't work).  TGoB has source code with the latest SirP code, but it won't work, and he's retired (temporarily, ?, I hope).