What's new

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
I made a little progress. I put together a script to drive the reader and had some success sending commands and getting replies from the reader. I had not been successful doing that when I tried before.

A few things changed:
-I resoldered some loose wiring at a db-9 connector.
-I experimented with changing up baudrate and parity. I still believe the correct baudrate is 38400bps, but my main issue with my script may have been parity. I can't recall on the sniffing script if I had parity at NONE or EVEN, so I may have had that wrong on my script I was trying to interface with the N2. I'll go back and try that.
-I did these tests on my Windows PC instead of my underpowered Linux netboot or the RPi.

The remaining issue with regards to driving the reader itself, which is being done entirely to determine if my serial settings are correct, is that often the reader doesn't understand the command and gives a x15 reply. If I keep re-trying the same command, it will eventually give an 06 reply. With a lot of retries built in, I can get the reader to initialize with a script.
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
It turns out in my tests at driving the physical reader with the script, I was simply sending commands too quickly. After adding in some delays, I can get reliable communications going.

I believe based on these tests that I can more confidently confirm that the serial settings are: 38400pbs, byte size 8, parity even, stop bits 1
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
Guess who got through initialization in the game!

I'll have to test more later.

I think it was a combination of flaky wiring and incorrect settings working against me on my first attempts to interface with the game.
 

mathewbeall

Grand Master
Joined
Nov 6, 2017
Messages
917
Reaction score
477
Location
Mission Viejo, CA, USA
Guess who got through initialization in the game!

I'll have to test more later.

I think it was a combination of flaky wiring and incorrect settings working against me on my first attempts to interface with the game.
Great job - always good to get past a hurdle that doesn't make sense to exist.. :)
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
I can get through all the WMMT3 test menu card reader options successfully.

I have even successfully started a game with card data taken from my logs. I'm not sure I'm writing data correctly yet, because I saved down new data and it didn't like what I was sending back when I tried to start again.

This is also where things get annoying with the game. It just keeps asking for the card data rather than deciding its getting bad data and giving an error... then it just keeps asking for it once going to the test menu. It won't stop and get on with another command until it's satisfied or rebooted.
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
I am successfully saving and inserting card data for WMMT3 now.

I notice the game does not send out a blanket erase command. WMMT1-2 use the x7D command for this. WMMT3 uses the x78 command. I can't quite understand what this is doing other than that it's possible that it's selectively erasing and overwriting parts as it prints. I haven't seen enough to know if a x78 command is a full erase, but the logs show that no time is taken in responding to the command, so it's not like the physical printer had to go through and spend time erasing and giving updates to this command. It only gives a single response.

I'm going to take advantage of the imaging script's ability to NOT use a transparent background when it's pasting new images onto the existing one, so it will effectively wipe out what's below it. We'll see if that does it.
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
My impression of printing on WMMT3 is that it erases a line as it prints. So I decided to have the printing script behave like that. If it's printing for WMMT3, or any game that behaves this way, it will clear out the line prior to printing it. It remains to be seen if this is appropriate across the board for WMMT3, but I'm hoping it is.

At any rate, assuming nothing happens that's wildly different than what I'm doing now, I'm mostly finished with the script for WMMT3. I still need to do a little work on the handling of inserting and ejecting cards.
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
As was mentioned much earlier in this thread by @MetalliC, the magnetic cards have 3 tracks of data.

Up until now I had not run into a game that uses more than the first track. WMMT3 uses all 3.

Furthermore, WMMT3 does not always overwrite all 3 tracks. I had scripted for it assuming the game was always sending complete card data when it wrote to the card, but that is not the case. It will only overwrite a track if it needs to and will leave the others alone. I discovered it was doing this is when after a few story races I kept running into issues with my card data file no longer being accepted by the game. It turns out I was only receiving data for tracks 2 and 3.

A track consists of 69 bytes. A card write command can come in with just 1 track or up to 3. There is a parameter byte for indicating which tracks are being written. A payload with 1 track of data can go to any of the 3 tracks. A payload with 2 tracks of data can be sent to 1 and 2, 2 and 3, or 1 and 3. A payload with 3 tracks obviously writes to all 3 tracks. I am now accommodating for this in my WMMT3 script and will hopefully not run into any more data issues.
 

rocket

Enthusiast
Joined
Dec 30, 2015
Messages
341
Reaction score
75
Those writes are they made in multiple swipes across the megnetic head? Meaning to write to track 1 and 3 does it pass across the magnetic head 2 times
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
Those writes are they made in multiple swipes across the megnetic head? Meaning to write to track 1 and 3 does it pass across the magnetic head 2 times
I honestly don't know the specifics of this technology. I'm able to get what I need out of serial logs and the general Sanwa reader pdf (which has great info that seems to apply regardless of the model). In the end, what's actually happening with the physical reader and how it writes and retrieves data from the cards is magic to me! :D

Magnetic reading/writing? Thermal printing (and erasing on some models)? Magic!
 

MetalliC

Grand Master
Joined
Nov 19, 2015
Messages
1,166
Reaction score
1,037
right, it depends on this device's magnetic head design, which may read/write only single track, or 1-2-3 tracks at once in single pass.
but we don't know how it is in this reader.
 

MetalliC

Grand Master
Joined
Nov 19, 2015
Messages
1,166
Reaction score
1,037
a bit related to this topic - I've did RE of Atomiswave "AW-NET" system card readers.
long story short - AW RFID cards was identified as Maxell ME-Y2001 (1Kbyte "coil-on-chip"), which read via Maxell ME-M21 series or compatible reader, same device as located inside of Lindbergh InitialD's card reader/printer. at least it uses same command set as encapsulated in ID4 command D1 :)
however, there is only 2 "Net@Select" games directly connected to these readers - "Salaryman Kintaro" and "Horse Racing: Victory Furlong". which is not "cool games", heh..

while more interesting games - KOF Neowave, NeoGeo Battle Coliseum and GG Isuka, connected to special box, which splits video, inputs and cardRW interface for up to 4x cabs.
https://imgur.com/a/HfwIw9w
at cardRW comms part it is much simpler than Maxell's readers, there is quite simple command set.

I can provide additional information if anyone interested to create some emulator script for RPi, for use with real Atomiswave (or maybe it may work for Naomi2 too ? I'm not sure)

ngbc_c.png
 

person808

Beginner
Joined
Jul 20, 2019
Messages
3
Reaction score
4
Location
Hawaii
As was mentioned much earlier in this thread by @MetalliC, the magnetic cards have 3 tracks of data.

Up until now I had not run into a game that uses more than the first track. WMMT3 uses all 3.

Furthermore, WMMT3 does not always overwrite all 3 tracks. I had scripted for it assuming the game was always sending complete card data when it wrote to the card, but that is not the case. It will only overwrite a track if it needs to and will leave the others alone. I discovered it was doing this is when after a few story races I kept running into issues with my card data file no longer being accepted by the game. It turns out I was only receiving data for tracks 2 and 3.

A track consists of 69 bytes. A card write command can come in with just 1 track or up to 3. There is a parameter byte for indicating which tracks are being written. A payload with 1 track of data can go to any of the 3 tracks. A payload with 2 tracks of data can be sent to 1 and 2, 2 and 3, or 1 and 3. A payload with 3 tracks obviously writes to all 3 tracks. I am now accommodating for this in my WMMT3 script and will hopefully not run into any more data issues.
From what I remember MT3 / 3DX / 3DX+ track 1 data will never change during the cards lifetime, I actually don't even think it changes after the card is renewed. So that probably holds the permanent data that doesn't change on a card like Card Name / Car Model / ID # (00-01 or whatever). I know that after every play no matter if you don't even race the only thing that changes is your card life goes down 1, both tracks 2 and 3 will change.
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
Just a bit of an update here. I have the card reader script working with 3DX+, but this game is apparently varying the way it prints on the card, so my WMMT3 printing method is not working out for 3DX+.
 

tacobell

Professional
Joined
Jan 17, 2020
Messages
194
Reaction score
372
Location
1
I just got my Naomi 2 to work with Initial D 3 and was wondering if there was any updates to the software? Thanks in advance!
 

winteriscoming

Champion
Joined
Feb 16, 2016
Messages
1,399
Reaction score
1,094
Location
Indiana, US
I don't quite understand why, but I often get PMs about this project asking me directly for help/updates/summaries. Anything I have to share is shared here. Read up and ask questions here if you can't figure it out, so the next person with the same question has a reference. Chances are that someone else can answer besides me. I tend not to reply to these questions via PM because it comes across to me as someone asking me to give them a personalized summary, and I don't have time for that.

For the record: there are aspects of this overall project that I have not released publicly, like an ID4-8 script and the RPi frontend that currently supports WMMT1-3DX+. If/when I'm ready to do so, it will be done here. Please don't PM me asking for updates. My main reason for not jumping into larger public releases with the frontend at this point is because I have little time or patience to manage the support questions that will inevitably come up. I have worked in support roles professionally in the past and have no interest in doing so in my free time.

Sorry if I sound cranky. I am and it's unrelated to this wonderful community. However, this project is low on my personal concerns list at the moment. I appreciate others' enthusiasm and interest in it.
 

twistedsymphony

Enlightened
Staff member
Immortal
Joined
Jul 21, 2015
Messages
10,004
Reaction score
9,329
Location
NH, USA
I tend not to reply to these questions via PM because it comes across to me as someone asking me to give them a personalized summary, and I don't have time for that.
I get this ALL THE TIME with other stuff. usually my answer is: don't PM me questions, ask in the forum where it can benefit everyone.
 
Top