Main > Software Forum

artwork fill edges hack

Pages: << < (5/7) > >>

Tiger-Heli:


--- Quote from: SirPoonga on August 02, 2004, 11:08:35 am ---You are right, and I know why now.  Hmm, I guess I originally was testing with the wrong game.  I usually use pacman and double dragon 2  to test this.  It's raw values must be very close to 4:3 because all I did was put sticky notes on the screen to indicate edges, was a better method than taking a screenshot and measuring :)

But I can't believe I didn't look at 1942 more closely, it's obviously not 4:3.

--- End quote ---
Yep, oddly, I just tested PacMan and it comes out at 463x597, which is much closer to the 450x600 desired number.

SirPoonga:

Do this, get 1942's artwork.  Run in it mame full artwork on (no crop, no fill edges.  
Fow, keepaspect on.  Run the game like "mame 1942" and "mame 1942 -ror".  Everything seems fine, huh?
now turn keepaspect OFF.  That is odd?

Oh, if oyu take screenshots of these mame will output the non keepaspect version out.  So mame is stretching the screen somehow.  Oh, put skip_gameinfo to 0 and you can see mame is stretching as the text for the info screen is stretched.

Anyway, ok, back to the problem.
I tried this
"mame 1942" with keepaskect on and off.
Note how mame stretches the screen with artwork.  Why it isn't doing that with filledges I don't know.  That's all handled in the windows specific stuff.  artwork.c is a general mame file in the /src/ folder.  keepaspect is handled in video.c, window.c and wind3d.c which are all in the /src/windows/ foilder i.e. they are windows specific stuff.  SO how keep aspect isn't keeping aspect when the fill edges is on I don't know.  hmmmm.  i may have to retire this hack for now.  I don't know if it is possible to do without rewriting a bunch of stuff.

Tiger-Heli:

Did some more testing - I don't see quite where you are going, but I do see what you mean.  The problem appears to be in MAME itself.

FWIW, if you run the games with -fill_edges and -crop on, then -keepaspect doesn't do much of anything at all . . .  (Might try with Centipede and whoa -  Centipede gets badly stretched by the new hack - goes to 566x600 or 577x600 with keepaspect on/off).  I don't remember it being stretched this much with the previous version of the hack . . .  hmmmmmn


--- Quote from: SirPoonga on August 02, 2004, 01:05:23 pm ---Do this, get 1942's artwork.  Run in it mame full artwork on (no crop, no fill edges.  
Fow, keepaspect on.

--- End quote ---
Interesting, game artwork displays as 426x600, game is 241x305, but should be 225x305 if a 4:3 aspect is preserved, so MAME is wrong at this point.

--- Quote --- Run the game like "mame 1942" and "mame 1942 -ror".  Everything seems fine, huh?

--- End quote ---
Uh, no - artwork is 800x570 (sideways), game is 408x325 (sideways), should be 408x305 for 4:3

--- Quote ---now turn keepaspect OFF.  That is odd?

--- End quote ---
Didn't see a big change - artwork stretches more vertically to 800x600, game screen goes to 408x343.

--- Quote ---Oh, if oyu take screenshots of these mame will output the non keepaspect version out.  So mame is stretching the screen somehow.  Oh, put skip_gameinfo to 0 and you can see mame is stretching as the text for the info screen is stretched.

--- End quote ---
Didn't quite follow you, but F12 screenshots are not useful for this - I use PrntScrn and then paste into Irfanview.

--- Quote --- i may have to retire this hack for now.  I don't know if it is possible to do without rewriting a bunch of stuff.

--- End quote ---
From what I can see, the hack seems to work pretty well, but I don't see a huge difference from what was in NoName before.  It is not staying at 450x600, but neither is MAME with artwork on.  And Centipede seems like it was better before.  I might try to go back to the older NoName version of it, if it's still available. . .

Let me know if I can test anything else out!!!

SirPoonga:

Ok, I figured a little bit out.  I started from scratch again, thinking I over thought this.

In vanilla mame, if you turn artwork on and turn artwork_crop off you see this code (will explain in english):


--- Code: ---if (!options.artwork_crop)
      for (piece = artwork_list; piece; piece = piece->next)
      {
         if (piece->left < min_x) min_x = piece->left;
         if (piece->right > max_x) max_x = piece->right;
         if (piece->top < min_y) min_y = piece->top;
         if (piece->bottom > max_y) max_y = piece->bottom;
      }

--- End code ---

Let me explain that to you non programmer types.  It is selft explanitory for the most part.  What it is saying IF options.artwork_crop is off then go through this loop.  The for loop goes through each artwork piece.  If the current min_x, max_x, min_y, or max_y is within the artowrk boundries make the mins and maxs the same as the artwork.

Now, what is the mins and maxs, that's the quesiton.  I thought it meant viewable area.  So, I added if artwork_crop is on and filledges is on that I'd just check either min and max of X or Y, but not both (depending on orientation of the game).  IF I'd only do two of those  if statements, not all 4.  So, using 1942 as an example, remembering it is rotated, I need to check the height restraints and make the edges of the height equal to the edges of the artwork.  THAT WORKED!!  I thought, cool, it works.  Then I tried gyruss.  Ok, the aspect ratio of the game screen was kept BUT the entire left and right artwork shown.  to we got a letterbox effect since the artwork:gamescreen is much wider than 4:3.  In pacman with the artwork was thinner than 4:3.

SO, I will have to figure a way to crop the art.  That might be a little involve as it does depend on if the person has keepaspect on.  I also may thin hwstretch may effect this too.  This will make it much more complex.  I will have to relook into this hack in the future,  right now I don't have the time to figure in keepaspect and possibly hwstretch.  More experimenting will need to be done.  I may have to put contrainsts on that filledges will only work if keepaspect is on and hwstretch on.

I just did some hwstretch tests, yeah, that would need to be taken into acocunt if turned off.  I will probably have to put constraints on conditions for filledges to work.

Tiger-Heli:

It might help to see Reply #21 from me in this thread:
http://www.arcadecontrols.org/yabbse/index.php?board=3;action=display;threadid=21170;start=msg172564#msg172564

--- Quote from: SirPoonga on August 02, 2004, 02:03:39 pm ---Ok, I figured a little bit out.  I started from scratch again, thinking I over thought this.

In vanilla mame, if you turn artwork on and turn artwork_crop off you see this code (will explain in english):

[code]
if (!options.artwork_crop)

--- End quote ---


Pages: << < (5/7) > >>

Go to full version