Jump to content

CoinOps screensize and aspect ratio


theoldone

Recommended Posts

Hi folks,

 

there is a way to change the CoinOps screensize and aspect ratio on a game by game basis.

 

I show you on Zaxxon as an example...

Create two plain black pngs the size of 256x224 and name them alphablack.png and black.png

create a text file named zaxxon.art (always use the rom name) with the following content:

bezel:
file		= black.png
alphafile	= alphamask.png
layer		= bezel
priority	= 0
visible		= 1
position	= -0.250,-0.459,1.250,1.469

 

Zip up the three files to zaxxon.zip and put it in the Coinops/artwork dir. Thats about it...

 

The hard part is to calculate the position values in zaxxon.art

The CoinOps source code says the following:

**********************************************************************

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)-----------------------(     |   |
 |                  ^                    |   |
 |              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)
	( 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)
	( 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)
	( 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)

*********************************************************************

 

Remember one thing. The global screensize setting will interfer with the new settings. So better leave them at default values...

 

Maybe someone like Cospefogo can figure out some decent settings... I am too stupid...

 

I have not tried it, but i think this trick will not work on any of the new cores added to coinops...

 

zaxxon.jpg

Link to comment
Share on other sites

That's really interesting. Its a hack sort of and a really clever one! I think you'r right though, the CoinOps screen setting could much things up. I can try this later today though.

 

Thanks!

 

 

eoldone' date='Mar 27 2010, 08:48 PM' post='329674']

Hi folks,

 

there is a way to change the CoinOps screensize and aspect ratio on a game by game basis.

 

I show you on Zaxxon as an example...

Create two plain black pngs the size of 256x224 and name them alphablack.png and black.png

create a text file named zaxxon.art (always use the rom name) with the following content:

bezel:
file		= black.png
alphafile	= alphamask.png
layer		= bezel
priority	= 0
visible		= 1
position	= -0.250,-0.459,1.250,1.469

 

Zip up the three files to zaxxon.zip and put it in the Coinops/artwork dir. Thats about it...

 

The hard part is to calculate the position values in zaxxon.art

The CoinOps source code says the following:

**********************************************************************

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)-----------------------(     |   |
 |                  ^                    |   |
 |              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)
	( 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)
	( 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)
	( 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)

*********************************************************************

 

Remember one thing. The global screensize setting will interfer with the new settings. So better leave them at default values...

 

Maybe someone like Cospefogo can figure out some decent settings... I am too stupid...

 

I have not tried it, but i think this trick will not work on any of the new cores added to coinops...

 

zaxxon.jpg

Link to comment
Share on other sites

Hello,

 

I just tried this with Alien Syndrome, but it only displayed a black screen. Here is the code I used. I started with the default position of 0,0,1,1 and made the PNG 640x480. I also tried it with PNGs as 320x240 and got the same black screen as a result.

 

bezel:

file = black.png

alphafile = alphamask.png

layer = bezel

priority = 0

visible = 1

position = 0.0,0.0,1.0,1.0

 

Any ideas?

Link to comment
Share on other sites

Wowwowow.

Wait there...

 

Does this really work?

What a find!!!!!

What a very nice find.

Even with the new PixelPerfect settings, this could be very useful for something else.

 

I will make my tests too on this.

Also, I can provide size values and positioning for many many games.

I have around 15 different CoinOPS set up in my Xbox.

They cover around 400 games if I am not wrong.

 

Cospefogo.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...