New Life Games Tech Forums

Homebrew Player Tracking and EFT Systems. => NLG Homebrew Player Tracking and EFT Systems. => Topic started by: Foster on December 21, 2011, 09:52:42 AM



Title: My Home Brew TITO program
Post by: Foster on December 21, 2011, 09:52:42 AM
I have been working on my own TITO program

All coded with VS 2010 C#
I get any tilts from machine and can redeem any ticket (right now hard coded for a specific amount) until I figure out how to access my SQL Table that I will use for tickets

Table
VoucherNumber    BigInt (same as Long) primary key
Issue Date            DateTime
Redeem Datge      DateTime
Redeemed            Int          (0 not redeemed) 1 redeemed
  I cant find a Boolean variable in MS SQL Express


I wish the built C# SerialPort Class and underlying code was not buggy.
I thought I found a decent one but it even has issues.


Title: Re: My Home Brew TITO program
Post by: stayouttadabunker on December 21, 2011, 01:29:52 PM
Sounds like a great winter project Foster!  :3-
Keep it up! K+ to you!
I hope you succeed and if there's anything that the slot community can do to help you - let us know!  :89-


Title: Re: My Home Brew TITO program
Post by: Foster on December 21, 2011, 01:35:08 PM
Yeah find me a free or very low cost C# Serial Port class library that supports 9 bits!
I hate doing parity flipping to make this work.

Also I can see why AndyP App had timing issues or not working with some serial ports.
Mine wont work with a standard serial port only a USB to Serial Adapter.


Title: Re: My Home Brew TITO program
Post by: crgadyk on December 21, 2011, 02:19:35 PM
It won't make a huge difference but you can use a BIT data type for your boolean instead of storing an INT. A bit is just 0 or 1 (typically people treat 0 as the false and 1 as the true).

You could also use a tinyInt but even that is using more storage space than a Bit would. And depending on which version of SQL server you are using, you have some flexibility with the dates as well. In SQL 2005 or below, you just have a DateTime which is the standard, but with 2008 and above there are several more options. You can do with just Date or Time (which really helps in date comparisons) and you can also use a DateTime2 which goes down to a finer level of granularity in the time. And not that it matters, but it will work for older dates (pre 1700) and for future dates.


Title: Re: My Home Brew TITO program
Post by: zarobhr on December 24, 2011, 08:55:01 AM
I have been working on my own TITO program

All coded with VS 2010 C#
I get any tilts from machine and can redeem any ticket (right now hard coded for a specific amount) until I figure out how to access my SQL Table that I will use for tickets

Table
VoucherNumber    BigInt (same as Long) primary key
Issue Date            DateTime
Redeem Datge      DateTime
Redeemed            Int          (0 not redeemed) 1 redeemed
  I cant find a Boolean variable in MS SQL Express


I wish the built C# SerialPort Class and underlying code was not buggy.
I thought I found a decent one but it even has issues.
foster you can use Bit in Sql. when writting that filed to the database you can write it using true false


Title: Re: My Home Brew TITO program
Post by: Foster on December 24, 2011, 11:29:40 PM
I have added reset hand pay button to the App.


Title: Re: My Home Brew TITO program
Post by: Foster on December 27, 2011, 09:43:57 PM
Why is this code not reading every row/record in the database?
Only returns the first row/record!

Code:

 SqlCommand VoucherCommand = VoucherCon.CreateCommand();
            VoucherCon.Open();
            VoucherCommand.CommandText = "SELECT * FROM Voucher";
            SqlDataReader VoucherReader = VoucherCommand.ExecuteReader();
            
            while (VoucherReader.Read())
            {
                textBox1.Text+=Convert.ToString(VoucherReader["VoucherNumber"]);
                textBox1.Text+=" ";
                textBox1.Text+=Convert.ToString(VoucherReader["Amount"]);
                textBox1.Text+="\r\n";
            }


Title: Re: My Home Brew TITO program
Post by: zarobhr on December 27, 2011, 09:49:19 PM
Why is this code not reading every row/record in the database?

Code:

 SqlCommand VoucherCommand = VoucherCon.CreateCommand();
            VoucherCon.Open();
            VoucherCommand.CommandText = "SELECT * FROM Voucher";
            SqlDataReader VoucherReader = VoucherCommand.ExecuteReader();
            
            while (VoucherReader.Read())
            {
                textBox1.Text+=Convert.ToString(VoucherReader["VoucherNumber"]);
                textBox1.Text+=" ";
                textBox1.Text+=Convert.ToString(VoucherReader["Amount"]);
                textBox1.Text+="\r\n";
            }
here is how mine read
Code:
 While myReader.Read()

                Dim dbval As Long = myReader.GetInt64(0)
                Console.WriteLine(dbval)
                Dim dbamount As Long = myReader.GetInt32(3)
                Console.WriteLine(myReader("amount").ToString())
                If sqlval = CLng(dbval) Then
                    SAS_RedeemTicket(currport, address, sqlval, dbamount)
                Else
                    SAS_RedeemTicket(currport, address, sqlval, 0)
                End If
            End While

how many records is it reading


Title: Re: My Home Brew TITO program
Post by: Foster on December 27, 2011, 10:05:35 PM
That code I posted is test code to see if I am accessing the database
which I am but it is not cycling through all records.


all I am trying to do test that I am reading each record through my loop
Then I can modify it to use the value from the database instead of a default value.

here is my voucher redeem code (data base only )

Code:
      {
            SqlCommand VoucherCommand = VoucherCon.CreateCommand();
            VoucherCon.Open();
            VoucherCommand.CommandText = "SELECT * FROM Voucher";
            SqlDataReader VoucherReader = VoucherCommand.ExecuteReader();
            Array.Copy(InTicketData, 11, InsertedVoucherNumber, 0, 8);
            InsertedVoucherNum = BCDtoLong(InsertedVoucherNumber);
      
            while (VoucherReader.Read())
            {
                DBVoucherNum = Convert.ToInt64(VoucherReader["VoucherNumber"]);
                DBVoucherAmt = Convert.ToInt64(VoucherReader["Amount"]);
                textBox1.Text += DBVoucherNum; //debugging code
                textBox1.Text += " ";
                textBox1.Text += DBVoucherAmt;
                textBox1.Text += "\r\n";              //end

                if (InsertedVoucherNum == DBVoucherNum)
                {
                   Long2BCD(DBVoucherAmt, VoucherAmount);                    
                }

            }
            VoucherReader.Close();
            VoucherCon.Close();




Title: Re: My Home Brew TITO program
Post by: zarobhr on December 27, 2011, 10:11:55 PM
how many records is it missing, or is it random you might try adding a counter to the while loop and see if it counts up to the same number of records you have



Title: Re: My Home Brew TITO program
Post by: zarobhr on December 27, 2011, 10:16:06 PM
also it would probable be more effeciant to to a select * from vouchers where vouchernumber = yourinsertedticketnumbervouchernumber

then it should only pull one voucher from data base (the matching one)

if it doesnt exist then in the followup poll put amount of 0


Title: Re: My Home Brew TITO program
Post by: Foster on December 27, 2011, 10:18:13 PM
it only reads first record
I can do the comparison but both code segments reads only the first record.
I can tell by the textbox output

3061316887909496 300000

First number is voucher number, second number amount in cents.

VoucherReader.Read(() is supposed to advance to next record if it exists.
While loop is exited if no more records.
 

I do know if I can get it to advance to each record my code will work.
I just tried it (used the ticket that matched the first record) and it loaded the amount in the DB.


Title: Re: My Home Brew TITO program
Post by: zarobhr on December 27, 2011, 10:52:28 PM
it only reads first record
I can do the comparison but both code segments reads only the first record.
I can tell by the textbox output

3061316887909496 300000

First number is voucher number, second number amount in cents.

VoucherReader.Read(() is supposed to advance to next record if it exists, otherwise go to next statement after loop.

I do know if I can get it to advance to each record my code will work.
I just tried it (used the ticket that matched the first record) and it loaded the amount in the DB.
add
 Console.WriteLine(dbvouchernum )
right aftr you textbox commands

and be sure to add Output window to your IDE view and see what you get


Title: Re: My Home Brew TITO program
Post by: Foster on December 27, 2011, 11:27:26 PM
I found the problem

I wish when I tell VS 2010 to add a SQL Sever MDF file it would not copy it to the solution directory and use the one where I placed it after using another project to create it.
I was viewing and editing one data base, my program was using the wrong one.

its working now

Just finished the add ticket to DB code


Title: Re: My Home Brew TITO program
Post by: knagl on December 30, 2011, 10:17:11 PM
I just wanted to chime in and give a K+ to everyone here -- nice work on getting this stuff working!  Hopefully someday I'll have enough time to tinker with my machines and try to get it working in my house...


Title: Re: My Home Brew TITO program
Post by: Foster on January 10, 2012, 11:25:07 PM
I decided to help some one have a TITO program with Database for the tickets (member of NLG)
He has 2 machines.

Here is the issue I came across:
When I modified my code for use with 2 machines the second machine would not redeem tickets right.

Since am not well versed on threading, and a few other things I duplicated the routines for first machine as  second set of routines
I modified variable names so the code wont use wrong variables.
I know that using different variable names may not be necessary when they are inside a function but doing so to be safe.

The only time the ticket redemption worked for the second machine is when my program was not in the foreground.
IF I was watching the program it would not work, if I was looking at another application it worked.


Why would being in the foreground (program window on top)or in the background (program window behind another application) matter?
All I know is it is strange.

This is how I fixed it for now:
I copied the whole single machine project folder
Then I modified com port name, form title
Both run just fine and work fully.

Why?


Title: Re: My Home Brew TITO program
Post by: zarobhr on January 10, 2012, 11:29:14 PM
this is where on mine i actually run each machine in a thread of its own. then you can start a thread for each com port and they dont interfere with each other

i have 2 NLG users plus myself running right now one with 9 machines one with 5 and i have had up to 13 machines running


Title: Re: My Home Brew TITO program
Post by: Foster on January 11, 2012, 01:43:47 AM
I know nothing about threading or how to create thread usable code
plus I would still want each machine to have its own Form


Title: Re: My Home Brew TITO program
Post by: FORDSBS on January 11, 2012, 01:52:28 AM
this is where on mine i actually run each machine in a thread of its own. then you can start a thread for each com port and they dont interfere with each other

i have 2 NLG users plus myself running right now one with 9 machines one with 5 and i have had up to 13 machines running


COOOOOOOOOOOOOOL


Title: Re: My Home Brew TITO program
Post by: zarobhr on January 11, 2012, 08:24:01 AM
Code:
Public Shared Sub startMachine(ByVal CommPort As String)
        'newThread = New Thread(AddressOf w.DoMoreWork)

        Dim newThread = New Thread(AddressOf myInit)
        newThread.Start(CommPort)

    End Sub
myinit is the code the runs each machine
this is the VB way of thread
for each thread (each machine i want running)
i do

startmachine("com3")
startmachine("com4")
etc
no need to worry about thread safe since in reality the threads are dependent upon each other


Title: Re: My Home Brew TITO program
Post by: Foster on January 11, 2012, 10:48:16 AM
I doubt that will work for a  Windows form application
Since I want each machine on its own form.
I have to figure out how to start a copy of my main form for each serial port passing it a string for the com port name (like you do)

Example may not be correct but how I would like it to work

FosterSASForm FosterSASFrom1 = new FosterSASFoirm();
FosterSASForm FosterSASForm2 = new FosterSASForm();
FosterSASForm1.ComPortName =  "COM!";
FosterSASForm2.ComPortName = "COM2";
FosterSASForm1.Show();
FosterSASForm2.Show();

I know it cant be that simple


Title: Re: My Home Brew TITO program
Post by: Foster on January 12, 2012, 04:31:39 AM
In part of my form class I had to add the following code
Code:
public partial class FosterSASForm : Form
    {
        // had to add the following 2 lines
        private string p;
        private string p_2;
        public SerialPort SerialPort1 = new SerialPort(); // had to move serial port declaration here
       
        public FosterSASForm(string p, string p_2) // added the parameter strings to the class definition
        {
           
           
            this.p = p;
            this.p_2 = p_2;
           

code in program.cs normally looks like this

Code:
static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);           
     Application.Run( new FosterSASForm);
}

Had to change it to this
 
Code:
static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    FosterSASForm FosterSASForm1 = new FosterSASForm("Foster;s S2000 on COM3", "COM3");
    Application.Run();
}
   

All I have to do is add a new line for each machine using a new line like FosterSASForm FosterSASForm2 - new FosterSASForm("Fosters AVP on COM4", "COM4");
I wish I had an AVP


Title: Re: My Home Brew TITO program
Post by: FORDSBS on January 12, 2012, 11:05:39 AM
With the TITO I learned something new last night. Your bill acceptor
can take money but not read ticket bar code.
I had that problem & thought since it took bills it was OK.
a guy on NLG told me about it taking bills but not reading bar code. That was problem.
 :259- to the guy that helped me. You know who you are.
Ford


Title: Re: My Home Brew TITO program
Post by: stayouttadabunker on January 12, 2012, 03:13:35 PM
In part of my form class I had to add the following code... I wish I had an AVP



This is a classic "quote taken out of context".... :72-


Title: Re: My Home Brew TITO program
Post by: IFFV68 on January 13, 2012, 12:00:19 AM
I don't believe it reads the Bar Code. The Dollar & cents amount is stored in a computer.
I don't know anything about computers, I just know that I can cash out of one machine & the other machine will take the ticket with the correct  amount. The amount has to be less than $3000.00.

My Slot tech..  is the best.


Title: Re: My Home Brew TITO program
Post by: zarobhr on January 13, 2012, 04:56:25 AM
I don't believe it reads the Bar Code. The Dollar & cents amount is stored in a computer.
I don't know anything about computers, I just know that I can cash out of one machine & the other machine will take the ticket with the correct  amount. The amount has to be less than $3000.00.

My Slot tech..  is the best.
the bill validatyor has to read the bar code in order to be able to send the validation number to a host. His particular BV was not reading the barcode and just spitting the ticket back out. once he changed the BV then he was able to read the ticket.


Title: Re: My Home Brew TITO program
Post by: SLOTMAN on January 13, 2012, 09:57:07 AM
Is anyone using a DBV200 to read tickets???


Title: Re: My Home Brew TITO program
Post by: FORDSBS on January 13, 2012, 11:25:41 AM
I don't believe it reads the Bar Code. The Dollar & cents amount is stored in a computer.
I don't know anything about computers, I just know that I can cash out of one machine & the other machine will take the ticket with the correct  amount. The amount has to be less than $3000.00.

My Slot tech..  is the best.
the bill validatyor has to read the bar code in order to be able to send the validation number to a host. His particular BV was not reading the barcode and just spitting the ticket back out. once he changed the BV then he was able to read the ticket.

 :244- :244- :244- :212- :293-


Title: Re: My Home Brew TITO program
Post by: Foster on January 13, 2012, 08:46:47 PM
The JCM DBV can read some coupon Bar Code generated by a Bally System if I remember right.
Do not know if that system was designed as a TITO system or not.
If you have the DBV-200 manual it is listed because one of the dip switches enables it.


Title: Re: My Home Brew TITO program
Post by: FORDSBS on January 13, 2012, 09:27:45 PM
I don't believe it reads the Bar Code. The Dollar & cents amount is stored in a computer.
I don't know anything about computers, I just know that I can cash out of one machine & the other machine will take the ticket with the correct  amount. The amount has to be less than $3000.00.

My Slot tech..  is the best.

Everyone thinks their slot tech. is the best.
I think mine is the best.
Here is video where it takes over $3000.00
http://youtu.be/k4_Nxfi5W-k (http://youtu.be/k4_Nxfi5W-k)

That must say something !!!!


Title: Re: My Home Brew TITO program
Post by: PLUNGER BOY on January 13, 2012, 10:18:02 PM
 :259-
I don't believe it reads the Bar Code. The Dollar & cents amount is stored in a computer.
I don't know anything about computers, I just know that I can cash out of one machine & the other machine will take the ticket with the correct  amount. The amount has to be less than $3000.00.

My Slot tech..  is the best.

Everyone thinks their slot tech. is the best.
I think mine is the best.
Here is video where it takes over $3000.00
http://youtu.be/k4_Nxfi5W-k (http://youtu.be/k4_Nxfi5W-k)

That must say something !!!!
I agree yours as posted is the best K+  :259-


Title: Re: My Home Brew TITO program
Post by: Foster on January 13, 2012, 10:25:25 PM
The limits are locked because it is coinless mode on one of his machines.
IF I take it out of coinless mode then it could accept any amount for a voucher as well.
If I remember right both VS chips are 11GX1 (has to be 1) since both are multi-denom.

My machine takes any amount for a voucher  machine thinks it can take coins but I have removed hopper, plate and token from comparator.


Title: Re: My Home Brew TITO program
Post by: FORDSBS on January 13, 2012, 10:35:20 PM
the one i showed is 11gx5 with token
also works in
1 --11gx1      coinless
1 -- 11gx1 coinless
1  -VS009GX0  coimless
1 -- 11gx5  coinless  -- doesn't work

HAD TO UPDATE


Title: Re: My Home Brew TITO program
Post by: Foster on January 14, 2012, 05:16:27 AM
I figure a screenshot is due.
It is not perfect but it works.


Title: Re: My Home Brew TITO program
Post by: stayouttadabunker on January 14, 2012, 07:22:32 PM
You're printing and validating a ticket with a single machine Foster?
Will it work with two or multiple machines now?


Title: Re: My Home Brew TITO program
Post by: jdkmunch on January 14, 2012, 08:15:41 PM
That's great!

With your code you could make a bunch of blank tickets and have them each worth an amount you choose.



Title: Re: My Home Brew TITO program
Post by: jdkmunch on January 14, 2012, 08:17:32 PM
Another problem is the serial connection.

I've had 5 hooked up at one time. But I think that's about it.


Title: Re: My Home Brew TITO program
Post by: zarobhr on January 14, 2012, 08:19:33 PM
Another problem is the serial connection.

I've had 5 hooked up at one time. But I think that's about it.
if you have a decent pc there are some good 8 port serial cards avail for about 120. they also make a 16 port one, and depending on pc you can but 3 of these cards in 1 machine


Title: Re: My Home Brew TITO program
Post by: jdkmunch on January 14, 2012, 08:22:44 PM
Yeah I had mine going to a USB hub


Title: Re: My Home Brew TITO program
Post by: Foster on January 14, 2012, 10:15:08 PM
I have a modified version that  I set up for IFFV68
he is actually running 2 copies with different serial ports

I figured out to get one program to handle multiple forms (one per machine after I set his up)

When I get a chance i will update his to use the single program (multiple forms)
I may modify how I am handling the SQL stuff
It only opens the database when it needs to run a read query or add a ticket. rest of the time it is closed.

So yes it will run more than one machine. I do not know what my program limit is.
What I really need to do is find a C# interface to the serial port that lets me modify the DCB block for the serial port (set fParity to false or 0)


Title: Re: My Home Brew TITO program
Post by: stayouttadabunker on January 14, 2012, 10:31:28 PM
I have an idea Foster... :299-
Instead of everyone getting this for each machine - could YOU be our database backroom server?
We all could Paypal ya a few dollars per year for server expense and that way you will have free internet!
All we gotta do on our end is run a serial cable harness from our machine to our desktop computer?  :71-

We will have the first worldwide database for slot homeowners!
Scratch it...Bad idea...I'm sure the authorities will be all over the place snooping those IP lines...  :101-


Title: Re: My Home Brew TITO program
Post by: Foster on January 14, 2012, 11:57:32 PM
I can see 2 problems with that idea.

1 How do we prevent duplicate tickets (enhanced validation the machine creates the whole number after being initialized with a seed number) and you have to do it after any chip changes. or you get a prirmary or secondary SAS doiwn depending on which you configured for the validation system.
this can introduce duplicate tickets more than once.
Those with knowledge of SQL Server know that if something is not configured right those duplicates can create problems, as I found out after accidently entering same ticket number in 2 records.
in fact I and IFFV68 had tickets that had the same ticket number on them
I used the data base with my tickets in it as a starting point for his database
Some of my tickets had large values assigned to them.

2 I would not know what would be a good protocol to transmit the data between the server and clients or if SQL Express will allow it.

Even my machine has printed duplicate tickets, after a game change.


Title: Re: My Home Brew TITO program
Post by: stayouttadabunker on January 15, 2012, 12:27:43 AM
lol It was just me thinking on the fly...I agree...not a good idea...lol


Title: Re: My Home Brew TITO program
Post by: zarobhr on January 15, 2012, 12:51:14 AM
lol It was just me thinking on the fly...I agree...not a good idea...lol
actually it would be kinda cool but the reel drawback is the amount of time it takes using sql queries over the internet the gaming machine would timeout waiting of the response from host. entire transaction should take less than 200ms


Title: Re: My Home Brew TITO program
Post by: Foster on January 15, 2012, 03:08:13 AM
200 ms is the normal response time.

I have seen my S2000 wait many seconds before the ticket is returned, when the redemption fails.


Title: Re: My Home Brew TITO program
Post by: zarobhr on January 15, 2012, 08:39:48 AM
200 ms is the normal response time.

I have seen my S2000 wait many seconds before the ticket is returned, when the redemption fails.
your right foster it appears that it may actually wait 15 secs for a response.
on the other issue of duplicate validation numbers,   will have to do the testing but it should work like this

every machine would need a unique gaming machine validation number (IGT issues these in pools to the casinos so that every machine using sas in the world will have it own number.

to prevent the dups when having to reissue the command you would have to know what the last sequence number was used by the gaming machine i am going to start i way of tracking this is my program and then if i need to reset it for some reason because of a change then i can set it to the last number used and that should avoid the duplicate. we will see


Title: Re: My Home Brew TITO program
Post by: jdkmunch on January 15, 2012, 10:25:41 AM
Foster are using
AndyP's dll ?


Title: Re: My Home Brew TITO program
Post by: Foster on January 15, 2012, 05:56:39 PM
I am not using Andy's DLL,
I got a hold a document that is easily obtained because it is on a states gaming/liquor web site that describes SAS perfectly.


Title: Re: My Home Brew TITO program
Post by: jpinto on January 20, 2012, 12:58:32 AM
I’m new on this forum.  I have a good knowledge of sas protocol due to the use of IGS system on a slot floor on the casino I worked.
I never consider to possibility of developing an application do deal with slot machine communications until I read all this good info from you guys.
I have downloaded the SASEGM.dll I believe form Andy.
Foster said he didn’t use Andy’s dll.
What are you using?
Did developed your own code?
Can you provide it?
Regards,

Joaquim Pinto


Title: Re: My Home Brew TITO program
Post by: Foster on January 20, 2012, 01:26:30 AM
I developed my program in Visual Studio 2010 using .NET Framework 3.5 and 4.0
I used the SeriallPort Class as defined in .NET
I may go back to experimenting with other Serial Port DLL here shortly.
The framing errors I get from the .NET serial port class makes me do do extra coding to fix them.

I grabbed a document from the State of Montana - Gaming and Liquor licensing concerning SAS.
IT was enough for me to figure out how to do the SAS protocol.

http://doj.mt.gov/wp-content/uploads/2011/05/sasimplementationguide1.pdf


Title: Re: My Home Brew TITO program
Post by: jpinto on January 20, 2012, 02:11:12 AM
Foster
can you provide a few lines of code so i can understand how you implement the protocol?
the sas document you mentioned is enough for implementing all sas commands?
thanks and regards,
Joaquim


Title: Re: My Home Brew TITO program
Post by: staz on January 20, 2012, 02:25:06 AM
can any one make a video of how to get tito working and hooked up to your slot machine for dummies in simple english lol im so lost with tito :103- :103-


Title: Re: My Home Brew TITO program
Post by: Foster on January 20, 2012, 02:32:38 AM
Think about how to do 11 bits as 1 start, 9 data, 1 stop bit.
The SerialPort Class only handles 8 unless something you use parity.  
That document pretty much covers it. or at least the ones needed for TITO and AFT.
TITO is not necessarily AFT.


Title: Re: My Home Brew TITO program
Post by: Foster on January 20, 2012, 02:50:10 AM
Staz,
Connecting the PC and the Machine is not that hard.
J82 on the Comm board it is a 5 pin Molex SL 0.100" upper right, Its the top connector on the right side of the comm board. Ribbon cable comes into he left area of he Comm board.


PC RS232       Machine RS232 (J85)
RxD 2 <------------------ 1 TxD
TxD 3 ------------------> 2 RxD
Gnd 5 -------------------- 5

Configure Bally Miser for Off first
then configure SAS for channel 3

As far as how do TITO (one is the easiest for developer) hint the machine creates the complete ticket number.
I posted the machine setup somewhere on here.
I think its in the S2000 area and could be a sticky.

Code hint C#
 I do not follow any conventions when creating names of objects, variables, methods or functions (my old pascal habits die hard)
SerialPort Class is outlined on Microsoft Developer Network.

Code:

private void sendcommand (Byte[] commandbyte)
{
  SerialPort1.Parity = Parity.Mark;
  SerialPort1.Write(commandbyte, 0, 1);
  SerialPort1.Parity = Parity.Space;
  SerialPort1.Write(commandbyte, 1, commandbyte.Length-1)
}



Title: Re: My Home Brew TITO program
Post by: Foster on February 07, 2012, 11:27:39 PM
 :8- :8-

The SAS computer Power Supply died.
It wont even power up its fan.
I even tried to get it to power up by a jumper between green wire and ground.
 


Title: Re: My Home Brew TITO program
Post by: bhinkley on April 20, 2012, 11:45:17 PM
Great work on the TITO system Foster.  It serves it's purpose well, and is a great thing for home slot owners.  K+   :259-


Title: Re: My Home Brew TITO program
Post by: Foster on August 20, 2012, 10:27:40 PM
I got tired of Vista and decided to jump to Windows 8 Professional (release candidate or whatever MS is letting every one d/l for free)
Also Visual Studio 2012
I can say my App works under XP, Vista, 7 and 8 without any rewrites.


Title: Re: My Home Brew TITO program
Post by: Foster on August 29, 2012, 08:21:16 AM
I am giving credit to jdkmunch and TZTech due to their work in doing it on a PIC microcontroller, for the idea of using system validation to store the amount as a ticket number
I thought of using a simple encryption algorithm to hide the amount but have not done so yet


I am going to order the PIC development stuff soon so I can work on the bridge idea I have. I want the pic to handle the 9 bit TX/RX and leave the PC in 8 bit but I see some issues doing it
Like how to know when more than one byte needs the address bit set, example the 80 81 general poll bytes
I might have the PIC do that and not have the PC do any general polls, it would just deal with the responses from the machine. as it does now.




Title: Re: My Home Brew TITO program
Post by: TZtech on August 29, 2012, 10:26:24 AM
Hi Foster

Although I foresee that the project will be mostly used as a standalone device I have implemented the serial bridge idea so the functionality will be there if users want to implement it (Your idea mentioned in a previous post)
How it works right now is that the micro handles all the timing/polling. Events are decoded as text strings and sent out on the serial port.
A number of functions have been coded already - to trigger simply send the relevant character to the serial port

Currently all this is done via a serial terminal - Would be nice to have a custom written program to handle this.

This functionality can be accessed by connecting a usb to Serial TTL adapter cable to the micro's second port or a bluetooth serial device for wireless operation.


Code:
'  EGM Control Functions

'  P        $01 - Shut down (disable EGM)             *
'  O        $02 - Startup (enable EGM)                *
'  H        $03 - Sound On                            *
'  J        $04 - Sound Off                           *
'  K        $06 - Enable Bill Aceptor                 *
'  L        $07 - Disable Bill Acceptor               *
'  N        $AA - Enable Autoplay                     *
'  M        $AA - Disable Autoplay                    *

' EGM Information Functions

'  A        $1F - Send gaming machine information     *             
'  S        $8E - Send Card Information               *
'           $8F - Send reel Stop Information

' EGM Meter Functions

'           $1A - Send current credits                *
'           $1C - Send Meters                         *
 


Title: Re: My Home Brew TITO program
Post by: Foster on August 29, 2012, 10:58:44 AM
I like the idea of the PC being the SAS host for the most part (maybe let the PIC drive a VFD display that could be mounted in place of the card reader or normal player tracking display
Like some creative SAS messages for door open and closed, etc
Maybe figure out player tracking protocols with the PIC  as well and add the functionality of player tracking to the PIC and or PC
 
I want to get the PIC just polling and passing the serial data from the machine back to the PC since my program already handles it the messages as long a parity error does not mess it up.
I hate the repeated responses I get related to doors and the like.
surprised my app works as good as does due that alone.


Title: Re: My Home Brew TITO program
Post by: TZtech on August 29, 2012, 12:03:37 PM
Foster

Let me know when You get PIC boards let me know and I will assist where I can on the micro side.

BTW I see you mentioned visual studio 2012 - Any merit in upgrading to this version (If there is a free version) for the casual programmer ?


Title: Re: My Home Brew TITO program
Post by: zarobhr on August 29, 2012, 12:07:10 PM
Foster

Let me know when You get PIC boards let me know and I will assist where I can on the micro side.

BTW I see you mentioned visual studio 2012 - Any merit in upgrading to this version (If there is a free version) for the casual programmer ?
there should be express version available for free you may have to do your specific language ie basic c++ C# etc not sure .

I have the Ultimate version

I also looking at using the pic for a vfd /number pad / card reader , i would love to be able to have the pic control that and do the polling of machine then pass the info to the pc, other wise i would need double the serial ports since i am not multidropping yet


Title: Re: My Home Brew TITO program
Post by: bhinkley on August 29, 2012, 12:33:22 PM
My standalone Tito is getting relatively close for just ticketing testing using a PIC.  I would also like one that would be able to control a card reader, key pad, and display to be able to create a standalone player tracking.


Title: Re: My Home Brew TITO program
Post by: Foster on August 30, 2012, 12:34:01 AM
here it accepts a ticket from the machine set for system validation


Title: Re: My Home Brew TITO program
Post by: jpinto on October 28, 2012, 12:09:15 AM
Probably this is not the wright place to post this questions but I do need major help.
Does anyone ever operate whit both IGT’s IGS and TITO?
My slot floor accounting system utilizes both systems, IGS for the normal accounting and TITO, or EzPay as we call it, to authenticate and redeem tickets.
I had a problem a few days and no one can explain it.
Regards

Joaquim Pinto


Title: Re: My Home Brew TITO program
Post by: staz on October 28, 2012, 12:38:10 AM
My standalone Tito is getting relatively close for just ticketing testing using a PIC.  I would also like one that would be able to control a card reader, key pad, and display to be able to create a standalone player tracking.

that would be so cool to be able to have this player tracking system be able to say jackpot and the amount you hit and be able set up free play on it...... got to be a way!!!!


Title: Re: My Home Brew TITO program
Post by: zarobhr on November 04, 2012, 01:50:45 AM
My standalone Tito is getting relatively close for just ticketing testing using a PIC.  I would also like one that would be able to control a card reader, key pad, and display to be able to create a standalone player tracking.

that would be so cool to be able to have this player tracking system be able to say jackpot and the amount you hit and be able set up free play on it...... got to be a way!!!!

do you know where i can get that particular player tracking screen


Title: Re: My Home Brew TITO program
Post by: staz on November 04, 2012, 02:18:07 AM


a screen like mine?


Title: Re: My Home Brew TITO program
Post by: zarobhr on November 04, 2012, 09:55:36 AM


a screen like mine?
yes like yours


Title: Re: My Home Brew TITO program
Post by: FORDSBS on November 04, 2012, 03:55:58 PM
I know nothing about this guy  glennabc4sale on ebay but he might have what your looking for.
Ford


Title: Re: My Home Brew TITO program
Post by: zarobhr on November 04, 2012, 04:11:06 PM
I know nothing about this guy  glennabc4sale on ebay but he might have what your looking for.
Ford
i will find out i got some regular button and display and readers from him, should arrive shortly


Title: Re: My Home Brew TITO program
Post by: boussihak on February 08, 2014, 07:10:29 AM
plz where i can get SASEGM.dll the link dont work