Wantame Card Scanner Documentation 0.1
September 18, 2025
Shonumi aka D.S. Baxter

***************************************************
1. Introduction
*************************************************** 

On November 22, 2007, Capcom released an action-rhythm game called Wantame Music Channel: Doko Demo Style for the Nintendo DS. It was part of the "Won!Tertainment" franchise developed in conjunction with Takara Tomy. Players can dress up as different dogs wearing various outfits by scanning physical cards with barcodes printed on them. This game was a port of the larger arcade version that was also capable of scanning the very same cards. The portable scanner for the DS offically was never officially given a name or product code, so for the purposes of this documentation is referred to simple as the Wantame Card Scanner.

Doko Demo Style shares some gameplay concepts with Oshare Majo and Sega's HCV-1000. Design-wise, the Wantame Card Scanner is also very similar in operation to the Wave Scanner, another device that Capcom and Takara Tomy collaborated on.


***************************************************
2. General Hardware Information
***************************************************

* Uses DS microphone plug to transmit data.
* Uses Slot-2 only for stability. There is no ROM chip or PCB connected to the Slot-2 pins.
* Powered by 3 LR44 batteries.
* Features a detachable guard for Slot-2 to better fit the original DS or DS Lite.
* Compatible with DSi models thanks to microphone cable.
* Has a red LED to indicate card scanning or errors.
* Microphone cable is tucked under the bottom of the unit.
* Has a reset button on the backside.
* Uses 12 character barcodes in Code-128 C format.
* Produces samples at approximately 400.005Hz.


***************************************************
3. Barcode Transmission Protocol
***************************************************

The Wantame Card Scanner translates barcodes into sound pulses via the DS microphone. By reading samples, the game grabs the barcode data as individual bits, verifies the integrity of the data, then checks to see if the barcode is valid for the game. Note that the arcade version was continually updated all the way through Fall 2009, therefore, some cards are incompatible with the DS version. The transmission protocol consists of the following parts:

---------------------------------------------------------
Protocol Stage	| Description
---------------------------------------------------------
ACK Signal	| Initial pulses
Barcode MSB	| Upper 10-bits
Barcode LSB	| Lower 32-bits
Check Digit	| Code-128 C checksum
---------------------------------------------------------

The ACK Signal alerts the game of incoming data. Normally, microphone input would be zero (assuming no noise from the Wantame Card Scanner). The game will wait for 2 separate LOW-to-HIGH transitions. At a minimum, each LOW and HIGH period should be sampled at least 9 times, but less than 16. The following psuedo-code can be used to determine whether a sample from the microphone is LOW or HIGH:

MIC_SAMPLE = READ_DS_MIC()
MIC_SAMPLE = MIC_SAMPLE * 2
MIC_SAMPLE = MIC_SAMPLE AND 0xFF

IF MIC_SAMPLE LESS THAN 0x48
	SAMPLE_TYPE = LOW

ELSE
	SAMPLE_TYPE = HIGH

After sending the ACK Signal, the Wantame Card Scanner sends a continuous stream of 49 bits. Depending on the length of the LOW part of the the LOW-to-HIGH transition, a "0" or a "1" will be recorded. If the LOW portion measures at 6 or more samples, this represents a "1" in the bitstream, otherwise it represents a "0". Importantly, each LOW and HIGH portion must measure at least 3 samples, and the total duration of the LOW-to-HIGH transition must not exceed 16 samples.

The first 42-bits of the stream represent the barcode as a hexadecimal number, and the final 7 bits represent the barcode's checksum. The barcode is split across 2 32-bit integers, with the the upper 10-bits received first, and lower 32-bits received immediately afterwards. However, each integer receives its bits big endian first, and the same is true of the Check Digit.

The format of the barcode data itself uses 7-bits to represent Code-128 C values. These values range from 00 to 99. Each barcode uses 12 characters, but these are "doubled up" in pairs so that only 6 Code-128 C values are necessary. As an example, a barcode such as "011128531729" can be encoded into hexadecimal as such:

---------------------------------------------------------
Barcode Pair	| Raw Hex Value		| Shift
---------------------------------------------------------
"01"		| 0x01			| 35		
"11"		| 0x0B			| 28
"28"		| 0x1C			| 21
"53"		| 0x35			| 14
"17"		| 0x11			| 7
"29"		| 0x1D			| 0
---------------------------------------------------------

FINAL_VALUE = ((0x01 LSL 35) OR (0x0B LSL 28) OR (0x1C LSL 21) OR (0x35 LSL 14) OR (0x11 LSL 7) OR (0x1D))

The result for this case would be 0x8B38D489D, which would get split up into 0x08 for the 10-bit segment and 0xB38D489D for the 32-bit segment. Continuing with the example barcode of "011128531729", the Check Digit can be calculated as such:

---------------------------------------------------------
Barcode Pair	| Sum
---------------------------------------------------------
"01"		| Sum += (1 * 1)
"11"		| Sum += (11 * 2)
"28"		| Sum += (28 * 3)
"53"		| Sum += (53 * 4)
"17"		| Sum += (17 * 5)
"29"		| Sum += (29 * 6)
---------------------------------------------------------
		| Sum += 105
		| Sum = (Sum % 103)
---------------------------------------------------------

Essentially, the first pair is multiplied by 1 and added to the sum, the second pair is multiplied by 2 and added to the sum, and so on and so forth for the other pairs. After that, a value of 105 is added to the sum, then a modulo of 103 is applied to the sum for the final result. For this example it would be 0x41.

After all of these signals are transferred from the Wantame Card Scanner via microphone input, the rest of the samples should go LOW until a new scan.
