Welcome, Guest. Please login or register.
June 01, 2024, 10:36:34 AM

Login with username, password and session length
* Home Help Arcade Login Register
.
+  Forum
|-+  Homebrew Player Tracking and EFT Systems.
| |-+  NLG Homebrew Player Tracking and EFT Systems.
| | |-+  Debug SAS DLL for testing
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 2 3 [4] 5 Go Down Print
Author Topic: Debug SAS DLL for testing  (Read 60893 times)
pshoey
Guest
« Reply #75 on: March 11, 2011, 06:40:55 PM »

Andy,

The Windows serial driver can be send an IOCTL that places a copy of the uart line status register when a parity error occurs. This allows you to place the serial port into SPACE parity mode and you will receive the LSR byte with every data byte and can check if a parity error occured and hence data with the wakeup bit set.

The IOCTL is: IOCTL_SERIAL_LSRMST_INSERT

Check MSDN docs for the details.

HTH

pshoey
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #76 on: March 11, 2011, 11:53:44 PM »

Andy,

The Windows serial driver can be send an IOCTL that places a copy of the uart line status register when a parity error occurs. This allows you to place the serial port into SPACE parity mode and you will receive the LSR byte with every data byte and can check if a parity error occured and hence data with the wakeup bit set.

The IOCTL is: IOCTL_SERIAL_LSRMST_INSERT

Check MSDN docs for the details.

HTH

pshoey


Dude that is an awesome find. I had been starring at various IOCTL's over the last few days and was even considering writing my own serial port driver. I have a few things to do next week but I will have a play with that one toward the end of the week.

Its a shame the SAS protocol does not set the wakeup bit for responses.
Logged
Forrhouse
Manufacturing Equipment & Parts to Keep Slots that are No Longer Supported by the Manufacturer running.
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 252
Offline Offline

Gender: Male
Posts: 532


Life is too short, live, love and have a good time


« Reply #77 on: March 16, 2011, 01:11:42 AM »

That is an awesome find. I must get one!   Here is a re-post from the closed thread of a cheap USB to fiber interface.

I still would like to see fiber implemented. I think I have found a very low cost fiber solution. It is a USB to fiber board.
They give customizable drivers with it and it seems that you can build it yourself if you like rather than purchase one complete which is $85
If this will work for us and enough people are interested, maybe we could get a group buy going.
E~

Here is the link to the board:

http://www.controlanything.com/Relay/Device/USBFOI




* USBFOI-600 USB to Fiber board.jpg (27.42 KB, 600x243 - viewed 351 times.)

* USBFOI-MECH.jpg (273.63 KB, 1858x1078 - viewed 316 times.)
Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #78 on: March 16, 2011, 09:52:49 AM »

There still would need to be some sort of fiber board in each machine (capable of daisy chaining). And unless someone finds a secret stash of factory boards, this will not really help much. I don't think converting to fiber at the PC end has ever really been the issue, but more of what to do at the slot machines.

I am also curious as to how many slots most people actually have. I know there are a few folks here with a lot, but if 95% of the people have 8 or less, I still think it would be simpler and cheaper to just have individual RS232 lines to each machine. Since we really only need 3 wires, it could be done with thin wire like telephone cable or even CAT5 (to multiple machines) . In the RS232 adapter thread, I posted a 4 port USB to RS232 box for $29. So 8 machines could be connected for about $75 total, even if adapters need to be made for machines without RS232 ports like the S+.

And as I also mentioned I think the software would actually be easier to write. Instead of polling machines on a single line and dealing with timing issues, etc., if each one is on a separate comm port at the PC end, you always know what data is coming from which machine. Each machine could actually be set up with the same SAS address (i.e. 1) which further simplifies the software end. Just poll the comm ports instead of the SAS addresses.

Just my $.02
Logged
jay
Global NLG Site Moderator
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 483
Offline Offline

Gender: Male
Posts: 3178


if you cant afford to lose you cant afford to win


« Reply #79 on: March 16, 2011, 08:45:05 PM »

I have two of the fiber boards.
I am sure the board does not differ much from the Rs232 version.
So I am sure a mod to either an existing Rs232 or one of the other interfaces would not be that difficult.

When we get to that stage I am certainly willing to donate one of my boards for discection.

For the sake of expidency having SAS1 connected to COM1,
                                              SAS2, connected to COM2 and so on

Does make a lot of sense - we can forget the timing issues for multiple polling etc.

Can we go beyond 8 or is that a Windows Limitation...... (I only have 4 slots but inquiring minds want to know).


Logged

The only way to beat the casino is to own it
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #80 on: March 16, 2011, 09:10:29 PM »

I have two of the fiber boards.
I am sure the board does not differ much from the Rs232 version.
So I am sure a mod to either an existing Rs232 or one of the other interfaces would not be that difficult.

When we get to that stage I am certainly willing to donate one of my boards for discection.

For the sake of expidency having SAS1 connected to COM1,
                                              SAS2, connected to COM2 and so on

Does make a lot of sense - we can forget the timing issues for multiple polling etc.

Can we go beyond 8 or is that a Windows Limitation...... (I only have 4 slots but inquiring minds want to know).





You can go beyond 8 ports.

However before you all get to excited, I will still be supporting multidrop in my software. The way I have it set up is so that it can compile it to either use serial port, or dedicated hardware. I am not yet convinced that it is impossible to do with a serial port, its just that my time of late has been consumed with real work. I was lucky there a few weeks back because I had about 2 weeks free with no paid work. FWIW, that SAS DLL has about 6000 lines of code so far!! Thats what you get for 2 weeks of my work!

Now I have a bunch of rs232 to fibre optic converters here that came from old IGT machines, and I have posted a schematic for a rs232 to fibre board. If someone wants to make these I am happy to provide schematics and PCB files. The Fibre optic interfaces that most people are posting up are not the type used for game comms. The type you need uses this fibre : http://www.i-fiberoptics.com/patchcords.php?id=1

Also, if by chance its not possible to get the serial port working the way I want, it would not be hard for me to get a really cheap micro controller to do the job, or alternatively I may even consider writing a serial driver for windows.

Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #81 on: March 16, 2011, 09:11:33 PM »

Oh, and further more, I am still not convinced that the USB adaptors are the way to go. There is too much latency and a lot dont support parity. The better option would be to consider a PCI comms card.
Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #82 on: March 16, 2011, 09:15:11 PM »

Can we go beyond 8 or is that a Windows Limitation...... (I only have 4 slots but inquiring minds want to know).

I've used 16 port units before, but they start getting more expensive. Digi makes the best ones and it's best to use a PCI card based one when going with that many ports.

I'm not sure how many of the 4 port USB ones like I got can be connected before you start having USB bandwidth issues. Not that there is that much traffic going across the lines. I'm sure 2 (for 8 ports) would be no problem.

And if using com separate com ports, each slot can still be set to SAS 1 to further simplify the software, since each machine would be identified by it's com port number and not the SAS address.
Logged
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #83 on: March 16, 2011, 09:18:40 PM »

Oh, and further more, I am still not convinced that the USB adaptors are the way to go. There is too much latency and a lot dont support parity. The better option would be to consider a PCI comms card.

Agreed on the PCI card. But the sim program is working fine with every USB adapter as far as I know. Again, the idea is that you only need to deal with one machine at any given time. Whatever is on that com port is coming from one machine.
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #84 on: March 16, 2011, 09:40:52 PM »

Oh, and further more, I am still not convinced that the USB adaptors are the way to go. There is too much latency and a lot dont support parity. The better option would be to consider a PCI comms card.

Agreed on the PCI card. But the sim program is working fine with every USB adapter as far as I know. Again, the idea is that you only need to deal with one machine at any given time. Whatever is on that com port is coming from one machine.

That last trace you sent me whilst significantly better than the first, was still showing latency issues. I guess not a problem for the home user, but you will get comms errors from time to time.
Logged
Foster
The S2000 GURU
Contributing NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 345
Offline Offline

Gender: Male
Posts: 2872



« Reply #85 on: March 16, 2011, 09:50:10 PM »

The Sim can poll multiple addresses.
I just have to move the serial extension cable between the 2 machines.
IT only grabs the events for the SAS address that is active at the time.
S2000 is SAS address 1
S+ is SAS address 2
I have turned off game events for the S2000, I do not need to see each game start and end.
Logged

A Slot Machine and Coca-Cola Addict!!
"If it is not broke do not fix it" I keep forgetting that!
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #86 on: March 16, 2011, 10:34:54 PM »

The Sim can poll multiple addresses.
I just have to move the serial extension cable between the 2 machines.
IT only grabs the events for the SAS address that is active at the time.
S2000 is SAS address 1
S+ is SAS address 2

True. But if you are moving the cable back and forth, both machines 'could' be set to SAS 1 and the sim program (or any program) would not care. That is why I said it could simplify the program by only needing to poll one SAS address, but 'poll' the com ports instead. So for example, S+ on com 1, S2000 on com 2, etc. Then the program just looks at SAS 1 on each com port and does whatever it needs to with the data since it would know what machine is on each com port. Same end result as polling SAS addresses, only easier/cheaper to implement (IMO) unless the number of machines is really large.

Note that I'm not advocating changing the direction of this app, only that there may be an alternative way to accomplish the goal of networking machines.
« Last Edit: March 16, 2011, 10:42:41 PM by poppo » Logged
Foster
The S2000 GURU
Contributing NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 345
Offline Offline

Gender: Male
Posts: 2872



« Reply #87 on: March 16, 2011, 10:59:11 PM »

RS485 is just as cheap to do as well. and all you need is one port and one cable that is the data bus for all machines.

I need to see the various DCS or comm boards for the S+ to see if they used RS485 as well on it.
Logged

A Slot Machine and Coca-Cola Addict!!
"If it is not broke do not fix it" I keep forgetting that!
poppo
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 248
Offline Offline

Gender: Male
Posts: 3266



« Reply #88 on: March 16, 2011, 11:23:41 PM »

RS485 is just as cheap to do as well. and all you need is one port and one cable that is the data bus for all machines.

It may well be. I really don't know much about RS485. I just figured RS232 would be simpler since it costs <$5 to make an  adapter if needed. There are multi conductor cables (like from a 25 pin RS232 cable) that could connect up to 12 machines (using a common ground), so it's not like one would need to run a ton of cabling. 
Logged
Foster
The S2000 GURU
Contributing NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 345
Offline Offline

Gender: Male
Posts: 2872



« Reply #89 on: March 16, 2011, 11:35:32 PM »

The Max491 are about the same costs, if you do not worry about fault tolerant operation or the like (just the terminating resistor at each end.
Logged

A Slot Machine and Coca-Cola Addict!!
"If it is not broke do not fix it" I keep forgetting that!
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #90 on: March 17, 2011, 02:29:08 AM »

Foster,
Do you mean like these things?
What are the advantages of using the RS485 as opposed to what we're using now? >>>



* RS485 to USB board.png (98.97 KB, 320x320 - viewed 684 times.)
Logged
Foster
The S2000 GURU
Contributing NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 345
Offline Offline

Gender: Male
Posts: 2872



« Reply #91 on: March 17, 2011, 02:46:31 AM »

That one is for the computer.

The computer uses one RS485 (either USB to RS485 or PCI based RS485 port)
In fact I think those multiport adapters that you poppo are playing with support RS485 or some versions do.


Basically you wire it in a bus configuration. (parallel) and not in a star config.
The only critical part is that you put a 120 ohm resistor at each end.

it would look like this

PC        GM1       GM2 ... GMn
|_______|________|_____|

The PC and the last game machine would have a 120 ohm resistor installed.

IF Andy could have it print GMx as it send data to or from a machine (using the SAS Address for x) then we would know which machine was polled.
or even allow us to give a name to each SAS Address we use (SAS 1 could be called S2000 or Double Diamond or such)
I believe that is the 2 wire version which would work. also if the machine has only a RS232 (a RS232 to RS485 could be built easily enough)


Logged

A Slot Machine and Coca-Cola Addict!!
"If it is not broke do not fix it" I keep forgetting that!
stayouttadabunker
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 1039
Offline Offline

Gender: Male
Posts: 13447



« Reply #92 on: March 17, 2011, 03:01:38 AM »

I see...
I would also like the ability to change address names or alongside in the TestApp - instead of "SAS address 001, 002, etc"
Just like they way I change the names of the addresses of the machines in the CDS ProLink.
It was pretty cool to have 5  S+'s all talking to my PC at once!
The harness was pretty simple but was only able to convert the coin in & out and jackpot signals through the serial lines.

Much in the same way your your name and phone number is listed in the phone book -
the ProLink allowed me to type in machine names with poll addresses...
« Last Edit: March 17, 2011, 03:27:05 AM by stayouttadabunker » Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #93 on: March 17, 2011, 07:51:59 AM »

I see...
I would also like the ability to change address names or alongside in the TestApp - instead of "SAS address 001, 002, etc"
Just like they way I change the names of the addresses of the machines in the CDS ProLink.
It was pretty cool to have 5  S+'s all talking to my PC at once!
The harness was pretty simple but was only able to convert the coin in & out and jackpot signals through the serial lines.

Much in the same way your your name and phone number is listed in the phone book -
the ProLink allowed me to type in machine names with poll addresses...

The test app was never intended to be a functional program. The idea was to do a dll to abstract away the IGT propiatory stuff that could then be used in a real program. The test app was just to test the DLL, nothing more.
Logged
Forrhouse
Manufacturing Equipment & Parts to Keep Slots that are No Longer Supported by the Manufacturer running.
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 252
Offline Offline

Gender: Male
Posts: 532


Life is too short, live, love and have a good time


« Reply #94 on: April 27, 2011, 06:50:05 PM »

Just wondering what the status of this program is. Have anymore features been added as far as standard SAS stuff, new features and testing?
What about for Tito using rs485v and the ability to use fiber?   I'm hoping that this project has been dropped or given up on.

Andy, I know that your really busy.  Any news on your end.

Thanks,
Eric
Logged
AndyP
NLG Member 101 to 500 Post
***

Total Karma Storms: 127
Offline Offline

Posts: 212



« Reply #95 on: April 27, 2011, 09:26:50 PM »

On the backburner at the moment. Happy to work with someone else on it (c++) but dont have the time to chase it up right now.
Logged
Forrhouse
Manufacturing Equipment & Parts to Keep Slots that are No Longer Supported by the Manufacturer running.
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 252
Offline Offline

Gender: Male
Posts: 532


Life is too short, live, love and have a good time


« Reply #96 on: April 28, 2011, 06:19:28 AM »

I completely understand. I wish I new how to work with code, C+, C++, etc.
It's Nice to know that it's still a go down the road.
Thanks,
Eric
Logged
InChile
Guest
« Reply #97 on: October 29, 2011, 11:19:59 PM »

Hi All

I'm new to the site but have read all the great stuff you have been doing with the SAS app. I managed to connect one of my machines to the app and receive some messages without any hassles. I have been looking for help with SAS for ages and your site is a great help.

Many thanks to you for sharing your knowledge! I attached a picture of the app with a comm logger in the background.  Clap applause Hail +1 (Karma, or whatever)

Regards


* Test1.JPG (264.9 KB, 1280x1024 - viewed 406 times.)
Logged
SLOTMAN
Contributing NLG Member
NLG Member 101 to 500 Post
*

Total Karma Storms: 34
Offline Offline

Gender: Male
Posts: 351



« Reply #98 on: October 30, 2011, 02:55:40 PM »

I hope my post isnt going to be misconstrued as hijacking but I really want to get in on the EFT and player tracking.  Andy, it seems like you have spear headed this project and after reading all the posts you have a commercial interest.

I would love to help in your pursuit and I feel i have some to offer.  If you look at my pic you will see a wide array of machines.  I would love to demo any software.  I have access to every type of communication peripheral like usb-rs232, rs232-rs485, fiber to 10/100, etc. etc. So you will not be receiving any questions from me like "what is bit parity" if you know what I mean.

Almost every one of my machines have some type of player tracking still installed including the card readers so I think I may be a big help to you and all I ask is that I get to use the software for my personal use and nothing else. 

At the minimum I would at least like to attempt to communicate with some machines for other users benefits.


* n822077304_947234_4074.jpg (67.63 KB, 604x453 - viewed 297 times.)
Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #99 on: October 30, 2011, 03:22:48 PM »

I think Andy is gone
Logged
Pages: 1 2 3 [4] 5 Go Up Print 
« previous next »
Jump to:  


If you find this site helpful, Please Consider Making a small donation to help defray the cost of hosting and bandwidth.



Newlifegames.com    Newlifegames.net    Newlifegames.org
   New Life Games    NewLifeGames  NLG  We Bring new Life to old Games    1-888-NLG-SLOTS
Are all Copyright and Trademarks of New Life Games LLC 1992 - 2021


FAIR USE NOTICE:

This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner.
We make such material available in an effort to advance awareness and understanding of the issues involved.
We believe this constitutes a fair use of any such copyrighted material as provided for in section 107 of the US Copyright Law.
In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those
who have expressed a prior interest in receiving the included information for research and educational purposes.

For more information please visit: http://www.law.cornell.edu/uscode/17/107.shtml.

If you wish to use copyrighted material from this site for purposes of your own that go beyond fair use,
you must obtain permission directly from the copyright owner.

NewLifeGames.net Web-Site is optimized for use with Fire-Fox and a minimum screen resolution of 1280x768 pixels.


Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Loon Designed by Mystica
Updated by Runic Warrior
Page created in 0.109 seconds with 19 queries.