{% extends "sega.html" %} {% block title %}RS232C{% endblock %} {% block body %}

# JAMMA Video Standard - Alternative version

Note: This page assumes you have read the documentation regarding the JAMMA video standard. If you have not, it is recommended to read that first.

## Packet framing

Request packet (master->slave)

E0h | n | Dest | Seq | CMD | D0 | D1 | D2 | ... | Dn-5 | SUM

Response packet (slave->master)

E0h | n | Src | Seq | Status | CMD | Report | D0 | D1 | D2 | ... | Dn-7 | SUM

## Commands and responses

Response packets of this format include a source address, which should match the destination in the request. The sequence number of both the request and response should be the same (? todo: verify this), and should be modulo 32 (20h).

While the packet format would suggest it supports multiple commands, I have never observed more than a single command per packet. Response packets include the command number between their packet status and report status bytes.

## Individual commands

The following is a reference table for communication with an {{ part("838-14971")|safe }}. Endpoints required for MIFARE cards are marked with M, FeliCa F, and LEDs L.

Req | Name | Code | Description | Request Size | Response Size
MF | Get Firmware Version | `30` | Retrive the firmware version string | 0 | 1+
MF | Get Hardware Version | `32` | Retrive the hardware version string | 0 | 1+
MF | Radio On | `40` | Enable the NFC radio | 2 | 0
MF | Radio Off | `41` | Disable the NFC radio |  | 0
MF | Poll | `42` | Retreive a list of NFC devices | 0 | 3+
M | Select MIFARE tag | `43` |  | 1+ | 0
|  | `44` |  | 1+ |
MF | Set MIFARE Classic key | `50` | Provide the key used for MIFARE decryption | 1+ | 0
|  | `51` | Read back the MIFARE key | 1+ | 6
M | Read MIFARE block | `52` | Read a secified block from a MIFARE Classic device |  |
MF | Set Aime key?? | `54` | /shrug | 1+ | 0
|  | `55` | Read back the Aime key |  | 6
|  | `60` |  |  |
|  | `61` |  |  |
MFL | Reset | `62` | Reset the device to an initial state |  | 0
|  | `70` |  |  |
F | FeliCa communication | `72` | Proxy the enframed command to a present FeliCa device | Variable | Variable
LED commands (address `08`)
L | Reset | `10` |  |  |
| Set timeout | `11` |  |  |
| Set timeout response | `14` |  |  |
L | Set LED colour | `82` |  |  |
| Set LED count | `86` |  |  |
L | Get board info | `f0` |  |  |
| Get board status | `f1` |  |  |
| Get firmware sum | `f2` |  |  |
| Get protocol version | `f3` |  |  |
| Bootloader | `fd` |  |  |

{% endblock %}