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: Mirror effect for MAME Plus (mirrored images for Head to Head cocktail cabinet)  (Read 8986 times)

0 Members and 1 Guest are viewing this topic.

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:June 29, 2017, 12:57:48 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



gregor7777

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 91
  • Last login:March 14, 2022, 04:07:00 pm
  • I'm your huckleberry. Say When...
nice, thanks!

mortacci

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:July 29, 2013, 10:53:04 pm
  • I want to build my own arcade controls!
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?

lustreking

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 100
  • Last login:October 11, 2021, 08:43:06 am
  • One Louder
Bump. 

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

-Steve

Spartan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:December 02, 2009, 07:09:38 pm
  • I like stuff!
    • The Municade
Holy cow -- this is AWESOME!  I'll give it a go with the latest source tonight!   :o

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:June 29, 2017, 12:57:48 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
« Last Edit: November 01, 2005, 05:36:21 pm by lokki »

Spartan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:December 02, 2009, 07:09:38 pm
  • I like stuff!
    • The Municade
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  :-\

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:June 29, 2017, 12:57:48 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.

Spartan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:December 02, 2009, 07:09:38 pm
  • I like stuff!
    • The Municade
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  :'(

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:June 29, 2017, 12:57:48 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....


Spartan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:December 02, 2009, 07:09:38 pm
  • I like stuff!
    • The Municade
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)
« Last Edit: November 02, 2005, 12:13:18 am by Spartan »

Spartan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:December 02, 2009, 07:09:38 pm
  • I like stuff!
    • The Municade
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

lustreking

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 100
  • Last login:October 11, 2021, 08:43:06 am
  • One Louder
Spartan,

Sent you a PM.

-S

Spartan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:December 02, 2009, 07:09:38 pm
  • I like stuff!
    • The Municade
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.

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:June 25, 2022, 02:46:08 pm
  • Your either on the bus or off the bus
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.

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:June 25, 2022, 02:46:08 pm
  • Your either on the bus or off the bus
Whoops, for some reason this thread didn't get bumped up on my reply

Spartan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:December 02, 2009, 07:09:38 pm
  • I like stuff!
    • The Municade
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.

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:June 25, 2022, 02:46:08 pm
  • Your either on the bus or off the bus
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  :)

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:June 29, 2017, 12:57:48 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?





juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:June 25, 2022, 02:46:08 pm
  • Your either on the bus or off the bus
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? 

Spartan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:December 02, 2009, 07:09:38 pm
  • I like stuff!
    • The Municade
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
« Last Edit: November 17, 2005, 12:55:11 pm by Spartan »

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:June 25, 2022, 02:46:08 pm
  • Your either on the bus or off the bus
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

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:June 29, 2017, 12:57:48 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.

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:June 25, 2022, 02:46:08 pm
  • Your either on the bus or off the bus
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

mortacci

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:July 29, 2013, 10:53:04 pm
  • I want to build my own arcade controls!
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

patito

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:November 27, 2013, 11:18:54 pm
  • I want to build my own arcade controls!
im sorry to bumb this,but theres any chance to get this mod working on a more current mame version? thanks!

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
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


patito

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:November 27, 2013, 11:18:54 pm
  • I want to build my own arcade controls!
im so stupid :).

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

thanks haze

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
im so stupid :).

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

thanks haze

 -view cocktail -rol

should do the trick