Network code

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Re: Network code

Postby SailorSat » Thu Nov 02, 2017 7:30 pm

I actually bought a Model3 comm board. but didn't put too much time into it yet.
real life ^^
SailorSat
 
Posts: 30
Joined: Mon Jun 06, 2016 4:26 am

Re: Network code

Postby Spindizzi » Fri Dec 22, 2017 9:46 am

Hi,
Little news, I always try to add network to supermodel. Do other people work on this too ?
Since last time, I've changed many things that I suppose to be more correct
The bad news, apparently, we must find good timing between irq call, very hard!
I'm not sure of the normal operation compared to real hardware, I've the bad impression I forgot things or I skip a step or 68k program skips step. My actual code is a work trial only and it can't be added to a real release, only for debugging and for devs.
I think I've reached my limit, lol

:?: Anybody have access to real twin linked cab ? I would like to obtain informations on what they display on screens during boot (specially dirtdvls, harley, lemans)

Oh oh oh, this happened to me yesterday :o
the one that gave me a gift
the video is hardly compressed, and sound choppy due to the recorder software and slow due to the fact I've used option no-threads)
I don't have youtube account, you can download it if stream doesn't work
https://yadi.sk/i/EAIsEKQf3QrwvN
Of course, I will publish diff source code, as soon as I cleaned it up a little, and asap I make the diff - takes a little time...
++
Spindizzi
 
Posts: 96
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Network code

Postby Ian » Fri Dec 22, 2017 10:13 am

Wow Spindizzi, amazing work. And it's not even christmas lol
As far as I know you are the only person working on this :) Maybe the network part will give us a better understanding of timing
Ian
 
Posts: 1323
Joined: Tue Feb 23, 2016 9:23 am

Re: Network code

Postby Boomslangnz » Fri Dec 22, 2017 7:09 pm

wow awesome stuff!

Keeo up the hard work man! Is Dirt Devils the only game that links up currently?
Boomslangnz
 
Posts: 117
Joined: Mon Jul 23, 2012 10:35 pm

Re: Network code

Postby Spindizzi » Sat Dec 23, 2017 1:00 am

Ian wrote:Maybe the network part will give us a better understanding of timing

sadly, I'm afraid not, not for now simply because the synchro is cheated by socket receive blocking fonction (loop until receiving something). This freezes supermodel.
So as I see the normal operation (assumption), the delay counter doesn't increment and the fonction that synchronize the cab isn't launched since it's falsely synchronised with the first send-receive. Many limitations at this time

Boomslangnz wrote:Is Dirt Devils the only game that links up currently?

Yes, this is the only one that enter in game, the others games produce network error, reset, waiting for, send 0 at firt trame, and so on....
Dirtdvls is the easiest game, I think it has less internal checks than others
This is the first that let me entering in game many many weeks ago, but it never takes care of data receive-send, it was like master and slave run stand alone
Spindizzi
 
Posts: 96
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Network code

Postby Ian » Sat Dec 23, 2017 2:30 am

Normally I would say always use a thread for receiving network stuff. But maybe you could get away with a blocking socket with a timeout of zero. If it starts to receive data maybe up the timeout to 16ms.
Ian
 
Posts: 1323
Joined: Tue Feb 23, 2016 9:23 am

Re: Network code

Postby ConversusVans » Sat Dec 23, 2017 9:40 am

Spindizzi wrote:Hi,
Little news, I always try to add network to supermodel. Do other people work on this too ?
Since last time, I've changed many things that I suppose to be more correct
The bad news, apparently, we must find good timing between irq call, very hard!
I'm not sure of the normal operation compared to real hardware, I've the bad impression I forgot things or I skip a step or 68k program skips step. My actual code is a work trial only and it can't be added to a real release, only for debugging and for devs.
I think I've reached my limit, lol

:?: Anybody have access to real twin linked cab ? I would like to obtain informations on what they display on screens during boot (specially dirtdvls, harley, lemans)

Oh oh oh, this happened to me yesterday :o
the one that gave me a gift
the video is hardly compressed, and sound choppy due to the recorder software and slow due to the fact I've used option no-threads)
I don't have youtube account, you can download it if stream doesn't work
https://yadi.sk/i/EAIsEKQf3QrwvN
Of course, I will publish diff source code, as soon as I cleaned it up a little, and asap I make the diff - takes a little time...
++


Great progress! Have you tried this with Harley, Spindizzi?
- Conversus W. Vans (Paul)
User avatar
ConversusVans
 
Posts: 207
Joined: Sun Apr 27, 2014 3:27 pm
Location: South Carolina

Re: Network code

Postby Spindizzi » Sat Dec 23, 2017 10:01 am

Ian wrote:Normally I would say always use a thread for receiving network stuff. But maybe you could get away with a blocking socket with a timeout of zero. If it starts to receive data maybe up the timeout to 16ms.

I've tested non blocking but I can't success to set timeout correctly. If non blocking, this let you very little time to connect. Thread, not my cup of tea, lol

of course, I've checked all, harley stops after displaying id network# and id cab#, never goes in attract mode
Attachments
very_early_netboard_diff_v03.rar
(18.72 KiB) Downloaded 20 times
Spindizzi
 
Posts: 96
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Network code

Postby MrThunderwing » Sat Dec 23, 2017 11:23 am

Oooooh, a nice little Christmas bonus!
User avatar
MrThunderwing
 
Posts: 446
Joined: Fri Sep 02, 2011 11:31 am
Location: Bristol, UK

Re: Network code

Postby Ian » Sat Dec 23, 2017 4:35 pm

Spindizzi, i can write you some multi threaded network code if you want. I've written a fair amount before so it should be pretty trivial. But the question is what should i write?

If we do tcp, we could even do automatic setup by detecting the port in use and bumping the number, written code to do that before :) useful for multiple program instances.
Ian
 
Posts: 1323
Joined: Tue Feb 23, 2016 9:23 am

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest