Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Creating Mame Artwork Files  (Read 2036 times)

0 Members and 1 Guest are viewing this topic.

jcroach

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 444
  • Last login:March 01, 2012, 09:36:56 am
  • I'm a llama!
Creating Mame Artwork Files
« on: February 24, 2006, 09:21:39 am »
Ok, so I've been messing around with altering some of the official Mame artwork files and creating my own bezels from scans.  Just for my own amusement, but I'd be happy to share.  I was inspired by some bezels files I found on the web.

http://www.excellentcontent.com/xbart/index.htm
http://www.excellentcontent.com/xbart/cb.htm
http://www.planetquake.com/meanarena/mame_bezels.html

I'm having some trouble figuring out how to line everything up.  I found some information on the boards.

What I'm trying to figure out is how to handle it if the game screen and the bezel opening are different shapes.  Say in the example below, the game screen is 700x500, but what if the bezel opening is 700x600?  Or 700x400? Do you measure the bezel based on the actual art or the art that's showing when the game is displayed?  How do you handle differing pixel aspect ratios?  Games displayed on an arcade monitor have 0.9:1 pixels, but pn a computer screen and a scan ona bezel, the pixels are 1:1.  Can anyone shed some light for me?



POSITIONING
    The positioning of the artwork is a little tricky.
    Conceptually, the game bitmap occupies the space from (0,0)
    to (1,1). If you have a piece of artwork that exactly covers
    the game area, then it too should stretch from (0,0) to (1,1).
    However, most of the time, this is not the case.

    For example, if you have, say, the Spy Hunter bezel at the
    bottom of the screen, then you will want to specify the top
    of the artwork at 1.0 and the bottom at something larger, maybe
    1.25. The nice thing about the new artwork system is that it
    will automatically stretch the bitmaps out to accomodate areas
    beyond the game bitmap, and will still keep the proper aspect
    ratio.

    Another common example is a backdrop that extends beyond all
    four corners of the game bitmap. Here is how you would handle
    that, in detail:

    Let's say you have some artwork like this:

     ============ 883 pixels ===============

    (1)-------------------------------------(2)  ^
     |                  ^                    |   |
     |              26 pixels                |   |
     |                  v                    |   |
     |     (5)-----------------------(6)     |   |
     |      |                         |      |   |
     |      |                         |      |   |
     |      |                         |      |   |
     | ---- |                         |      |   |
     |  97  |      Game screen        |      |  768
     |pixels|       700 x 500         |      | pixels
     |      |                         | ---- |   |
     |      |                         |  86  |   |
     |      |                         |pixels|   |
     |      |                         |      |   |
     |      |                         |      |   |
     |     (7)-----------------------(8]     |   |
     |                  ^                    |   |
     |              42 pixels                |   |
     |                  v                    |   |
    (3)-------------------------------------(4)  v

    If you're looking at the raw coordinates as might seem
    logical, you would imagine that they come out like this:
        (1) is at (0,0)
        (2) is at (883,0)
        (3) is at (0,768)
        (4) is at (883,768)
        (5) is at (97,26)
        (6) is at (797,26)
        (7) is at (97,526)
        (8] is at (797,526)

    The first thing you need to do is adjust the coordinates
    so that the upper left corner of the game screen (point 5)
    is at (0,0). To do that, you need to subtract 97 from
    each X coordinate and 26 from each Y coordinate:
        (1) is at (0-97,0-26)     - (-97,-26)
        (2) is at (883-97,0-26)   - (786,-26)
        (3) is at (0-97,768-26)   - (-97,742)
        (4) is at (883-97,768-26) - (883,742)
        (5) is at (97-97,26-26)   - (0,0)
        (6) is at (797-97,26-26)  - (700,0)
        (7) is at (97-97,526-26)  - (0,500)
        (8] is at (797-97,526-26) - (700,500)

    The final thing you need to do is make it so the bottom
    right corner of the image (point  is at (1.0,1.0). To do
    that, you need to divide each coordinate by the width
    or height of the image
        (1) is at (-97/700,-26/500)  - (-0.13857,-0.052)
        (2) is at (786/700,-26/500)  - (1.122857,-0.052)
        (3) is at (-97/700,742/500)  - (-0.13857, 1.484)
        (4) is at (883/700,742/500)  - (1.122857, 1.484)
        (5) is at (0/700,0/500)      - (0.0,0.0)
        (6) is at (700/700,0/500)    - (1.0,0.0)
        (7) is at (0/700,500/500)    - (0.0,1.0)
        (8] is at (700/700,500/500)  - (1.0,1.0)

    Alternately, you can also provide pixel coordinates, but it will
    still be relative to the game's native resolution. So, if
    the game normally runs at 256x224, you'll need to compute
    the division factor so that the bottom right corner of the
    game (point  ends up at (256,224) instead of (1.0,1.0).
    Basically, if you have the original coordinates shown
    right below the image, you can compute the values needed by
    doing this for X coordinates:

        (X coordinate on artwork) - (X coordinate of game's upper-left)
        ---------------------------------------------------------------
                   (width of game in artwork pixels)

    And this for Y coordinates:

        (Y coordinate on artwork) - (Y coordinate of game's upper-left)
        ---------------------------------------------------------------
                   (height of game in artwork pixels)

« Last Edit: February 24, 2006, 09:26:06 am by jcroach »

jcroach

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 444
  • Last login:March 01, 2012, 09:36:56 am
  • I'm a llama!
Re: Creating Mame Artwork Files
« Reply #1 on: February 27, 2006, 08:28:39 am »
Anybody able to help me out here?