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 118735 times)

1 Member and 2 Guests are viewing this topic.

holmes

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:May 20, 2024, 05:07:22 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #280 on: April 28, 2024, 03:13:39 pm »
Thanks! I like Super Gt 24h and was very disappointed to not being able to play it on LAN.

Francesco75

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:May 01, 2024, 09:45:28 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #281 on: April 28, 2024, 04:34:31 pm »
Thank you very much SailorSat, what you are doing for model2emu is really fantastic and even more so the sharing you are doing.
I'm trying to integrate Daytona into my twin cab driven by two PCs. I have added a third pc with two attached monitors, planning to dedicate it as a spectator pc (live cam and stats).
1) is it correct to have the only master in the spectator pc as a special cab so Player 1 and Player 2 will be both slaves?
2) is it possible to have virtual cam and stats on a 2 only linked players instead of 8?
3) assuming my win10 pcs are 192.168.0.161 (spectator pc), 192.168.0.162 (player1), 192.168.0.163 (player2) what are the right per machine configurations files? I'm really a bit lost, and also is not clear if i have to execute the lagfix only on the spectator pc or on all my 3 machines.
Any help will be appreciate.
« Last Edit: April 29, 2024, 01:30:31 pm by Francesco75 »

anchounio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 122
  • Last login:April 30, 2024, 09:25:47 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #282 on: April 30, 2024, 07:23:47 am »
Thank you SailorSat !! 
I've been waiting for this upgrade for years !
love you :)

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1763
  • Last login:June 05, 2024, 07:42:16 pm
  • Is running at 15kHz
Re: fooling with m2emu network
« Reply #283 on: June 03, 2024, 11:52:30 pm »
So... finaly made patch of 1.1a (multicpu) that fixes the "newer" games' network initialization. (no more service-menu reset shenanigans)

Sega Ski Super G
SuperGT 24h
OverRev
Sega Touring Car Challenge
Wave Runner

called 1.1b

Gee, that's awesome. I'd love to get this running with STCC

I must admit to always being in the dark as to how to actually use this. I never got the original lagfix working either. Is there a guide to starting from scratch with the rom and the emu, and going from there? Can i just run one version of emu/lagfix and run all M2 games from it?


MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1064
  • Last login:Yesterday at 11:51:20 am
  • As I pass, do I give you the ass or the crotch?
Re: fooling with m2emu network
« Reply #284 on: June 04, 2024, 12:25:43 pm »
I must admit to always being in the dark as to how to actually use this. I never got the original lagfix working either. Is there a guide to starting from scratch with the rom and the emu, and going from there? Can i just run one version of emu/lagfix and run all M2 games from it?

Likewise, I kept meaning to look through the thread to try and figure it out, but I left it a bit too late and the thread got bigger and bigger and then I moved onto other things. A quick start write-up from someone that knows what they're doing with it would be ace!

jorgenjl2

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 124
  • Last login:Today at 03:30:46 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #285 on: June 08, 2024, 10:27:35 pm »
I must admit to always being in the dark as to how to actually use this. I never got the original lagfix working either. Is there a guide to starting from scratch with the rom and the emu, and going from there? Can i just run one version of emu/lagfix and run all M2 games from it?

Likewise, I kept meaning to look through the thread to try and figure it out, but I left it a bit too late and the thread got bigger and bigger and then I moved onto other things. A quick start write-up from someone that knows what they're doing with it would be ace!
I third this. My 4 player racing cabinet has flashing cars on Daytona and I am not sure what is wrong with this. At one point in the thread someone says to use similar to what I have below, another person says the network ini should point to another pc instead of the local pc, and at another point someone says the port should be 9000 instead of 9002. So a quick guide or find/replace file for 2p, 3p, and 4p options would be very helpful. Here is what I have but it does not work.

Code: [Select]
Racer1 (192.168.0.2)
--m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.2
NextPort=9002
FrameSync=1

--m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.2
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.2
LocalPort=9002
RemoteHost=192.168.0.3
RemotePort=9000


--racer2

--m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.3
NextPort=9002
FrameSync=1

--m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.3
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.3
LocalPort=9002
RemoteHost=192.168.0.4
RemotePort=9000


--racer3
[Network]
RxPort=9001
NextIP=192.168.0.4
NextPort=9002
FrameSync=1

[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.4
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.4
LocalPort=9002
RemoteHost=192.168.0.5
RemotePort=9000


--racer4
[Network]
RxPort=9001
NextIP=192.168.0.5
NextPort=9002
FrameSync=1

[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.5
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.5
LocalPort=9002
RemoteHost=192.168.0.2
RemotePort=9001

jorgenjl2

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 124
  • Last login:Today at 03:30:46 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #286 on: June 08, 2024, 10:38:20 pm »
GPT4o says to try this so I will give it a shot tomorrow. It has the ip's pointing to the next player unlike some other references in the thread I could have sworn said to first point at itself in the network ini and then the m2lagfix ini points to the next ip later. Obviously I could have been mistaken. Anyhow i will give it a shot.

Code: [Select]
# Racer 1 (192.168.0.2)

-- m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.3
NextPort=9002
FrameSync=1

-- m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.3
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.2
LocalPort=9002
RemoteHost=192.168.0.3
RemotePort=9000


# Racer 2 (192.168.0.3)

-- m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.4
NextPort=9002
FrameSync=1

-- m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.4
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.3
LocalPort=9002
RemoteHost=192.168.0.4
RemotePort=9000


# Racer 3 (192.168.0.4)

-- m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.5
NextPort=9002
FrameSync=1

-- m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.5
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.4
LocalPort=9002
RemoteHost=192.168.0.5
RemotePort=9000


# Racer 4 (192.168.0.5)

-- m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.2
NextPort=9002
FrameSync=1

-- m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.2
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.5
LocalPort=9002
RemoteHost=192.168.0.2
RemotePort=9000

bandicoot

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 117
  • Last login:Today at 08:24:59 am
Re: fooling with m2emu network
« Reply #287 on: June 09, 2024, 08:08:16 am »
you must test this

# Racer 1 (192.168.0.2)

-- m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.3
NextPort=9001
FrameSync=1

-- m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.3
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.2
LocalPort=9002
RemoteHost=192.168.0.3
RemotePort=9000


# Racer 2 (192.168.0.3)

-- m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.4
NextPort=9001
FrameSync=1

-- m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.4
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.3
LocalPort=9002
RemoteHost=192.168.0.4
RemotePort=9000


# Racer 3 (192.168.0.4)

-- m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.5
NextPort=9001
FrameSync=1

-- m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.5
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.4
LocalPort=9002
RemoteHost=192.168.0.5
RemotePort=9000


# Racer 4 (192.168.0.5)

-- m2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.2
NextPort=9001
FrameSync=1

-- m2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=192.168.0.2
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=192.168.0.5
LocalPort=9002
RemoteHost=192.168.0.2
RemotePort=9000

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1219
  • Last login:Today at 01:34:12 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #288 on: June 09, 2024, 12:47:07 pm »
Long Story short...

Start withOUT m2lagfix in the first place.

Grab a copy of the patched m2emulator from http://files.arianchen.de/m2em/emulator_multicpu_11b.zip
( might want to rename it instead of replacing the existing one )

Turn on FrameSync in m2network.ini

If using ONE machine set your RXPort and NextPort
If using MULTIPLE machines only set NextIP the next machine
-- Test your ---steaming pile of meadow muffin--- --


Known issues:

Random Freezes
IF you get random "freezes" for about 2 seconds, you might need lagfix.
This happens when packets are lost somewhere. You can try to fix this with m2lagfix.

Sega Rally timer goes haywire
The timer in Sega Rally acts up in multiplayer for unknown reason - Grab a copy of https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/srallyc.lua and put it in your scripts folder.

Indy500 or motoraid show NETWORK ERROR
If Indy500 or MotorRaid error out, you might give the "error patch"-scripts a try.
https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/indy500d.lua
https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/motoraid.lua

Flickering cars (in any game)
No reliable fix known - Works fine if the network is forcefully slowed down, but causes audio stuttering.
Need to "fix" the timers in m2em at some point.
Likewise turning on V-SYNC and running the game at 58Hz helps something, while breaking audio.



M2lagfix should only be used if packets are lost and for splitting off a datastream for my custom daytona live spectator.
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1219
  • Last login:Today at 01:34:12 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #289 on: June 09, 2024, 12:47:21 pm »
Games tested...
GameRomset2 Players4 Players4 Players + Spectator8 PlayersNotes
Daytona USA (Saturn Ads)daytonasfinefinen/afine
ManxTT Superbike (Rev D, Deluxe)manxttfinefinefinefinesometimes glitches out in race - works fine on next try
Motor Raidmotoraidfinefinefinen/a
Sega Rally Championshipsrallycfine*fine*fine*n/ause lua script to fix timer
Indianapolis 500 (Rev A, Twin, Newer rev)indy500finefine*fine*fine*spectator = slave
Indianapolis 500 (Rev A, Deluxe)indy500dfinefine*fine*fine*use lua script for reliable connection - mostly works, sometimes gets stuck on transmission selection -- spectator = slave
Over Rev (Model 2B)overrevbfinefinen/an/a
Over Revoverrevfinefinen/an/a
Super GT 24hsgt24hfinemeh*n/an/agets stuck on link screen most of the time.
Sega Touring Car Championshipstccfinefinefinefineuse lua script for reliable link
Wave Runnerwaverunrfinefine*n/an/ause lua script for reliable link
« Last Edit: Yesterday at 10:22:36 pm by SailorSat »
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


jorgenjl2

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 124
  • Last login:Today at 03:30:46 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #290 on: June 09, 2024, 02:15:25 pm »
Long Story short...

Start withOUT m2lagfix in the first place.

Grab a copy of the patched m2emulator from http://files.arianchen.de/m2em/emulator_multicpu_11b.zip
( might want to rename it instead of replacing the existing one )

Turn on FrameSync in m2network.ini

If using ONE machine set your RXPort and NextPort
If using MULTIPLE machines only set NextIP the next machine
-- Test your ---steaming pile of meadow muffin--- --


Known issues:

Random Freezes
IF you get random "freezes" for about 2 seconds, you might need lagfix.
This happens when packets are lost somewhere. You can try to fix this with m2lagfix.

Sega Rally timer goes haywire
The timer in Sega Rally acts up in multiplayer for unknown reason - Grab a copy of https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/srallyc.lua and put it in your scripts folder.

Indy500 or motoraid show NETWORK ERROR
If Indy500 or MotorRaid error out, you might give the "error patch"-scripts a try.
https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/indy500d.lua
https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/motoraid.lua

Flickering cars (in any game)
No reliable fix known - Works fine if the network is forcefully slowed down, but causes audio stuttering.
Need to "fix" the timers in m2em at some point.
Likewise turning on V-SYNC and running the game at 58Hz helps something, while breaking audio.



M2lagfix should only be used if packets are lost and for splitting off a datastream for my custom daytona live spectator.
Thanks for this. To clarify, m2lagfix only fixes “freezes” of the game and doesn’t fix the cars flashing? What does the patched emulator do and is that only needed for games other than Daytona USA (since I have never had any issues with network on regular besides the flashing/flickering cars). The flickering cars are pretty bad though so I will have to look at your old Daytona videos and see if it is anything like mine. Do you think it is worth trying jumbo frames or will that not help?

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1219
  • Last login:Today at 01:34:12 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #291 on: June 09, 2024, 02:50:09 pm »
As for the patched emulator - It introduces a small delay to the network intialization code.
this in practice only affects model2b and model2c games.

those newer games start the comm board and THEN setup the comm parameters afterwards.
real comm hardware takes some time to do a self test - the emulation did not, hence it would start up as "slave" by default.
in the past people cheatet their way in by entering and leaving service mode in the right moment - that is no longer needed.

I've had jumbo frames enabled for the longest time (for performance reasons actually), but had to disable them when I added the NPCAP-protocol.
--

as for the flickering cars in daytona...
on my development machine cars don't flicker at all - doesn't matter if 2 or 8 players
on my 8 player setup, some cars do flicker... like ONE of the 8 cabinets has flickering cars, the others dont - in other instances, only one car is flickering on all cabinets, while the others are fine.

--

long story short, the network code still isn't working correctly.
having dug into the binary for some time now, there are two possible issues right now.

1. the code runs "async" based on some timer - that timer appears to be off somehow.
if I slow down the video (via vsync) funky stuff happens
if I slow down the network other stuff happens.

2. the network code itself - the "buffer" to be exact
received data is handled different in M2EM to how my implementation in MAME does - as MAME links up absolutely fine in all games and M2EM does not, that "might" be a lead - moving stuff around in binary is a tricky thing though.
« Last Edit: June 09, 2024, 02:54:07 pm by SailorSat »
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


jorgenjl2

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 124
  • Last login:Today at 03:30:46 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #292 on: June 09, 2024, 08:56:44 pm »
As for the patched emulator - It introduces a small delay to the network intialization code.
this in practice only affects model2b and model2c games.

those newer games start the comm board and THEN setup the comm parameters afterwards.
real comm hardware takes some time to do a self test - the emulation did not, hence it would start up as "slave" by default.
in the past people cheatet their way in by entering and leaving service mode in the right moment - that is no longer needed.

I've had jumbo frames enabled for the longest time (for performance reasons actually), but had to disable them when I added the NPCAP-protocol.
--

as for the flickering cars in daytona...
on my development machine cars don't flicker at all - doesn't matter if 2 or 8 players
on my 8 player setup, some cars do flicker... like ONE of the 8 cabinets has flickering cars, the others dont - in other instances, only one car is flickering on all cabinets, while the others are fine.

--

long story short, the network code still isn't working correctly.
having dug into the binary for some time now, there are two possible issues right now.

1. the code runs "async" based on some timer - that timer appears to be off somehow.
if I slow down the video (via vsync) funky stuff happens
if I slow down the network other stuff happens.

2. the network code itself - the "buffer" to be exact
received data is handled different in M2EM to how my implementation in MAME does - as MAME links up absolutely fine in all games and M2EM does not, that "might" be a lead - moving stuff around in binary is a tricky thing though.

It looks like Daytona USA is not a later model b or model c game so I am guessing it won’t help me in my specific case so I will stick with the emulator I am using now. That is good to know if I dive into the other games.

I may try enabling jumbo frames in that case. You just set the mtu (9000?) on the PCs and then the router and that is it? No emulator specific changes right?

Since 8 simultaneous separate instances of m2 emulator running Daytona USA on your one development pc has zero flashing cars, that would probably tell us that the specs of the pc are probably unrelated (unlike SFRush Mame where the emulation lan speed might or might not require heavy spec PCs) and that it is related to sending data over the network. I guess I will just have to deal with the flashing cars. Actually you said only one pc flickers.. is it a pc wirh lower specs or is a random pc each time? I will test again to see what it is like on mine (all besides player 1 flicker or is it only one pc etc).

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1219
  • Last login:Today at 01:34:12 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #293 on: June 10, 2024, 03:19:01 pm »
My gaming setup actually consists of 9 identical machines.

i3-4170
4gb dual-channel DDR3
geforce gt730
GigaBit Ethernet with what used to be 5K jumboframes (as the M2EM sends 4k packets)
running (cloned) win7 installations of 128GB SSD

I tried to keep any differences as small as possible.

Live I've said, my MAME implementation of the network works fine, but -as the time of writing- MAME has several issues with the graphics.
Speed is not an issue at the moment, as these machines run most of the 3D racers MAME supports at way over 120% speed, so there should be enough wiggle room.

I will do a test though, changing the way my code handles received data to how the M2EM does - if it breaks something I shall try to patch M2EM in that regard >_<
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1064
  • Last login:Yesterday at 11:51:20 am
  • As I pass, do I give you the ass or the crotch?
Re: fooling with m2emu network
« Reply #294 on: June 11, 2024, 02:10:46 pm »
Long Story short...

Start withOUT m2lagfix in the first place.

Grab a copy of the patched m2emulator from http://files.arianchen.de/m2em/emulator_multicpu_11b.zip
( might want to rename it instead of replacing the existing one )

Turn on FrameSync in m2network.ini

If using ONE machine set your RXPort and NextPort
If using MULTIPLE machines only set NextIP the next machine
-- Test your ---steaming pile of meadow muffin--- --


Known issues:

Random Freezes
IF you get random "freezes" for about 2 seconds, you might need lagfix.
This happens when packets are lost somewhere. You can try to fix this with m2lagfix.

Sega Rally timer goes haywire
The timer in Sega Rally acts up in multiplayer for unknown reason - Grab a copy of https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/srallyc.lua and put it in your scripts folder.

Indy500 or motoraid show NETWORK ERROR
If Indy500 or MotorRaid error out, you might give the "error patch"-scripts a try.
https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/indy500d.lua
https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/motoraid.lua

Flickering cars (in any game)
No reliable fix known - Works fine if the network is forcefully slowed down, but causes audio stuttering.
Need to "fix" the timers in m2em at some point.
Likewise turning on V-SYNC and running the game at 58Hz helps something, while breaking audio.



M2lagfix should only be used if packets are lost and for splitting off a datastream for my custom daytona live spectator.

Thanks for this Ariane, greatly appreciated! I renamed the patched M2 exe and added it to an existing 4 player M2 single PC setup I've got (and added the frame sync info to the inis) and all seems good with Daytona. I still get a network error with Indy500 and the D version (I've previously had limited success getting it running in multiplayer in regular M2EMU - sometimes it links, sometimes it doesn't. Sometimes it links for a bit then fails after 1 game). I know nothing about LUA -How do you apply the patch for Indy? I tried Googling this, but I can't seem to find a simple answer...

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1219
  • Last login:Today at 01:34:12 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #295 on: June 11, 2024, 02:14:31 pm »
I know nothing about LUA -How do you apply the patch for Indy? I tried Googling this, but I can't seem to find a simple answer...

Just download that script and place it in the "scripts" folder of the emulator.
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1064
  • Last login:Yesterday at 11:51:20 am
  • As I pass, do I give you the ass or the crotch?
Re: fooling with m2emu network
« Reply #296 on: June 11, 2024, 02:25:46 pm »
Hey, thanks for the quick reply - I couldn't see anyway to download it from the links, but I recalled this topic came up before on the form and found the info in another part of this thread and was able to figure out how to make the LUA script from a text file. Indy 500 linking ok now  :)

thanks again!
Edit: Arrghh, no spoke to soon. It looks like it's working initially but it fails without going in game.
« Last Edit: June 11, 2024, 02:30:33 pm by MrThunderwing »

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1064
  • Last login:Yesterday at 11:51:20 am
  • As I pass, do I give you the ass or the crotch?
Re: fooling with m2emu network
« Reply #297 on: June 11, 2024, 02:38:36 pm »
If I click on the link, this is what I get on-screen in attachment one, there's no download option anywhere I can see on screen.

Attachment 2 is what my homemade LUA file looks like though, which I think is the same as what I'd download...? I've put one of these in each of the 4 scripts folder and Indy 500 still gets the network error.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9423
  • Last login:Today at 03:30:37 pm
  • Designated spam hunter
Re: fooling with m2emu network
« Reply #298 on: June 11, 2024, 07:05:51 pm »
If I click on the link, this is what I get on-screen in attachment one, there's no download option anywhere I can see on screen.
Here's an easier link.

https://github.com/SailorSat/daytona-utils/tree/master/src/scripts

- Click on the desired script.

- On the script page, there's a download link.


Scott

jorgenjl2

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 124
  • Last login:Today at 03:30:46 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #299 on: June 11, 2024, 08:16:25 pm »
My gaming setup actually consists of 9 identical machines.

i3-4170
4gb dual-channel DDR3
geforce gt730
GigaBit Ethernet with what used to be 5K jumboframes (as the M2EM sends 4k packets)
running (cloned) win7 installations of 128GB SSD

I tried to keep any differences as small as possible.

Live I've said, my MAME implementation of the network works fine, but -as the time of writing- MAME has several issues with the graphics.
Speed is not an issue at the moment, as these machines run most of the 3D racers MAME supports at way over 120% speed, so there should be enough wiggle room.

I will do a test though, changing the way my code handles received data to how the M2EM does - if it breaks something I shall try to patch M2EM in that regard >_<

That would be awesome.

Here is my testing from earlier:

1) M2lagfix with m2network.ini pointed to local ip = master zero flashing cars. All 3 slaves constant flashing cars
2) M2lagfix with m2network.ini pointed to next ip (gpt4o) = master zero flashing cars. All 3 slaves constant flashing cars
3) Take out m2lagfix and have network.ini point to next ip in ring = master zero flashing cars. All 3 slaves constant flashing cars
4) Change mtu to 9000 for all PCs = won’t get past black connecting to network screens
5) Change mtu to 4000 for all PCs = won’t get past black connecting to network screens
6) Change back to mtu 1500 and reboot = no flashing cars first race for some reason
7) 2nd race = 2nd player flashing cars and then eventually all three slaves flashing cars again
8) Reboot. Same three flashing slaves.

Super-Becker

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 104
  • Last login:Yesterday at 10:01:13 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #300 on: June 12, 2024, 01:11:01 pm »
Everything has been working out for me in the link games on M2. I saw that some colleagues' files have different information than mine:

PC1:
m2network.ini:
[Network]
Rxport=11200
NextIP=PUT PC2 IP HERE
NextPort=44405
FrameSync=1

m2lagfix.ini:
[m2rx]
LocalHost=127.0.0.1
LocalPort=8001
RemoteHost=127.0.0.1
RemotePort=9002
StallDetection=1

[m2tx]
LocalHost=127.0.0.1
LocalPort=9001
RemoteHost=127.0.0.1
RemotePort=8001

[m2stats]
RemoteHost=127.0.0.1
RemotePort=8000

PC2:
m2network.ini:
[Network]
Rxport=44405
NextIP=PUT PC1 IP HERE
NextPort=11200
FrameSync=1

m2lagfix.ini:
[m2rx]
LocalHost=127.0.0.1
LocalPort=8001
RemoteHost=127.0.0.1
RemotePort=9002
StallDetection=1

[m2tx]
LocalHost=127.0.0.1
LocalPort=9001
RemoteHost=127.0.0.1
RemotePort=8001

[m2stats]
RemoteHost=127.0.0.1
RemotePort=8000

I ran the emulator using "EMULATOR.EXE" because "emulator_multicpu.exe" caused some problem that I no longer remember. Now I use SailorSat's multicpu_1.1b which is the best version. I would also like to take this opportunity to thank you: -Congratulations on your work and thank you very much SailorSat!

I don't use any lua scripts from SailorSat.

I always use m2lagfix in linked games. The flashing cars rarely appear for me, and when they do I just close m2lagfix and the emulator, and open them again. I did several random tests to try to find out what favors flashing cars or not, but I didn't come to a conclusion.

I hope I helped someone.

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1064
  • Last login:Yesterday at 11:51:20 am
  • As I pass, do I give you the ass or the crotch?
Re: fooling with m2emu network
« Reply #301 on: June 12, 2024, 02:02:40 pm »
If I click on the link, this is what I get on-screen in attachment one, there's no download option anywhere I can see on screen.
Here's an easier link.

https://github.com/SailorSat/daytona-utils/tree/master/src/scripts

- Click on the desired script.

- On the script page, there's a download link.


Scott

Scott my dude! Thanks for sharing that link, the OG Indy 500 still keeps failing the link a few seconds after connecting, but the LUA script for Indy 500d seems to be creating a nice stable connection. I'm able to drag windows around the screen to reposition them and the link doesn't immediately disconnect, so that's cool.

jorgenjl2

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 124
  • Last login:Today at 03:30:46 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #302 on: June 12, 2024, 07:09:09 pm »
Everything has been working out for me in the link games on M2. I saw that some colleagues' files have different information than mine:

PC1:
m2network.ini:
[Network]
Rxport=11200
NextIP=PUT PC2 IP HERE
NextPort=44405
FrameSync=1

m2lagfix.ini:
[m2rx]
LocalHost=127.0.0.1
LocalPort=8001
RemoteHost=127.0.0.1
RemotePort=9002
StallDetection=1

[m2tx]
LocalHost=127.0.0.1
LocalPort=9001
RemoteHost=127.0.0.1
RemotePort=8001

[m2stats]
RemoteHost=127.0.0.1
RemotePort=8000

PC2:
m2network.ini:
[Network]
Rxport=44405
NextIP=PUT PC1 IP HERE
NextPort=11200
FrameSync=1

m2lagfix.ini:
[m2rx]
LocalHost=127.0.0.1
LocalPort=8001
RemoteHost=127.0.0.1
RemotePort=9002
StallDetection=1

[m2tx]
LocalHost=127.0.0.1
LocalPort=9001
RemoteHost=127.0.0.1
RemotePort=8001

[m2stats]
RemoteHost=127.0.0.1
RemotePort=8000

I ran the emulator using "EMULATOR.EXE" because "emulator_multicpu.exe" caused some problem that I no longer remember. Now I use SailorSat's multicpu_1.1b which is the best version. I would also like to take this opportunity to thank you: -Congratulations on your work and thank you very much SailorSat!

I don't use any lua scripts from SailorSat.

I always use m2lagfix in linked games. The flashing cars rarely appear for me, and when they do I just close m2lagfix and the emulator, and open them again. I did several random tests to try to find out what favors flashing cars or not, but I didn't come to a conclusion.

I hope I helped someone.

I will have to try using the new multicpu1.1b emulator and m2lagfix again since my flashing is pretty bad. What does the m2stats do? I thought that was a 9th (or third in your case?) pc that displays where people are on the track but admittedly I did not really look closely at that part yet.

SailorSat - Do you have a m2lagfix and m2network ini settings you recommend for 2p and 4p so we have a single set of ini’s that we know work? I can try what Super Becker has and try to translate to 4p if having the stats doesn’t hurt anything.

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1219
  • Last login:Today at 01:34:12 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #303 on: June 12, 2024, 09:43:08 pm »
First of all, please don't quote the whole wall of text every time you reply :)
the configuration you've posted does not utilize m2lagfix at all.

m2network.ini #1 receives on 11200 and points to ip2:44405
m2network.ini #2 receives on 44405 and points to ip1:11200



Second... I managed to "fix" the receive code - that seems to fix overrev and sgt24h in 4 player mode (no more glitchfest).
But I found yet another issue... (although that is a good thing, as that might be the initial issue all along)

stay tuned :)

*EDIT*
mhm... I sometimes feel stupid

that "fix" enables OverRev and WaveRunner to boot up quite reliable.
and earlier today I had SGT24H and STCC running with 4 players - I then took a nap.
having changed nothing since, I cant get them to link up anymore.
it feel like once in a 50 restarts, they link up (and play) fine. otherwise they just stay at ther "network check ok!" screen and do nothing.
« Last Edit: Yesterday at 12:28:54 pm by SailorSat »
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1219
  • Last login:Today at 01:34:12 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #304 on: Yesterday at 10:17:51 pm »
Guess it's time to update the initial post in this thread.

Today I bring you... M2EM 1.1c ( grab a copy at http://files.arianchen.de/m2em/emulator_multicpu_11c.zip )
the network code for receiving data has been fixed - this allows most games to link up.
Super GT 24h still feels like gambling for some reason.

On that note - I fixed the script for indy500 and added scripts for waverunr and stcc to boot reliable.
you can find the scripts at https://github.com/SailorSat/daytona-utils/tree/master/src/scripts

( click on the script you want, then click on the download icon in the top right corner )



As for the flickering cars issue...
I now know for sure there is a timing issue!

If I slow down the network even a little bit, basically all error disappear - be it link up issues (without scripts that is) or flickering cars.
Still trying to figure out the timing logic in m2em... so there may be a 1.1d someday.
I'll do some tests on my setup with slowing down the network by "external" ( m2lagfix 2.0? :) ) - as I found the offset for the audio rate, I should be able to fix any stuttering that a slight slowdown would introduce.
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1219
  • Last login:Today at 01:34:12 pm
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #305 on: Today at 03:48:27 am »
Oh dear... Considering Super GT 24h - You need to have them wired "backwards" (or switch the player number of 2 and 4)

PC1 - Player 1 of 4
PC2 - Player 4 of 4
PC3 - Player 3 of 4
PC4 - Player 2 of 4

and yes, did not work in MAME either...
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


Maillouski

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:Today at 07:19:53 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #306 on: Today at 07:19:53 am »
Sailors at, I've been watching this topic since the beginning, it is awesome that you are working again on the flashing cars !