The NEW Build Your Own Arcade Controls

Main => Driving & Racing Cabinets => Topic started by: SailorSat on July 07, 2013, 10:04:59 am

Title: fooling with m2emu network
Post by: SailorSat on July 07, 2013, 10:04:59 am
Hi Folks :)

I've recently upgraded my 4 player setup (http://www.thomas-daden.de/artikel/lib/exe/fetch.php/bilder:faoev:fao-2013-06-22:fao-sel-20130622-242-web.jpg) to 8 players and had quite a nice time running daytona with 8 players (though I messed the live screen :)).

As some of you know, the m2 emulator has actually two modes of network emulation, both with some drawbacks.
the default mode is not synched at all. while this works pretty well, it causes flickering cars in daytona, "random" time in sega rally and network errors in pretty much every other game.
 
the alternate mode is synched per frame ("framesync 1" in m2network.ini), this works more stable, but sometimes the game stops for a second or two. as a fun fact, it also hiccups on "solo" mode (linked to itself).
[/list]



So I've started tinkering with the network. I wrote a small tool to "view" the packets and tinker with em.
As it turns out, the whole buffer (8 sets of data) is sent each frame by each unit.
For playing online, this can be optimized a lot by only sending out 1 set of data

Sadly even a 1 player "framesync" setups keeps pausing now and then so my initial focus was to find out why the cars flicker in daytona, and how to get it fixed.
On the other hand, I like to fool around with stuff .)

Well... Long story, short conclusion:
I am able to "fake" an 8 player setup for the client - which is pretty nice as you can literally join the action anytime you want. (and quit if you are in attract mode)
I build some kind of "client server" system for "remote" play. Long term goal would be to link up players around the globe.

(http://images.arianchen.de/misc/hacks/sega_rally_6players.jpg)
As a side effect I discovered sega rally can be played with more than 4 players - though thats more of a glitch .)
For a fact, Car 1 means MASTER, Car 2 to Car 4 mean slave. Each Car Number can be used multiple times.
First glitch - The attract mode shows some bogus sprites for 1 and 5-8 player mode.
Seconds glitch - All Cars with the same number share the same starting point - which will cause a "crash" at start and resulting in everybody getting pushed appart.
Third glitch - Timer goes apeshit right away :)

Other than those, the game itself works fine, you can drive normaly and even see all players on the map.
Title: Re: fooling with m2emu network
Post by: Nuexzz on July 07, 2013, 12:50:43 pm
thanks for working on m2emu network. I trust that you can fix it and play with players around the world to daytona usa and not see the cars flashing more.

thank you very much SailorSat  :notworthy: :notworthy:
Title: Re: fooling with m2emu network
Post by: SegaOutrun on July 07, 2013, 01:02:10 pm
sweet. keep up the good work
Title: Re: fooling with m2emu network
Post by: Nuexzz on July 07, 2013, 03:48:16 pm


We can do some online testing tool in beta version?
Title: Re: fooling with m2emu network
Post by: Brian74 on July 07, 2013, 04:55:24 pm
I'm in for some testing.

Sent from my Nexus 7 using Tapatalk 2

Title: Re: fooling with m2emu network
Post by: isamu on July 07, 2013, 06:32:29 pm
Sailorbot that is VERY exciting news. Glad to see someone picking up the network emulation in Model 2 and improving it. If you get it to where we can all play Daytona and Sega from all around the world with minimal lag and a nice GUI and lobby system, there's gonna be quite a few of us Sega heads that's gonna jump on this! Keep us posted buddy!!!
Title: Re: fooling with m2emu network
Post by: SailorSat on July 08, 2013, 02:32:23 am
What I can say for now is - the flickering cars are "out of order" frames.
Just overwriting the frame numbers DOES work and fix the flicker, however we get problems with the attract mode and track selection.

Goal for now is figuring out the "header" (first 32bytes of each frame). It contains a system state, a game state, and a message group.
First thing however was/is to "patch" the emulator itself to not send "M2EM" with every packet .) don't know if the real hardware sends a head (most likely SEGA).
Title: Re: fooling with m2emu network
Post by: Nuexzz on July 08, 2013, 12:24:55 pm
Here I leave some research I did, if you can help

1) NO CARS collide. VALUE = 1       
Code: [Select]
RAMBASE+A0A10A4
-----------------------------------------------------------------------------------------------------------------------------------------

2) DETERMINE AMOUNT OF CARS RIVALS. VALUE = 0 TO 39     
Code: [Select]
RAMBASE+A0A3220
(http://i.imgur.com/yYFx9Sh.jpg)


Table
Title: Re: fooling with m2emu network
Post by: Nuexzz on July 08, 2013, 02:33:43 pm
SPEED CAR (HORNET) MAY INCREASE AND DECREASE.   
Code: [Select]
RAMBASE+A1551D4
Title: Re: fooling with m2emu network
Post by: ant2 on July 09, 2013, 03:33:50 am
Good job. Be great to play those racers online :)
Title: Re: fooling with m2emu network
Post by: SailorSat on July 10, 2013, 06:26:56 am
Nah, offline!

(http://images.arianchen.de/daytona/img_6754.jpg) (http://images.arianchen.de/daytona/img_6754.jpg)
DAAY TOOO NAAA ;)

(http://art.penny-arcade.com/photos/215079819_7MHKQ-L-2.jpg) (http://www.penny-arcade.com/comic/2000/10/05)
Title: Re: fooling with m2emu network
Post by: BadMouth on July 10, 2013, 09:10:29 am
Nah, offline!

(http://images.arianchen.de/daytona/img_6754.jpg) (http://images.arianchen.de/daytona/img_6754.jpg)
DAAY TOOO NAAA ;)

Friggin' awesome!  :notworthy:
Title: Re: fooling with m2emu network
Post by: SailorSat on July 14, 2013, 05:59:54 am
hm...
haven't found a reliable way to fix flickering yet.

however I currently read the game state and overwrite the frame number. this fixes flickering though it breaks the timer. if the counter goes too low, i simply stop overwriting the frame number, causing the cars to flicker and the timer to sync up again.
Title: Re: fooling with m2emu network
Post by: Boomslang on July 14, 2013, 08:30:30 pm
keep it up mate! doing great work
Title: Re: fooling with m2emu network
Post by: Nuexzz on July 24, 2013, 06:41:40 pm
any news about the project ?  :dunno
Title: Re: fooling with m2emu network
Post by: SailorSat on July 26, 2013, 07:27:57 pm
Nothing specific.

Still don't understand why I can't renumber the packets without the game going desync.

It IS possible to trick a nineth player into the ring (read only though) which can in turn used to position the camera on several defined spots on the course.
However, I have yet to actually do that .)
Title: Re: fooling with m2emu network
Post by: Xiaou2 on July 28, 2013, 01:27:02 am
I think you have to try to think like the people who built these programs / protocols...

 For example..

 What kinds of things would you need to communicate with the other machines to make everything work?
 What kinds of things could cause problems with communications?
 What effects would happen from missed data?
 What kinds of things could you do to remedy such problems.. keeping the game functionally usable?

 I think that there is an internal timer that each game checks, and communicates with each other.  That way, even if somehow a packet was lost, lagged, or corrupted.. the system would know how to piece the information together to make things work properly.

 It would seem that if theres some sort of lag in one machine.. the others try to compensate by pausing or tossing out data.  ??   Causing the flicker frame issues.

 By changing the data, the game goes ape,  probably because the values are tied into each other.  It might be trying to reverse engineer what actually took place and fix that with a certain process.   Each time theres a communication break, its going to do Something.. because the game needs to know what things are where, to process collisions and keep accurate race positions and finish-line status.

 I would guess that if a systems link got totally busted while multiple racers were at it... after a series of missed connections, it would eventually either give up and create an error / reboot.. or would carry on and start making artificially intelligent assumptions about where things were supposed to be based on last know data... and eventually may realize it would just need to take full control as if it were a single player game.  (either having the cars auto drive at a set pace, cars coast to a stop as if the driver fell asleep, using AI to drive them competitively, or remove them completely)

 Other things to think about... is that if all the machines were turned on at different times...  wouldnt that mean that the scanline timing between all of them would possibly be different between each monitor?  As such,  trying to tie things into frames may be an issue.  Especially since even if a game isnt displaying whats happening.. things are still taking place.

 As such, precise data about  'times'  is going to be very critical, and stamped and tied into everything that is done.

 Some other things to consider...

 - They may take into consideration things like slower cpu processing, due to overheating issues. IE: clogged fans, thermal paste drying out, and or failing caps / components.  Thats common with pc based equipment.. but, not sure how much a factor it is with non pc based machines... or at least, games that are much older that probably didnt have those kinds of issues.

 - Check out other Sega (and non sega) game link protocols... (especially from that time period)  and or look up the programmers that worked on these games.. and see what other games they have dabbled in.  I think one of the guys who worked on a sega game was from the usa.. and did a lot of custom AI coding.

 - Remember that in many Sega games... game timers are different from CPU / motherboard timers.  Game-Time may be completely inaccurate to real-time seconds for example.  The clock could also conceivably speed up or slow down a bit, depending on many factors..  from problems to an actually designed feature.  While each timer may be used differently..  each is also critical in different ways to the way the programs use them.


 Im not a programmer.. as Im not good enough with the abstract thinking and complex math... but the basic foundation of programs are usually rooted in basic logic and reasoning.  The biggest hurdle for arcade games programs, may be in understanding the hardware enough to know why certain things are 'logical and reasonable'...    heh
Title: Re: fooling with m2emu network
Post by: tron84 on August 01, 2013, 12:27:19 am
I use Tungle for online play for Sega model2 & Super model3, link games.  It works like a champ. No slow downs, no hiccups, runs at full speed.
It creates a VPN and I race Daytona with my buddy, yes I do know him.  I am in South Carolina & he moved to Utah.  We have been doing this for two years now, since he moved out there.
Once the VPN is set up & Model2, it rocks.  Online play all the way, no desync's either.
Give it a try, you will love it. Who doesnt like Sega online :)
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 01, 2013, 01:30:08 am
I use Tungle for online play for Sega model2 & Super model3, link games.  It works like a champ. No slow downs, no hiccups, runs at full speed.
It creates a VPN and I race Daytona with my buddy, yes I do know him.  I am in South Carolina & he moved to Utah.  We have been doing this for two years now, since he moved out there.
Once the VPN is set up & Model2, it rocks.  Online play all the way, no desync's either.
Give it a try, you will love it. Who doesnt like Sega online :)

I've actually played daytona online with Tunngle and also with hamachi and found no difference.

tron84@ you are using the line tool (dev) or is beginning simply games m2network.ini settings ?
Title: Re: fooling with m2emu network
Post by: tron84 on August 01, 2013, 01:58:26 am
I use Tungle for online play for Sega model2 & Super model3, link games.  It works like a champ. No slow downs, no hiccups, runs at full speed.
It creates a VPN and I race Daytona with my buddy, yes I do know him.  I am in South Carolina & he moved to Utah.  We have been doing this for two years now, since he moved out there.
Once the VPN is set up & Model2, it rocks.  Online play all the way, no desync's either.
Give it a try, you will love it. Who doesnt like Sega online :)

I've actually played daytona online with Tunngle and also with hamachi and found no difference.

tron84@ you are using the line tool (dev) or is beginning simply games m2network.ini settings ?

I have to change the m2network cfg file: Nextip= to the persons who is hosting VPN IP address to link up.
The host is on master, other on slave and have different car/machine id's. Same region of coarse also.
Title: Re: fooling with m2emu network
Post by: SailorSat on August 01, 2013, 05:10:08 pm
What version of the m2 emu are you using?
Title: Re: fooling with m2emu network
Post by: tron84 on August 02, 2013, 02:15:26 pm
What version of the m2 emu are you using?

It is v1.0, same as other person is using. We are using same roms of coarse.
Title: Re: fooling with m2emu network
Post by: SailorSat on August 02, 2013, 02:45:01 pm
Strange - 1.0 keeps flickering without framesync and hiccuping WITH framesync
Title: Re: fooling with m2emu network
Post by: tron84 on August 02, 2013, 02:56:06 pm
Strange - 1.0 keeps flickering without framesync and hiccuping WITH framesync

I do not have any of those problems, neither does who I race with.  I am using the emulator- multi-cpu app/exe.

here is my config file with the way it is set up.
http://www.filedropper.com/emulator (http://www.filedropper.com/emulator)
Title: Re: fooling with m2emu network
Post by: SailorSat on August 03, 2013, 03:07:41 am
I don't get it.
With that emulator.ini the game keeps flickering like ---steaming pile of meadow muffin---.

Are you playing as MASTER or SLAVE site?
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 03, 2013, 04:43:53 am
if you want to do some testing with Tunngle, I'll be on network called "Game Emulators" in my spare time  8)
Title: Re: fooling with m2emu network
Post by: tron84 on August 03, 2013, 02:48:42 pm
I don't get it.
With that emulator.ini the game keeps flickering like ---steaming pile of meadow muffin---.

Are you playing as MASTER or SLAVE site?

I just recorded a quick lap on bandicam on Daytona ’93. Now recordings are not the best way to show, what is truly going on.  I don’t have flickers and that.  I did not say I was a good driver either.  It runs fine on my system with no flickers.  I dont get why it would flicker on yours? Does not make sense.

video:
http://www.filedropper.com/emulatormulticpu2013-08-0313-35-33-142 (http://www.filedropper.com/emulatormulticpu2013-08-0313-35-33-142)

Then when me & my friend play on it on Tungle we don’t get desync’s.  We talk on mumble when we are racing and have always ask each other what the time was on the screen & where were the cars etc.  It always matched up.  We did a lot of mamehub stuff in the early stages, we know about some desync’s on games.
As far as set up to get going in tungle. In the m2network cfg file.  The NEXTIP=  you set yours to the other persons VIP# that tungle gives you.  They need to do the same.
In tungle once you have it set up & opened/forward port 11155 for tungle. Once you have the room going.  The person who is hosting the game, in model2 they need to be set to Master.  The other person set to slave with a different car #.  Both on same region.  Then you will be linked to race online. Set the cabinets up also.
Title: Re: fooling with m2emu network
Post by: SailorSat on August 03, 2013, 04:49:09 pm
Every game I've tried on network looks like
https://www.youtube.com/watch?feature=player_detailpage&v=t3Ahgo4W7Y4&t=67 (https://www.youtube.com/watch?feature=player_detailpage&v=t3Ahgo4W7Y4&t=67)
(notice the AI cars)
https://www.youtube.com/watch?feature=player_detailpage&v=Dgi5b0TZ46U&t=120 (https://www.youtube.com/watch?feature=player_detailpage&v=Dgi5b0TZ46U&t=120)
https://www.youtube.com/watch?feature=player_detailpage&v=ovmzytkHba4&t=529 (https://www.youtube.com/watch?feature=player_detailpage&v=ovmzytkHba4&t=529)

Online it gets even worse
https://www.youtube.com/watch?v=5M5QjCanbLw (https://www.youtube.com/watch?v=5M5QjCanbLw)
(not my recording)
Title: Re: fooling with m2emu network
Post by: Boomslang on August 05, 2013, 10:03:46 pm
me and my friend tried this a few months ago with a 1gigabit network switch and it still flickered cars etc for us

I tried the framesync=1 thing but it still wasn't perfect

and Supermodel 3 network support has not been added yet so you cannot of played online that way...
Title: Re: fooling with m2emu network
Post by: SailorSat on August 22, 2013, 04:46:38 pm
slightly off-topic
sometimes even 8 players is not enough!

daytona @ gamescom 2013

(http://images.arianchen.de/gamescom/2013/tn_21082013710.jpg) (http://images.arianchen.de/gamescom/2013/21082013710.jpg)
(http://images.arianchen.de/gamescom/2013/tn_22082013729.jpg) (http://images.arianchen.de/gamescom/2013/22082013729.jpg)
Title: Re: fooling with m2emu network
Post by: isamu on August 23, 2013, 09:38:49 am
slightly off-topic
sometimes even 8 players is not enough!

daytona @ gamescom 2013

(http://images.arianchen.de/gamescom/2013/tn_21082013710.jpg) (http://images.arianchen.de/gamescom/2013/21082013710.jpg)
(http://images.arianchen.de/gamescom/2013/tn_22082013729.jpg) (http://images.arianchen.de/gamescom/2013/22082013729.jpg)

Nice. Out of curiosity who organized this event and what was the significance of it?
Title: Re: fooling with m2emu network
Post by: BadMouth on August 23, 2013, 10:40:13 am
More importantly, how much have you spent on steering wheels?  :lol
Title: Re: fooling with m2emu network
Post by: SailorSat on August 23, 2013, 04:18:14 pm
not too much on the wheels... got most for 1€ on ebay.
https://www.facebook.com/photo.php?v=10200496121708323 (https://www.facebook.com/photo.php?v=10200496121708323)

as for the event itself, gamescom is one of the larger european trade fairs, like the e3.
part of that is a whole building for "amusement". got a cosplay village, gokarts and other stuff here.
there usually is a retro game area too, and most of the staff happen to own loads of older stuff, and my club (for amusement only e.v.) has various pinball and video arcade stuff there.
Title: Re: fooling with m2emu network
Post by: Nuexzz on September 15, 2013, 07:48:14 am
What I can say for now is - the flickering cars are "out of order" frames.
Just overwriting the frame numbers DOES work and fix the flicker, however we get problems with the attract mode and track selection.

Goal for now is figuring out the "header" (first 32bytes of each frame). It contains a system state, a game state, and a message group.
First thing however was/is to "patch" the emulator itself to not send "M2EM" with every packet .) don't know if the real hardware sends a head (most likely SEGA).

I found how to completely eliminate attract mode (replaced by display of "awaiting players"without running the counter, I mean freeze)

also delete the track selection screen (with buttons VR key z,x,c,, I can choose the course)

this could be useful to the patch that you did?
Title: Re: fooling with m2emu network
Post by: Nuexzz on September 15, 2013, 08:51:54 am
I found a more elegant way to change the attract mode (Panoramic mode "2 players" also works with "one") and all versions of Daytona USA, also in all modes deluxe, twin, uplight.

ops! also works in single mode. :cheers:
I think sega was decided by the two modes attract and this was "covered" with the original.


(http://i.imgur.com/0YIS04O.jpg)

(http://i.imgur.com/VfejDoQ.jpg)

MODE SINGLE

(http://i.imgur.com/LBh8cul.jpg)

(http://i.imgur.com/ulXsJUN.jpg)
Title: Re: fooling with m2emu network
Post by: SailorSat on September 15, 2013, 10:30:14 am
Hm... Seems interesting enough.
I currently switched focus on getting a stats tool up that shows which games are up and stats.
Title: Re: fooling with m2emu network
Post by: Nuexzz on September 15, 2013, 11:12:22 pm
I'm a little confused. 're discarding the patch of "network" to have full monitoring of the data for each game and read and overwrite "emulator"? .

If This what you mean you can manipulate the game to 100%: such as (reverse mode for all tracks, 16 or more players online, the name of each player above the car and much more.

am I right?
Title: Re: fooling with m2emu network
Post by: BadMouth on September 27, 2013, 04:40:04 pm
Skip to 14:25  :D

Gamescom 2013 Recap by Inside Sim Racing (http://www.youtube.com/watch?v=Oh9b5dmjkY8#)

They showed it briefly in a few other episodes related to GamesCon too.

I haven't watched Inside Sim Racing for a while because they always say things that annoy me.
The last time I quit watching, they were complaining about the sky being too blue in a game.

Title: Re: fooling with m2emu network
Post by: Nuexzz on September 28, 2013, 01:20:14 pm
Skip to 14:25  :D

Gamescom 2013 Recap by Inside Sim Racing (http://www.youtube.com/watch?v=Oh9b5dmjkY8#)



but hey .. the cars do not  flickering in the video!!  :-[
Title: Re: fooling with m2emu network
Post by: SailorSat on September 30, 2013, 02:10:58 am
Sure, framesync was on :)
Either they didn't capture the occosional hiccups, or they just didn't show em .)
Title: Re: fooling with m2emu network
Post by: SailorSat on October 05, 2013, 04:27:42 pm
Sitting here at "HomeConnected <3 You", and spent the whole day analysing Daytona datachunks.

Big news first - I fixed those damn hiccups with framesync 1 - A simple tool between the last slave and the master unit fixed it.

Small bits - Figured out quite a lot of daytonas first 48 bytes.

Code: [Select]
offset meaning
00-03 - SIG (M2EM / SEGA / 0x0000)
04 - NetState (0 = link, 1 = setup, 2 = online)
05 - position 1st (relative to car list)
06 - position 2nd
07 - position 3rd
08 - position 4th
09 - position 5th
0A - position 6th
0B - position 7th
0C - position 8th

0F - Frame Index (counts up)

1A - Node-ID (if hosting a game)
1B - GameStatus

1D - Group

20 - GameStatus
21 - SetupStatus
22 - GameStatus
23 - SetupStatus
24 - 0x81?
25 - car list - 2nd car
26 - car list - 3rd car
27 - car list - 4th car
28 - car list - 5th car
29 - car list - 6th car
2A - car list - 7th car
2B - car list - 8th car
2C - 0x00?
2D - TimeLeft Lo \ 64 per Second
2E - TimeLeft Hi /

D9 - Car ID (red = 00, blue = 01 etc.)
[/cod€]
Title: Re: fooling with m2emu network
Post by: Nuexzz on October 05, 2013, 06:14:17 pm
ops ops! I can not wait to see how it works! thanks to work on the network  :applaud: :applaud: :applaud: :applaud: :applaud:
Title: Re: fooling with m2emu network
Post by: Nuexzz on October 07, 2013, 11:12:51 pm
someone here has tried to set float values ​​in lua? if so please let me know
Title: Re: fooling with m2emu network
Post by: SailorSat on January 21, 2014, 04:17:38 pm
After some rather long delay, we're finally getting somewhere...

(http://images.arianchen.de/tn_daytona-live-proto01.jpg) (http://images.arianchen.de/daytona-live-proto01.jpg)

Actually these are two screenshots in one...

On the bottom you can see two games driving (Red and Blue)
On the top is the "Live" Spectator, one time with Car 2 (left) and the other time with Car 1 (right)

Still a lot room for improvements though.
Currently one needs to "join" the game by hand on the live machine.
Also it only work for games started by slave units, as the live client is master to a virtual network.
Title: Re: fooling with m2emu network
Post by: Nuexzz on January 22, 2014, 05:52:37 pm
a live camera you can disable tilemaps and looks cool.  ;)

RAMBASE+0x1320=11

(http://i.imgur.com/nsBp6nW.jpg)
Title: Re: fooling with m2emu network
Post by: SailorSat on January 23, 2014, 04:42:26 am
a live camera you can disable tilemaps and looks cool.  ;)

RAMBASE+0x1320=11

Haha, nailed it.
Exactly what I was just trying to do :)

Nice find :D
Title: Re: fooling with m2emu network
Post by: SailorSat on January 23, 2014, 05:05:58 pm
M2 LIVE - Daytona USA LIVECAM - Proof of Concept (http://www.youtube.com/watch?v=qIpfD8A23Y4#ws)

still a lot of work to do :)
Title: Re: fooling with m2emu network
Post by: Nuexzz on January 24, 2014, 11:22:14 am
I love their live camera, here I leave a rear camera if you want to integrate this camera turns on all angles of the hornet. Grades can adjust to your taste.

RAMBASE 0 x1835 = 125

Title: Re: fooling with m2emu network
Post by: Boomslang on February 10, 2014, 04:13:51 am
keep us updated!

Sounds really interesting
Title: Re: fooling with m2emu network
Post by: Boomslang on February 28, 2014, 12:53:18 am
Hi

Ive been playing with m2 network games last few days.

Found Daytona USA, Sega Rally, Manx TT, Indy 500 work fine for the most part (Indy 500 can play up a little but works for the most part) however Sega Touring Car doesn't really work at all. If you load it up it will just sit on network checking screen but if you go to test mode on master and go back out of test mode they connect up and will go ingame but can't seem to race each other. It's kinda wierd
Title: Re: fooling with m2emu network
Post by: SailorSat on February 28, 2014, 04:40:25 am
As far as I remember Model2C games don't seem to do anything at all.

Usually the MASTER unit sends out some kind of request and the SLAVES reply to that.
With Model2C (and some 2B games, like Virtua On) the MASTER don't seem to send anything, hence no link is established.

As a fun fact, a friend got a virtua on, and both units have different comm boards on the MASTER and SLAVE unit.
Though I believe there is no real difference software side (game roms are identical) there may be differences on the hardware side.

I just tested your way to link up (service menu) and it actually works... Great find :)
However I get a car conflict - tried to link up 4 players, every player gets car id #4 though they have individual car numbers in service mode.

(http://images.arianchen.de/stcc-4player.jpg)
Title: Re: fooling with m2emu network
Post by: Howard_Casto on February 28, 2014, 04:54:56 am
Hmm... sounds like a bit isn't getting switched somewhere. 
Title: Re: fooling with m2emu network
Post by: Boomslang on February 28, 2014, 03:08:18 pm
Yea I get that car conflict sometimes too but it does connect eventually if you keep trying (I was only doing 2 player) so both get in game. Over rev I got both connecting same method and got in game with each other and could even see each other but it became buggy and car would go invisible then visible a little as it moved. Keep trying and it will get past conflict screen (I have framesync=1)
Title: Re: fooling with m2emu network
Post by: SailorSat on March 06, 2014, 06:04:02 pm
Hehe... We'll see into that later on... need to do a patch for sega rally with more than 4 players while I'm on it.

Behold! Daytona Live Camera is getting somewhere :)
Fixed the problem with Player1 going invisible and "other" cars jumping a little. (yeah!)
However there is a "slight" problem (guess what)

(http://images.arianchen.de/daytona-livecam-03.png)
Title: Re: fooling with m2emu network
Post by: vandale on March 07, 2014, 06:21:20 am
2p is labelled 1p in the live view and vice versa?
Title: Re: fooling with m2emu network
Post by: SailorSat on March 07, 2014, 07:48:35 am
2p is labelled 1p in the live view and vice versa?

exactly :)

the live view always shows a red car for the person i'm spectating. and replaces my "own" car (1p) with the spectated car.
like in this case, I'm spectating car no. 2, still the live cam shows a red "player" (instead blue) and a blue car (labeled 1p) instead of the red car that should be visible.

still, better than not seeing the other car at all :)
Title: Re: fooling with m2emu network
Post by: Nuexzz on March 07, 2014, 10:47:55 am

Fixed the problem with Player1 going invisible and "other" cars jumping a little. (yeah!)


you are saying that fixed the flicker problem in rival cars?
Title: Re: fooling with m2emu network
Post by: SailorSat on March 07, 2014, 11:09:12 am

Fixed the problem with Player1 going invisible and "other" cars jumping a little. (yeah!)


you are saying that fixed the flicker problem in rival cars?

no, just live cam related fixes.

to get rid of jumping rival cars use framesync=1 ^^
Title: Re: fooling with m2emu network
Post by: AMG KC on March 18, 2014, 07:44:11 pm
I will be up for abit of online racing if you get it all up and running.

I used to do alot of racing with a couple guys in Asia years ago on 0.9, was awesome fun.
Title: Re: fooling with m2emu network
Post by: AMG KC on March 23, 2014, 02:38:08 am
Ok, spent a fair bit of time on this all last night, using the online compression tool seemed to give us a near flawless connection on Sega Rally with Framesync=1 turned on, but we had changed a few settings in the dev file as well, that seemed to help. The cars were stable and no lag on the slaves in Sega Rally. In my case, the time clock has always counted down fine in version 1.0 or higher, was very random in 0.8 and 0.9, not that it matters, you get so much time you couldn't possibly care ( unless it glitches and shows 5 seconds when youre miles from a checkpoint and doesn't change back!! )

Daytona however we had minor issues, as always you can just play it that way and its not a playability issue, with Framesync=1 it was flawless for the first race only, then the other player car was slightly jolting back and forward. We did experience the 2 second pause a few times, but once we got things working well, it was about 6 to 10 times over about 50-80 races between both games.

Im interested to know what else can be changed to make the connection stability better, and in particular what was added between last car and master to fix the 2 second pause issue?

We did try going direct using just the emulator network file, however that didn't make it any better, and in the case of Sega Rally seemed to be a bit worse, which affects the slave cars to what I consider unplayable.

We were using a 24 port NETGEAR managed Gigabit switch, the shortest CAT5e cables that would reach, and onboard NICs, with their settings adjusted for the best performance ( that last item made a big difference ) The NETGEAR switch did make a difference over my 8 port DLink non managed Gigabit switch, however that NETGEAR is not exactly cheap either.
Title: Re: fooling with m2emu network
Post by: AMG KC on March 23, 2014, 02:58:59 am

Big news first - I fixed those damn hiccups with framesync 1 - A simple tool between the last slave and the master unit fixed it.
How do you do this? Thanks :)
Title: Re: fooling with m2emu network
Post by: SailorSat on March 23, 2014, 08:33:09 am
(this one could be a little techie ^^)

my current setup:
I recently changed my older switches (2 TP-LINK 8 Port Gigabit) for the bigger one, because of the JUMBO Frame support.


some facts on the original model 2 and model 2A network:
communication is tied to the framerate of the model 2. (58 video FPS = 58 comm FPS)


emulation related stuff:


communication details:
because of this, no more than 8 units are possible in a ring (for now)


something on the header status-byte:
status-2 is the final status; once reached, the game will start

as for the states:

my observations:
i suspect the master unit is forced to send out a frame every like 256 video frames to keep the "ring" alive.

about jumbo frames
theoreticaly this improves the overall performance, however this would be pretty hard to measure anyway

what my "m2lagfix"-tool does
each event gets noted in a log file. no response in 64ms = LAG; double frames = DOUBLE; network stall = STALL

about the games:

random thoughts
Title: Re: fooling with m2emu network
Post by: vandale on March 23, 2014, 01:43:07 pm
thanks for the in-depth technical info, very interesting.

hidden 4th track, how do we access this and do you have screen shots?

keep up the good work.
thanks
Title: Re: fooling with m2emu network
Post by: Nuexzz on March 23, 2014, 02:25:01 pm
you mean this track?

I guess that is the prototype of driving.
Title: Re: fooling with m2emu network
Post by: vandale on March 23, 2014, 04:13:21 pm
you mean this track?

I guess that is the prototype of driving.

hahaha, really?

So disappointed. I thought there was something special hidden away.

Thanks
Title: Re: fooling with m2emu network
Post by: AMG KC on March 23, 2014, 06:04:33 pm
Brilliant info there SailorSat, i will have a good read of that when i get home today :)

Thanks very much!!
Title: Re: fooling with m2emu network
Post by: AMG KC on March 23, 2014, 09:57:44 pm
Ok ive read through, and so far my experiences are basically the same as yours.

One thing i never thought of from playing around 7 years ago was we were all running XP x64, where as ive been running on Windows 7 Pro x64 ever since it came out. I recently made a few registry changes to network adaptor settings that made some significant improvements to some things.

We used to have an average of 3 races on Sega Rally and then close to restart as the slaves would tend to become unplayable during a forth race. I cant remember if we did 3 or 5 lap races at that point.

We did a 6 player race session way back then too, cars 2 and 3 were used twice, and they did have the crazy crash at the start, also causing player 4 to be involved. It never made any difference after the first lap, it was so easy to catch up with the boost anyway that no one really had much hope of getting a solid lead unless the track was too choked up with cars ( which it always did ). We restarted after every race that particular time and never saw slave lag issues.

6 players on Daytona was no issue, except two people wanting to use the orange car so for a couple races we had two number 8s on the track.

Is there somewhere i can download this tool to fix the lag?
Title: Re: fooling with m2emu network
Post by: AMG KC on March 24, 2014, 01:48:28 am
Meant to add earlier on ive got a couple new network items on the way, got an Intel I350T2BLK PCI-Ex4 network card and a TP-LINK TL-SG3424 L2 managed switch, will see how all that goes and do some aggregation testing, if that NIC is as good as it is meant to be I might grab a couple more.

Got a new router coming as well cause the ZTE my provider gives me with the package is somewhat unstable and has a terrible ping when compared to connection through my iPhone 5 hotspot... So I bought a NETGEAR MBRN3000, which by all accounts is pretty good. Got a new 7dBi antenna coming to replace the 3dBi on my roof, should allow me to race against others over seas again.
Title: Re: fooling with m2emu network
Post by: SailorSat on July 31, 2014, 08:24:23 am
Teaser...
Daytona USA - Live Spectator / Statistics W.I.P. (http://www.youtube.com/watch?v=H7z1lypelKs#)

http://images.arianchen.de/temp/daytona_overlay_test.png (http://images.arianchen.de/temp/daytona_overlay_test.png)

nearing "beta" mode :)
Title: Re: fooling with m2emu network
Post by: Nuexzz on July 31, 2014, 11:16:10 am
Teaser...
Daytona USA - Live Spectator / Statistics W.I.P. (http://www.youtube.com/watch?v=H7z1lypelKs#)

(http://images.arianchen.de/temp/daytona_overlay_test.png)

nearing "beta" mode :)

It is really amazing!!   
Title: Re: fooling with m2emu network
Post by: Nuexzz on July 31, 2014, 11:20:20 am
if you are bothered by the needle and mirror, we can remove.

(http://i.imgur.com/FpSii51.jpg)
Title: Re: fooling with m2emu network
Post by: SailorSat on July 31, 2014, 11:44:47 am
That would be superb!
Maybe minimap can be disabled too? :)
Title: Re: fooling with m2emu network
Post by: Howard_Casto on July 31, 2014, 12:56:48 pm
That's some impressive work guys! 

What is there a table with the x/y of the cars in the memory or are you using some other trick?
Title: Re: fooling with m2emu network
Post by: Jitterdoomer on July 31, 2014, 04:02:36 pm
Is the Live Overlay a leftover from Virtua Formula, or you just did by yourself and ripping graphics from it?
Title: Re: fooling with m2emu network
Post by: SailorSat on July 31, 2014, 04:46:53 pm
@Howard: As far as I can tell, daytona does not have a "other car table". (or i have not found it yet)
The map and overlay is drawn from reading the network stream.

@Jitterdoomer: both is true to some extend. daytona shares LOTS of graphics and fonts with virtua racing.
however, the I had to rip some stuff (most likely the "car names" and the "live"-logo) from virtua racing.
Title: Re: fooling with m2emu network
Post by: SailorSat on July 31, 2014, 05:21:28 pm
Dayonta USA - Live Spectator Alpha 3 (http://www.youtube.com/watch?v=1VTsDZNixdM#)

And yeah... source code screenshot ;) (http://images.arianchen.de/for-amusement-only/2014-07/31072014997.jpg) - yeah, that visual basic 6 ^^
Title: Re: fooling with m2emu network
Post by: SailorSat on July 31, 2014, 05:25:09 pm
I'll give it a "public" try on saturday. If nothing to severe happens, I guess I'll upload a beta version next week.
Title: Re: fooling with m2emu network
Post by: Nuexzz on July 31, 2014, 06:40:25 pm
done! completely clean your camera live!
 
Code: [Select]
0x2810= 600 I think I can remove the section of track and car.
slave (live camera) will have a field in the demo up ingame
Title: Re: fooling with m2emu network
Post by: SailorSat on July 31, 2014, 07:10:31 pm
Ah wonderfull :)
2810 turns out to be the Y-Offset
2812 is the X-Offset
this is great :)
Title: Re: fooling with m2emu network
Post by: Jitterdoomer on July 31, 2014, 10:46:42 pm
http://youtu.be/YKUOB8MN4Kc (http://youtu.be/YKUOB8MN4Kc)
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 01, 2014, 01:28:18 am
The menu of the machine live is now more cleaner. You can add a nice "waiting for players" or something  ;D
Code: [Select]
off map                           221B=51
off selectors                   212B=02
off cars in single mode    209B=01


Title: Re: fooling with m2emu network
Post by: SailorSat on August 01, 2014, 02:18:12 am
how the heck do you find all those offsets so fast? :)

this is getting better and better ^^
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 01, 2014, 05:31:58 pm
SailorSat you plan to add fonts with overlapping virtua racing or daytona attract mode, menu and game? if so I think know the address used to read byte
example.
Code: [Select]
xxxx = 1 (attract mode)  if 1 show graphics "link system"
      = 2 (menu)           if 2 show  graphics "waiting for players"
       = 3 (in game)       if 3 show  graphics "that you are currently using for graphics  virtua racing "
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 01, 2014, 11:16:27 pm
yup!
Code: [Select]
[read byte to bits add graphics]


0x43E2=       0-attrac demo
-----------------------------------------------------------------------------------------------
              1-select track
              2-select track
              3-select track
-----------------------------------------------------------------------------------------------
              4-select track/transmission (transition between)
-----------------------------------------------------------------------------------------------
              5-select transmission
              6-select transmission
              7-select transmission
              8-select transmission
              9-select transmission
             10-select transmission
             11-select transmission
-----------------------------------------------------------------------------------------------
             12-select transmission/gentlemen start your engines (transition between)
-----------------------------------------------------------------------------------------------
             13-gentlemen start your engines
             14-gentlemen start your engines
             15-gentlemen start your engines
-----------------------------------------------------------------------------------------------
             16-in game
--------------------------------
Title: Re: fooling with m2emu network
Post by: SailorSat on August 02, 2014, 11:25:48 am
Public testing is looking good so far.

I also ruined my brain cells and made some progress on the camera control.
I have a proof of concept "turn camera towards point x" (great for the hair needle on expert!) and a (pretty funky) "turn and move camera to some point" logic working (great for finish line etc.).
Title: Re: fooling with m2emu network
Post by: SailorSat on August 05, 2014, 04:52:55 pm
If some of you happen to be at GamesCom next week, come over to hall 10.2 (upper floor) and find the daytona at the retro area :)

Hall 10.2 E-041
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 11, 2014, 12:18:04 am
as you see for Spectator / Statistics W.I.P ??
if only I would find as breaking the 3d and put a white background.
Title: Re: fooling with m2emu network
Post by: Howard_Casto on August 11, 2014, 12:59:55 am
Nice.
Couldn't you use the png functions in the lua scripts to draw the map?  That way you could add a background and make it as fancy as you want.  I used lua to draw the cursors in troubleshooter 2... I read the memory locations to get X/Y values and then applied them to the script.
Title: Re: fooling with m2emu network
Post by: SailorSat on August 13, 2014, 12:33:10 pm
Day 1 @ GamesCom 2014:
Got dynamic cameras up and running :)

Daytona USA - Live Spectator Alpha #4 "dynamic cameras" (http://www.youtube.com/watch?v=BAhNh1ggcUI#)
Title: Re: fooling with m2emu network
Post by: SailorSat on August 14, 2014, 05:00:57 pm
Day 2 @ GamesCom 2014:
more camera modes, cleaned up hud, reenabled some 2D elements.

Daytona USA - Live Spectator Alpha #4.5 (B54) (http://www.youtube.com/watch?v=sDc0H6nQTKA#)
Daytona USA - Live Spectator Alpha 5 (B57) (http://www.youtube.com/watch?v=tzHux65GePQ#)
Title: Re: fooling with m2emu network
Post by: vandale on August 15, 2014, 03:55:56 am
Can you set the live spectator to view from the winning car in reverse, ie to see who is behind them but include the car in 3rd person mode, then flick through the whole field of cars each 5 seconds etc?
Title: Re: fooling with m2emu network
Post by: BadMouth on August 15, 2014, 10:15:50 am
Awesome work on the map and spectator cam.
I like the little fans!   :lol
Title: Re: fooling with m2emu network
Post by: SailorSat on August 15, 2014, 01:36:40 pm
I can change the cars, but all cars except the first (which is the live spectators internal car id) will go invisible as soon as they hit anything.

Don't know if nuezz fixed that with daytona++ ^^
Will write some logic for automated camera changes though.
Title: Re: fooling with m2emu network
Post by: Jitterdoomer on August 16, 2014, 03:11:14 am
Nuexzz, can you manage to get the camera pan to a first place car? Because when I saw SailorSat's vid at Gamescom, the camera just pan to Car No. 1, although the Orange car comes into first place.
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 17, 2014, 04:40:21 am
good first have to say that Daytona USA ++ not based on m2emu network even in the next version will aver major advancements as a reverse mode and I'm struggling a lot a lot for the mirror mode but idk if I will achieve.

Secondly I could help find the code for the viewer to follow the car going first, but ... it depends on SailorSat share the code to change all cars spectators  :D

some reverse mode wip (http://i.imgur.com/aK6ujZo.jpg)
Title: Re: fooling with m2emu network
Post by: Jitterdoomer on August 17, 2014, 05:13:19 am
This seems interesting, I'm looking forward for the next version of Daytona USA ++ with Special Edition features and stuff, you and SailorSat were working hard to make this a true Daytona experience!  :applaud: :applaud:
Title: Re: fooling with m2emu network
Post by: MrThunderwing on August 17, 2014, 08:05:50 am
Day 1 @ GamesCom 2014:
Got dynamic cameras up and running :)

Daytona USA - Live Spectator Alpha #4 "dynamic cameras" (http://www.youtube.com/watch?v=BAhNh1ggcUI#)

Great videos SailorSat, looks like a lot of fun.
Title: Re: fooling with m2emu network
Post by: SailorSat on August 18, 2014, 03:21:12 am
Final day at GamesCom - implemented some basic automatic car change.
Every 15 seconds 2nd place will be selected EXCEPT if 2nd place is already on - in that case 3rd place is selected.

Daytona USA - Live Spectator Alpha #7 - Epona ;) (http://www.youtube.com/watch?v=JLFBlc5NfaM#)
Title: Re: fooling with m2emu network
Post by: Howard_Casto on August 18, 2014, 04:37:43 am
Fantastic.  I'm impressed by your work every time I visit this thread. 

You might want to look at the "please wait" mode in Mario Kart 8.  They are doing something very similar to what you are.  Basically it rotates among the players, and the camera follows the car but like yours, it switches to front view when going around corners.  One thing it does do that this one doesn't is you can press a button to manually switch views. 
Title: Re: fooling with m2emu network
Post by: edekoning on August 18, 2014, 10:36:32 am
If some of you happen to be at GamesCom next week, come over to hall 10.2 (upper floor) and find the daytona at the retro area :)

Hall 10.2 E-041

I was there!!!! When I saw the setup I was like: no way ... can I play ... yes I can whoohoo :D Totally awesome racing against 7 other people. Only had to wait for 6min before I could play, shortest queue of the event ;) I also really digged the two big screens showing everyone's position.

The only thing odd I noticed was that there always seemed to be one car that was glitching like hell. All the other were just fine.

I had a blast racing, many thanks for that  :applaud:
Title: Re: fooling with m2emu network
Post by: Xiaou2 on August 18, 2014, 01:49:01 pm
Some really cool work here.  :)

  Im not sure if the game would lend itself well to a this, depending on how they modeled things... but it would be interesting to see a full top-view mode for the Live-Display monitor.   Camera zoomed far back, to fit the entire thing in.

 If not, maybe even make a custom track model snapshot, thats based off a not so usable top view capture.. and place the moving cars models on top of it.

Title: Re: fooling with m2emu network
Post by: SailorSat on August 19, 2014, 06:04:45 pm
So... There are still some things hardcoded (8 player setups only) for now, but I'll aiming for a public release this week.

I found some kind of table in memory with the cars for all network nodes

the start at 0x5180 and seem to be 0x300 bytes long.

so "local" node starts at 0x5180
5184 - node id
519C - car y
51A0 - car z
51A4 - car x
51A8 - pitch
51AC - roll
51B4 - speed
etc.

2nd car starts at 5480
3rd car at 5780

5482 - node 2 id
549C - car 2 y
etc.

nice to know, if i replace a remote node id, it will update the rest by itself. (good for the live cam)

still have to find out how to "control" the camera.
was thinking of adding a 9th car to the table, but i don't know the format of the npc cars yet.
Title: Re: fooling with m2emu network
Post by: vandale on August 20, 2014, 03:01:09 am
So... There are still some things hardcoded (8 player setups only) for now, but I'll aiming for a public release this week.

I found some kind of table in memory with the cars for all network nodes

the start at 0x5180 and seem to be 0x300 bytes long.

so "local" node starts at 0x5180
5184 - node id
519C - car y
51A0 - car z
51A4 - car x
51A8 - pitch
51AC - roll
51B4 - speed
etc.

2nd car starts at 5480
3rd car at 5780

5482 - node 2 id
549C - car 2 y
etc.

nice to know, if i replace a remote node id, it will update the rest by itself. (good for the live cam)

still have to find out how to "control" the camera.
was thinking of adding a 9th car to the table, but i don't know the format of the npc cars yet.

Cool, I cant wait for a release. I have my 15inch LCD ready and waiting to recess into the marquee on my cab  :applaud:
Title: Re: fooling with m2emu network
Post by: SailorSat on August 24, 2014, 10:59:45 am
So after digging into the code (again) i found something nice :)

the car table indeed contains a list of model offsets.

RAMBASE + 0x5194 = model "body"
RAMBASE + 0x53D8 = model "number"

funny enough, the game uses two models for the cars, the car body contains numbers, however they also have a transparent model with the cars number floating.

I usually overwrite RAMBASE + 53D8 with 0.

---

"some" model offsets I found
Code: [Select]
0283FBB4 - npc 00
0283FC04 - npc 1
0283FC54 - npc 2
0283FCA4 - npc 3
0283FCF4
0283FD44
0283FD94
0283FDE4
0283FE34
0283FFC4 - npc 13
02840014 - npc 15
02840064 - npc 16
028400B4 - npc 20
02840104 - npc 28
028401F4 - npc 31
02840244 - npc 32
02840294 - npc 35
028402E4 - npc 42
02840334 - npc 46
02840384 - npc 51
028403D4 - npc 53
02840424 - npc 55
02840474 - npc 62
028404C4 - npc 66
02840514 - npc 69
02840564 - npc 71
028405B4 - npc 73
02840604 - npc 77
02840654 - npc 78
028406A4 - npc 80
028406F4 - npc 82
02840924 - npc 99
02840974 - npc 69 alt

02842F1C - big purple coin
02843728 - dice
0284373C - post?

0284378C - roulette
02843944 - virtua starting lights

028439E4 - virtua stock car?!

02843B38 - GOAL!

02843E44

02843BB0 - at
02843CF0 - mt

02843E94 - pylon

0284413C - pony
...
02844394

028443A8 - gigantic guy?!

028448E4 - adv course
028448F8 - exp course
0284490C - beg course

02844934 - bird
...
02844BA0

02844E20 - crew

02844E84 - daytona lights

028458E8 - some car?

02845C44 - cockpit at
02845C58 - cockpit mt

02846D88 - car AT
02846DB0 - car MT

02848890 - car 1
028488E0 - car 2
02848930 - car 3
02848980 - car 4
028489D0 - car 5
02848A20 - car 6
02848A70 - car 7
02848AC0 - car 8
02848B24 - npc 99

0284A30C - 1P
...

0284A3AC - 1P sideways left?!
...

0284A44C - 1p sideways right?!
...

...
if anyone ever doubts daytona is based on virtua racing...
(http://images.arianchen.de/temp/virtua-daytona.png)
Title: Re: fooling with m2emu network
Post by: Jitterdoomer on August 24, 2014, 02:17:23 pm
Someone needs to get a TCRF page about Daytona USA...
Title: Re: fooling with m2emu network
Post by: SailorSat on August 24, 2014, 02:46:48 pm
got another one :)=
(http://images.arianchen.de/temp/virtua-stockcar.png)
Title: Re: fooling with m2emu network
Post by: Jitterdoomer on August 24, 2014, 04:18:57 pm
Is this the preliminary model of the AT Hornet car that was left during the development?
Title: Re: fooling with m2emu network
Post by: SailorSat on August 25, 2014, 03:55:02 am
I think so. This model has a higher polygon count but no textures.

Last thing to figure out is where the shadow (found the model), the tires and the windshield gets drawn. Horse with wheels looks strange ;)
Also, still haven't figured out how the hood (in cockpit mode / view 2) gets colored - there needs to be a texture reference saved somewhere.

I'll upload a copy of the livecam tonight - though it still is hardcoded for 8 player setups.

I also resurrected another small tool I once made - a model 2 network recorder/player. Still use an ages old record to test my stuff at home :D
Title: Re: fooling with m2emu network
Post by: Xiaou2 on August 25, 2014, 05:45:56 pm
The 8 player limit was probably based on some testing with regard to lag and speed.

 If the games have more checks to perform, and even the extra variable added, could possibly cause some slower gameplay and or a lot more issues with lost positional data.

 Also, it may be a real pain to wait for +15 players to join and play / not play... and make all the options selections in time.

 Audio echo delays may also have been a factor.  Hard to say.
Title: Re: fooling with m2emu network
Post by: Howard_Casto on August 25, 2014, 07:25:37 pm
Eh I dunno.  I know in Japanese arcades I've seen pics of a bank of 16 of these guys.  Then again, I don't know if that was one giant network or two separate ones. 
Title: Re: fooling with m2emu network
Post by: SailorSat on August 25, 2014, 08:09:34 pm
This is gonna be a long post :)

So... in this example m2lagfix will be used as a splitter
http://files.arianchen.de/daytona/m2lagfix.zip (http://files.arianchen.de/daytona/m2lagfix.zip)
http://files.arianchen.de/daytona/livestats.zip (http://files.arianchen.de/daytona/livestats.zip)



1. use "daytona usa (saturn ads)" for the spectator. this is important for livestats to find the window.
2. run the spectator in a window and set it to widescreen=1 (16/9). optional, spectator will be disorted if not 16/9
3. there is a lua script included with the livestats tool - this is needed to allow the spectator to "coin up".
4. spectator needs to be "master", "car 1" and "special" (cabinet), the other settings can be set as you like, though all machines should share them :)

5a. YOU NEED A 8 PLAYER NETWORK! IT DOES NOT WORK WITH LESS UNITS YET :)
5b. PLAYER 1 MUST NOT BE THE "HOST" OF A RACE (first person to coin up / hit start) - ALWAYS JOIN WITH PLAYER 1.



Getting the "game" running:
1. start your 8 units.
2. start m2lagfix. - if everything is fine the 8 units should sync up and go into attract mode.

Getting the "spectator" running:
1. start "daytona usa (saturn ads)"
2. start "livestats.bat" or "statsupdate.exe" / "livestats.exe" - this actually is part of my "update logic" which goes by hand for now ^^
3. livestats window should come up shortly after. NOTE: if nothing happens, most likely the "window" of daytona cannot be found.
4. spectators daytona should try to link up (THIS UNIT IS MASTER flashing) and "stop flashing" after a few seconds.

Getting the "magic" running:
1. IF m2lagfix and livestats are running correctly (= copying the network stream) the spectator game should come up with attract mode by itself.
2. "coin up" / "press start" on any of player 2 to player 8. - player 1 as well as the spectator should come up with the "do something to join in"-screen.
3. "coin up" / "press start" on player 1 - the spectator should join the game automatically (and select beginner course)
4. wait for the race to start.



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

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

[m2stats]
RemoteHost=127.0.0.1
RemotePort=8000

m2stats section controls where to send the "copy" of the network stream, this is your livestats ip/port.
m2rx section remote ip/port = 1st daytona unit RxPort.
m2tx section local ip/port = 2nd daytona unit NextPort



stats.ini
Code: [Select]
[client]
localhost=0.0.0.0
localport=8000

[live]
LocalHost=127.0.0.1
LocalPort=7001
RemoteHost=127.0.0.1
RemotePort=7002

client section controls where the "copy" of the network stream is expected.
live section controls where the live stats emulator instance shall be served.



example setup
player 1 - 192.168.0.1
player 2 - 192.168.0.2
player 3 - 192.168.0.3
player 4 - 192.168.0.4
player 5 - 192.168.0.5
player 6 - 192.168.0.6
player 7 - 192.168.0.7
player 8 - 192.168.0.8
spectator - 192.168.0.10

player 1
m2network.ini
Code: [Select]
[Network]
RxPort=9000
NextIP=192.168.0.2
NextPort=9000
FrameSync=1

player 2
m2network.ini
Code: [Select]
[Network]
RxPort=9000
NextIP=192.168.0.3
NextPort=9000
FrameSync=1

player 3
m2network.ini
Code: [Select]
[Network]
RxPort=9000
NextIP=192.168.0.4
NextPort=9000
FrameSync=1

player 4
m2network.ini
Code: [Select]
[Network]
RxPort=9000
NextIP=192.168.0.5
NextPort=9000
FrameSync=1

player 5
m2network.ini
Code: [Select]
[Network]
RxPort=9000
NextIP=192.168.0.6
NextPort=9000
FrameSync=1

player 7
m2network.ini
Code: [Select]
[Network]
RxPort=9000
NextIP=192.168.0.8
NextPort=9000
FrameSync=1

player 8
m2network.ini
Code: [Select]
[Network]
RxPort=9000
NextIP=192.168.0.10
NextPort=9000
FrameSync=1

spectator
m2lagfix.ini
Code: [Select]
[m2rx]
LocalHost=127.0.0.1
LocalPort=8001
RemoteHost=192.168.0.1
RemotePort=9000

[m2tx]
LocalHost=192.168.0.10
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=8001

[m2stats]
RemoteHost=127.0.0.1
RemotePort=8000

stats.ini
Code: [Select]
[client]
localhost=127.0.0.1
localport=8000

[live]
LocalHost=127.0.0.1
LocalPort=7001
RemoteHost=127.0.0.1
RemotePort=7002

m2network.ini
Code: [Select]
[Network]
RxPort=7002
NextIP=127.0.0.1
NextPort=7001
FrameSync=1


Title: Re: fooling with m2emu network
Post by: SailorSat on August 25, 2014, 08:15:35 pm
The 8 player limit was probably based on some testing with regard to lag and speed.

 If the games have more checks to perform, and even the extra variable added, could possibly cause some slower gameplay and or a lot more issues with lost positional data.

 Also, it may be a real pain to wait for +15 players to join and play / not play... and make all the options selections in time.

 Audio echo delays may also have been a factor.  Hard to say.

I believe the 8 player limit comes from the memory available to the network board - it only fits 9 packets, and 1 packet is used to "rotate" the packets in memory.

I know for sure that Daytona USA 2 can run up to 16 units, though various sources on the internet claim that up to 40 are possible (which I doubt, there are not enough "car skins" in the game).

I'll try to patch the "network check" to allow more than 8 units - currently the game reboots if the network size reported is larger than 8 - however I think there will be invalid memory reads afterwards :)
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 26, 2014, 04:18:09 pm
I have to say the tool looks very coll .. but unfortunately my pc is slow to test 8 units  :(, there is a possibility of two more instances try a third (live)?
Title: Re: fooling with m2emu network
Post by: SailorSat on August 26, 2014, 04:19:31 pm
Yes - next step will be replacing that hardcoded stuff with dynamic values.
Title: Re: fooling with m2emu network
Post by: Nuexzz on August 26, 2014, 04:26:30 pm
ok thanks ,for you will be easy to create a gui to avoid having to edit many files ini   :D
Title: Re: fooling with m2emu network
Post by: Dozer316 on September 08, 2014, 11:16:10 am
Hello Sailorsat, many thanks for your work on this. Just wondering if the current lag fix exe is hard coded for 8 players or just the stats/Live Cam component?. I've got a fairly good link stability at the moment but a fix for the random hiccup with the dual frame issue would be great.

I have a 2 player link.

Many thanks.
Title: Re: fooling with m2emu network
Post by: SailorSat on September 08, 2014, 01:10:40 pm
Hi dozer, the lagfix works in any setup.
Title: Re: fooling with m2emu network
Post by: Dozer316 on September 08, 2014, 01:18:58 pm
That's great news :)

Will get it running tomorrow and do some testing.

Thanks a million.
Title: Re: fooling with m2emu network
Post by: Dozer316 on September 08, 2014, 11:29:24 pm
Hey again, sorry to be a pain.

Wrote some AHK scripts today to launch both instances of the lagfix tool and then the emulators on the 1st and 2nd machine and the tool loads fine.

I've had a look at the example m2network.ini's and m2lagfix.ini setup  for the stats setup but I feel as though I'm missing something with a simple 2 player no stats setup.

Is it enough to just run the tool or do I need to point the master machine to the tool's listening ports in m2network.ini and the same on the slave so that it acts as a buffer between them?

My setup at the moment is cab1 192.168.1.244  -  cab2 192.168.1.245   TX and RX port are both 9000 on cab1 and 2.

What should the m2lagfix options be set to on cab1 and cab2 to get the tool to do it's magic? :)

Thanks again for your help with this.

Dozer.   
Title: Re: fooling with m2emu network
Post by: SailorSat on September 12, 2014, 06:16:27 am
m2lagfix was intended to be wrapped around "any" m2em instance.
I wrapped it around all of my m2em instances.

Example config for your setup below:



m2network.ini (player 1)
Code: [Select]
[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSync=1

m2lagfix.ini (player 1)
Code: [Select]
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=9001

[m2tx]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=192.168.1.245
RemotePort=9000



m2network.ini (player 2)
Code: [Select]
[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSync=1

m2lagfix.ini (player 1)
Code: [Select]
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=9001

[m2tx]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=192.168.1.244
RemotePort=9000
Title: Re: fooling with m2emu network
Post by: Dozer316 on September 12, 2014, 10:07:36 pm
Hey there, many thanks for the info - Looking forward to trying this out.
Title: Re: fooling with m2emu network
Post by: Nuexzz on September 21, 2014, 03:42:29 am
I think we're leaving overlook an awesome job, someone tried the tool "lag fix" online??
Title: Re: fooling with m2emu network
Post by: Nuexzz on February 04, 2015, 03:22:25 am
HERE I'M BREAKING THE HEAD BETWEEN BOTH LOCAL, REMOTE ETC  :banghead:
anyone here knows how to do magic (m2lagfix) in only 1 pc and 2 instances of m2emulator ?
Title: Re: fooling with m2emu network
Post by: SailorSat on February 04, 2015, 06:58:27 am
--- master
Code: [Select]
[Network]
RxPort=8001
NextIP=127.0.0.1
NextPort=8002
FrameSync=1
--- slave
Code: [Select]
[Network]
RxPort=7002
NextIP=127.0.0.1
NextPort=7001
FrameSync=1
--- m2lagfix
Code: [Select]
[m2rx]
LocalHost=127.0.0.1
LocalPort=7001
RemoteHost=127.0.0.1
RemotePort=8001
StallDetection=1

[m2tx]
LocalHost=127.0.0.1
LocalPort=8002
RemoteHost=127.0.0.1
RemotePort=7002

[m2stats]
RemoteHost=127.0.0.1
RemotePort=-1
Title: Re: fooling with m2emu network
Post by: Nuexzz on February 04, 2015, 12:21:30 pm
cool thanks works great!  :applaud:

if someone wants to do some tests with m2lagfix online so I'll be on this server http://irc.lc/freenode/m2lagfix/user (http://irc.lc/freenode/m2lagfix/user) , if it works well we can think about doing a nice interface to communicate in races.

something?

(http://i.imgur.com/74iFeFE.jpg)
Title: Re: fooling with m2emu network
Post by: Nuexzz on February 05, 2015, 12:17:24 pm
Help SailorSat! we can not communicate by the rules of the tool m2lagfix (we are using the old online tool using an external program vpn "hamachi" to avoid opening ports).
here I leave you in attachment configurations of each machine
Title: Re: fooling with m2emu network
Post by: SailorSat on February 10, 2015, 10:57:42 am
Oops, didn't see you post until now... I'll take a look at it once I get home.
Title: Re: fooling with m2emu network
Post by: Nuexzz on February 13, 2015, 01:57:21 am
you are far from home haha :laugh2:

(https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQeyMDK3NykksQ232xguA0M7Gq7cLL2-XX4tXuzUriJDYaeSql7)
Title: Re: fooling with m2emu network
Post by: SailorSat on February 13, 2015, 11:41:53 am
your m2lagfix.ini has a broken [m2rx] header.
Title: Re: fooling with m2emu network
Post by: Boomslang on April 11, 2015, 08:12:33 am
any updates to this at all sailorsat? I'm not very patient haha. Love hearing of cool new finds
Title: Re: fooling with m2emu network
Post by: SailorSat on April 11, 2015, 12:59:00 pm
Nothing new here for now. I'm in the process of converting my (every damn time broken) Daytona USA cabinets to PCs
Title: Re: fooling with m2emu network
Post by: Boomslang on April 12, 2015, 02:27:30 am
ah I happen to be doing the exact same with Sega Rally 2 Twin cabs. Just spent last 2 days working on them so ill have these as 3p and 4p to go with my Daytona 2 twin ive already converted. Hope it goes well for you
Title: Re: fooling with m2emu network
Post by: jacklance on August 18, 2015, 02:19:24 am
It's been a week or so, and I still get "107" when I try starting up the game. Meanwhile, everyone else is talking about how they can play the game, and it seems like Sega's continuing with updates and new outfits now. Is IbVPN (http://www.ibvpnreview.com/) my only option now?
Title: Re: fooling with m2emu network
Post by: vandale on June 21, 2016, 06:11:36 am
m2lagfix was intended to be wrapped around "any" m2em instance.
I wrapped it around all of my m2em instances.
Hi SailorSat. Just stumbled across this and since I am upgrading my cab I decided to finally get rid of the buggy connection between my M2 units.

Arrghhh, I cant get it to work, please check my settings. I have 2 separate machines, Gb LAN connected, currently links ok with some flickering on rival cars when not using m2lagfix.

Any help is appreciated as I cant get them to link with your wrapper
--- master
[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSync=1

--- slave

[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSync=1

--- m2lagfix
Master
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=9001

[m2tx]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=10.0.0.2
RemotePort=9000

Slave
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=9001

[m2tx]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=10.0.0.1
RemotePort=9000
Title: Re: fooling with m2emu network
Post by: SailorSat on June 21, 2016, 10:14:33 am
Hm... I remember running into similar issues - try replacing 127.0.0.1 with 10.0.0.1 on the master, and 10.0.0.2 on the slave

If I remember correctly, UDP on 127.0.0.1 did work fine on my Win7 development rig, but not on my XP64 rig in the cab.



m2network.ini - master
Code: [Select]
[Network]
RxPort=9001
NextIP=10.0.0.1
NextPort=9002
FrameSync=1

m2lagfix.ini - master
Code: [Select]
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=10.0.0.1
RemotePort=9001

[m2tx]
LocalHost=10.0.0.1
LocalPort=9002
RemoteHost=10.0.0.2
RemotePort=9000



m2network.ini - slave
Code: [Select]
RxPort=9001
NextIP=10.0.0.1
NextPort=9002
FrameSync=1

m2lagfix.ini - slave
Code: [Select]
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=10.0.0.2
RemotePort=9001

[m2tx]
LocalHost=10.0.0.2
LocalPort=9002
RemoteHost=10.0.0.1
RemotePort=9000
Title: Re: fooling with m2emu network
Post by: vandale on June 21, 2016, 07:08:54 pm
Hm... I remember running into similar issues - try replacing 127.0.0.1 with 10.0.0.1 on the master, and 10.0.0.2 on the slave

If I remember correctly, UDP on 127.0.0.1 did work fine on my Win7 development rig, but not on my XP64 rig in the cab.



Thanks I will give it a go tonight, your a star.
Title: Re: fooling with m2emu network
Post by: SailorSat on June 24, 2016, 05:35:13 am
Thanks I will give it a go tonight, your a star.

Did it work?
Title: Re: fooling with m2emu network
Post by: vandale on June 24, 2016, 03:45:28 pm
Thanks I will give it a go tonight, your a star.

Did it work?

Hi, got caught up with bg4 trying to format widescreen correctly, will have a go today
Title: Re: fooling with m2emu network
Post by: vandale on June 25, 2016, 12:56:33 am
Thanks I will give it a go tonight, your a star.

Did it work?
Hi, no it didnt.

Now due to BG4 I am running the IP addresses 192.168.69.251 (Master) and 192.168.69.252 (Slave). M2 works fine in linked mode and then I try the following for m2lagfix and they just dont connect, am I doing it wrong, is there a special startup sequence? I am just running m2 then the m2lagfix exe's one after the other:
--- master
[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSync=1

--- slave

[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSync=1

--- m2lagfix
Master
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=9001

[m2tx]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=192.168.69.252
RemotePort=9000

Slave
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=9001

[m2tx]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=192.168.69.251
RemotePort=9000
Title: Re: fooling with m2emu network
Post by: SailorSat on June 25, 2016, 04:25:44 pm
Like I explained earlier, don't use 127.0.0.1 - use the local address (192.168.69.251 on master, 192.168.69.252 on slave) :(



P.S. I see myself "patching" some ROMs soon ^^
https://www.youtube.com/watch?v=2rqSSTjN7Mg (https://www.youtube.com/watch?v=2rqSSTjN7Mg)
Title: Re: fooling with m2emu network
Post by: Nuexzz on June 26, 2016, 06:50:19 pm


P.S. I see myself "patching" some ROMs soon ^^
https://www.youtube.com/watch?v=2rqSSTjN7Mg (https://www.youtube.com/watch?v=2rqSSTjN7Mg)

"but consider m2lagfix obsolete soon"


you think replacing m2lagfix for a patch for each game?
Title: Re: fooling with m2emu network
Post by: SailorSat on June 26, 2016, 08:43:15 pm
No, I plan on replacing the "master" mode in the games.
It seems the master mode is causing like 90% of all problems.

However, not every game allows to choose between master and slave - those games need to be patched :)
Title: Re: fooling with m2emu network
Post by: vandale on June 27, 2016, 05:21:40 am
Like I explained earlier, don't use 127.0.0.1 - use the local address (192.168.69.251 on master, 192.168.69.252 on slave) :(



P.S. I see myself "patching" some ROMs soon ^^
https://www.youtube.com/watch?v=2rqSSTjN7Mg (https://www.youtube.com/watch?v=2rqSSTjN7Mg)

Hi, got it working, thanks for being patient! Looking forward to your next public release. ElSemi would be so proud.
Regards
Gene
Title: Re: fooling with m2emu network
Post by: eldiego on June 27, 2016, 10:29:51 am
Hi Vandale, can you post how was it configuration (working now), because
I'm pretty hard to learn.
Thanks
Title: Re: fooling with m2emu network
Post by: SailorSat on June 27, 2016, 05:08:59 pm
I am currently investigating into the advanced link fix.

So far done:
External "Master"-Token generator and packet throttle.

--- PPS = packets per second ---

Daytona USA - shows rock solid graphics with 58 pps - cars start flickering if more than 60 pps

Indy500 - was one of the games that was basically impossible to link up with more than 2 oder 3 units - with the fake master and a packet limit of 58 pps the game stays in sync and the link stays stable. If I increase the packet limit to 60 pps (or more) the game almost instantly shows "network error".

MotorRaid - behaves basically the same as Indy500.

ManxTT - doesn't seem to care about packets at all, it just works fine with any speed.

Sega Rally - the pointers on minimap seem to flicker with 58 pps - the flickering disappears with more than 60 pps, however the countdown still goes crazy in any case.

Last but not least, Sega Touring Car does not seem to work at all - Without the tool, it simply won't link up at all - With my tool it will link up, but sit in network check forever.

--

I am pretty sure the network should be closer tied to the framerate, however I have currently no idea how exactly that is supposed to work.
Title: Re: fooling with m2emu network
Post by: Boomslang on June 28, 2016, 02:31:44 am
awesome SailorSat!

very cool to get link finally working in IndyCar, i was having issues with that :(
Title: Re: fooling with m2emu network
Post by: SailorSat on July 04, 2016, 08:07:51 am
Guess this one will be a little harder as I thought.
Can't get it working on the actual cabinets - need to "hook" VSync and pause the emulator (which in turn slows down emulation speed).
Title: Re: fooling with m2emu network
Post by: SailorSat on July 07, 2016, 05:20:19 pm
So it turned out, I cannot hook the vsync the way I wanted to do.

However there still is light at the end of the tunnel :D

Small LUA patch to "disable" the infamous "NETWORK ERROR" in Indy500 and Motoraid - turns out the code has some "delay" counter going up till 0xFF, and then deeming the network unreliable. By writing 0 (read ZERO) to this counter every single frame we can be sure to never reach that value. - Not exactly the way I wanted to fix things, but still should be enough to get a "stable" 8 player setup running.

indy500d.lua
Code: [Select]
require("model2"); -- Import model2 machine globals

function Frame()
I960_WriteDWord(0x00555214,0x00000000)
end



indy500.lua
Code: [Select]
require("model2"); -- Import model2 machine globals

function Frame()
I960_WriteDWord(0x005ec6b0,0x00000000)
end



motoraid.lua
Code: [Select]
require("model2"); -- Import model2 machine globals

function Frame()
I960_WriteDWord(0x005195d4,0x00000000)
end
Title: Re: fooling with m2emu network
Post by: SailorSat on July 10, 2016, 03:51:30 pm
First test on my daytona setup was good, although some questions remain.

Indy 500 with the ROM patched, (but without the new link fix) works good, as long as all machines can keep up with 60 FPS. - It gets even worse than Daytona if machines can't reach full speed. - Most of the time I try to overtake an NPC car, they instantly "teleport" into my car and crash me.

With the new link fix, that doesn't happen, but the game will slow down for everybody to the lowest machines speed. (which is fine if they can run at 60fps)

I still can't get a "reasonable" netplay in Sega Rally though, even with only 2 machines and the link fix, the timers go crazy. The problem seems to be buried deeper inside the network boards.

Haven't tried other games yet.
Title: Re: fooling with m2emu network
Post by: vandale on July 11, 2016, 01:23:30 am
Hi, do we use the m2lagfix and the LUA script? Thanks
Title: Re: fooling with m2emu network
Post by: SailorSat on July 11, 2016, 02:34:38 pm
you can use the lua with m2lagfix, yes.
Title: Re: fooling with m2emu network
Post by: SailorSat on August 28, 2016, 11:42:13 am
Bam... Indy 500 has another serious problem xD - the game simply freezes (as does it in MAME) :(
Title: Re: fooling with m2emu network
Post by: baritonomarchetto on August 28, 2016, 04:00:38 pm
Keep the work up Arianne!
Title: Re: fooling with m2emu network
Post by: buttersoft on September 02, 2016, 12:38:19 am
Agreed! Amazing efforts so far, we're all itching to play more model2 and model 3 games over network! It feels so close, though I imagine even with your skillset it's still a lot of work. You have my thanks.
Title: Re: fooling with m2emu network
Post by: eldiego on October 30, 2016, 06:18:53 pm
Hi, i am trying to use the m2lagfix but with this config start only master with link system (but for 1 player) and slave continue searching...

Master

[Network]
RxPort=9001
NextIP=192.168.1.3
NextPort=9002
FrameSync=1

m2lagfix.ini

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

[m2tx]
LocalHost=192.168.1.110
LocalPort=9002
RemoteHost=192.168.1.3
RemotePort=9000

Slave

[Network]
RxPort=9001
NextIP=192.168.1.110
NextPort=9002
FrameSync=1

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

[m2tx]
LocalHost=192.168.1.3
LocalPort=9002
RemoteHost=192.168.1.110
RemotePort=9000


I have only 2 cabs connected via lan, Ip master 192.168.1.110 ip slave 192.168.1.3
Please If anybody can help me.
Thanks
Title: Re: fooling with m2emu network
Post by: Boomslang on October 30, 2016, 11:49:26 pm
Master

[Network]
RxPort=9001
NextIP=192.168.1.3
NextPort=9001
FrameSync=1


Slave

[Network]
RxPort=9001
NextIP=192.168.1.110
NextPort=9001
FrameSync=1



m2 network should look like that on each machine. Read back on SailorSat instructions earlier in this thread
Title: Re: fooling with m2emu network
Post by: eldiego on October 31, 2016, 12:14:45 am
Master

[Network]
RxPort=9001
NextIP=192.168.1.3
NextPort=9001
FrameSync=1


Slave

[Network]
RxPort=9001
NextIP=192.168.1.110
NextPort=9001
FrameSync=1



m2 network should look like that on each machine. Read back on SailorSat instructions earlier in this thread

Ok tomorrow will try.
I read 10 times or more but i m not ever understand...for the english i supose.
Thanks
Title: Re: fooling with m2emu network
Post by: eldiego on October 31, 2016, 05:42:39 pm
Works fine!!!. thanks
Title: Re: fooling with m2emu network
Post by: FaithLes2425 on July 28, 2017, 10:59:22 pm
Does the m2lagfix work across multible PC's?
What cabels are required?
Can i run through a switch/router or do i need a crossover?
Are there any limits to the lenght of the cabel/cabels?
Title: Re: fooling with m2emu network
Post by: SailorSat on July 29, 2017, 11:57:49 am
Sure it does.
You can (in theorie) even use it online.
Title: Re: fooling with m2emu network
Post by: buttersoft on July 31, 2017, 12:59:22 am
Forgive me for begging, Sailorsat, but any chance STCC networking will come good at some point?
Title: Re: fooling with m2emu network
Post by: Boomslang on August 13, 2017, 01:56:41 am
Ive finally moved all my cabs out to the garage together side by side and for the life of me I can't seem to get m2lagfix working anymore. Just attempted for about 3 hours

I used to have this working with ease which is the annoying part. It works if i bypass the m2lagfix program so it's not a network problem

Can someone please post a working m2network and m2lagfix ini files to work across 2-4 machines? I must be doing something dumb but I can't work it out

I can't even connect between 2 machines at the moment, let alone 4

I used to have it using just m2lagfix on the Master machine so I didn't have to load m2lagfix on every slave as well
Title: Re: fooling with m2emu network
Post by: FaithLes2425 on August 14, 2017, 10:46:23 am
I need some help with the m2lagfix.ini. I suck at Network. What numbers do i need to put in?
Master: 192.168.1.86
Slave:   192:168.1.238
Title: Re: fooling with m2emu network
Post by: Boomslang on February 17, 2018, 04:00:49 pm
gonna bump this post since it's relevant

I was messing with m2 emulator and found a way to link up in Sega Touring Car Championship. But only 2 player so far, can't seem to get it working 4 player yet

obviously set up game as per usual with master as Car 1 and slave as Car 2.  Exit the test mode at the same time on both pcs

Will connect and go ingame and work properly!  :cheers:

sometimes it did freeze on the connected screen however and never load attract mode which resulted in me having to exit and try again

Now previously we were kinda doing this but we only went to test menu and back out on the master and we never did it with slave which resulted in some conflict id happening sometimes and once they went ingame they didn't even seem to link up as you would press start and nothing popped up on other pc etc

I tried this 4 player too before, but could never get the attract mode to load after trying 4-5 times with my wife. Exiting test mode at same time always resulted in them connecting and just staying on that screen
Title: Re: fooling with m2emu network
Post by: Agent47 on February 17, 2018, 05:05:28 pm
Great find!  I just tried this and was able to connect with 2 players linked.  The attract mode screen says 2 players wanted and when one player inserts a coin, the second screen goes to the "waiting entry" screen like normal.  However, when I start a 2 player race, I don't see the other player and even the count down timer is not synced between the two sessions.  It's like we are playing single player on a linked machine.  I have the ID's set to Car 1 and Car 2 and changed the cabinet type to "twin" on both PC's.  Strange....
Title: Re: fooling with m2emu network
Post by: Boomslang on February 17, 2018, 05:18:17 pm
Eh wierd

Works fine for me, I see the other car on each pc etc ingame

Not that it should matter, set Freeplay on both. That's what I did

Also you obviously have to go into test menu and exit out of test menu at the exact same time. If you don't then it can do as you said
Title: Re: fooling with m2emu network
Post by: buttersoft on February 18, 2018, 09:13:58 pm
Mine always goes into link, but then i can't get the game to stay synced, timer issues etc. I thought it was known this is how far the game gets? Still, I'll give it another shot as this is one i really want to get working over link.
Title: Re: fooling with m2emu network
Post by: Friko on March 14, 2018, 08:18:20 pm
Great find!  I just tried this and was able to connect with 2 players linked.  The attract mode screen says 2 players wanted and when one player inserts a coin, the second screen goes to the "waiting entry" screen like normal.  However, when I start a 2 player race, I don't see the other player and even the count down timer is not synced between the two sessions.  It's like we are playing single player on a linked machine.  I have the ID's set to Car 1 and Car 2 and changed the cabinet type to "twin" on both PC's.  Strange....

I believe m2lagfix only works for 8 players
I was hoping SailorSat would release a customizable version so we can select between 2-8 cars.
Title: Re: fooling with m2emu network
Post by: SailorSat on March 14, 2018, 11:01:39 pm
Nah - m2lagfix works for any amount of players, as all it does is fixing the frame size/times.

I was workin on an external "sync" tool... some time ago - but never finished it.
I used it to create some "in sync" teasers on youtube. (see this (https://www.youtube.com/watch?v=2rqSSTjN7Mg))

The main problem is the m2em itself - in master mode it sends out "too many" frames, which causes the clients to mix up stuff.
There are actually two ways to "fix" this (without altering the emulator, which I might try next).

Path #1 - fix the frame order/count (which m2lagfix tries to some success)
Path #2 - patch the netcode in the ROMs (so that the game is slave in any case) and go with the external init (like in the videos). this has been done for sega rally

Title: Re: fooling with m2emu network
Post by: buttersoft on March 15, 2018, 09:33:37 pm
SailorSat that's amazing news, keep us posted!

:)
Title: Re: fooling with m2emu network
Post by: SailorSat on March 17, 2018, 02:06:24 am
Hm... Even with frame perfect sync, the timers in Sega Rally are all over the place. And I still can't get STCC to link up at all - It says "network check success" but never goes to attract mode.
Title: Re: fooling with m2emu network
Post by: Boomslang on March 17, 2018, 03:22:21 am
Hm... Even with frame perfect sync, the timers in Sega Rally are all over the place. And I still can't get STCC to link up at all - It says "network check success" but never goes to attract mode.

gonna bump this post since it's relevant

I was messing with m2 emulator and found a way to link up in Sega Touring Car Championship. But only 2 player so far, can't seem to get it working 4 player yet

obviously set up game as per usual with master as Car 1 and slave as Car 2.  Exit the test mode at the same time on both pcs

Will connect and go ingame and work properly!  :cheers:

sometimes it did freeze on the connected screen however and never load attract mode which resulted in me having to exit and try again

Now previously we were kinda doing this but we only went to test menu and back out on the master and we never did it with slave which resulted in some conflict id happening sometimes and once they went ingame they didn't even seem to link up as you would press start and nothing popped up on other pc etc

I tried this 4 player too before, but could never get the attract mode to load after trying 4-5 times with my wife. Exiting test mode at same time always resulted in them connecting and just staying on that screen
Title: Re: fooling with m2emu network
Post by: SailorSat on March 18, 2018, 12:42:33 pm
Damn... Sometimes I should start from scratch. Turns out I patched around to much in the netcode to get it booting xD

So I can get STCC to link up using the previous mentioned method (service mode) pretty reliable.

However for some unknown reason there seem to be various "new" problems.
With my external master tool the network stays synched enough to drive an entire race - But the performance drops to about 45 fps.
Without my modifications, the game stays at 59fps, but looses sync pretty quickly.
Guess it's time for some dynamic delays in my tool then.
Title: Re: fooling with m2emu network
Post by: buttersoft on March 18, 2018, 06:49:57 pm
Confirming that i can get STCC to link 2p as well by adding a test-menu key and simply entering and then simultaneously exiting test menu on each cab. Cheers for pointing this out, Boomslang! I don't actually have any friends though, so i haven't driven an entire race to see if the sync goes weird :)

It never worked for me on my test PC, the sync occasionally came up, and you could see the JP screen where it says 2 players are possible, but things would go wrong before you could get into a race. That was on a Win7 build.

Last night I did the qualifying lap on each machine, one timing out, of course, and then drove a race lap and ran into the back of the 2p car, then drove the 2p car back to unlap itself, and around for a bit, and that far everything seemed to be in sync across the two cabs.  This is on two Win10 builds, though the OS may not mean as much as using it across two machines and LAN rather than two ports on the one machine?

I might try it with WaveRunner at some point, as i'd like to get that running too :)
Title: Re: fooling with m2emu network
Post by: SailorSat on March 19, 2018, 08:56:15 pm
I'm starting to hate the m2em :)

After several hours of experiments I can say - Fixing the network will be a pain in the ass.
If I limit the Network to 58 FPS (which will cause slight audio stutter) the network stays perfectly in sync (and flicker free) in Daytona, Indy500, Motoraid and STCC - But the timer goes absolutely wild in Sega Rally.
On the other hand, if I "unchain" the Network FPS - At about 240 FPS (that means 4 network cycles per video frame) Sega Rally works fine, but Daytona is flickering like ---steaming pile of meadow muffin---, and the others show a network error pretty quick.

Guess it will be back to MAME for a while - In MAME the games seem to work better, no flickering and no link problems in Indy500 or STCC, but Sega Rally is not working correctly either.
I really need to figure out the network stuff...

Most likely the network needs to be "in sync" on scanline 383 (the VBLANK-IRQ is triggered at this point) as most games start to write the network data on scanline 384 and read the network data on scanlines 385 to 387.
Title: Re: fooling with m2emu network
Post by: buttersoft on March 19, 2018, 11:41:03 pm
I didn't actually realise model 2 was playable in MAME at this point, i'll have to give it a look. Cheers for the heads up, SailorSat, and always keen to hear more about what you're working on!
Title: Re: fooling with m2emu network
Post by: SailorSat on March 20, 2018, 04:08:38 am
I didn't actually realise model 2 was playable in MAME at this point, i'll have to give it a look. Cheers for the heads up, SailorSat, and always keen to hear more about what you're working on!
It does for M2, M2A and M2B - although my i7 has trouble keeping 100% speed :)
M2C has no 3D output.
Title: Re: fooling with m2emu network
Post by: SailorSat on March 20, 2018, 04:00:35 pm
Current MAME status - Indy500 works (with framesync), but the timer in SegaRally still is not correct.

https://www.youtube.com/watch?v=ZhTwpV8TuyU (https://www.youtube.com/watch?v=ZhTwpV8TuyU)
https://www.youtube.com/watch?v=59O4wk8DyWk (https://www.youtube.com/watch?v=59O4wk8DyWk)

I'm still impressed on how far we got...
Title: Re: fooling with m2emu network
Post by: SailorSat on March 20, 2018, 08:00:02 pm
Got another one... Heretics!
https://www.youtube.com/watch?v=3XDCV5uIx9I&index=14&list=PLcApqXpkuyTeEyVygBUsJ9Oc3xlwU7AOw (https://www.youtube.com/watch?v=3XDCV5uIx9I&index=14&list=PLcApqXpkuyTeEyVygBUsJ9Oc3xlwU7AOw)
Title: Re: fooling with m2emu network
Post by: Nuexzz on March 20, 2018, 10:18:34 pm
haha awesome !! Is the network more stable with one instance of each emulator?
Title: Re: fooling with m2emu network
Post by: buttersoft on March 20, 2018, 11:33:44 pm
Haha, that's awesome. Sadly my cabs have Core2Duo E8500 cpu's, so model2 isn't going to run well through MAME :/
Title: Re: fooling with m2emu network
Post by: SailorSat on March 21, 2018, 01:42:56 am
Haha, that's awesome. Sadly my cabs have Core2Duo E8500 cpu's, so model2 isn't going to run well through MAME :/
Same for me :)

haha awesome !! Is the network more stable with one instance of each emulator?
Maybe - MAME as master and M2EM running slaves only seems to be much more reliable.
Sadly the games I want to test (mainly STCC) don't work in MAME at all, as there is no 3d emulation on model 2c yet.
Title: Re: fooling with m2emu network
Post by: Nuexzz on March 21, 2018, 10:15:02 pm
well, mame in 3D emulation is very far compared to m2em, it would not be unreasonable to create a binary that represents mame (master fake that controls the network) and all other slaves (m2em) that follow their orders  :dunno
Title: Re: fooling with m2emu network
Post by: dgrace on April 22, 2018, 05:48:11 pm
I just got a 2nd PC (one is Win7 and the new one is win10).  I'm trying to play some Model2 link LAN racing games but ran into a few issues.  Here is what I have in my Model 2 network ini file for my Master 1 computer:

[network]
Rxport=1978
NextIP=192.168.0.89
NextPort=1979

And here is what I have in my second PC/Slave computer:

[network]
Rxport=1979
NextIP=192.168.0.91
NextPort=1978


I still get network errors on my Master computer.  Even with all my real time AV scan and firewalls turned off.  Hmmmmm? Not sure what else I can do with that.  When I set it to single cabinet (Daytona USA) it works fine, but when I set to slave or master I get network error ("Network board not present").  Any idea what else it could be? I imagine I messed up my ini file above.  The NextIPs are both computer's IP addresses. Thanks
Title: Re: fooling with m2emu network
Post by: buttersoft on April 23, 2018, 10:38:44 pm
For network play on multiple PC's you don't want to touch the port settings, they should remain the same. Or the same as each other, anyway. Only modify the IP addresses. Vice versa for multiple instances on one PC, only use ports, not IP's.

Assuming you have only two computers C1 and C2, with network addresses IP1 and IP2 respectively, you want to set the m2network.ini file on C1 to point to IP2 - using the nextIP line, of course.  Then the same line on C2 to point to the next IP in the ring, or, because this is the last computer in your ring of two, you set it to point to the IP of the first computer - so IP1.

MrThunderwing actually just posted this info elsewhere, though this is probably a better place for it here.

http://forum.arcadecontrols.com/index.php/topic,157120.msg1650952.html#msg1650952 (http://forum.arcadecontrols.com/index.php/topic,157120.msg1650952.html#msg1650952)

Title: Re: fooling with m2emu network
Post by: BigPanik on April 26, 2018, 08:14:37 am
On my 4 linked PC's configuration, the Daytona attract mode gone de-synchronized after some time. After 5 minutes, Daytona logo come on cab #1 when cab #4 still displays driving instructions.

Does someone else observe this issue? Does m3lagfix solve this problem?

Thanks
Title: Re: fooling with m2emu network
Post by: SailorSat on April 26, 2018, 04:16:40 pm
Nope, sadly.

I have a fix for that, though it has yet to mature into a "stable" tool :)
Title: Re: fooling with m2emu network
Post by: BigPanik on April 27, 2018, 10:27:21 am
 :applaud:

Could you explain the cause?
Title: Re: fooling with m2emu network
Post by: buttersoft on April 29, 2018, 07:21:34 pm
Read up the thread, the reason for it isn't too far back.
Title: Re: fooling with m2emu network
Post by: Boomslang on May 01, 2018, 05:07:57 am
Damn... Sometimes I should start from scratch. Turns out I patched around to much in the netcode to get it booting xD

So I can get STCC to link up using the previous mentioned method (service mode) pretty reliable.

However for some unknown reason there seem to be various "new" problems.
With my external master tool the network stays synched enough to drive an entire race - But the performance drops to about 45 fps.
Without my modifications, the game stays at 59fps, but looses sync pretty quickly.
Guess it's time for some dynamic delays in my tool then.

did you have any luck with trying to get STCC to work with more then 2 Players? I can get it to work 2p but never 4p
Title: Re: fooling with m2emu network
Post by: Boomslang on November 15, 2018, 07:36:05 pm
bumping this just cos its a little relevant


Wave Runner works with the stcc method posted above incase anyone was wanting that game to work over network
Title: Re: fooling with m2emu network
Post by: buttersoft on November 19, 2018, 05:40:52 pm
I was thinking about trying that trick with wave runner just last weekend! I had it setup a while back but not with service mode buttons, so i'll just add it back in.
Title: Re: fooling with m2emu network
Post by: Boomslang on December 09, 2018, 04:46:57 am
So ages ago I mucked around with a hack to make network work while including AI positions

I've finally coded it up over the weekend which was a massive pain to get working right but have it working really well for 2p,3p and 4p setups so far

Just start race as normal and everything happens automatically as soon as race starts, also made the results screen at end work correctly

One side effect is the AI cars are coloured like normal multiplayer cars as opposed to the normal purple but otherwise it seems to work pretty good
Title: Re: fooling with m2emu network
Post by: buttersoft on December 09, 2018, 06:00:56 pm
What game was that for, Boomslang?
Title: Re: fooling with m2emu network
Post by: Boomslang on December 09, 2018, 06:42:27 pm
What game was that for, Boomslang?

Oh sorry

Daytona USA


Here's a bad video I did ages ago of it before I coded it up properly last couple days

https://youtu.be/zGjHmrXk8dc
Title: Re: fooling with m2emu network
Post by: baritonomarchetto on December 10, 2018, 01:43:27 am
AI cars coloured like normal player cars is a plus for me
Title: Re: fooling with m2emu network
Post by: Boomslang on December 11, 2018, 04:21:18 am
another bad video im afraid as I have no idea how to crop a video lol etc

heres what it looks like now when 4p

https://youtu.be/VcoWmcN8hZw
Title: Re: fooling with m2emu network
Post by: SailorSat on December 11, 2018, 03:19:02 pm
Ah so you feed the car data into memory directly. Pretty neat idea. Keep it up :)
Title: Re: fooling with m2emu network
Post by: Maillouski on January 14, 2019, 10:22:18 am
Hi everyone, I read through the whole thread and this is very interesting.

I owned a Twin Cab Daytona USA for 8 years. 8 years of fun and fixing the damn thing  ;D

I have the idea of making a new single cab using a PC, or maybe reuse a non-working original Daytona USA cab and converting it.

Has anybody have experience in converting cabs ? If I understand correctly, @SailorSat does ?
Title: Re: fooling with m2emu network
Post by: XSFDriver on January 15, 2019, 05:41:29 am
Mate, you've just opened up a BIIIIIIG can of worms  :lol ....I signed up on this site about 9 months ago, and I'm still pouring through the pages and pages of stuff here. I just wish I had more to contribute !!! (and I'm not that good at putting thoughts to text without rambling) :banghead:

I've been reading this particular thread over and over, trying to get my head around most of it. I've succeeded in hooking up two PC's with Model 2 running Daytona, but man, these guys take it to another level.... for example, check out this one of Sailorsat's threads :notworthy:, I think it might be what you're after...

http://forum.arcadecontrols.com/index.php/topic,145000.0.html?PHPSESSID=p7c5gtsrpp06beuget5r34ebs3 (http://forum.arcadecontrols.com/index.php/topic,145000.0.html?PHPSESSID=p7c5gtsrpp06beuget5r34ebs3)

...and that's just the start of it.

...Anyway, Hi to all, and thanks heaps for all your hard work... If there's anything I can help with, please ask, but I hate to say, from what I've read on this site so far, I doubt I could be much of a trail blazer :lol

Cheers  :cheers:
Title: Re: fooling with m2emu network
Post by: AMG KC on April 21, 2019, 02:15:55 am
Ah so you feed the car data into memory directly. Pretty neat idea. Keep it up :)
Hi :) I have a few questions to add.

Im a bit muddled on what the status of Indy 500 multiplayer is, will it run well now and be completely playable?

What is the best way to run it with 3-5 players?

How do i run that lua file you made for it?

Do you find XP x64 runs better for this or other Windows versions?
Title: Re: fooling with m2emu network
Post by: Hydreigon on April 21, 2019, 10:53:18 am
Ah so you feed the car data into memory directly. Pretty neat idea. Keep it up :)
Hi :) I have a few questions to add.

Im a bit muddled on what the status of Indy 500 multiplayer is, will it run well now and be completely playable?

What is the best way to run it with 3-5 players?

How do i run that lua file you made for it?

Do you find XP x64 runs better for this or other Windows versions?
Running Indy 500 multiplayer (or any model 2 game) would most likely require that m2lagfix. Speak of m2lagfix, I would like to know the current progress on that (or a new version of m2emu updated for later operating systems). Sadly, the only way to run these Model 2B or 2C games is to exit test mode at the same time. Very finicky network coding atm.
Title: Re: fooling with m2emu network
Post by: MrThunderwing on April 21, 2019, 12:13:13 pm
In the past I've been able to get a 2 Player single system network running Indy 500 (https://youtu.be/iB3Pxb-tU8o) with the 'regular' Model 2 Emulator network function working - it's just highly temperamental. I don't know if the thing about both systems having to exit the test mode at the same time is true or not, I think it's just if there's any lag between the two it causes an instant network failure.
Title: Re: fooling with m2emu network
Post by: Nuexzz on April 21, 2019, 04:22:26 pm
Ah so you feed the car data into memory directly. Pretty neat idea. Keep it up :)
Hi :) I have a few questions to add.

Im a bit muddled on what the status of Indy 500 multiplayer is, will it run well now and be completely playable?

What is the best way to run it with 3-5 players?

How do i run that lua file you made for it?

Do you find XP x64 runs better for this or other Windows versions?
Running Indy 500 multiplayer (or any model 2 game) would most likely require that m2lagfix. Speak of m2lagfix, I would like to know the current progress on that (or a new version of m2emu updated for later operating systems). Sadly, the only way to run these Model 2B or 2C games is to exit test mode at the same time. Very finicky network coding atm.


you have all the reason that it will have to be "automated" but also I am more than sure that we are advanced in question of "nowadays we can do it" many years passed and it is time to work on it.
I'm ready for whatever
Title: Re: fooling with m2emu network
Post by: Boomslang on April 22, 2019, 03:52:07 pm
Theres a lua fix to indy 500 that Sailorsat made

I've got it somewhere so I'll try post it

At least 4 players works fine now with it
Title: Re: fooling with m2emu network
Post by: AMG KC on April 23, 2019, 01:58:24 am
Theres a lua fix to indy 500 that Sailorsat made

I've got it somewhere so I'll try post it

At least 4 players works fine now with it
Yeah mate i found that worked too, i dont know if im using m2lagfix or not, no idea how to tell if it is working or if the emulators are still just talking direct and ignoring the lagfax file.

Be nice if we could get it all to run as smooth and synced as Sega Racing Classic does!
Title: Re: fooling with m2emu network
Post by: XSFDriver on May 13, 2019, 04:46:04 am
Theres a lua fix to indy 500 that Sailorsat made

I've got it somewhere so I'll try post it

At least 4 players works fine now with it

That'd be appreciated, if you could, please Boomslang.... I'm slowly collecting hardware to put a 4 Player system together in the future... and Indy 500 is one of the main Model 2 games I'd like to run on it (Don't want to know how much $$$ I pumped into that machine in the arcade back in the day).

But... until then... just reading and learning... and collecting stuff to try out when I get time... and a new garage to set it up in :lol

Thanks again to all of you who put all this effort into making these old classics more manageable on what we have access to today, Cheers.. :cheers:
Title: Re: fooling with m2emu network
Post by: AMG KC on May 13, 2019, 05:39:05 am
Itd be good if someone could take the network system from Sega Racing Classic and implement that into Model 2 emulator, it works beautifully with no jolting cars or lag at all, even when 1 machine is running at 60Hz and another is 75Hz, which ive noticed caused issues with M2 Emulator networking.
Title: Re: fooling with m2emu network
Post by: vandale on June 07, 2019, 10:41:17 pm
Theres a lua fix to indy 500 that Sailorsat made

I've got it somewhere so I'll try post it

At least 4 players works fine now with it

Gday mate, I am hoping you can help with my lua file for indy500. Currently its this:
require("model2")

function Init()

end

function Frame()
   local state = I960_ReadByte(0x202098);
   local state2 = I960_ReadByte(0x20209C);
   local state3 = I960_ReadByte(0x2020AC);

   if state==3 and state2==5 and state3==1 then   
      Model2_SetWideScreen(0)
   else
      Model2_SetWideScreen(1)
   end

end

And I need to add this:
require("model2");   -- Import model2 machine globals

function Frame()
   I960_WriteDWord(0x005ec6b0,0x00000000)
end

do I simply paste it in like this?

require("model2")

function Init()

end

function Frame()
I960_WriteDWord(0x005ec6b0,0x00000000)
   local state = I960_ReadByte(0x202098);
   local state2 = I960_ReadByte(0x20209C);
   local state3 = I960_ReadByte(0x2020AC);

   if state==3 and state2==5 and state3==1 then   
      Model2_SetWideScreen(0)
   else
      Model2_SetWideScreen(1)
   end

end

Ive tried and it doesn't work  :embarassed:

Please help.

Thanks


Title: Re: fooling with m2emu network
Post by: SailorSat on June 08, 2019, 03:05:57 pm
Hm... That should work. Do you get any error?
Title: Re: fooling with m2emu network
Post by: vandale on June 09, 2019, 07:01:20 pm
Hm... That should work. Do you get any error?
The game won’t link at all, I get network error immediately after the screen that says master and slaves, nodes etc. if I remove the code from the script then it works fine and links but fails like it used to randomly.

Am I meant to run lagfix and the script together?

Thanks



Sent from my iPhone using Tapatalk
Title: Re: fooling with m2emu network
Post by: SailorSat on June 10, 2019, 09:48:18 am
Hm... Then I can't help.
I have "FrameSync=1" in "m2network.ini" and the script.
Other than that I didn't change anything.
Title: Re: fooling with m2emu network
Post by: vandale on June 10, 2019, 03:30:43 pm
Hm... Then I can't help.
I have "FrameSync=1" in "m2network.ini" and the script.
Other than that I didn't change anything.
Do I still need to run lagfix also or does it only need the script and framesync to work?

Thanks


Sent from my iPhone using Tapatalk
Title: Re: fooling with m2emu network
Post by: vandale on June 11, 2019, 08:49:57 pm
Hm... Then I can't help.
I have "FrameSync=1" in "m2network.ini" and the script.
Other than that I didn't change anything.

Please post a copy of your LUA with widescreen and network fix.

Thanks
Title: Re: fooling with m2emu network
Post by: XSFDriver on June 15, 2019, 09:26:17 am
G'day Vandale, was wonderin'... (from your "G'Day mate" earlier), if you were down under as well, yeah?

...Anyway, I'm no programmer (only done a bit of "Basic" YEARS AGO), but I'm trying to get my head around the .lua scripts and how they work/what they do... I've been reading the "model2lua.txt" trying to understand the contexts, layouts of these. Also checked out the .lua scripts of other roms that were packaged in with Model2 1.1a (not that I get what they mean, but I gotta start somewhere)..... and was wondering, what this section of your lua script does exactly?-

function Frame()
   I960_WriteDWord(0x005ec6b0,0x00000000)
end


Also, to you others who do coding, I've done a little research, but can you tell me if I'm on the right track (or not)... are the .lua scripts written in "C" programming format or something else? I can see a BIG learning curve coming up for me.

I know that I might come across as a bit of a noobie with this, but I gotta start somewhere, to understand whats going on in the background, if I'm gunna get this 4 player Model 2 system up and running in the future sometime (and mess with it's head), and I would like to help with SOME input in the future here, if possible.

Cheers.
Title: Re: fooling with m2emu network
Post by: vandale on June 15, 2019, 05:47:10 pm
G'day Vandale, was wonderin'... (from your "G'Day mate" earlier), and was wondering, what this section of your lua script does exactly?-

function Frame()
   I960_WriteDWord(0x005ec6b0,0x00000000)

Gday mate, haha, yes I’m in little ol New Zealand. So is Boomslang.

I wouldn’t have a clue about lua scripts and how they work. Earlier in this thread sailorsat provided the script line to assist with network errors in indy500.

I think I’m not putting it in the script correctly as it makes the network worse when I use it.

Hopefully sailorsat or boomslang or Howard or one of the other true geniuses can answer your other questions.

Chur


Sent from my iPhone using Tapatalk
Title: Re: fooling with m2emu network
Post by: 2huwman on June 16, 2019, 06:07:13 am
So ages ago I mucked around with a hack to make network work while including AI positions

I've finally coded it up over the weekend which was a massive pain to get working right but have it working really well for 2p,3p and 4p setups so far

Just start race as normal and everything happens automatically as soon as race starts, also made the results screen at end work correctly

One side effect is the AI cars are coloured like normal multiplayer cars as opposed to the normal purple but otherwise it seems to work pretty good

Would love to try this - do you have a download for the hack available please?
Title: Re: fooling with m2emu network
Post by: XSFDriver on June 16, 2019, 07:56:00 am
Quote:
"Gday mate, haha, yes I’m in little ol New Zealand. So is Boomslang.

I wouldn’t have a clue about lua scripts and how they work. Earlier in this thread sailorsat provided the script line to assist with network errors in indy500. "

Cool, just a stones throw across the pond ;D  ...Me and the Mrs. want to go there sometime (I'll have to ask ya's where the good arcades are, when we go 8))

And thanks for the reply Vandale... I went back and re-read page 4 of this thread (for about the 6th time)
...so you're using the "Indianapolis500 (Rev A, Deluxe)" rom yeah? I'm curious about the "Patched Indy500 Rom" that Sailorsat mentioned in that section. The 4 PC's I've got shouldn't have any issues running at 60FPS as I've already collected heaps of matched ram and 1GB graphics cards for them, they'll all be identical so they should all run at the same performance.

Man, reading this stuff makes me want to get it all out of storage and start hookin' things up... just don't have the space at the mo'... I'm currently doing a full resto' of my car AND trying to get a few things sorted out on the house... but, one day. ::)

Cheers :cheers:

Title: Re: fooling with m2emu network
Post by: SailorSat on June 20, 2019, 04:25:27 pm
So... I just tried it (again).

m2emulator 1.1a - "Indianapolis 500 (Rev A, Twin, Newer rev)"

m2network.ini (master)
Code: [Select]
[Network]
RxPort=7001
NextIP=127.0.0.1
NextPort=7002
FrameSync=1

m2network.ini (slave)
Code: [Select]
[Network]
RxPort=7002
NextIP=127.0.0.1
NextPort=7001
FrameSync=1

indy500.lua (master and slave)
Code: [Select]
require("model2"); -- Import model2 machine globals

function Init()
end

function Frame()
I960_WriteDWord(0x005ec6b0,0x00000000)
Model2_SetWideScreen(1)
end

works like charm
Title: Re: fooling with m2emu network
Post by: Hydreigon on June 22, 2019, 01:20:43 pm
Wave Runner also has a network error type screen. Idk if you managed to patch that out or not?
Title: Re: fooling with m2emu network
Post by: XSFDriver on June 23, 2019, 08:07:06 am
Hi Sailorsat, THANKS HEAPS for going over that, with the indy500.lua... Like you said "Works like a charm"... I finally got it networking on two PC's with the following:

m2emulator 1.1a - "Indianapolis 500 (Rev A, Twin, Newer rev)"

m2network.ini (master)
Code: [Select]
[Network]
Framesync=1 ; test for stopping flickering cars
RxPort=1978
NextIP=192.168.1.2 ; sends info to this ip
NextPort=1978

m2network.ini (slave)
Code: [Select]
[Network]
Framesync=1 ; test for stopping flickering cars
RxPort=1978
NextIP=192.168.1.1 ; sends info to this ip
NextPort=1978

...and NOW with your .lua script on both:

indy500.lua (master and slave)
Code: [Select]
require("model2"); -- Import model2 machine globals

function Init()
end

function Frame()
I960_WriteDWord(0x005ec6b0,0x00000000)
Model2_SetWideScreen(1)
end

...at first, I had the two PC's just hooked up with a crossover cable, then I hooked them up with normal network cables and a router, but with both attempts I can NOW network them successfully and play the game linked, but I still get flickering rival cars (same on Daytona USA). :banghead:
Is there something I'm missing or do you think it's the two primitive PC's I've used for the test?

PC 1:
MOBO: Intel D945GTP
CPU: Intel Pentium "D945" (early Dual Core) 3.4GHz
Ram: 3Gb
GPU: Nvidia Geforce 8400 GS 512Mb
OS: XP SP2 32bit

PC 2:
MOBO: Intel D865GLC
CPU: Intel Pentium 4 (Hyperthreaded) 3.0GHz
Ram: 4Gb
GPU: ATI Radeon HD 3650 AGP 512Mb
OS: XP SP2 32bit

I've been reading this thread over and over, trying to learn more and be able to mess with these things myself. I was thinking maybe your "M2Lagfix.exe" might help this glitch?
...Any help or guidance to understand what's going on would be greatly appreciated, I know you're busy with lots of projects though.

Cheers. :cheers:
Title: Re: fooling with m2emu network
Post by: vandale on June 23, 2019, 04:38:15 pm
So... I just tried it (again).

…….works like charm

Thanks heaps
Title: Re: fooling with m2emu network
Post by: XSFDriver on June 24, 2019, 07:30:08 am
So it turned out, I cannot hook the vsync the way I wanted to do.

However there still is light at the end of the tunnel :D

Small LUA patch to "disable" the infamous "NETWORK ERROR" in Indy500 and Motoraid - turns out the code has some "delay" counter going up till 0xFF, and then deeming the network unreliable. By writing 0 (read ZERO) to this counter every single frame we can be sure to never reach that value. - Not exactly the way I wanted to fix things, but still should be enough to get a "stable" 8 player setup running.

indy500d.lua
Code: [Select]
require("model2"); -- Import model2 machine globals

function Frame()
I960_WriteDWord(0x00555214,0x00000000)
end



indy500.lua
Code: [Select]
require("model2"); -- Import model2 machine globals

function Frame()
I960_WriteDWord(0x005ec6b0,0x00000000)
end



motoraid.lua
Code: [Select]
require("model2"); -- Import model2 machine globals

function Frame()
I960_WriteDWord(0x005195d4,0x00000000)
end

OK... so this is to set this "delay" counter to 0...to go around this network error...just curious...by what way do you find this address/value in each rom? Can anyone shed some light on this for me?

E.G. I960_WriteDWord(0x005ec6b0,0x00000000)
                                      ^^^^^^^
Cheers.  :cheers:
Title: Re: fooling with m2emu network
Post by: SailorSat on June 24, 2019, 10:25:25 am
Phew… Single step debug (in MAME) every time the host cpu tries to communicate with the comm boards.
Taking notes, more debug... once in a while feeling funny and changing some memory values on the fly :D
Title: Re: fooling with m2emu network
Post by: XSFDriver on June 25, 2019, 09:16:28 am
...and a LOT of patience and persistence by the sound of it... Thanks for the reply Sailorsat, you've given me a new respect of all the work you lot put in, I'll look into the MAME debugging, not that I'll understand it, but it's a start.

Cheers.  :cheers:
Title: Re: fooling with m2emu network
Post by: gareth_iowc on November 26, 2019, 07:25:05 pm
Do i run m2lag fix on every machine or just the spectator?
Title: Re: fooling with m2emu network
Post by: vandale on October 13, 2021, 09:37:04 pm
Yes - next step will be replacing that hardcoded stuff with dynamic values.

Hi Sailorsat.

Ive finally setup a live screen on my twin daytona and was curious if you ever added the dynamic values to allow just a 2 player setup with live link?

Many thanks
Title: Re: fooling with m2emu network
Post by: SailorSat on October 16, 2021, 11:43:26 pm
To be honest - I don't remember :D
I did a lot of additions, but I'm not sure if it works in a 2-player setup correctly.
Title: Re: fooling with m2emu network
Post by: Nuexzz on October 17, 2021, 11:53:26 pm
would be great to try with 2 players  ;D
Title: Re: fooling with m2emu network
Post by: vandale on October 19, 2021, 03:52:22 am
would be great to try with 2 players  ;D

I agree. I have Sega Rally and Daytona 2 running the live system and its awesome!!!
Title: Re: fooling with m2emu network
Post by: vandale on October 19, 2021, 03:53:34 am
To be honest - I don't remember :D
I did a lot of additions, but I'm not sure if it works in a 2-player setup correctly.

Ok thats cool, Im willing to have a play around with the software on my twin, where can I acquire your scripts etc?

Thanks
Title: Re: fooling with m2emu network
Post by: MrThunderwing on October 21, 2021, 09:00:13 am
Hey, I'm just jumping in here having just skimmed through the recent comments in the thread, but for Daytona USA 2 if you want a live cam, all you need to do is add an extra machine in to your network and configure it as a live cam in the test menu.

If you add an extra Sega Rally machine into your Model 2 Network, I think it'll automatically default to a live cam if no one's playing on it. I did some single PC 3 player games of Sega Rally awhile back, but I opened the emulators up in a 4P network, so that when I used the desktop option to 'display windows side-by-side' it kept them in the right aspect ratio. The player 4 window turned into a live cam, and I can't recall actually changing anything in the test menu to make it do that. This is all without lagfix or any scripts BTW.
Title: Re: fooling with m2emu network
Post by: SailorSat on October 22, 2021, 03:43:07 am
If you add an extra Sega Rally machine into your Model 2 Network, I think it'll automatically default to a live cam if no one's playing on it.
Yup, I think Indy 500 and STCC do the same - they switch between attract mode and "live cam" every 30 seconds or something like that.
Title: Re: fooling with m2emu network
Post by: vandale on October 25, 2021, 04:15:12 am
Hey, I'm just jumping in here having just skimmed through the recent comments in the thread, but for Daytona USA 2 if you want a live cam, all you need to do is add an extra machine in to your network and configure it as a live cam in the test menu.

If you add an extra Sega Rally machine into your Model 2 Network, I think it'll automatically default to a live cam if no one's playing on it. I did some single PC 3 player games of Sega Rally awhile back, but I opened the emulators up in a 4P network, so that when I used the desktop option to 'display windows side-by-side' it kept them in the right aspect ratio. The player 4 window turned into a live cam, and I can't recall actually changing anything in the test menu to make it do that. This is all without lagfix or any scripts BTW.

Yup Im running both those games in live mode. Its Daytona I want to add though and the information and files seem very illusive.
Title: Re: fooling with m2emu network
Post by: Sixfortyfive on October 27, 2021, 05:13:48 am
Oh cool, this thread is still kind of active. I e-mailed you about this a couple days ago SailorSat and have been playing around with the Daytona live spectator program and trying to get it to work. For the time being I'm using the files and instructions in this post (http://forum.arcadecontrols.com/index.php/topic,133283.msg1459251.html#msg1459251) since it's the most complete and straightforward explanation I've seen so far. I haven't messed around with the other tools you linked (https://github.com/SailorSat/daytona-utils/tree/master/src) very much yet since some of the config files in there are a little different and I'm trying to take this one step at a time and not bombard everyone with too many troubleshooting questions.

Anyway, I'm trying to set up a full count of 8 Daytona game sessions plus a spectator on one computer, just for the sake of testing for now. The 8 actual game sessions are fully booting and running correctly, which suggests that the lagfix tool is configured correctly, but the spectator session gets stuck on the "NETWORK CHECKING" screen and never advances, and I can't figure out the cause. For what it's worth, the stats program does seem to correctly identify the instance of the emulator that is meant for spectating; the overlay wraps around that specific emulator window.

These are all of the config files:

(https://i.imgur.com/5Uoq6pW.png)

The top 8 docs are the m2network settings for each of the 8 player stations.
On the bottom, the first doc is the m2network settings for the spectator station, followed by the config files for the stats and lagfix tools.
On the player stations, car 1 is set to Master and the rest to Slave. The spectator station is also set to Master and car 1; it wasn't clear to me whether this was correct or not.
All other game settings are identical between emulators, and they're all running the "Saturn ads" version of the game. The cabinet type is set to "Special" for all of them.
All IP addresses in these files are set to localhost since it's all running on one PC at the moment.

Did I mess up the port assignments somewhere or is something else the cause?

EDIT: Also, uh, when I started messing around with these tools, my laptop keyboard's Windows key stopped working. If I plug in a USB keyboard or use the Win10 OSD keyboard, the key functions fine on those. I've tried several googled suggestions for fixing this but no luck. I guess there's a chance that this might be an unrelated hardware failure but just throwing this out there.
Title: Re: fooling with m2emu network
Post by: SailorSat on October 27, 2021, 05:56:25 am
I'll try to get my lazy ass up and check the stuff and provide some instructions on how to use it.
Title: Re: fooling with m2emu network
Post by: vandale on October 27, 2021, 11:51:15 pm
I'll try to get my lazy ass up and check the stuff and provide some instructions on how to use it.

Yay!!!!!!!!!  :applaud:
Title: Re: fooling with m2emu network
Post by: SailorSat on October 28, 2021, 05:54:47 am
Holy crap... Virus detections nowaday seriously are paranoid... "Possibly sketchy software" because I do socket operations and memory injection...
Anyway...

Notes for "same machine use":
- run the main emulators using "emulator_multicpu.exe"
- run the live spectator using "emulator.exe" (because is checked first).

The LiveStats will use the "last active" window called "Daytona USA (Saturn Ads)".
It uses two "full screen" windows - if there is no second screen, the map view can't be seen.

!! DON'T start a race with Car No.1 !! - Start with any other car and have Car No. 1 join in.

Speed will always be shown as km/h (sorry folks ;))
Tested with 2, 4 and 8 players. (other sizes should work too.)
Title: Re: fooling with m2emu network
Post by: Sixfortyfive on October 28, 2021, 12:06:39 pm
Thanks. It seems that it's almost working for me, but not quite. This time the spectator gets past the network check, but the stats display doesn't actually load. Interestingly enough, if I kill the spectator emulator, then the stats program seems to attempt to hook into the player 1 station. Not sure what's going on.

EDIT: PLEASE MUTE THIS VIDEO LOL. Seems that OBS didn't use my desktop volume setting, so you get 9 copies of Mitsuyoshi belting the attract demo at you.

Here's a video of what I'm doing and seeing. (https://www.youtube.com/watch?v=w18P3EumslE)

I made another attempt with a full 8 players, and then another attempt where I left the spectator emulator in fullscreen. Same result.

These are my config files:

(https://i.imgur.com/9n93Pdx.png)




EDIT 2: Oh, of course. If I insert coin on the spectator machine then the stats hook into that station correctly. So nevermind, for the most part.

The spectator station's HUD still spreads out across the whole monitor instead of staying confined to the emulator window, but I assume that's just a limitation of the program?
Title: Re: fooling with m2emu network
Post by: SailorSat on October 28, 2021, 01:02:35 pm
Ah... I see...
I guess you are missing the patch-script for the special inputs.

https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/daytonas.lua
Title: Re: fooling with m2emu network
Post by: Sixfortyfive on October 28, 2021, 01:43:35 pm
Ah, I'm close, and it seemed to have been working fine at first, but now the spectator cam alternates between a working behind-the-car view and this, where only the background is visible.

(https://i.imgur.com/4y5x5oz.png)

Ah... I see...
I guess you are missing the patch-script for the special inputs.

https://raw.githubusercontent.com/SailorSat/daytona-utils/master/src/scripts/daytonas.lua
I did have a version of this; just forgot to put it in the scripts folder for the spectator. But now I'm getting the above error whether I have a script in the folder or not.



EDIT: In any case, here's what it looked like while I had it working.

https://www.youtube.com/watch?v=ASUTMqdtcLA (https://www.youtube.com/watch?v=ASUTMqdtcLA)



EDIT: I consistently get that bug on the spectator station if I hold the VR4 button during the part in the attract demo where it lets you change views.



EDIT: Fixed it by deleting the spectator emulator's NVRAM and reconfiguring it from scratch.  :)

Can the control panel tool be feasibly run from a single PC setup?
Title: Re: fooling with m2emu network
Post by: anchounio on November 12, 2021, 01:58:50 pm
Are there lua scripts also for stcc and waverunr ?  :notworthy: :notworthy:

The network is not stable on those games too, as well as indy500 or motoraid without the lua scripts
Title: Re: fooling with m2emu network
Post by: Daytonafan1984 on December 02, 2021, 09:28:55 pm
Hi Sailorsat, I want to thank you for all the awesome work you have done with lagfix and the live cam. I have this setup on my cab and it's great. I have a few questions, I noticed you have a new daytonalagfix.exe but I can't get this working with livecam, not sure the benefit of this new exe? Also just curious if you found a way to make it possible to be able to start a game from 1p and have the live cam work as I only have a 2 can setup the game often gets started from 1p and the camera doesn't work :( lastly I was wondering if you could update to allow livestats to work with model 2 in full screen mode. I have the livecam on a 75" and it doesn't look great in native resolution without antialiasing which is only possible in full screen( also higher resolutions are possible in full screen) I've tried everything and can't find a solution here so I'm hoping it's something you can add? Thanks again!
Title: Re: fooling with m2emu network
Post by: SailorSat on December 04, 2021, 04:58:29 am
As for the fullscreen issue - I use dxwnd to "fake" fullscreen.

As for the 1p issue - well, thats sadly not possile right now. maybe later ;D
Title: Re: fooling with m2emu network
Post by: Daytonafan1984 on December 05, 2021, 08:06:40 pm
Thanks for your help Sailorsat! I can confirm dxwnd works perfectly with livestats. Now I'm able to run a higher res with AA on the live cam screen and it looks great!

I look forward to the 1p race start fix :)
Title: Re: fooling with m2emu network
Post by: holmes on January 05, 2022, 05:06:42 pm
Hi,

OK, here is my stupid question: if I only want to have a 2 player session + AI cars without livecam, on a single PC or using 2 PCS, is it relevant to use m2lagfix?
Should I use the zip files provided in post #110 or should I use the files from Sailorsat's github (daytona-utils/src)? There seems to be a lot of files in there and it is not obvious to me which ones to use.

Thank you for your help
Title: Re: fooling with m2emu network
Post by: gareth_iowc on February 17, 2022, 02:21:32 pm
Sorry, I have a few questions :)

I have 4 emulators running with lagfix no issues but as soon as i open stats it crashes.


I'm opening in order

Code: [Select]
Emulator 1
Master
Car 1

[Network]
RxPort=15612
NextIP=127.0.0.1
NextPort=15613
FrameSync=1

Code: [Select]
Emulator 2
Slave
Car 2

[Network]
RxPort=7002
NextIP=127.0.0.1
NextPort=7003
FrameSync=1

Code: [Select]
Emulator 3
Slave
Car 3

[Network]
RxPort=7003
NextIP=127.0.0.1
NextPort=7004
FrameSync=1

Code: [Select]
Emulator 4
Slave
Car 4

[Network]
RxPort=7004
NextIP=127.0.0.1
NextPort=7001
FrameSync=1

Code: [Select]
Sats Emulator
Slave
Car 2

[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=8002
FrameSync=1


Code: [Select]

Lagfix

[network]
localhost=127.0.0.1
localport=7001
remotehost=127.0.0.1
remoteport=7002

[emulator]
host=127.0.0.1
localport=15613
remoteport=15612

[stats]
remotehost=127.0.0.1
remoteport=8000



Code: [Select]
Stats

[client]
localhost=0.0.0.0
localport=8000

[live]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=127.0.0.1
RemotePort=9001


Is that stats emulator set to master or slave in game?
Title: Re: fooling with m2emu network
Post by: dgrace on November 08, 2022, 03:40:31 pm
Finally got Daytona and Motoraid Network/LAN running pretty smoothly using two separate PCs. I'm still struggling to get Wave Runner to link consistently. I can only get them to link up maybe 25% of the time. Otherwise I either get a "network error" or "checking internet connection". Is anyone aware of any tricks or tips on linking Wave Runner consistently (i.e. lua script)? Thanks a bunch
Title: Re: fooling with m2emu network
Post by: buttersoft on November 08, 2022, 05:50:33 pm
Finally got Daytona and Motoraid Network/LAN running pretty smoothly using two separate PCs. I'm still struggling to get Wave Runner to link consistently. I can only get them to link up maybe 25% of the time. Otherwise I either get a "network error" or "checking internet connection". Is anyone aware of any tricks or tips on linking Wave Runner consistently (i.e. lua script)? Thanks a bunch

Not sure what you've already tried, but for some model2 games in two player I find going into the test menu's and exiting again at the right time will help them link. Some games you exit the master half a second before the slave, some the slave half a second before the master. There's probably a way to automate the process. This is without using Sailorsat's patch though, no idea what effect that would have.

EDIT: This is exactly what Buno is showing below. And i should have typed "test menu's" not "text menu's". Have updated now :)
Title: Re: fooling with m2emu network
Post by: xbrunox on November 09, 2022, 11:31:33 am
Finally got Daytona and Motoraid Network/LAN running pretty smoothly using two separate PCs. I'm still struggling to get Wave Runner to link consistently. I can only get them to link up maybe 25% of the time. Otherwise I either get a "network error" or "checking internet connection". Is anyone aware of any tricks or tips on linking Wave Runner consistently (i.e. lua script)? Thanks a bunch


sorry is in italian..

https://www.youtube.com/watch?v=5vVva_ttXXg&t=1950s

look at min 8:30
Title: Re: fooling with m2emu network
Post by: MrThunderwing on November 10, 2022, 06:14:15 pm
What's the deal with that crazy wide 3 monitor cabinet? I don't think I've ever seen anything like it before.
Title: Re: fooling with m2emu network
Post by: PL1 on November 10, 2022, 06:32:45 pm
What's the deal with that crazy wide 3 monitor cabinet? I don't think I've ever seen anything like it before.
That's Bruno's "YATTACAB".
- There are lots of pics in his Project Announcement thread here (http://forum.arcadecontrols.com/index.php/topic,163833.0.html).
- The other cab in the video is his "MAZINCAB" which is also mentioned in that thread.


Scott
Title: Re: fooling with m2emu network
Post by: Maillouski on March 04, 2023, 09:05:37 pm
Sorry if this is very well known information, but I would like to know if it is possible to run 2 instances on fullscreen on 2 monitors plugged into the same PC ?
Title: Re: fooling with m2emu network
Post by: buttersoft on March 05, 2023, 12:39:03 am
Hmm, i have memories of m2emu being stubborn about moving monitors. There will be apps you can force or redraw it with tho.
Title: Re: fooling with m2emu network
Post by: SailorSat on March 15, 2023, 09:46:24 am
I used dxWnd for that, however I think I had issues with controls only workin in the focused instance.
Title: Re: fooling with m2emu network
Post by: Billkwando on July 19, 2023, 02:25:21 pm
Hello folks! Old timey poster here, back hoping for some Daytona link mode help.

I recently had to order a new racing seat, because my new G29 wheel has a giant pedal board that won't fit on my playseat (original, from 20 years ago) seen here, in the top right corner:

https://www.youtube.com/watch?v=w7Jer5xDbOM

So now, I'm going to have 2 seats and 2 FFB wheels. I ordered a monitor stand for the old playseat (2nd player) and before I shell out on a big monitor, build a new 4 speed shifter (bought the 2nd happ cruisin stick already) and buy a used PC on ebay, I figured I'd better check on the state of things.

Is it possible to run Daytona smoothly on 2 PCs? My understanding is I only need the lag fix on the master machine, correct? I hear everyone talking about live cam but I'm not sure what that is. If I just want to run 2 players and have the audio and everything sync up nicely, what do I need?

Should I download the lagfix from the Github address? I originally saw a link to it in a youtube video pointing to a .de site, but Firefox kept blocking it like a virus or something.

I am at your mercy, gentlefolk, so please help me start my engines!  ;)

Also, here's a cheery Mitsuyoshi to brighten your day!

https://www.youtube.com/watch?v=1J9ffRgADRU

Thanks!!!!


EDIT: Also, I can't seem to figure out how to download the lagfix from the github site.
Title: Re: fooling with m2emu network
Post by: USSDG on July 25, 2023, 10:38:22 am
Depends on the specs of your 2 PCs.  I have same setup as you.  Daytona USA (Model 2 version) runs perfectly smooth multiplayer with both PCs linked over LAN cable.  Same with Daytona USA 2 (Model 3, Supermodel) and most Teknoparrot games.  My PCs are MinisForum HX99G, so they are pretty capable of playing both old and new games very smooth.

Perhaps you are talking about the Teknoparrot version of Daytona Championship USA?  I think that is the one that requires webcams to work. 

**BREAK**
Does anyone know why networking with Waverunner on Model 2 is not yet working?
Title: Re: fooling with m2emu network
Post by: buttersoft on July 25, 2023, 07:25:15 pm
**BREAK**
Does anyone know why networking with Waverunner on Model 2 is not yet working?

Because the networking in M2emu isn't finished. We're lucky to have it at all, really :) Elsemi, the dev, got up to where he got up to and stopped very abruptly. Rumour has it Sega was watching development, and was so impressed they hired him (under all sorts of NDAs) to work for them porting games to other platforms like VC.

FYI Waverunner GP on Naomi will network in Flycast, but it doesn't control well with a wheel.
Title: Re: fooling with m2emu network
Post by: USSDG on July 25, 2023, 09:50:42 pm
Wow, fascinating insight.  Thank you for that bit of info.  Yes, indeed, we truly are lucky to have it at all, but so sad it is unfinished.  M2 is the Edward Scissorhands of emulators.
Title: Re: fooling with m2emu network
Post by: Super-Becker on September 01, 2023, 07:14:16 am
This is not a topic but a historical document! Congratulations SailorSat, Nuexzz and everyone who put in the effort.
Title: Re: fooling with m2emu network
Post by: trick72 on October 11, 2023, 07:11:31 am
Hi,
I'm trying to setup m2emulator linked on two different pc's via lan. I can get m2emulator to work but i cannot get m2lagfix to work on top of it.
The m2lagfix small window has a red bar in it (supposed to be green when working?) and the cars in daytona still flicker.
So I'm not running the two emulators on the same machine, but on 2 different PC's on a LAN network (not cross linked, but on a switch)
I am able to run a lot of other linked arcade games like supermodel, teknoparrot etc.

cab1 ip address is 192.168.0.11
cab2 ip address is 192.168.0.12
currently working m2emulator link is:

cab1:
[Network]
RxPort=1978
NextIP=192.168.0.12
NextPort=1978
FrameSync=1

cab2:
[Network]
RxPort=1978
NextIP=192.168.0.11
NextPort=1978
FrameSync=1

What would the m2lagfix.ini would look like to make it work in this particular situation? I found various example ini files in this thread but they are all different, some really don't make sense (like 127.0.0.1 as remote ip address??), and none of them work for me. Anyone in the same setup as me can share their working m2lagfix.ini?
Thanks


Title: Re: fooling with m2emu network
Post by: Super-Becker on October 11, 2023, 07:05:31 pm
Try putting:

cab1:
[Network]
RxPort=11200
NextIP=192.168.0.12
NextPort=44405
FrameSync=1


cab2:
[Network]
RxPort=44405
NextIP=192.168.0.11
NextPort=11200
FrameSync=1


Title: Re: fooling with m2emu network
Post by: trick72 on October 12, 2023, 02:58:22 am
Try putting:

cab1:
[Network]
RxPort=11200
NextIP=192.168.0.12
NextPort=44405
FrameSync=1


cab2:
[Network]
RxPort=44405
NextIP=192.168.0.11
NextPort=11200
FrameSync=1

Hi, thanks for your reply. But the suggestion you have is the contents of the m2network.ini but I want to know the contents of a working m2lagfix.ini in my situation. Lan on m2emulator itself works for me, so the contents of m2network.ini is fine for me.
Title: Re: fooling with m2emu network
Post by: jorgenjl2 on October 28, 2023, 01:13:01 pm
Try putting:

cab1:
[Network]
RxPort=11200
NextIP=192.168.0.12
NextPort=44405
FrameSync=1


cab2:
[Network]
RxPort=44405
NextIP=192.168.0.11
NextPort=11200
FrameSync=1

Hi, thanks for your reply. But the suggestion you have is the contents of the m2network.ini but I want to know the contents of a working m2lagfix.ini in my situation. Lan on m2emulator itself works for me, so the contents of m2network.ini is fine for me.

Here are my files that work if you assume pc1 is 192.168.0.2 and pc2 is 192.168.0.3. No blinking cars.

Pc1 (192.168.0.2) - Set to master/car number 1 in test menu.
—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

—m2network.ini
RxPort=9001
NextIP=192.168.0.3
NextPort=9001
FrameSync=1



Pc2 (192.168.0.3 - set to slave and car 2 in test menu)
—M2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
Remotellost=192.168.0.3
RemotePort=9001
StallDetection=1

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

—M2network.ini
[Network]
RxPort=9001
NextIP=192.168.0.2
NextPort=9001
FrameSync=1


Note: This was keyed in via iPhone pic to text so double check for any typos but numbers should be right. Also, if using Launchbox, esc key script may not auto save test menu changes so open m2emu and load DaytonaUSA outside Bigbox/LB or take away LB esc script temporarily)
Title: Re: fooling with m2emu network
Post by: MrThunderwing on October 29, 2023, 12:30:27 pm
Y'know, trying this lagfix out has been on my 'to-do' list for awhile, but because I started playing Daytona online again on the PS3 several years back, it kept slipping off my horizon... but I kept saying to myself I'll have a crack at getting it working sometime soon...

I just realised this thread is over 10 years old now.

10 years!

---fudgesicle--- me sideways - where has that time gone?!?
Title: Re: fooling with m2emu network
Post by: SailorSat on October 29, 2023, 02:28:01 pm
---fudgesicle--- me sideways - where has that time gone?!?
Took one too many pit-stop... :)
Title: Re: fooling with m2emu network
Post by: jorgenjl2 on December 03, 2023, 11:25:32 pm
I need some help. I have three racing cabinets hooked up with the settings below but the racers still blink a lot. What is wrong with this? The m2network.ini is simple (pc 1 to pc2 to pc3 back to pc1 all over rx and next port both/all 9001 for port and framesync=1) which network wise works fine but the lagfix is not working. Is RemoteHost supposed to be local host ip like below? I am pretty sure my 2 player settings I posted a few posts up worked with no blinking but now I am wondering if I had anything wrong.

Pc 1 - 192.168.0.2
—M2lagfix.ini
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

Pc2 - 192.168.0.3
—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

Pc 3 - 192.168.0.4
—m2lagfix.ini
[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.2
RemotePort=9000
Title: Re: fooling with m2emu network
Post by: buttersoft on December 04, 2023, 05:32:38 am
This post contains two IP addresses, and the one below it is Sailorsat explaining how to config m2lagfix for them.

http://forum.arcadecontrols.com/index.php/topic,133283.msg1462123.html#msg1462123
Title: Re: fooling with m2emu network
Post by: jorgenjl2 on December 05, 2023, 03:56:09 pm
This post contains two IP addresses, and the one below it is Sailorsat explaining how to config m2lagfix for them.

http://forum.arcadecontrols.com/index.php/topic,133283.msg1462123.html#msg1462123


EDIT: REPLACING 127.0.0.1 with each PCs local ip address (192.168.0.2 on pc 1, etc) for each time 127.0.0.1 is below, it runs and it appears pc 1 and pc3 have no flashing cars but pc 2 does still for some reason (I may have started the game with pc2 if it matters). I will test some more or see if I have a typo in my code.

Hmm this doesn’t seem to work for 3 players but I may have something wrong. Here is what I have. I assume it’s a ring back to the beginning. Do the ports need to change for 3 players?


Pc 1 - 192.168.0.2
—M2network.ini
[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSvnc=1

—M2lagfix.ini
[m2rx]
Localhost=0.0.0.0
LocalPort=9000
Remotelost=127.0.0.1
RemotePort=9001
StallDetection=1

[m2rx]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=192.168.0.3
RemotePort=9000



Pc 2 - 192.168.0.3
—M2network.ini
[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSync=1

—M2lagfix.ini
[m2rx]
LocalHost-=0.0.0.0
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=9001
StallDetection=1

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



Pc 3 - 192.168.0.4
—M2network.ini
[Network]
RxPort=9001
NextIP=127.0.0.1
NextPort=9002
FrameSync=1

—M2lagfix.ini
[m2rx]
LocalHost=0.0.0.0
LocalPort=9000
RemoteHost=127.0.0.1
RemotePort=9001
StallDetection=1

[m2tx]
LocalHost=127.0.0.1
LocalPort=9002
RemoteHost=192.168.0.2
RemotePort=9000
Title: Re: fooling with m2emu network
Post by: jorgenjl2 on December 05, 2023, 05:18:51 pm
The first two times I played with the new lag fix settings above (with the local ips instead of 127.0.0.1), the game started in 3 player mode but just racer 2 had flickering. The third and fourth time (exit game but no reboot and same settings) there was no flickering at all for any racer. Does this have to do with who starts the race or something? I will have to test more.
Title: Re: fooling with m2emu network
Post by: buttersoft on December 05, 2023, 05:51:42 pm
From memory you are supposed to use the loopback IP's (127.0.0.1) in the m2network.ini files where they were shown. This is because the m2lagfix program wraps m2emu and handles the comms between PC's for you. So M2emu on PC1 talks to M2lagfix on PC1 (loopback and ports), then M2lagfix on PC1 talks to M2lagfix on PC2 (IP addreses), then M2lagfix on PC2 talks to M2emu on PC2 (loopback and ports), and on. If you aren't doing that, the comms chain won't be set up right.

If you compare the example i linked with Sailorsat's next post three spots down, which shows an example of two instances of m2emu on the one PC, i'm hoping it makes more sense. I'm not saying i understand why the ports numbers are the way they are yet, but i'm sure the answer is in there somewhere.

EDIT: err, also, one of those "remotehost" entries in your config was misspelled as remotelost, though that could just be in the post not the files.

EDIT2: ok, i think it runs like this:

-PC1 receives IP message (on PC2 M2lagfix M2TX remote port)
-M2lagfix M2RX local port (same port number as line above)
-M2lagfix M2RX remote port
-M2emu RXport (same port number as line above; i.e. M2RX remote port)
-M2emu TXport
-M2lagfix M2TX local port (same port number as line above)
-M2lagfix M2TX remote port
-M2lagfix M2TX remotehost (PC2 IP address)

-PC2 receives IP message (on PC1 M2lagfix M2TX remote port)
-M2lagfix M2RX local port (same port number as line above)
-M2lagfix M2RX remote port
-M2emu RXport (same port number as line above)
-M2emu TXport
-M2lagfix M2TX local port (same port number as line above)
-M2lagfix M2TX remote port
-M2lagfix M2TX remotehost (PC1 IP address)

and repeat. The m2network.ini file should not contain any external IP addresses. M2emu itself is not talking to the other PC, it's only talking locally to M2Lagfix, and M2lagfix talks to the other PC.

That's for two PC's.  I'm not sure if the ports need to line up between PCs, but it's not going to hurt, so best to stick to it. And the magic lagfix itself happens somewhere between steps, of course.
Title: Re: fooling with m2emu network
Post by: jorgenjl2 on December 05, 2023, 08:07:10 pm
This is awesome thank you. Yeah I did a pic to text via my iPhone since my arcades don't have internet so that explains that typo. I went ahead and connected to them via the physical router to grab the actual code below. A few posts after the one you sent, SailorSat talks about how on Windows 7 using 127.0.0.1 works but newer Windows versions require using the actual ip address of that local host so that explains why the three linked cabs would not start at all until I fixed that. However, using the below settings, I always have one cabinet that has flashing cars. If all three race, player 2 flashes. If player 1 and player 3 race (and player 2 sits out), player 3 has flashing cars. So something odd. Here is the code I have now with the one showing blinking... Do you see any issues?


--Racer 1 - 192.168.0.2 (Master, Car 1 in Test Menu)
--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



--Racer 2 - 192.168.0.3 (Slave, Car 2 in Test Menu)
--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



--Racer 3 - 192.168.0.4 (Slave, Car 3 in Test Menu)
--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.4
LocalPort=9002
RemoteHost=192.168.0.2
RemotePort=9000
Title: Re: fooling with m2emu network
Post by: buttersoft on December 05, 2023, 08:24:09 pm
If I remember correctly, UDP on 127.0.0.1 did work fine on my Win7 development rig, but not on my XP64 rig in the cab.

She seems to be saying it should be fine for Win7 and up, but not on XP? I haven't even tried to run this yet, so i'm not saying i have any experience.
Title: Re: fooling with m2emu network
Post by: jorgenjl2 on December 05, 2023, 10:26:50 pm
If I remember correctly, UDP on 127.0.0.1 did work fine on my Win7 development rig, but not on my XP64 rig in the cab.

She seems to be saying it should be fine for Win7 and up, but not on XP? I haven't even tried to run this yet, so i'm not saying i have any experience.
In later posts she talks about changing from 127.0.0.1 to the local actual ip so that definitely seemed to fix part of the issue as it wouldn’t get past the black initial screen until I changed that. It fixed everything after that except for one pc flickering.

I tried using gpt4 to see if something is wrong with those latest settings but it was not super helpful. It suggested changing the pc that is master which is a good idea. Right now I can get both pc 2 and pc3 to each separately flicker in a 2 player race (using 3 linked cabs though). So I expect the pc 1 to flicker once I make it a slave in the set. It is just odd that I am pretty sure I had all three working with no flicker at one point before it came back again. Not sure if the issue is sporadic or if I just missed the flicker somehow.

SailorSat mentioned something about not starting the game with player 1 but I think that was referencing the 9th player preview if I recall and anyhow my player 1 auto starts and inserts a coin every time automatically whereas player 2 and 3 (after an initial race) allow me to insert or not insert a coin to start or not start those. I also wonder if an odd number of players (3 players in my case) is supported with m2lagfix.
Title: Re: fooling with m2emu network
Post by: buttersoft on December 06, 2023, 03:06:18 am
That quote is from when Sailorsat was talking about changing IPs, or one of the following posts on the same subject. But i would imagine that if your games are linking, without using the IP of a different PC in the network.ini files at least, the IP is not the issue.

The auto-coin-up is just the NVRAM recording previous coin ups IIRC. When you switch off, credits carry over. Delete the NVRAM file and when the game loads there' won't be any credits. Of course then you have to go into the service menu and set things up, but if you're doing that anyway...
Title: Re: fooling with m2emu network
Post by: M00C0WM00 on February 29, 2024, 11:35:30 am
As for the fullscreen issue - I use dxwnd to "fake" fullscreen.

As for the 1p issue - well, thats sadly not possile right now. maybe later ;D

Hey SailorSat,

Just wondering if I could ask you a few questions about your Daytona setup, if that's cool?
Title: Re: fooling with m2emu network
Post by: SailorSat on March 02, 2024, 02:17:24 am
Sure...
Title: Re: fooling with m2emu network
Post by: M00C0WM00 on March 02, 2024, 06:48:41 am
Sure...

Awesome! I sent you a DM with a few questions. Appreciate it!