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: fooling with m2emu network  (Read 273605 times)

0 Members and 6 Guests are viewing this topic.

dekkit

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:Today at 09:39:36 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #320 on: October 09, 2024, 07:03:47 am »
Updated 14/5/26 - various edits to the post tl summarise experiences.

Firstly thank you sailorsat for the massive efforts to debug the emulator and try and troubleshoot the network component also to the community for keeping this thread active for one of the best arcade games ever made.

I recently setup another 2 player Daytona emulation rig (with newer hardware ) and was really surprised to see how differently (ie worse) the network performed on the newer rig when compared to my older pair of laptops.

Note: I use a cross-over cable between the two PCs (no hub/ router) to minimise lag.

Original PC Hardware

Old pair of laptops (both running at 640x480 @60hz resolution)
Laptop 1
 2 Cores, @2.26 GHz, Penryn (was master) win7 32-bit
Laptop 2
2 Cores, @1.66 GHz, Merom (was slave) winxp 32-bit

Both had 2GB ram
Using a cross over cable , 100Mbit network (so no jumbo frames)

Performance
Performance was great - with all the recommended settings (network sync =1 and did not need to use the m2 lagfix).  No freezes/pauses, very minimal purple car flickering (occasional after a few races and not enough to spoil the fun)

Newer PC Hardware
A pair of matching/identical HP Elite 8300  'All-in-one' pc's (running at 1920x1080 @60hz)
Were a different story initially but thankfully now are running better (still not as good as the original setup)

i5-3470. @3.6 GHz running on win7 64bit
Cross over cable, 1gb network (originally with jumbo frames =off)

Performance (initial)
The settings I carried over from the original setup resulted in the dreaded 1-2 pause people mention all over this thread but other than that the cars didn't flicker too much if at all - however the in game freezes eally killed the gameplay.  It seemed to happen randomly.  Sometimes not at all but then a few games in a row.

After turning off network sync(=0), and using the m2lagfix it was stable and removed the freezes but introduced a constant heavy flickering of the other players car (seen from p1 and from p2).  Still more playable but hardly fun.
 

Performance (tweak network adaptor + lagfix)
After reverting back to my original settings eg. network sync =1 the problem disappeared for a while until eventually the 2 second freezes returned.

I followed a gaming ' lag reducing' guides to turn off a bunch of network adaptor settings, turned on jumbo frames, changed the network cable ... amended the UDP cache size...and still the 2 second freeze problem persisted but now I do not get any purple car flickering at all.

Using the lagfix again but m2network with network sync on(=1), the freeze now seems to have been reduced to some very minor occasional glitches (like a very brief stutter).  Playing around the m2lagfix settings to see if there is anything can be done with the minor glitches and will update this post in case it helps anyone.
« Last Edit: Today at 08:43:34 am by dekkit »

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1846
  • Last login:Yesterday at 07:45:41 pm
  • Is running at 15kHz
Re: fooling with m2emu network
« Reply #321 on: January 26, 2025, 05:17:45 am »
Sailorsat, sorry to be pain, but do you have outputs working ok with your 1.1c version?  I can see outputs in mamehooker but they never change state.

I was told, ages ago in another thread, that you needed the scripts from https://github.com/njz3/vJoyIOFeederWithFFB/tree/master/gameassets/nebula_m2_1.1 but that dir is 404 now.

EDIT: ok, new location for those scripts found (thanks @vincerplay) and outputs working again - https://github.com/njz3/BFF_gameassets/tree/dd185d82ea3829033a4d99a65767b3a4739778cc/image_njz3/Emulators/Model2%20v1.1a/scripts

I'd love to figure out how to get STCC leader lamps running next, but that looks like it's going to be much trickier.

EDIT2: @vincerplay modified a version of outputblaster to receive outputs from STCC and Sega Rally Champsionship - https://fastupload.io/1b9ad0d3638c2684
That file is all that is needed to get outputs from m2emu 1.1c. It works with the two games listed, does not work with Daytona anymore, and you would need to test other games.
« Last Edit: January 29, 2025, 05:36:43 pm by buttersoft »

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1259
  • Last login:March 26, 2026, 10:41:24 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #322 on: January 31, 2025, 12:32:35 am »
I have outputs for all games in m2em woring, but I use my own tool to get them.

Basically the offset to read them is 'EmulatorEXE + 0x174CF0'

The only Exception is Daytona*, which uses 'M2EM_RAMBASE + 0x824' (and requires the lua patch)

Not very that helpfull I guess.
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1846
  • Last login:Yesterday at 07:45:41 pm
  • Is running at 15kHz
Re: fooling with m2emu network
« Reply #323 on: January 31, 2025, 05:55:48 am »
Not very that helpfull I guess.

I wouldn't say that, it's all interesting :)

Monkee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 169
  • Last login:June 08, 2025, 10:45:43 am
Re: fooling with m2emu network
« Reply #324 on: March 23, 2025, 10:49:25 am »
Just discovered this thread and it sounds great but sadly the download link seems to be down.  :'(

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1259
  • Last login:March 26, 2026, 10:41:24 pm
    • For Amusement Only e.V.
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


Monkee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 169
  • Last login:June 08, 2025, 10:45:43 am
Re: fooling with m2emu network
« Reply #326 on: March 24, 2025, 05:42:45 pm »
Thanks a lot SailorSat! I cannot wait to try all those amazing arcade racers in multiplayer just like in my childhood!  8)

WolfRagnell

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:April 11, 2025, 07:51:45 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #327 on: April 11, 2025, 07:47:43 am »
Sailorsat, sorry to be pain, but do you have outputs working ok with your 1.1c version?  I can see outputs in mamehooker but they never change state.

I was told, ages ago in another thread, that you needed the scripts from https://github.com/njz3/vJoyIOFeederWithFFB/tree/master/gameassets/nebula_m2_1.1 but that dir is 404 now.

EDIT: ok, new location for those scripts found (thanks @vincerplay) and outputs working again - https://github.com/njz3/BFF_gameassets/tree/dd185d82ea3829033a4d99a65767b3a4739778cc/image_njz3/Emulators/Model2%20v1.1a/scripts

I'd love to figure out how to get STCC leader lamps running next, but that looks like it's going to be much trickier.

EDIT2: @vincerplay modified a version of outputblaster to receive outputs from STCC and Sega Rally Champsionship - https://fastupload.io/1b9ad0d3638c2684
That file is all that is needed to get outputs from m2emu 1.1c. It works with the two games listed, does not work with Daytona anymore, and you would need to test other games.


Yo currently adding race leader lights to my setup as I learn the ins and outs. the link for the output blaster sega rally & stcc file is down do you know where else I could find it, or if you could upload it for me? tried searching around to no luck,would love the file especially for sega rally cheers!

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1846
  • Last login:Yesterday at 07:45:41 pm
  • Is running at 15kHz
Re: fooling with m2emu network
« Reply #328 on: May 25, 2025, 12:07:12 am »
Hi @WolfRagnell, i've bene moving househad no time to check the forums. I think Vincerplay & MightyMike updated Boomslangz new OutputBlaster to let M2Emu push outputs to MameHooker. Try Boom's channel in the TeknoParrot Discord.

And my god that sounded like a lot of gibberish even to me. If it doesn't make sense or you still get stuck, msg me in a week or two!

themotherbrain

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:August 18, 2025, 10:26:09 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #329 on: July 20, 2025, 06:15:31 pm »
try https://www.rev-girls.de/m2em/emulator_multicpu_11c.zip

Hi!  :)

I've been setting up my own pair of Daytona racecabs and it has led me here to this thread. I have managed to get everything going just great and I am now just down to the flickering car issue. I have download the 11c multicpu exe and throttle linked in this thread but I do not understand what I am supposed to do with it.

If I am using IP 192.168.1.4 for player 1 and 192.168.1.5 for player 2 could you possibly show me how to add this into my files and what values to use please? I assume I keep these files in the model2link folder. Do I need to have these files running on both pcs? Do I need to download anything else to make this work?

If you wouldn't mind giving a little nudge across the finish line id appreciate it so much! Also I wanted to personally say thanks for working on this emulator!   :notworthy::notworthy: Daytona is one of my absolute favorites and am looking forward to having a bunch more linked up soon! I can't even imagine the effort it takes to figure this stuff out so I want to say I truly appreciate the work you've done!

Many thanks in advance for any help that can be offered!  :cheers:
« Last Edit: July 20, 2025, 07:05:30 pm by themotherbrain »

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 779
  • Last login:May 07, 2026, 02:54:20 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #330 on: August 14, 2025, 04:10:09 pm »
Hi @WolfRagnell, i've bene moving househad no time to check the forums. I think Vincerplay & MightyMike updated Boomslangz new OutputBlaster to let M2Emu push outputs to MameHooker. Try Boom's channel in the TeknoParrot Discord.

And my god that sounded like a lot of gibberish even to me. If it doesn't make sense or you still get stuck, msg me in a week or two!

Do you have further information if they made it work? I'm fighting with the same problem of no state change in m2emu.

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1846
  • Last login:Yesterday at 07:45:41 pm
  • Is running at 15kHz
Re: fooling with m2emu network
« Reply #331 on: August 15, 2025, 05:04:54 am »
Do you have further information if they made it work? I'm fighting with the same problem of no state change in m2emu.

No, i have not set up FFBBlaster yet! And TBH i'm not sure it's meant to cover M2emu, but maybe it is?

I do, however, have outputs working fine with FFBplugin and Outputblaster. All my files for those two elements, and my complete scripts directory from the m2emu folder, are attached. Using these with the 1.1c update by sailorsat gets me working outputs in mamehooker.

MY setup is mostly aimed at STCC as that game is my fav, so you might need to try the different DLL files in there and see. The one with ronames in the title will give individual rom ini's in mamehooker, not just the generic m2emu.ini or whatever it is that covers all roms.

ddraigcymraeg

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:September 04, 2025, 12:08:09 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #332 on: September 04, 2025, 10:17:20 am »
Hi All,
The original link to M2lagfix download just hangs for me. Can anyone provide another link? Thanks.
Just catching up with all the work done here great job! Looking to get Sega Ski Super G to work for 2 players 4 tops, as well as the other games.

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1846
  • Last login:Yesterday at 07:45:41 pm
  • Is running at 15kHz
Re: fooling with m2emu network
« Reply #333 on: September 05, 2025, 09:13:59 pm »
Is M2lagfix still needed with the 1.1c version of the emulator and framesync enabled? I'm not saying it's not, just asking...

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1259
  • Last login:March 26, 2026, 10:41:24 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #334 on: September 06, 2025, 04:50:34 pm »
don't think so.
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


vertex

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:October 27, 2025, 09:07:40 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #335 on: September 16, 2025, 11:00:48 am »
Do you have further information if they made it work? I'm fighting with the same problem of no state change in m2emu.

No, i have not set up FFBBlaster yet! And TBH i'm not sure it's meant to cover M2emu, but maybe it is?

I do, however, have outputs working fine with FFBplugin and Outputblaster. All my files for those two elements, and my complete scripts directory from the m2emu folder, are attached. Using these with the 1.1c update by sailorsat gets me working outputs in mamehooker.

MY setup is mostly aimed at STCC as that game is my fav, so you might need to try the different DLL files in there and see. The one with ronames in the title will give individual rom ini's in mamehooker, not just the generic m2emu.ini or whatever it is that covers all roms.

Using your m2emu files and the Sailorsat version, Mamehooker works, but when I exit, sometimes the lights stay on. I have to close Mamehooker and restart it. This doesn't happen with Mame. Is there a specific reason for this? Or is there a way to fix it?
mamehooker keeps listening to m2emu outputs, but exiting it doesn't delete the information and sometimes the lights stay on.

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1846
  • Last login:Yesterday at 07:45:41 pm
  • Is running at 15kHz
Re: fooling with m2emu network
« Reply #336 on: September 16, 2025, 07:37:20 pm »
when I exit, sometimes the lights stay on. I have to close Mamehooker and restart it. This doesn't happen with Mame. Is there a specific reason for this? Or is there a way to fix it?

Firstly, glad to hear you got it working :)

Secondly, sometimes the lights stay on. I imagine it's because when you exit, the game never sends a message to your arduino or whatever turn off the output. Happens to me with most games. MAME must have a close protocol that sends a 0 or something. And Mamehooker must do so on startup, or just re-initialise the arduino or something.

If you really needed to do something about it, you could write an autohotkey script that fires each time you close a problem game, and closes and re-opens mamehooker... That would be the simplest way i can think of to do it. Or maybe your frontend could do it for you, IDK.
« Last Edit: September 16, 2025, 07:39:51 pm by buttersoft »

dekkit

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:Today at 09:39:36 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #337 on: Today at 09:28:10 am »

what my "m2lagfix"-tool does
  • check status of header; the tool won't do anything until status-2 is reached.
  • received frames get buffered, sent to the emulator and (if enabled) a copy is sent to the "control tower"
  • if the emulator does NOT respond within 64ms, the buffered frame will be sent to the emulator again.
  • double-frames sent by the emulator will be split to get rid of "lost" frames.
  • if no frame gets received in 256ms, we have a network stall. (nothing will be done)
each event gets noted in a log file. no response in 64ms = LAG; double frames = DOUBLE; network stall = STALL


Hi Sailorsat - apologies for digging up an old post but I've been going thru the code of the m2lag fix and just want to check if the version on the GitHub is the latest version of your vb code? 

I couldn't see anything in the code the handles the double frames condition (or writes something  to the log when it sees a double). Also the value for the stall condition seems different to your post (128ms vs 256ms unless I read it wrong)?

Do you recommend using the Throttle=1 line in the ini if using lagfix on all cars/ emulator instances? 

 I'm thinking it might be inadvertently causing some glitching in my setup which has lagfix running on each car

Eg when throttle = 1
 car 1 - emulator doesnt send a packet in 128ms, so lagfix detects a throttle and sends a dummy packet for car 2.
Car 2 - meanwhile lagfix on car 2 also realises it didnt receive a packet in 64ms (the LAG condition), so lagfix also creates it's own dummy packet  and sends it to the car 2 emulator
Car 1 - meanwhile car 1 emulator now sends a new 'real' UDP packet which lagfix then immediately sends to car 2.

If I've read the code correctly, is it possible that the car 2 emulator could receive a burst of 3x UDP packets in quick succession (possibly with conflicting information) when throttle =1 and each car has its own instance of lagfix?

Source code for lagfix link: https://github.com/SailorSat/m2lagfix

Lagfix is a smart workaround, many thanks for sharing the source code