Home Page

Question: Implementing bespoke RS232 Devices

Posted By: elcondor

Question: Implementing bespoke RS232 Devices - 07/31/20 07:43 AM

I've been looking at the null_modem setup for RS232, to implement a device for the MPU4 and similar drivers, namely the BACTA datalogger. It's a specification part, where the key to handling communication is to run as a null modem at 1200 baud, 1 start bit, 8 databits, odd parity and 1 stop bit.

I had intended to fork the null modem implementation that already exists in bus/rs232, as there are only two real differences. 1 is that the data frame configuration is fixed, and the other is that when a receive operation is complete, the character is logged for later recall and 0x06 is sent back as the acknowledgement response.

My question is, effectively, what is the most MAME appropriate way of doing this? As I say, the connection is standard RS232, so I want to represent that up to a point, but it's not really appropriate as a full on RS232 device as its scope is so limited.
Posted By: Vas Crabb

Re: Question: Implementing bespoke RS232 Devices - 07/31/20 07:59 AM

Just add an RS232 port to the MPU4, then you can plug in the null_modem, and implement that BACTA datalogger in a Python script or something that connects to it.
Posted By: elcondor

Re: Question: Implementing bespoke RS232 Devices - 07/31/20 08:12 AM

Perhaps I'm misunderstanding this, but I'm trying to do this for the benefit of the driver as it currently stands - a lot of these games that are listed as 'Protocol' or 'Datapak' rely on this signal to operate, so there'd have to be something albeit rudimentary in the regular code base. If someone wanted to do actual, virtual datalogging then yes, an external setup would do it, but it's a way of doing it internally that I'm struggling to find.
Posted By: Vas Crabb

Re: Question: Implementing bespoke RS232 Devices - 07/31/20 10:39 AM

Oh, if it’s supposed to be internal, do you need the RS232 glue at all? Couldn’t you just use the device_serial_interface mixin to implment your dummy datalogger?
Posted By: R. Belmont

Re: Question: Implementing bespoke RS232 Devices - 07/31/20 12:09 PM

Yeah, if this is an internal thing that the game needs to operate, skip RS232 entirely and just hardwire it.
Posted By: elcondor

Re: Question: Implementing bespoke RS232 Devices - 07/31/20 12:31 PM

Pretty much, the only reason for spinning it out into device space at all is that Maygay, JPM, Bellfruit etc all have interfaces for this thing, as it's the slot machine equivalent of the little diagnostic socket in your car. I should just pull it together out of the serial interface and have done, as it's basically DIN socket abuse anyway (just RX, TX and power basically).
Posted By: R. Belmont

Re: Question: Implementing bespoke RS232 Devices - 07/31/20 01:10 PM

Yeah, it's pretty easy with diserial to make custom serial devices. esqpanel.cpp does exactly that.
Posted By: Heihachi_73

Re: Question: Implementing bespoke RS232 Devices - 07/31/20 07:17 PM

Originally Posted by elcondor
Pretty much, the only reason for spinning it out into device space at all is that Maygay, JPM, Bellfruit etc all have interfaces for this thing, as it's the slot machine equivalent of the little diagnostic socket in your car. I should just pull it together out of the serial interface and have done, as it's basically DIN socket abuse anyway (just RX, TX and power basically).

The Aristocrat games also need a similar thing, mainly for setting up progressive jackpots and cashless credit I/O, but the Queensland games need it in order to actually work at all. Even the old MK4 (MK2.5) games have jackpot occurrence meters in the menu, but I'm not sure if it's leftover code from other games that actually had jackpots, or whether they really can be hooked up to a jackpot.
Posted By: elcondor

Re: Question: Implementing bespoke RS232 Devices - 08/01/20 06:32 PM

It may well be the same protocol I think, but it got extended over the years to support such things through the likes of ccTalk. However, in the hardware I'm looking at there's no communication beyond the acknowledgment byte. As such, I'm keeping it incredibly simple for now, but as mentioned earlier, in theory it's a null terminal setup, just with some different behaviour on handling.
Posted By: Heihachi_73

Re: Question: Implementing bespoke RS232 Devices - 08/01/20 11:59 PM

Aristocrat games (and other similar "American" or "Australian" style slot makers e.g. Konami, IGT, WMS, Bally/SHFL, Ainsworth/AGT) have a number of different protocols, ASP (1000 and 2000), QCOM, VLC, SAS, X-series etc. A user on here (and newlifegames) by the name of bogan is a lot more knowledgeable than me, before the coronavirus became a thing he was getting some machines (real hardware) working with a custom comms program he was making.

It looks like some serial-based thing though, if the DE9 plug in this topic is anything to go by. http://newlifegames.com/nlg/index.php?topic=26955.0
Posted By: elcondor

Re: Question: Implementing bespoke RS232 Devices - 08/03/20 03:42 PM

Given that the BACTA standard did surprisingly well in terms of UK takeup, it wouldn't surprise me to see something similar elsewhere, but my knowledge of such things is very limited. I know of some of the setup in The Netherlands and Germany, purely because a lot of it used the UK techs under license. They never really weaned of serial communications though, so I would guess that it would be vaguely close.
© 2020 Forums