Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: fooling with m2emu network  (Read 35960 times)

0 Members and 1 Guest are viewing this topic.

AMG KC

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:July 17, 2019, 05:53:09 am
Re: fooling with m2emu network
« Reply #200 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?

Hydreigon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:Yesterday at 06:59:56 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #201 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.

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 682
  • Last login:August 18, 2019, 06:50:30 am
  • As I pass, do I give you the ass or the crotch?
Re: fooling with m2emu network
« Reply #202 on: April 21, 2019, 12:13:13 pm »
In the past I've been able to get a 2 Player 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.

Nuexzz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 236
  • Last login:July 15, 2019, 09:03:40 pm
Re: fooling with m2emu network
« Reply #203 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

Boomslang

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 768
  • Last login:Yesterday at 01:19:04 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #204 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

AMG KC

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:July 17, 2019, 05:53:09 am
Re: fooling with m2emu network
« Reply #205 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!

XSFDriver

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:August 03, 2019, 08:05:42 am
Re: fooling with m2emu network
« Reply #206 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:

AMG KC

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:July 17, 2019, 05:53:09 am
Re: fooling with m2emu network
« Reply #207 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.

vandale

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 335
  • Last login:August 22, 2019, 04:15:09 pm
  • Id 10 and t error
Re: fooling with m2emu network
« Reply #208 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


« Last Edit: June 07, 2019, 10:43:39 pm by vandale »

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1165
  • Last login:August 21, 2019, 03:56:38 am
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #209 on: June 08, 2019, 03:05:57 pm »
Hm... That should work. Do you get any error?
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


vandale

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 335
  • Last login:August 22, 2019, 04:15:09 pm
  • Id 10 and t error
Re: fooling with m2emu network
« Reply #210 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

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1165
  • Last login:August 21, 2019, 03:56:38 am
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #211 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.
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


vandale

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 335
  • Last login:August 22, 2019, 04:15:09 pm
  • Id 10 and t error
Re: fooling with m2emu network
« Reply #212 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

vandale

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 335
  • Last login:August 22, 2019, 04:15:09 pm
  • Id 10 and t error
Re: fooling with m2emu network
« Reply #213 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

XSFDriver

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:August 03, 2019, 08:05:42 am
Re: fooling with m2emu network
« Reply #214 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.

vandale

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 335
  • Last login:August 22, 2019, 04:15:09 pm
  • Id 10 and t error
Re: fooling with m2emu network
« Reply #215 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

2huwman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 58
  • Last login:Yesterday at 11:19:57 am
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #216 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?

XSFDriver

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:August 03, 2019, 08:05:42 am
Re: fooling with m2emu network
« Reply #217 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:

« Last Edit: June 16, 2019, 09:45:49 am by XSFDriver »

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1165
  • Last login:August 21, 2019, 03:56:38 am
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #218 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
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


Hydreigon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:Yesterday at 06:59:56 pm
  • I want to build my own arcade controls!
Re: fooling with m2emu network
« Reply #219 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?

XSFDriver

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:August 03, 2019, 08:05:42 am
Re: fooling with m2emu network
« Reply #220 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:

vandale

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 335
  • Last login:August 22, 2019, 04:15:09 pm
  • Id 10 and t error
Re: fooling with m2emu network
« Reply #221 on: June 23, 2019, 04:38:15 pm »
So... I just tried it (again).

…….works like charm

Thanks heaps

XSFDriver

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:August 03, 2019, 08:05:42 am
Re: fooling with m2emu network
« Reply #222 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:
« Last Edit: June 24, 2019, 07:34:00 am by XSFDriver »

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1165
  • Last login:August 21, 2019, 03:56:38 am
    • For Amusement Only e.V.
Re: fooling with m2emu network
« Reply #223 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
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


XSFDriver

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:August 03, 2019, 08:05:42 am
Re: fooling with m2emu network
« Reply #224 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: