Welcome, Guest. Please login or register.
May 05, 2024, 06:42:00 PM

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.
| | |-+  Very close to working TITO
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 ... 9 Go Down Print
Author Topic: Very close to working TITO  (Read 85430 times)
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« on: July 31, 2012, 07:42:09 PM »

My last post was too simplistic.

Here is how we can get TITO to work

when a ticket is inserted the machine transmits
67

we must respond with an interrogate command which is
70

the machine will then answer with
Redeem ticket length
Ticket status
Ticket amount    <--------------- now for some reason all my tickets that I print have a value of 0 so  Scratch Head
parsing code
validation number


ok once we get this string of info - -   we have to respond with a 71 to redeem the ticket

the 71 command has the ticket length, machine status, transfer amount, parsing code and validation number
all which we just got from the interrogate command


voila ticket is accepted and credits are applied to the machine

so the sequence looks like this:

RX: 67 -  a ticket has been entered
TX: 70 - interrogate the ticket
RX: 70 - --- with the data from the ticket here
TX: 71 -  with the info we just got from the RX

bam - ticket accepted -  

this now works for me-  I can accept tickets

Here's the rub -  at the end of the transmittal for the last 71 command we need a CRC checksum

if someone can help with the calculation of this crc I'm pretty sure I can get this going.  

Others here have said they have TITO working -  if they actually do then they know how to calculate the CRC




Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #1 on: July 31, 2012, 11:04:15 PM »

Munch

Foster posted a nice example of the entire chain of events in reply 19 in this thread - http://newlifegames.net/nlg/index.php?topic=18559.0
Zarob posted the CRC routine for C# here - http://newlifegames.net/nlg/index.php?topic=13799.0
The routine for PICS in assembler is here - Still have to implement it http://www.protonbasic.co.uk/content.php/2517-Re-CCITT-CRC16-CRC-16-Routines

Both I believe have TITO working from their PC's
Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #2 on: July 31, 2012, 11:15:53 PM »

This is fantastic news -

because if the Amicus18 (which based on your post should)  can do this then we are golden!

I have to say I'm torn -    Who really cares if the machine actually eats the ticket?     We can right now this second - print a ticket and put it back in for $100 - or whatever amount you want.


I guess the real prize is to print a ticket for 44.22 and have it redeem for 44.22

Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #3 on: July 31, 2012, 11:19:07 PM »

For what it's worth I wasted 2 nights and about 14 hours just hooking the IGame up to SAS

don't know why but the computer doesn't read a thing on channel 1 or 2 when it's on 3 it works

took me 4 computers and two nights to stumble upon that

Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #4 on: July 31, 2012, 11:30:20 PM »

you are right

public  static byte[] ComputeCRC(byte[] val)
        {
            long crc;
            long q;
            byte c;
            crc = 0;
            for (int i = 0; i < val.Length; i++)
            {
                c = val;
                q = (crc ^ c) & 0x0f;
                crc = (crc >> 4) ^ (q * 0x1081);
                q = (crc ^ (c >> 4)) & 0xf;
                crc = (crc >> 4) ^ (q * 0x1081);
            }
            return new byte[] { (byte)(crc & 0xff),(byte)(crc >> 8) };
           
        }



looks like it will do the trick -   thanks for linking to those other posters-   K+
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #5 on: August 01, 2012, 04:20:53 AM »

Munch

Based on all the info already posted by Zarob and Foster TITO  should be do able on a single machine. Multiple machines will be quite a bit of extra work.
Right now You can trigger a fixed amount by inserting a ticket (Ticket does not get stacked).
Whats the ETA on Your amicus board ?

Has anybody done anything with secure enhanced validation ? whre the ticket value is encoded in the validation number (IE validation calculated by host and not EGM)
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 #6 on: August 01, 2012, 06:21:53 AM »

You cant use secure enhanced validation to encode the amount into the ticket number,
The Electronic Gaming Machine creates the number using a sequence number and a algorithm when Enhanced validation used
Enhanced validation has to be initialized by the validation server. it is actually 2 numbers in the data packet sent during the initialization but one of them is supposed to be assigned by IGT when the validation system is SAS based (they have some listed in their docs)

For home users just pick a number and stick with it, and vary the sequence number if you start getting duplicate tickets, after a change that forces you to initialize enhanced validation
yeah you need to code a way to do it manually in case your code does not catch the SAS code that says it is not initialized.

To encode the amount into the ticket/voucher number you have to use system or standard which ever allows the host to create the number and there might be some restrictions on that.
Logged

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

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #7 on: August 01, 2012, 09:56:10 AM »

Tuesday
Logged
zarobhr
Contributing Gold NLG Member
Sr.NLG Member 501 to 1000 Post
*

Total Karma Storms: 178
Offline Offline

Gender: Male
Posts: 622



« Reply #8 on: August 01, 2012, 10:00:48 AM »

Munch

Based on all the info already posted by Zarob and Foster TITO  should be do able on a single machine. Multiple machines will be quite a bit of extra work.
Right now You can trigger a fixed amount by inserting a ticket (Ticket does not get stacked).
Whats the ETA on Your amicus board ?

Has anybody done anything with secure enhanced validation ? whre the ticket value is encoded in the validation number (IE validation calculated by host and not EGM)

to encode the ticket amount in the validation number would use system validation. i am planning on implementing that but havent had much time to code lately
Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #9 on: August 01, 2012, 10:34:54 AM »

That's interesting  -- when I had the I-Game on System Validation I did not see a 67 when a ticket was inserted - 

The ticket went in and came out without an event

I changed to Enhanced Validation and the 67 event was generated
Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #10 on: August 04, 2012, 03:21:06 PM »

can the amicus run this?

Code:
public  static byte[] ComputeCRC(byte[] val)
        {
            long crc;
            long q;
            byte c;
            crc = 0;
            for (int i = 0; i < val.Length; i++)
            {
                c = val[i];
                q = (crc ^ c) & 0x0f;
                crc = (crc >> 4) ^ (q * 0x1081);
                q = (crc ^ (c >> 4)) & 0xf;
                crc = (crc >> 4) ^ (q * 0x1081);
            }
            return new byte[] { (byte)(crc & 0xff),(byte)(crc >> 8) };
            
        }
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #11 on: August 05, 2012, 05:49:46 PM »

No

That routine I believe is in C# to run on a PC. The amicus uses a dialect of basic tailored to run on a 8 bit microcontroller with limited resources.
I did find a routine in assembler for PICS - still need to implement and test it.
Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #12 on: August 05, 2012, 06:18:05 PM »

Thanks TZ is there a programming guide for this ?  I'd love to learn some more -
I've only done assembler on an IBM 360 -  other than that all my programming has been in high level languages 


Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #13 on: August 05, 2012, 06:35:49 PM »

Munch

Install MPLab and the Amicus dev environment as per this link - http://www.myamicus.co.uk/content.php?245-Free-AMICUS18-Compiler
All the relevant manuals are installed with the application and are availabe from Help - Documents.
 
« Last Edit: August 05, 2012, 06:40:59 PM by TZtech » Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #14 on: August 05, 2012, 06:56:21 PM »

Thanks - this little thing is incredible

The microcontroller used on the Amicus18 is the Microchip PIC18F25K20, which has 32768 bytes of flash memory, 1536 bytes of RAM, and operates at 64MHz, which equates to 16 MIPS (Million Instruc- tions per Second).
Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #15 on: August 06, 2012, 11:07:50 PM »

I'm really disappointed -  I just checked the order and the status is "Warehouse Notified" whatever that means

then when I look at the item in the store it's estimated available August 13

I have a feeling it's going to be a while
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #16 on: August 07, 2012, 02:49:52 AM »

Bummer - Hope You get it soon
Its always a drag waiting for parts - I order most of my stuff via EBAY from the east and the wait is generally 3 weeks

If you have a device programmer thats capable of programming it i would suggest You ad a PIC18F25K22 to the order
This chip works on the Amicus board but runs at 5 volts and has 2 hardware serial ports

http://www.microchipdirect.com/ProductSearch.aspx?keywords=PIC18F25K22-E/SP
Logged
vtyler
New NLG Member 1 to 100 Post
**

Total Karma Storms: 32
Offline Offline

Posts: 97



« Reply #17 on: August 07, 2012, 01:57:17 PM »

i have seen where sometimes c# code can be converted into c (never done it my self). if we could convert the code for the crc to c it may work on the pic i used c to code a free play chip for the s2000 and i game.
Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #18 on: August 07, 2012, 04:30:49 PM »

*

« Last Edit: October 19, 2012, 05:05:01 PM by TZtech » Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #19 on: August 07, 2012, 06:18:11 PM »

 Clap Outstanding

I ordered another board from Newark.com and it says they have some in stock to ship today.  Lets see what happens.

Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #20 on: August 08, 2012, 12:36:58 PM »

VTyler

Which c compiler for PICS are You using and how have You experienced it so far?
The Amicus environment is pretty powerfull and I am nowhere close to using it to its full potential but would like to explore some C alternatives as well as that seems to be the industy standard
Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #21 on: August 09, 2012, 05:27:26 PM »

Got the board today!

I programmed it - now I just need a little help with the hookups -

on the com analyzer all I see are many green 0's flying across the screen
« Last Edit: August 09, 2012, 05:41:33 PM by jdkmunch » Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #22 on: August 09, 2012, 05:56:15 PM »

Great

I will be home in about a hour and a half and will post some updated TITO testing code and some pics

Oled               Amicus
+V                 +3.3V
GND               Gnd
In                   RB7

Are You going to use DCS port or the RS232 port?

Machine DCS   Amicus
DCS Pin 7        +5V
DCS Pin1         Gnd
DCS Pin 5        TX
DCS Pin 9        RX

Change Your SAS channel to 2 for dcs port
Also change Your SAS adress to 1 as my code assumes we are always talking to SAS address 1
Logged
jdkmunch
Senior Full time Member.
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 624
Offline Offline

Gender: Male
Posts: 2640



« Reply #23 on: August 09, 2012, 07:15:25 PM »

Your going to have to go real slow with me please -  as I have no idea what I'm doing.   

I tried hooking it up to the rs232 port TX,RX and ground on the board with power from the computer's usb and that did not work

1.  What is DCS?

2. Would that supply power to the amicus? - can you tell me what port it is and which pin is #2 I'll connect into it - I already wired and additional connector for it.

3.  I don't have my OLED screen working yet - I didn't realize I had to assemble it - I'll work on that later - I think it would be really really cool to insert it into the player tracking spaces in the top box. 

Logged
TZtech
Contributing Gold NLG Member
Sr.Tech NLG Member 1000+ Post
*

Total Karma Storms: 129
Offline Offline

Gender: Male
Posts: 1113



« Reply #24 on: August 09, 2012, 08:27:25 PM »

For Now just power it via the USB cable

The DCS port is on the backplane board - on a 039 its labeled J6 and DCS (Just above the LED)
Attached is a photo of the connector on a PE+
Unlike RS232 the DCS port also needs a positive supply from the device connecting to it - In this case the Amicus board
Logged
Pages: [1] 2 3 4 ... 9 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.111 seconds with 19 queries.