Part 3 - Contents: An Encryption Layer Is Used On Some Peripherals Where Security Is Paramount
Part 3 - Contents: An Encryption Layer Is Used On Some Peripherals Where Security Is Paramount
Part 3 - Contents: An Encryption Layer Is Used On Some Peripherals Where Security Is Paramount
Part 3 - Contents
1. Appendix 1 - cctalk Command Cross Reference............................................................................................3
1.1 Core Commands.............................................................................................................................................7
1.2 Core Plus Commands....................................................................................................................................7
1.3 Multi-drop Commands..................................................................................................................................7
1.4 Coin Acceptor Commands...........................................................................................................................7
1.5 Payout Commands.........................................................................................................................................7
1.6 Bill Validator Commands.............................................................................................................................8
1.7 Obsolete Commands .....................................................................................................................................8
2. Appendix 2 - OSI 7-layer Network Model ......................................................................................................9
An encryption layer is used on some peripherals where security is paramount. ................9
3. Appendix 3 - Coin Types and Coin Values ...................................................................................................10
3.1 Automatic Coin Configuration ..................................................................................................................11
3.2 CVF ................................................................................................................................................................13
3.3 BACTA Token Selection ...........................................................................................................................14
3.3.1. Token Selection...................................................................................................................................14
3.3.2. Tokens as Coins..................................................................................................................................15
4. Appendix 4 - Polled Serial Credit Timing for Coin Acceptors ..................................................................16
4.1 Polled Retries................................................................................................................................................17
5. Appendix 5 - Multi-Master Applications.......................................................................................................18
5.1 Arbitration Controllers ................................................................................................................................20
6. Appendix 6 - Naming Convention ..................................................................................................................21
6.1 Money Controls Product Examples ..........................................................................................................23
7. Appendix 7 - Flash Memory Support .............................................................................................................25
8. Appendix 8 - Address Clash Probability........................................................................................................26
8.1 Clash Results ................................................................................................................................................27
9. Appendix 9 - CRC Checksum Algorithm......................................................................................................28
9.1 Outline ...........................................................................................................................................................28
9.2 Example Command .....................................................................................................................................28
9.3 Algorithm in C++ ........................................................................................................................................28
9.4 Look-up Table ..............................................................................................................................................29
9.5 Verification Data..........................................................................................................................................30
10. Appendix 10 - Common Country Codes......................................................................................................31
10.1 Europe..........................................................................................................................................................31
10.2 Rest of the World.......................................................................................................................................32
10.3 Islands..........................................................................................................................................................34
10.4 Exceptions...................................................................................................................................................36
11. Appendix 11 - Coin Acceptor Messaging Example ...................................................................................37
11.1 Initialisation................................................................................................................................................37
11.2 Pre-Acceptance ..........................................................................................................................................38
11.3 Credit Polling .............................................................................................................................................38
12. Appendix 12 - Italian Flavour Specification Changes...............................................................................40
13. Appendix 13 - Minimum Acceptable Implementations............................................................................41
13.1 Coin Acceptors...........................................................................................................................................41
13.1.1. Add for Sorter / Diverter Support ..................................................................................................41
13.1.2. Add for Date Support.......................................................................................................................41
13.1.3. Add for Encrypted Serial Communication...................................................................................41
13.2 Bill Validators ............................................................................................................................................42
13.2.1. Add for Bank Switching Support...................................................................................................42
13.2.2. Add for Date Support.......................................................................................................................42
13.2.3. Add for Barcode Support ................................................................................................................42
13.3 Payouts ........................................................................................................................................................43
13.3.1. Add for Encrypted Payout...............................................................................................................43
13.3.2. Add for Enhanced Security.............................................................................................................43
13.3.3. Add for Date Support.......................................................................................................................43
13.3.4. Add for Parameter Support .............................................................................................................43
13.3.5. Add for Accumulator Mode............................................................................................................43
14. Appendix 14 - Large Packet Exchange ........................................................................................................44
14.1 Host to Device............................................................................................................................................44
14.2 Device to Host............................................................................................................................................44
cctalk Generic Specification - Money Controls - Page 1 of 66 - cctalk Part 3 v4.4
While every effort has been made to ensure the accuracy of this document no liability of any kind is
accepted or implied for any errors or omissions that are contained herein.
Public Domain Document
15. Appendix 15 – Bill Types and Bill Values ..................................................................................................46
16. Table 1 - cctalk Standard Category Strings & Default Addresses...........................................................48
17. Table 2 - cctalk Coin Acceptor Error Code Table ......................................................................................49
17.1 cctalk Coin Acceptor Error Code Descriptions....................................................................................51
18. Table 3 - cctalk Fault Code Table .................................................................................................................53
18.1 cctalk Fault Code Descriptions ...............................................................................................................55
19. Table 4 - cctalk Coin Acceptor Status Codes ..............................................................................................57
20. Table 5 - cctalk Coin Calibration Reply Codes ..........................................................................................58
21. Table 6 - cctalk Standard Manufacturer Strings.........................................................................................59
21.1 Manufacturer Names .................................................................................................................................59
22. Table 7 - cctalk Bill Event Codes..................................................................................................................60
23. Circuit 1 - cctalk Standard Interface .............................................................................................................61
Typical Components..........................................................................................................................................61
24. Circuit 2 - cctalk Low Cost Interface............................................................................................................62
25. Circuit 3 - cctalk Direct Interface..................................................................................................................63
26. Circuit 4 - PC Interface ...................................................................................................................................64
27. Glossary .............................................................................................................................................................65
Header Function 1 2 3 C P B O
255 Factory set-up and test
254 Simple poll 1
253 Address poll 3
252 Address clash 3
251 Address change 3
250 Address random 3
249 Request polling priority C B
248 Request status C
247 Request variable set C P B
246 Request manufacturer id 1
245 Request equipment category id 1
244 Request product code 1
243 Request database version C
242 Request serial number 2
241 Request software revision 2
240 Test solenoids C
239 Operate motors B
238 Test output lines C B
237 Read input lines C B
236 Read opto states C P B
235 Read last credit or error code O
234 Issue guard code O
233 Latch output lines C B
232 Perform self-check C B
231 Modify inhibit status C B
230 Request inhibit status C B
229 Read buffered credit or error C
codes
228 Modify master inhibit status C B
227 Request master inhibit status C B
226 Request insertion counter C B
225 Request accept counter C B
224 Dispense coins O
223 Dispense change O
222 Modify sorter override status C
221 Request sorter override status C
220 One-shot credit O
These are the commands which should be supported by all cctalk peripherals. They
allow the device at the address specified to be precisely identified, even if the rest of
the command set is unknown.
Command Response
Simple poll ACK
Request equipment category id “Coin Acceptor”
Request product code “SR3”
Request build code “TSTD”
Request manufacturer id “Money Controls”
These commands are useful but not essential for all cctalk peripherals. For instance, it
can be useful to have an electronic serial number in the product but not all devices
support this feature.
These commands are not needed if the host is connected to only one cctalk peripheral,
or if all the addresses on the bus are known in advance. Otherwise these commands
are needed to perform address resolution and dynamic address changing.
This is the recommended command subset for all cctalk peripherals which return
‘Coin Acceptor’ as the category identification.
Note that not all commands will be implemented by every product. The serial
communication manual for the product concerned should provide a definitive
command list. See Appendix 13 for a minimum acceptable implementation.
This is the recommended command subset for all cctalk peripherals which return
‘Payout’ as the category identification. This is the case for serial compact hoppers etc.
Note that not all commands will be implemented by every product. The serial
communication manual for the product concerned should provide a definitive
command list. See Appendix 13 for a minimum acceptable implementation.
This is the recommended command subset for all cctalk peripherals which return ‘Bill
Validator’ as the category identification.
Note that not all commands will be implemented by every product. The serial
communication manual for the product concerned should provide a definitive
command list. See Appendix 13 for a minimum acceptable implementation.
These commands are either discouraged or not in widespread use. They should not be
used in any new designs.
For PC-based host software, writing a cctalk DLL or OCX is an elegant way of
separating the low level serial communication packet drivers from the high level
application software. A generic cctalk message sender can be made available through
a public interface.
In broad terms...
The link between the coin type and the coin name is determined by the ‘coin
specification’ programmed into the coin acceptor either at the factory or by portable
equipment supplied to customers and service centres. The product label usually details
which coins are programmed into which positions.
C435A GB
1 2 3 4 5 6 7 8
The label shows that coins are programmed into positions 1 to 7 of a 16 coin acceptor.
The upper bank ( coins 9 to 16 ) is not used in this example.
When polling for serial credits, the following codes are obtained…
The host machine can be programmed with these assignments in a look-up table. Any
coin acceptor ordered from the factory must be programmed with the correct coin
specification.
It is possible using cctalk to have the coin type table automatically downloaded from
the coin acceptor into the host machine during power-up initialisation.
For this to work, there needs to be support for the ‘Request coin id’ command.
Each coin position, for example 1 to 16, is interrogated for an ASCII identifier. This
consists of 6 characters representing the coin name.
[C][C][V][V][V][I]
CC = Standard 2 letter country code e.g. GB for the U.K. ( Great Britain )
VVV = Coin value in terms of the base unit appropriate to that country
I = Mint Issue. Starts at A and progresses B, C, D, E…
The country code for the ‘Euro’, the Common European currency, is ‘EU’.
If the country code is ‘TK’ then a token occupies this position rather than a coin. In
this case the VVV field represents a token number in ASCII rather than a value which
could change from one jurisdiction to another.
It is possible to have more than one mint issue in circulation at any particular time -
for instance during a transition period from ‘old’ coins to ‘new’ coins. Serial coin
acceptors can be programmed with both types and the ‘old’ coins inhibited by the host
machine when they officially go out of circulation.
3 x ASCII Value
Characters
5m0 0.005
10m 0.01
20m 0.02
25m 0.025
50m 0.05
.10 0.10
.20 0.20
.25 0.25
.50 0.50
001 1
002 2
2.5 2.5
005 5
010 10
020 20
025 25
050 50
100 100
200 200
250 250
500 500
1K0 1,000
2K0 2,000
2K5 2,500
5K0 5,000
10K 10,000
20K 20,000
25K 25,000
50K 50,000
M10 100,000
M20 200,000
M25 250,000
M50 500,000
1M0 1,000,000
2M0 2,000,000
2M5 2,500,000
5M0 5,000,000
10M 10,000,000
20M 20,000,000
25M 25,000,000
50M 50,000,000
G10 100,000,000
Some examples…
3.2 CVF
The Coin Value Format or CVF is a quick method for returning coin value rather than
coin position in the ‘Read buffered credit or error codes’ command. It is a useful
option when the ‘Request coin id’ command is not supported but only works for coin
values in the range 1 to 1000 in standard increments.
The CVF is basically a method for compressing coin values into a single byte.
A CVF byte consists of a multiplier bit ( bit 7 ) and a 7-bit data value…
[ multiplier bit | data value ]
If the multiplier bit is set then the data value is multiplied by 10. This allows a
convenient way of transmitting credit codes as monetary values with a ratio between
largest and smallest coins in excess of 1000 to 1. A CVF byte of 255 is reserved for a
token of unspecified value.
The CVF bytes 0 and 128 have no monetary value. The maximum CVF byte is 254 (
255 is a token ) which corresponds to a coin value of 1260.
To determine whether a coin acceptor has been programmed with CVF codes, read
option flag 0 with the ‘Read option flags’ command.
Each game has 1 active token. The coin acceptor can be programmed with a number
of different tokens but only one of them can be selected at any one time. The selected
token is used in place of coin position 5 which historically ( in the days of parallel
coin acceptors ) has always been the token. When a token is inserted into the coin
acceptor and is validated as true, credit code 5 is stored in the event buffer. The host
machine knows that a token has been inserted and assigns the correct monetary value
to it.
Any coins programmed into coin position 5 are disabled in this mode as a token
substitution has been made. A coin acceptor may typically have 6, 12 or 16
programmed tokens and a manual method of selecting which one to use with a DIP
switch or rotary switch.
To maximise the benefits of serial operation it makes sense to have a serial command
to select the token to use. The convention has been to use cctalk header 177,
‘Handheld function’. This is a general purpose command which allows manual
switch-selectable configuration options ( literally selected by ‘hand’ ) to be replaced
with a serial equivalent. In this case we define ‘function 1’ to be token selection
across all coin acceptors which support it.
For example…
To select token 1
TX = 002 002 001 177 001 001 072
RX = 001 000 002 000 253 - ACK
To select token 5
TX = 002 002 001 177 001 005 068
RX = 001 000 002 000 253 - ACK
The commands for reading coin identifiers ( cctalk header 184 ) are unsupported for
tokens as there is no standardised database as yet for token descriptors. So requesting
the coin identifier for position 5 will produce undefined results.
In some coin acceptor configurations, the coins are programmed as 2 banks. For
instance a coin acceptor with 12 programmed coins may be seen as having 2 banks of
6 coins or a coin acceptor with 16 programmed coins may be seen as having 2 banks
of 8 coins. One bank may contain standard security coins and the other bank high
In this alternative method the tokens are treated identically to coins and programmed
into the coin space as part of the currency specification. The country code is set to
‘TK’ and the value field becomes an arbitrary catalogue number ( as yet not
standardised ). A credit code is obtained in the same way as coins when the coin
acceptor is polled. Tokens can fill 1, 2 or all of the available coin positions.
Token selection is made by use of inhibits rather than the method described above.
The disadvantage of this method is that adding tokens to a coin specification reduces
the number of coins that can be programmed in as well. Some dual currency
specifications such as GB & Euro require nearly all 16 coin positions to be available
for coins rather than tokens.
For a coin acceptor that can accept 5 coins per second, we must poll it every 200ms.
This means on a multi-drop network, we can support 200 / 30 = 6 identical coin
acceptors.
For a coin acceptor that can accept 5 coins per second, we must poll it every 1000ms (
because we have a 5 event buffer ). This means on a multi-drop network, we can
support 1000 / 38 = 26 identical coin acceptors.
For multi-drop networks, the use of the buffered serial credit command gives
much better performance and allows more slave devices to be networked
together.
Some protocols have a single-shot credit system such that each coin generates a single
credit message that disappears after reading it. For this method to be secure, a retry
mechanism needs to be in place at a low level to cope with an error in sending the
credit information from the coin acceptor back to the host. If this data is corrupted and
the credit information is re-read, the device may report no new credits !
The buffered credit system of cctalk allows the message to be retransmitted repeatedly
in the event of a communication error. The only limiting factor is the size of the event
buffer as there will reach a point when new credits are over-written. A typical
network configuration will allow plenty of retries before this could happen and if
there is still a communication problem the coin acceptor could be shut down.
Multi- master
Slave Master Network Master Slave
The addition of a source address field in cctalk message packets allows any network
device to talk to any other network device. If each cctalk message packet on the bus is
plucked out and examined, it knows where it is going and it knows where it has come
from. So although the host machine could ask a coin acceptor for its serial number, a
coin acceptor could in theory ask a bill validator for its escrow status.
The biggest problem with this approach is network clashes. If 2 masters decide to
transmit a message simultaneously or even near simultaneously then the message
packets will collide. On a single data line this means any message bit could be
‘scrambled’. Although this sounds bad, some networking protocols make use of this
feature. If the data is scrambled then it is re-sent later, ideally after a random amount
of time. With any luck the next retry will get through. This type of network is usually
referred to as CSMA/CD, i.e. Carrier Sense Multiple Access with Collision Delay.
There is a chance of a message collision which can be estimated for any degree of
network loading. Clearly the more masters that exist on a network, the more
frequently they transfer information and the longer the message packets, the less
chance there is of a message getting through. When the network loading is low, the
chances of collisions are so small that they can effectively be ignored and we have a
true network. As loading increases, the number of retries goes up and eventually the
network becomes unusable.
For cctalk to detect a network clash, one or more of the following events must occur.
a) RS232 framing error ( the stop bit was low not high )
b) 8-bit checksum error
Reliance on these conditions for money transactions would be represent a big security
lapse as a collision would not always be detected. Messages could collide and
transform themselves into different but seemingly authentic ones.
The addition of some simple electronics allows far more reliable data transfer in such
situations. We can detect the condition whereby a device is transmitting a logic 1 but
another device on the bus is transmitting a logic 0. Since a logic 0 on the serial bus is
A small filter can be included on the clock line to the latch to remove glitches due to
transmission / reception delays.
/TX
NOR Filter
NOR CLK Q
/RX 1/4 74HC02
1/4 74HC02 1 D
ENABLE
/CLR
1 /PRE
1/2 74HC74
CLASH DETECT
The ability of a device to successfully talk to a slave on a multi- master network can be
estimated with probability theory. Unlike a deterministic network with time slots that
can be allocated according to priority, cctalk is non-deterministic in that there is no
way of knowing in advance whether a particular command will succeed.
Define...
n = no. of masters on bus
f = frequency of communication ( /s )
t = average length of message ( s )
r = no. of retries before command aborted
This is a simple estimate based on the available time in each second during which a
short command could be sent. Note that when there is only 1 master there is no
chance of a collision.
1
0.8
0.6
p
0.4
0.2
0
1 3 5 7 9 11 13 15 17 19 21 23 25
No. of Masters
As can be seen from the graph, the performance is fairly flat to start off with and then
drops dramatically as the network limit approaches. In this example, the network can
support 12 masters quite comfortably ( i.e. > 90% success rate ).
For a network which only requires 2 masters, another solution to the problem would
be a small controller pod which isolates the 2 masters from each other. The controller
Master 1
Multi-drop
Bus
Master 2
pod would arbitrate between the 2 masters and decide which one has access to the
multi-drop bus. If both masters require access together, one of them could be delayed
by replying with the cctalk BUSY message.
cctalk
b baud rate ÷ 100
p interface port
v supply voltage
a data voltage
d supply direction
c connector type
m master / slave configuration
x checksum type
e encryption type
i specification release - minor ( previously the level )
r specification release - major
v. The supply voltage refers to the nominal power supply voltage to the product,
specified in volts.
5 - 5V
12 - 12V ( default )
24 - 24V
48 - 48V
a. The data voltage is the bus pull- up voltage when using an open-collector interface.
Note that cctalk always uses 0V as the active state ( start bit condition ) but the idle
state can be altered to suit the application.
5 - 5V ( default )
12 - 12V
24 - 24V
It is assumed that for voltages other than 5V, the data voltage will usually track the
supply voltage.
cctalk Generic Specification - Money Controls - Page 21 of 66 - cctalk Part 3 v4.4
While every effort has been made to ensure the accuracy of this document no liability of any kind is
accepted or implied for any errors or omissions that are contained herein.
Public Domain Document
i. For specification release - minor, use the minor issue number of this document.
r. For specification release - major, use the major issue number of this document.
SCH3
cctalk b96.p0.v24.a5.d0.c8.m0.x8.e0.i4.r4
Expands as 9600 baud, open-collector, +24V supply, +5V data, supply sink, connector type 8, slave
device, 8-bit checksum, no encryption, minor release 4, major release 4
SR5i
cctalk b96.p0.v12.a5.d0.c5.m0.x8.e0.i2.r4
Expands as 9600 baud, open-collector, +12V supply, +5V data, supply sink, connector type 5, slave
device, 8-bit checksum, no encryption, minor release 2, major release 4
SR3i
cctalk b96.p0.v12.a5.d0.c7.m0.x8.e0.i2.r4
Expands as 9600 baud, open-collector, +12V supply, +5V data, supply sink, connector type 7, slave
device, 8-bit checksum, no encryption, minor release 2, major release 4
C120S
cctalk b48.p0.v5.a5.d0.c3.m0.x8.e0.i2.r4
Expands as 4800 baud, open-collector, +5V supply, +5V data, supply sink, connector type 3, slave
device, 8-bit checksum, no encryption, minor release 2, major release 4
Lumina
cctalk b96.p0.v12.a5.d0.c5.m0.x16.e1.i2.r4
Expands as 9600 baud, open-collector, +12V supply, +5V data, supply sink, connector type 5, slave
device, CRC CCITT checksum, encryption type 1, minor release 2, major release 4
SCH2
cctalk b96.p0.v24.a5.d0.c8.m0.x8.i1.r3
Expands as 9600 baud, open-collector, +24V supply, +5V data, supply sink, connector type 8, slave
device, 8-bit checksum, level 1, release 3
SR5
cctalk b96.p0.v12.a5.d0.c5.m0.x8.i1.r3
Expands as 9600 baud, open-collector, +12V supply, +5V data, supply sink, connector type 5, slave
device, 8-bit checksum, level 1, release 3
SR3
cctalk b96.p0.v12.a5.d0.c7.m0.x8.i1.r3
Expands as 9600 baud, open-collector, +12V supply, +5V data, supply sink, connector type 7, slave
device, 8-bit checksum, level 1, release 3
Expands as 9600 baud, open-collector, +12V supply, +5V data, supply sink, connector type 7, slave
device, 8-bit checksum, level 1, release 3
Expands as 9600 baud, open-collector, +24V supply, +5V data, supply sink, connector type 6, slave
device, 8-bit checksum, level 1, release 3
C435S
cctalk b96.p0.v12.a12.d0.c5.m0.x8.i1.r3
Expands as 9600 baud, open-collector, +12V supply, +12V data, supply sink, connector type 5, slave
device, 8-bit checksum, level 1, release 3
C435SR
cctalk b48.p0.v12.a5.d0.c1.m0.x8.i1.r2
Expands as 4800 baud, open-collector, +12V supply, +5V data, supply sink, connector type 1, slave
device, 8-bit checksum, level 1, release 2
C120P
cctalk b48.p0.v5.a5.d0.c3.m0.x8.i4.r2
Expands as 4800 baud, open-collector, +5V supply, +5V data, supply sink, connector type 3, slave
device, 8-bit checksum, level 4, release 2
Expands as 4800 baud, open-collector, +12V supply, +5V data, supply sink or source, connector type
1, slave device, 8-bit checksum, level 4, release 2
Commands have been added into the BNV command set for flash programming - see
headers 138 to 141.
The limitations at present centre around the slow baud rate. 9600 baud is fine for
control messages but slow for firmware upgrades. A 64K block of memory would
take 1 minute 8 seconds to transfer without the associated protocol overheads. The net
result could typically be 2 to 3 minutes for each 64K block.
Future revisions of the protocol may see faster baud rates for use during flash
programming.
Question : What is the probability of an address clash when ‘n’ devices are connected
to the cctalk bus with random addresses ?
Like most problems, the solution is often easier when turned on its head. Instead of
calculating how many devices could share an address, calculate how many outcomes
there are of all the addresses being different.
Assuming all addresses are different, the number of possible permutations we can
have is…
m! / ( m - n )!
We now flip it back to find the chance of a clash ( 2 or more devices with the same
address… )
p clash = ( m ^ n ) - ( m! / ( m - n )! ) / ( m ^ n )
Rewriting…
p clash = 1 - ( m! / ( ( m - n )! * ( m ^ n ) ) )
For cctalk, m = 254. There are 254 possible addresses as the broadcast address and
host address are excluded.
n p clash
1 0.0000%
2 0.3937%
3 1.1780%
4 2.3452%
5 3.8831%
6 5.7751%
7 8.0009%
8 10.5363%
9 13.3541%
10 16.4242%
11 19.7146%
12 23.1915%
13 26.8203%
14 30.5657%
15 34.3928%
16 38.2672%
17 42.1559%
18 46.0274%
19 49.8522%
20 53.6034%
25 70.5071%
30 83.1874%
40 96.0981%
So for 3 serial compact hoppers attached to the bus, randomising their addresses
would be successful a fraction less than 99 times out of a 100 first pass ( the process
could obviously be repeated ). However, as the number of devices attached to the bus
increase, there is a dramatic fall off in success rate. The break even point is 20
devices.
9.1 Outline
The particular CRC checksum used in cctalk is taken from the CRC-CCITT standard.
• CRC-CCITT
• Polynomial = x^16 + x^12 + x^5 + 1
• Initial crc register = 0x0000
To calculate the CRC protected message packets for the ‘Reset device’ command…
TX : [ 40 ] [ 0 ] [ crc_lsb ] [ 1 ] [ crc_msb ]
RX : [ 1 ] [ 0 ] [ crc_lsb ] [ 0 ] [ crc_msb ]
The TX packet is to address 40 ( bill validator ) with header 1 ( Reset device ) and no
data. The receive packet is to address 1 ( host controller ) with a null header and no
data ( the ACK message ).
TX : [ 40 ] [ 0 ] [ 70 ] [ 1 ] [ 63 ]
RX : [ 1 ] [ 0 ] [ 48 ] [ 0 ] [ 55 ]
{
int i;
BYTE z = 0;
{
int i;
WORD crc = seed;
return crc;
{
int i, j;
WORD crc = seed;
return crc;
Country 3166-1-A2
Albania AL
€ Andorra AD
€ Austria AT
€ Belgium BE
Bosnia Herzegovina BA
Bulgaria BG
Croatia HR
Czech Republic CZ
Denmark DK
Estonia EE
EURO EU
€ Finland FI
€ France FR
Gibraltar GI
€ Germany DE
€ Greece GR
Hungary HU
Iceland IS
€ Irish Republic IE
Israel IL
€ Italy IT
Latvia LV
Liechtenstein LI
Lithuania LT
€ Luxembourg LU
Macedonia MK
Moldova MD
€ Monaco MC
€ Netherlands NL
Norway NO
Poland PL
€ Portugal PT
Romania RO
€ San Marino SM
Serbia & Montenegro SX
Slovakia SK
Slovenia SI
€ Spain ES
Sweden SE
Switzerland CH
Turkey TR
United Kingdom GB
€ Vatican City VA
€ = Euroland country
Country 3166-1-A2
Afghanistan AF
Algeria DZ
Angola AO
Antarctica AQ
Argentina AR
Armenia AM
Australia AU
Azerbaijan AZ
Bahrain BH
Bangladesh BD
Bhutan BT
Belarus BY
Belize BZ
Benin BJ
Bolivia BO
Botswana BW
Brazil BR
Brunei BN
Burkina Faso BF
Burundi BI
Cambodia KH
Cameroon CM
Canada CA
Central African Rep. CF
Chad TD
Chile CL
China CN
Columbia CO
Congo CG
Costa Rica CR
Cote D’Ivoire CI
Djibouti DJ
East Timor TP
Ecuador EC
Egypt EG
El Salvador SV
Eritrea ER
Ethiopia ET
Equatorial Guinea GQ
French Guiana GF
French Polynesia PF
Gabon GA
Gambia GM
Georgia GE
Ghana GH
Greenland GL
Guatemala GT
Guinea GN
cctalk Generic Specification - Money Controls - Page 32 of 66 - cctalk Part 3 v4.4
While every effort has been made to ensure the accuracy of this document no liability of any kind is
accepted or implied for any errors or omissions that are contained herein.
Public Domain Document
Guinea-Bissau GW
Guyana GY
Honduras HN
Hong Kong HK
India IN
Indonesia ID
Iran IR
Iraq IQ
Japan JP
Jordan JO
Kazakhstan KZ
Kenya KE
Korea North KP
Korea South KR
Kuwait KW
Kyrgyzstan KG
Laos LA
Lebanon LB
Lesotho LS
Liberia LR
Libya LY
Macau MO
Malaysia MY
Malawi MW
Mali ML
Mauritania MR
Mexico MX
Mongolia MN
Morocco MA
Mozambique MZ
Myanmar MM
Namibia NA
Nepal NP
New Zealand NZ
Nicaragua NI
Niger NE
Nigeria NG
Oman OM
Pakistan PK
Panama PA
Papua New Guinea PG
Paraguay PY
Peru PE
Philippines PH
Puerto Rico PR
Qatar QA
Russia RU
Rwanda RW
Samoa WS
Saudi Arabia SA
Senegal SN
Sierra Leone SL
Singapore SG
Somalia SO
10.3 Islands
Country 3166-1-A2
American Samoa AS
Anguilla AI
Antigua & Barbuda AG
Aruba AW
Bahamas BS
Barbados BB
Bermuda BM
Bonaire QQ
Bouvet Island BV
Cape Verde CV
Cayman Islands KY
Christmas Island CX
Cocos ( Keeling ) Islands CC
Comoros KM
Cook Islands CK
Cuba CU
Cyprus CY
Dominica DM
Dominican Republic DO
East Caribbean EA
Falkland Islands / Malvinas FK
Faroe Islands FO
Fiji FJ
Jamaica JM
10.4 Exceptions
11.1 Initialisation
This is a typical initialisation or enrolment process for a gaming machine. The idea is
to confirm the cctalk link to the coin acceptor is operational and that the device fitted
is approved for use in this environment.
11.2 Pre-Acceptance
We could also read the coin identifiers for coins 9 to 16 if we wanted to.
Remember that the event code wraps from 255 to 1 as 0 is a special start-up value
indicating a power-up or reset has occurred.
The following commands were seen as ‘core’ to the Italian amusement market and
have to be implemented by all peripherals. All other commands are optional.
Simple poll
Perform self-check
Calculate ROM checksum
Request equipment category id
Request product code
Request build code
Request manufacturer id
Request serial number
Request software revision
Request comms revision
Modify inhibit status
Request inhibit status
Modify master inhibit status
Request master inhibit status
Request coin id
Read buffered credit or error codes
Request data storage availability
Reset device
Simple poll
Perform self-check
Calculate ROM checksum
Request equipment category id
Request product code
Request build code
Request manufacturer id
Request serial number
Request software revision
Request comms revision
Modify inhibit status
Request inhibit status
Modify master inhibit status
Request master inhibit status
Request bill id
Request country scaling factor
Read buffered bill events
Route bill
Switch encryption code
Store encryption code
Request variable set
Request option flags
Modify bill operating mode
Request bill operating mode
Request currency revision
Request firmware upgrade capability
Request data storage availability
Reset device
13.3 Payouts
Simple poll
Test hopper
Request equipment category id
Request product code
Request build code
Request manufacturer id
Request serial number
Request software revision
Request comms revision
Enable hopper
Dispense hopper coins
Request hopper status
Emergency stop
Request hopper coin
Request hopper dispense count
Request payout high / low status
Request data storage availability
Reset device
Pump RNG
Request cipher key
As the device knows in advance about data arriving and what it is for, the host does
not need to send packet addresses or sequence numbers, although it may of course do
so. It is assumed all data packets will arrive in sequence. Transfer integrity can be
guaranteed by using large packet checksums at the end of the data.
This particular command transfers up to 128 bytes of data each time as shorter
messages are better protected by the packet checksum and internal memory boundary
calculations are often easier using powers of 2.
An error in data transfer will usually be picked up at the end when a final checksum is
calculated. If an ACK is not received for one of the data packets then this packet
could be re-sent but in this case a sequence number would be essential to prevent
multiple copies being received in error.
Since the host is the bus master it must first find out how much data the peripheral
device has to send through a memory size packet request. The host can then poll the
individual data packets out of the device but must include a block address.
The data storage in this case can be anything from 1 to 64,512 bytes.
If an error occurs reading the data, then the request can be re-sent as each packet
includes a block address.
[C][C][V][V][V][V][I]
CC = Standard 2 letter country code e.g. GB for the U.K. ( Great Britain )
VVVV = Bill value in terms of the country scaling factor
I = Issue code. Starts at A and progresses B, C, D, E…
Bill validators return a country-specific scaling factor and decimal places – see
command header 156, ‘Request country scaling factor’.
The value code x scaling factor should express the bill value in terms of the lowest
value currency unit in active circulation e.g. pence or cents.
Combined with the decimal places the result should be in terms of the bill currency
unit e.g. pounds, euros or dollars.
Examples
= preferred settings
Problems can exits in concurrent new & old currencies where there is a massive
change in scaling factor as cctalk only supports a common scaling factor for each
country rather than a scaling factor for each note. For details of industry-wide
solutions then contact Money Controls for more information.
These standard category strings should be reported exactly as reproduced in the table
below by the ‘Read equipment category id’ command. Observe any capitalisation
rules - ‘Coin Acceptor’ is not the same as ‘COIN ACCEPTOR’, ‘coin acceptor’ or
‘Coin acceptor’.
Reel 30 31 to 34
A manufacturer of cctalk coin acceptors can implement any subset of the error codes below depending
on the technology they are using and the ability to self-diagnose problems. These are all ‘event’ codes
and can be reported at any time in a reply to a host credit poll.
A manufacturer of cctalk equipment can implement any subset of the fault codes below depending on
the technology they are using and the ability to self-diagnose problems. These are all status codes
which can be returned in response to a ‘Perform self-check’ command. They are all ‘fatal’ errors in that
any non-zero reply prevents normal operation of the device and is an implicit request to the host
machine for a service callout. The host does not need to ‘inhibit’ or prevent the device from operating
if a non-zero fault code is returned as this will be done automatically.
Note that all fault code conditions relating to payout devices were incorporated into the ‘Test hopper’
command in a past revision of the protocol and are therefore marked as obsolete.
Code Status
0 OK
1 Coin return mechanism activated ( flight deck open )
2 C.O.S. mechanism activated ( coin-on-string )
Code Error
1 calibration denied
2 calibration recharge required
3 calibration failed ( product name mismatch )
4 calibration failed ( database number mismatch )
250 calibration error ( key not supported )
251 calibration error ( internal bin failure )
252 calibration error ( op-code not supported )
253 calibration error ( illegal parameter )
254 calibration error ( database corrupt )
255 calibration error ( unspecified )
BNV’s are expected to reply with abbreviated names. Other peripherals may return a
full name.
If you are a manufacturer of cctalk peripherals then you may submit your company
identification string for inclusion in this table.
There are two types of ‘Bill jammed in transport’ errors - safe mode and unsafe mode.
The safe mode assumes that the note is jammed in a position which cannot be
retrieved by the customer and so if validated as true a credit can be given. The unsafe
mode assumes that the customer can retrieve the note and so no credit should be
given.
Event Types
This circuit uses an open-collector transistor to drive the data line and a diode
protected straight-through receiver.
Typical Components
Transistors are any small signal, general-purpose types with a dc current gain of at
least 100.
27. Glossary
Presented below is an arbitrary selection of terms relating to serial communications
and the money transaction industry which may prove helpful to people unfamiliar
with this field.
Accumulator As in ‘accumulator hopper’. The hopper can dispense multiple coin types to reach
a requested coin value but can only determine which coin has been paid after it
leaves the hopper. To prevent overpaying the hopper must sometimes stop before
the requested coin value is met and inform the host machine so that a second
single-coin hopper can dispense the remaining coin value or ‘change’. This
method can be substantially faster than a discriminator hopper which rejects
unwanted coin types before they leave the hopper.
ACK Acknowledge message. Affirmative outcome, it worked.
API Application Program Interface. The use of a common software library through
standardised ‘hooks’.
ASCII American Standard Code for Information Interchange. A universal way of
representing letters with numbers
Asynchronous Data is transferred at seemingly random intervals, i.e. not synchronised with a
master clock.
AWP Amusement With Prize - a type of amusement machine. Typically reels.
BACTA British Amusement Catering Trade Association ( founded 1974 ). Represents the
pay-to-play leisure industry in Great Britain.
Bit (Binary Digit). The smallest unit of digital information - a 0 or 1.
Bit stuffing The process of adding extra bits into a transmitted packet to ensure continuous
data transfer
BNV Bank Note Validator
Broadcast Sending a message to all bus peripherals regardless of address
Bus The electrical connection along which data flows between devices
Byte (Binary Term). A storage location for 8 bits
Calibration The Money Controls method of remote coin programming
CAN Controller Area Network - an automotive serial protocol
CCITT Comité Consultatif International Téléphonique et Télégraphique
Checksum A method of detecting errors in transmitted data
CRC Cyclic Redundancy Check - a secure type of checksum based on polynomial
division
CSMA/CD Carrier Sense Multiple Access / Collision Detection. A method of handling
collisions on a multi-master network.
CVF Coin Value Format as used by cctalk
Discriminator As in ‘discriminator hopper’. The hopper can dispense multiple coin types. The
hopper determines each coin type prior to payout and if it does not match the
required type it is ‘rejected’. Can suffer from ‘hunting’ whereby the hopper
cannot find a particular coin if the frequency of occurrence is low.
EEPROM Electrically Erasable Read Only Memory. Non-volatile storage.
EMS Early Morning Start-up. Software executed when power is first applied to a
machine. Traditionally assumed to be first thing in the morning.
EIA Electronic Industries Association
Ethernet A common networking protocol employing CSMA/CD on a bus or star topology
Full-duplex Data can be transmitted and received simultaneously
Half-duplex Data can be transmitted and received, but not simultaneously
IEEE Institution of Electrical and Electronic Engineers
ISO International Standards Organisation
Isochronous Data is transferred subject to some time constraints. Applications such as multi-
media must have a guaranteed data throughput.
ITU International Telecommunication Union
MDCES Multi-Drop Command Extension Set as used by cctalk
Mech Industry-standard abbreviation for a coin (mech)anism
MPU Micro-processing Unit. Old-fashioned word for a PCB with a microprocessor
on it. A system block with processing capability.