The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: lokki on June 13, 2005, 06:07:49 pm

Title: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: lokki on June 13, 2005, 06:07:49 pm
Hi,
Sorry for taking so long rl gets in the way sometimes. Attached you will find the code to add the mirrored effect to mame plus build 97.
The purpose of this is to allow  the playing of 2-player horizontal games from the opposite ends of vertical cocktail cab. By displaying mirror images of the playfield on the screen

Sample of current command line

C:\mame>mameppp kof98  -scale_effect mirrored  -d3d -tb -hws -ror -noka

Note: It looks better when using the noka (no Keep Aspect) parameter


Compile instructions

Download MAME 97 Source code from www.mame.net
Download Mame Plus 97 source code from http://mameplus.emu-france.com/
(You will also need to download the extra tools)
Overwrite the code in attached file

Note attached file should be renamed to .zip

Sorry for creating a new thread for this, but wanted a more descriptive subject

Original Thread can be found here
http://forum.arcadecontrols.com/index.php/topic,36605.0.html


Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: gregor7777 on June 15, 2005, 11:19:50 am
nice, thanks!
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: mortacci on September 18, 2005, 11:59:46 pm
I tried this with the MAMEPLUS .100 source and it would not compile. Is this code addition for mameplus .97 only? Where can I get the source for mameplus .97?
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: lustreking on October 28, 2005, 03:01:38 pm
Bump. 

I love this idea, and also want to know where to find the source for Mameplus .97

-Steve
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: Spartan on November 01, 2005, 04:06:16 pm
Holy cow -- this is AWESOME!  I'll give it a go with the latest source tonight!   :o
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: lokki on November 01, 2005, 05:15:02 pm
Hi,
Around mame 99, mamdev changes the way the images are rendered, so the code posted will only work on mame 97, and will require significant changes to get it to work on newer mame.

There was very little interested in this when it came out, so did not continue updating....

Update
Just took a look at the code the changes do not look too bad, should be fairly easy to upgrade to mame 101.
Best bet would be to look at the differences between the mirror code and the mame plus 97 code and apply the same changes to mame 101



good luck
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: Spartan on November 01, 2005, 07:36:21 pm
Hi,
Around mame 99, mamdev changes the way the images are rendered, so the code posted will only work on mame 97, and will require significant changes to get it to work on newer mame.

There was very little interested in this when it came out, so did not continue updating....

Update
Just took a look at the code the changes do not look too bad, should be fairly easy to upgrade to mame 101.
Best bet would be to look at the differences between the mirror code and the mame plus 97 code and apply the same changes to mame 101



good luck

Yea, I'm doing that right now.  Two questions tho:

1) Do you have a copy of mameplus 0.97 laying around?  I can't seem to find one.  I have the changes from scale2x.h and scale.c incorporated, but it looks like they changed a number of API calls in properties.c

2) Is the switch -d3d required?  I use a mobo with integrated video (KM400 chipset -- S3 UniChrome IGP) in my cocktail cab, and it's not DX7 compliant  :-\
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: lokki on November 01, 2005, 07:44:34 pm
Hi,
Around mame 99, mamdev changes the way the images are rendered, so the code posted will only work on mame 97, and will require significant changes to get it to work on newer mame.

There was very little interested in this when it came out, so did not continue updating....

Update
Just took a look at the code the changes do not look too bad, should be fairly easy to upgrade to mame 101.
Best bet would be to look at the differences between the mirror code and the mame plus 97 code and apply the same changes to mame 101



good luck

Yea, I'm doing that right now.
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: Spartan on November 01, 2005, 08:06:26 pm
Ok, well, I copied the newly compiled mamep and it's dll to my workstation computer and the mirror image works except for some small random dots in the lower right hand corner of the screen.  Other than that it looks great!

Oh, and -d3d seems to be required  :'(
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: lokki on November 01, 2005, 09:46:06 pm
Glad to hear you got it to work...
I also noticed some pixels missing, but could never figure it out...and it was only aparent on certain resolutions.

How is the performance...? I noticed maybe a 10% loss in performance, but some one reported huge performance loss....

Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: Spartan on November 01, 2005, 10:30:14 pm
Glad to hear you got it to work...
I also noticed some pixels missing, but could never figure it out...and it was only aparent on certain resolutions.

How is the performance...? I noticed maybe a 10% loss in performance, but some one reported huge performance loss....



Well, my workstation PC is a Athlon XP 3200+ @ 400MHz FSB w/ a gig of RAM and a Radeon 9700pro.  Here is a very UN-scientific test using S.T.U.N Runner:

Code: [Select]
D:\mame>mamep stunrun -scale_effect mirrored  -d3d -tb -hws -rol -noka
Average FPS: 41.818807 (2658 frames)

Code: [Select]
D:\mame>mamep stunrun  -d3d -tb -hws -rol -noka
Average FPS: 58.654777 (3089 frames)

I think I'll be picking up a Radeon so I can run this in my cocktail cab.

Oh -- one last thing:  Do you think it would be possible to place a black bar between the 2 images so that they don't run together?

EDIT:  I figured out the last thing -- looks nice now!   8)
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: Spartan on November 02, 2005, 10:47:29 am
Here's another thought.... What I would absolutely love is to run old consoles in my cocktail cab.  To that end, I have done a little digging and found that the scale2x (as with all scaling) was taken from AdvanceMAME.  If I could figure out how to implement the "mirroring" in that framework (it looks like much has changed since it was originally taken), then we should be able to run AdvanceMESS in mirrored mode.

That would rock!   :D
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: lustreking on November 03, 2005, 05:52:57 pm
Spartan,

Sent you a PM.

-S
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: Spartan on November 11, 2005, 12:21:48 pm
Some have asked me how I got a black bar between the 2 images:

In scale.c around line 685 change:

Code: [Select]
UINT8 *dst0_next = dst + (height-1) * dst_pitch;
UINT8 *dst1_next = dst + (height-1) * dst_pitch;

to

Code: [Select]
UINT8 *dst0_next = dst + (height-2) * dst_pitch;
UINT8 *dst1_next = dst + (height) * dst_pitch;

...and do the same thing to the else portion.
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: juggle50 on November 13, 2005, 04:04:05 am
Hey guys,

I'm really excited about this and can't wait to get it on my cocktail table.  Unfortunately, I've never complied anything before but am excited about giving it a try but am a bit confused.  Am I correct in understanding you guys, that this overwrite will definately not work for the current mameplus.  If that's true, do you know anywhere that I can get mameplus 97.  LIke I said I'm stoked about this.  I just don't think I can figure out the code changes myself.
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: juggle50 on November 13, 2005, 04:09:35 am
Whoops, for some reason this thread didn't get bumped up on my reply
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: Spartan on November 13, 2005, 10:44:45 am
Hey guys,

I'm really excited about this and can't wait to get it on my cocktail table.  Unfortunately, I've never complied anything before but am excited about giving it a try but am a bit confused.  Am I correct in understanding you guys, that this overwrite will definately not work for the current mameplus.  If that's true, do you know anywhere that I can get mameplus 97.  LIke I said I'm stoked about this.  I just don't think I can figure out the code changes myself.

Read the thread a little closer.  I posted that I definately got it going with version 101.
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: juggle50 on November 13, 2005, 12:14:30 pm
Hey Spartan,

I got the impression that you got it working with 101.  However, lokki indicated that there would need to be changes to the overwrite with versions post 97.  I was wondering if you made any alterations to the overwrite (besides the black line, that sounds cool)  or if you kept the original attachement as is.  Thank you for your help  :)
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: lokki on November 13, 2005, 08:21:33 pm
Hi,
I was under the impression that more changes would be required. But looks like this was not the case after all. the changes look pretty straightforward to make.

Apparently there where some changes in properties.c but not sure spartan figured that out or just ignored it.  (not needed if you are just using the command line version).

Regarding the black line... do you loose two lines at the bottom?




Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: juggle50 on November 14, 2005, 04:26:46 pm
Hey lokki,

I'm trying to compile everything and I'm having troubles. (This is the first time I've tried compiling.)  I can't seem to get env.bat to open or run.  I've tried editing it as it said in the directions on Mameplus.  Any ideas? 
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: Spartan on November 16, 2005, 01:03:16 pm
Hi,
I was under the impression that more changes would be required. But looks like this was not the case after all. the changes look pretty straightforward to make.

Apparently there where some changes in properties.c but not sure spartan figured that out or just ignored it.  (not needed if you are just using the command line version).

Regarding the black line... do you loose two lines at the bottom?

I suppose it is possible that I did lose two lines at the bottom.  I'm not sure I really care, though.



Quote
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: juggle50 on November 17, 2005, 03:37:28 am
Hey guys,

Sorry for the dumb question.  I spent an afternoon learning a bit more about compiling and found these excellent directions on how to compile mameplus with no errors. 

www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=43088&page=1&view=expanded&sb=5&o=&fpart=1&vc=1

Anyway, as you said, everything works perfect with the command line version.  Thank you guys for this it's really cool.  If you ever find what changes are neccesary to make to the properties c doc please let me know, it would be great to have the gui version as well.

thanks again
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: lokki on November 18, 2005, 06:28:24 pm
Hi,
I was under the impression that more changes would be required. But looks like this was not the case after all. the changes look pretty straightforward to make.

Apparently there where some changes in properties.c but not sure spartan figured that out or just ignored it.
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabin
Post by: juggle50 on November 23, 2005, 01:55:08 am
Hey guys, another question about this.

When I got everything working on my workstation laptop everything was great but when I moved it to my cab I get a huge loss in performance 18 - 20fps.  I am using:

Trident acclerator 3d blade
WG u3100
Athalon 2800

I know the Trident video card isn't the greatest but works excellently with my monitor.  I do have to change the resolution to 800x600 to get this build to run.

Is there something that I can do to enhance the performance without changing out the hardware?

Thank you
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: mortacci on March 29, 2006, 03:29:11 pm
Hello all, I would like to revisit this topic because I am interested in getting the mirror affect to work in mameplus version 104update5. I am sure all would to because this new version lets you have independent mice which is nice to have in a cocktail cabinet. 

Has anyone done any updates on this? If Lokki is still arround maybe you could help.

Much appreciated.

Thanks, Mortacci
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: patito on August 04, 2013, 03:12:30 pm
im sorry to bumb this,but theres any chance to get this mod working on a more current mame version? thanks!
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: Haze on August 04, 2013, 10:53:05 pm
im sorry to bumb this,but theres any chance to get this mod working on a more current mame version? thanks!

it requires no special mods with current MAME.

tab menu

video options
cocktail

Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: patito on August 05, 2013, 12:00:37 am
im so stupid :).

whats the command line to start games in cocktail mode rotated 90?

thanks haze
Title: Re: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)
Post by: Haze on August 05, 2013, 01:24:52 am
im so stupid :).

whats the command line to start games in cocktail mode rotated 90?

thanks haze

 -view cocktail -rol

should do the trick