NAOMI 2/Chihiro/Triforce Card Reader Emulator (Initial D3/WMMT/Mario Kart/F-ZERO AX)

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • NAOMI 2/Chihiro/Triforce Card Reader Emulator (Initial D3/WMMT/Mario Kart/F-ZERO AX)

      Edit: Now there's one for F-ZERO AX!
      Download and wiring info here: NAOMI 2/Chihiro/Triforce Card Reader Emulator (Initial D3/WMMT/Mario Kart/F-ZERO AX)

      Edit: Now there's one for Mario Kart Arcade GP!
      Download and wiring info here: NAOMI 2/Chihiro/Triforce Card Reader Emulator (Initial D3/WMMT/Mario Kart)

      Edit: I have successfully put together a card emulator for ID3 and WMMT.
      WMMT 1/2 card emulator/wiring info here: NAOMI 2/Chihiro Card Reader Emulator (Initial D3/WMMT)

      ID3 card emulator info here: NAOMI 2/Chihiro Card Reader Emulator (Initial D3/WMMT)
      Wiring for the ID3 emulator here: NAOMI 2/Chihiro Card Reader Emulator (Initial D3/WMMT)

      Original post:
      ----------------------------------------------

      I had brought up this idea on KLOV and someone suggested I might get more interest/feedback/help here, so here goes! :D

      Short project description:
      Emulate the NAOMI 2 card reader and interface it with an actual NAOMI 2 for the purposes of saving progress in Initial D3.

      Background:
      I've got a Sega driving cab (OutRun2 SP) and I've got a NAOMI 2 hooked up and netbooting working. I've also got an ID3 card reader and cards, and have that wired up and working just fine. For this game, the cards work essentially to save your progress along with car upgrades. This is a great feature for home use. While I'm good to go with a currently working setup and a large quantity of compatible cards, I thought it would be a fun project to try to emulate the card reader, maybe using a Raspberry Pi, so that the NAOMI thinks a card reader is plugged up, and the data can be saved and loaded accordingly. If that works, then others can get a cheap alternative to the expensive and dying card readers. Apparently cards are getting hard to come by, too, and each has a limit of 50 uses as far as I know.

      The data is transmitted between the NAOMI and Card Reader by serial communication.

      In my brief review of serial communication standards, I believe that in spite of the CN8 port on NAOMI 2 saying RS-422, the labeling of the pins for the card reader make me think the standard is RS-232.

      On the actual reader at CN2, we've got:
      Pin 2: RXD (Serial Data Input)
      Pin 3: TXD (Serial Data Output)
      Pin 4: CTS (Clear to Send)
      Pin 5: RTS (Request to Send)
      Pin 6: SG (Signal Ground)

      On the NAOMI 2 at CN8, we've got:
      Pin 1: RXD
      Pin 2: TXD
      Pin 3: GND
      Pin 4: RTS
      Pin 5: CTS

      Wiring from Card Reader to NAOMI 2:
      RXD to TXD
      TXD to RXD
      CTS to RTS
      RTS to CTS
      SG to GND

      My thinking is that while the 2 are wired up, I could tap into one side of this communication and sniff it with a serial input on the computer to read what's happening one way and then wire in to the other and see what's happening in that direction. After getting that information, I could try to unhook the reader and wire up just the computer to send the same signals back to the NAOMI2 that it expects from the reader.

      The short term goal would be to trick the NAOMI into thinking the card reader has initialized. After that, it's a matter of figuring out what communication happens back and forth during the reading and writing of the card, then somehow figuring out how to store that data and give it back to the NAOMI when it expects it.

      I've got almost no experience with serial communication standards. I would initially appreciate any help with regards to methods I could use for sniffing the signals and help addressing any concerns over signal voltage differences between computer and NAOMI 2. I've got a working serial port on an older laptop that I was hoping to use in the initial experiments before moving to an RPi.

      I was thinking I could maybe take the RXD and RTS from either device and wire into the computer while the 2 devices are communicating to intercept the communication one way. Is there a good way to listen to the signal coming from both devices at once?

      Once I'm able to analyze the signals to see what's sent from the NAOMI and what it expects to receive back, I think I could come up with some kind of program to manage the feedback.

      Does this project seem realistic? Anyone have any advice to offer?

      Thanks for any and all help!

      The post was edited 5 times, last by winteriscoming: Added links to posts with emulator info. ().

    • Glad to see you made it over here. :)

      I don't have any experience with sniffing serial data but is there a reason you can't capture the traffic in both directions at the same time?

      I feel like a logic analyzer or a Bus Pirate would be helpful for something like this.

      Do you have any pictures of the card reader? it might be helpful to know what the hardware looks like.
      "Information wants to be free"
      VOOT | RFM | Kraylix V3 | FiF Jr. | KI2 | UMK3 | E29 | E29| TOTD | DDR
      Follow my projects on Instagram: instagram.com/twistedchu

      Buy my 3D Printed Parts: bit-district.com
    • twistedsymphony wrote:

      I don't have any experience with sniffing serial data but is there a reason you can't capture the traffic in both directions at the same time?
      I don't know... As far as I'm seeing, a 9-pin PC serial port has designated pins for the communication standard you're using. So I believe it's only going to be able to receive 1 input at a time, at least in the way I was thinking I'd be able wire it up.
    • great to see more people interested in NAOMI InitialD card reader reverse engineering

      on software side you'll be needed "232Analyzer" - handy tool for serial communication sniffing.
      not sure about hardware side, I don't know exact CN8 voltage levels, if its 422 - probably you'll be needed some 422-232 level converter. I guess Darksoft knows more than me here and gives some advices.

      at serial level -
      ID reader uses software handshake, so 2wire RX/TX used for serial communication.
      but CTS used here as well, as GPIO input (read below)

      at logic level -
      if you run some of latest Demul emulator versions, you may notice - in ID 1-3 game test mode card reader/writer tests works and passed OK.
      this means I've already reverse engineered (almost all) its protocol, commands, etc :) by the analysis game code (a lot of spaghetti code heh)
      BUT, then you run the game with card R/W enabled - you'll get weird game messages like "remove card" etc, so the game thinks card is always inserted into reader and can't eject it for some reson...
      I spent quite many time on this, and most realistic cause of this looks - CTS line used for some security purposes, and possible must provide some specific encoded information.

      in any way - all info I have is results of pure software analysis, I hope real hardware communication logs will fill all blindspots of this card R/W unit functioning.

      I can provide packet structure and known commands info in PM, but I won't post it on public until its verified/compared with real HW logs (because I dont want to send someone's researches in the wrong direction because of my potentially wrong info)
    • MetalliC wrote:

      in any way - all info I have is results of pure software analysis, I hope real hardware communication logs will fill all blindspots of this card R/W unit functioning.
      Since I have a working reader and a lot of cards available, as long as I can get something set up to read the signals, I should be able to assist in providing logs generated by the hardware.

      I would have thought during the period where the game requests that you remove the card, the card reader is simply waiting for the card to be removed (the opto sensor is no longer triggered) and sends a signal to the NAOMI that the card is removed. This is only a guess, though. Hopefully it's a simple signal and there is not much in the way of security to deal with, but I'm maybe being too optimistic. :P
    • Once you've figured out the protocol how do you plan to fake the cards?

      Obviously I'm getting way ahead of this project but I was thinking it might be cool to make a standard Arduino or Raspberry Pi setup and a smartphone app that let you store virtual cards and "read"/"write" them via NFC.
      "Information wants to be free"
      VOOT | RFM | Kraylix V3 | FiF Jr. | KI2 | UMK3 | E29 | E29| TOTD | DDR
      Follow my projects on Instagram: instagram.com/twistedchu

      Buy my 3D Printed Parts: bit-district.com
    • twistedsymphony wrote:

      Once you've figured out the protocol how do you plan to fake the cards?
      I was assuming it would just be a matter of saving down whatever the game outputs when it sends the command to write the card, and then send that data back when it reads the card. I don't know that it would need to get much more complex than that. You wouldn't even need a visual representation of the card. Sure, that would be cool, but probably beyond the scope of what I'd pursue on my end.

      The most complex I was thinking was maybe having the alpha numeric display attached to the RPi so you can pick a card that you've saved... or maybe just have an SD card per car. SD cards are pretty dirt cheap these days.
    • I tried reading a signal with my laptop that has a serial port with an adapter that's supposed to manage 5.5v to 3.3v signal voltages. I didn't get anything to read. I kind of remember when I was using this setup for a PIC project I was only getting output on this port to work, not input. I ordered a $10 RS-232 USB adapter on Amazon. I figure if that doesn't read anything, I'll have to move up to something more expensive. I don't currently own a logic analyzer (though it would come in handy for other projects I do).
    • winteriscoming wrote:

      I tried reading a signal with my laptop that has a serial port with an adapter that's supposed to manage 5.5v to 3.3v signal voltages. I didn't get anything to read.
      perhaps incorrect port settings ?
      right is 9600bps 8E1 (8 data bits, even parity, 1 stop bit)

      winteriscoming wrote:

      I ordered a $10 RS-232 USB adapter on Amazon.
      make sure you ordered dual RS-232 adapter, because there needed to sniff 2x serial streams - from NAOMI and from card reader.
    • MetalliC wrote:

      make sure you ordered dual RS-232 adapter, because there needed to sniff 2x serial streams - from NAOMI and from card reader.
      I didn't even know dual adapters existed... :P

      I guess I'll see what happens with the single port adapter. I was assuming I'd just be sniffing one side at a time anyway, at least at first. If that works out, I'll invest in a dual adapter.
    • MetalliC wrote:

      you can use 2x single serial ports as well, it doesn't really matters.
      but it's important to have data sniffed from both NAOMI and R/W in real time. so you'll see request-reply chains.
      I'll see what happens with the single one and move up from there. Thanks for the suggestion.

      Do you know if 232Analyzer is capable of monitoring two ports simultaneously?
    • cruzlink2 wrote:

      Question guys if you don't mind. Could a card reader emulator like this be used for other naomi 2 games? Say Virtua fighter 4 series which have 4, Evo, Final Tuned. Be awesome to be able to collect items and dress up your characters like in the arcades in Japan back when the game was popular.
      I've only got a driving cabinet, so haven't ever loaded up VF4 to test if my reader can work with it. I seem to recall at one point reading somewhere that even though the reader hardware may be the same, the reader may have different firmware according to the game it's used with. I'm not sure on that, but I don't know if a solution for ID3 would necessarily be applicable to VF4 or other NAOMI games with card readers.
    • cruzlink2 wrote:

      Question guys if you don't mind. Could a card reader emulator like this be used for other naomi 2 games? Say Virtua fighter 4 series which have 4, Evo, Final Tuned. Be awesome to be able to collect items and dress up your characters like in the arcades in Japan back when the game was popular.
      no
      Japan VF4s have completely different reader, cards (they are RFID, not magnetic like ID ones), and the way it connected to NAOMI (to MAPLE port(s) through special MAPLE-RS board(s)).
      and the worst - it is almost useless without online connection to VF.net services (are they still alive ? I doubt it is), so all you get is fights count increased and stored on card. no items, no dress, no char naming is possible without Sega's VF4 servers.
    • It sucks that there are so many different readers. I've only got a full setup for Initial D since force feedback and controls are identical to those in my OR2SP cab. All I had to do was add a NAOMI 2 with netbooting and card reader which I found on eBay.

      ID3 is my go to game on this cab, but I actually like Wangan Midnight on the Chihiro more, though I lose force feedback and card reader when I play it, plus I'm missing appropriate shifter controls, so I'm stuck with auto transmission. If someone could come up with a card reader emulator for that game, I might forego force feedback and prefer that game in my cab. As it is, I sat down to play WMMT for like 3 hours one time and had a lot of good upgrades, but of course lost all progress when I powered off.

      Anyway, that's my motivation. I assume others might like to be able to save progress on ID3 without an expensive dedicated card reader system that only serves one purpose and has a limited supply of cards.

      These games lose so much without the card readers.
    • well, at least in the case of ID or Club Cart or Derby Owners we potentially can fully emulate this readers and get all game's features.

      but in the games like VF4 or Atomiswave AW.NET games (KOF NW, NGBC, etc) its almost useless without servers, because player profile (was) stored and progressed online, card is just like backup solution which identifies player and gives possibility to play on offline arcades having all his current progress and stuff but not unlock/achieve something new.
      that's sux.
    • MetalliC wrote:

      well, at least in the case of ID or Club Cart or Derby Owners we potentially can fully emulate this readers and get all game's features.

      but in the games like VF4 or Atomiswave AW.NET games (KOF NW, NGBC, etc) its almost useless without servers, because player profile (was) stored and progressed online, card is just like backup solution which identifies player and gives possibility to play on offline arcades having all his current progress and stuff but not unlock/achieve something new.
      that's sux.
      I wonder how difficult it would be to setup community run servers for these older games, similar to how the Bemani players managed to created a whole fake E-Amuse server system for players outside of Japan.
      "Information wants to be free"
      VOOT | RFM | Kraylix V3 | FiF Jr. | KI2 | UMK3 | E29 | E29| TOTD | DDR
      Follow my projects on Instagram: instagram.com/twistedchu

      Buy my 3D Printed Parts: bit-district.com
    • twistedsymphony wrote:

      MetalliC wrote:

      well, at least in the case of ID or Club Cart or Derby Owners we potentially can fully emulate this readers and get all game's features.

      but in the games like VF4 or Atomiswave AW.NET games (KOF NW, NGBC, etc) its almost useless without servers, because player profile (was) stored and progressed online, card is just like backup solution which identifies player and gives possibility to play on offline arcades having all his current progress and stuff but not unlock/achieve something new.
      that's sux.
      I wonder how difficult it would be to setup community run servers for these older games, similar to how the Bemani players managed to created a whole fake E-Amuse server system for players outside of Japan.
      Came here to ponder the same thing. Since USA does not have any way to access AI.net, or the old sega initial d rankings system this would be very nice to hook up with other players to play.