New Life Games Tech Forums

Homebrew Player Tracking and EFT Systems. => NLG Homebrew Player Tracking and EFT Systems. => Topic started by: jiggywithit on January 25, 2014, 08:21:47 PM



Title: Open source examples of SAS communication
Post by: jiggywithit on January 25, 2014, 08:21:47 PM
I've been searching through the forums for a few days now, lots of good information but I have yet to
see someone share any code that they've written to communicate via SAS. I have an Arduino with a
TTL -> RS232 interface along with a bunch of other ARM boards to play with..

Anyone feel like sharing? :)


Title: Re: Open source examples of SAS communication
Post by: Foster on February 22, 2014, 06:14:03 AM
There are no Open Source code of SAS communication
If you search the State of Montana gaming board web site you will find a SAS Implementation document.
Otherwise you need to contact IGT to get anything about SAS there are hints about how it works in this particular forum
I have done 2 different home systems based on SAS for my S2000 and a friends S2000's.




Title: Re: Open source examples of SAS communication
Post by: jiggywithit on February 22, 2014, 04:25:18 PM
There are no Open Source code of SAS communication
If you search the State of Montana gaming board web site you will find a SAS Implementation document.
Otherwise you need to contact IGT to get anything about SAS there are hints about how it works in this particular forum
I have done 2 different home systems based on SAS for my S2000 and a friends S2000's.

Thank you for getting back to me - I should of been more clear. I was wondering if any members had shared
the source code to their SAS controller projects. I know there is a .dll floating somewhere but I am more of a
Linux guy than Windows, so I was hoping for some example code I could port to a SBC like a Raspberry PI or
BeagleBone black.

I have found numerous accounts of 9 bit serial implementations not working but I'd like to try to solve that. I
used to write kernel drivers and have a logic analyzer, hopefully that will give me enough of a start to productively
debug it.

I put that on the back burner for now I am working on writing an I2C controller to drive the Bally player tracking
display.


Title: Re: Open source examples of SAS communication
Post by: Foster on February 23, 2014, 01:12:06 AM
The bally displays are Noritake parts and the docs to use them are available
The Noritake itron CU20025ecpb can be controlled by the Arduino Liquid Crystal library directly you remove the Bally board from it
The Noritake itron GU...... is TTL serial and how you move the cursor and such is in the documentation for the device no need for the bally board on it either. if using a arduino you may need to use software serial library if you do not have an avaiable serial port. 328 chip only has one hardware serial port. 32u4 chip has 2 but 1 is usually tied to the USB connection for programming and cant usually be used by a program
there are arduino boards with more than 2 serial ports

In my PC program I configure the serial port for space parity and switch it to mark parity when I need to send the wake up bit
I do not know how you would emulate the 9 bit on Raspberry PI in C++ for unix
Arduino you change a bit in the serial port config bytes.

The DLL you are referring to was so to hide the SAS protocol since the guy that wrote the DLL signed a NDA with IGT or others.

Like this C# with .net libraries
Code:
// serial port configured for space parity in program or form setup - Windows Form Application

  
void sendToGame(byte[] command)
{
   serialPort1.Parity = Parity.Mark;
   serialPort1.Write (command, 0,1);
   Thread.Sleep(1); // 1 ms delay to make sure PC has sent the first byte before changing parity.
   serialPort1.Parity = Parity.Space; // default mode for the serial port
   // The only time the game machine will assert mark parity or set the wake up bit is when it thinks it has lost communications with the SAS host / server
   serialPort1.Write(command,1,commnd.Length-1);
}