The '''[[wikipedia:Barcode Battler|Barcode Battler]]''' is a handheld electronic game released by Epoch Co. which uses a barcode scanner to generate ingame characters and items. A successor called the '''Barcode Battler II''' would later be released in Japan with an output port to interface with video game consoles such as the Famicom and Super Famicom. (This is the version released internationally as the Barcode Battler)
A Famicom [[expansion port]] cable was bundled with the game ''Barcode World'' in order to interface with the device, which is what this page will describe.
==Input ($4017 Read)==
7 bit 0
---- ----
xxxx xDxx
|
+---- Serial data
The transmission format appears to be level-shifted RS232 serial at 1200 baud:
*1 Start bit (must be 1=LOW)
*8 Data bits (LSB first, 1=LOW=Zero, 0=HIGH=One)
*1 Stop bit (must be 0=HIGH)
==Data format==
The data format is a 20-byte ASCII string consisting of a 13-character barcode followed by a 7-character ID.
Known barcode formats:
*[[wikipedia:EAN-13|EAN-13]]
*[[wikipedia:EAN-8|EAN-8]] (''leading'' space padding)
*ERROR (''trailing'' space padding, denotes scanning error)
An emulator providing barcode inputs should pad smaller codes to 8 or 13 characters by prepending '0's and then treating it as one of the above formats. This allows the [[wikipedia:UPC-A|UPC-A]] and [[wikipedia:UPC-E|UPC-E]] formats to be used in ''Barcode World'', though it is unknown if they are officially supported by the hardware.
Known IDs:
*EPOCH\r\n - sent by hardware (i.e. CRLF line ending)
*SUNSOFT - alternate string accepted by ''Barcode World''
==References==
*[https://problemkaputt.de/everynes.htm#controllersbarcodebattlerbarcodereader nocash's documentation] (covers FC & SFC protocols)