GXTX / YACardEmu

Software emulator for Sanwa CRP-1231BR-10 / CRP-1231LR-10NAB / CR-S31R-10HS3 card readers.
GNU General Public License v2.0
32 stars 10 forks source link

Working with Derby Owners Championship World Edition #19

Closed Kamikazi20 closed 1 year ago

Kamikazi20 commented 1 year ago

I am trying to get your code to work with Derby Owners Championship World Edition. I am able to get the program to start up but DOCWE is stating that the Card reader is not responding.

This is all I am getting image

I have a usb to RS232 cable connected to my unit based on https://www.arcade-projects.com/threads/naomi-2-chihiro-triforce-card-reader-emulator-initial-d3-wmmt-mario-kart-f-zero-ax.814/

Let me know if there is anything I can do to help you get this working for DOC.

GXTX commented 1 year ago

Thanks for checking it out!

Derby, much like Virtua On requires the RS422 converter board (P/N 838-13661) between the reader and the machine. So you'd connect to that instead of directly to the Naomi, since you have a real machine it should be easy enough to figure out where to attach it.

When you get it hooked up, you'll want to set the config to be 1231BR 9600 even (although the baud and parity at this point is just assumption based on Virtua On). If you launch via command line you can set the -t option which should give more info, such as if it's captured any packets from the machine.

Kamikazi20 commented 1 year ago

Thanks for the reply and I look forward to getting this working for you. At the time of testing, The board that you are talking about has an RS232 9-pin D. Sub female connector. It looks pretty straightforward. I converted the cable so that the RxD and TXD are crossed over

My current setup has has a USB to RS232 connector going directly into the converting board rs 232 9 PIN D Sub female connector. It is using an FTDI chip as well. See picture attached. Let me know if I got this right.

20230802_083758 I matched the pins to the original cable. on the RS232 side Pin 2 RXD Pin 3 TXD Pin 5 GND Pin 7 CTS Pin 8 RTS

Is this setup correct or should I be connecting into the cn8 connecter of the printer.

my config.ini

[config] ; basepath MUST end in a trailing slash! ;basepath = /home/wutno/cards/ basepath = C:\docwe_c\ ; Linux ;serialpath = /dev/ttyUSB0 ; Windows serialpath = COM3 ;serialpath = \.\pipe\YACardEmu ; Which device should we emulate? ; C1231LR / C1231BR / S31R targetdevice = C1231BR ; ; Optional ; serialbaud = 9600 ;Acceptable even & none serialparity = even apiport = 8080 autoselectedcard = card.bin

I look forward to your reply! :D

GXTX commented 1 year ago

Looks OK, do me a favor and just bridge RTX/CTS on both ends. Some controllers may not be happy that we aren't properly handling that. And yeah you'll want to be hooked up to that board, not to the printer.

Kamikazi20 commented 1 year ago

Confirming you want a wire from RTX(pin 8) and CTS (pin7). I made this cable bridge_RTX_CTS

The good news is that the card reader not responding error is gone.

Now I am at a please wait. But I am not seeing your program go back and forth with the unit. PXL_20230802_230221127

GXTX commented 1 year ago

Right, RTS/CTS bridged on both sides, but no wires going back and forth. Did you run with -t option? If so and there's nothing there (it would be in the terminal screen, not web display), can you try some other baud (9600, 19200, 38400, 57600, 115200) and parity settings (even, none), and perhaps going into test mode and running a card test there would be better for now.

Kamikazi20 commented 1 year ago

Please Close - I am a dummy. I wired it wrong.

GXTX commented 1 year ago

Just to confirm, it works? And what were your settings? And I'd love to see a pic of it running :)

Kamikazi20 commented 1 year ago

So here was the thing I crossed the wires and aligned RXD -> RXD and TXD -> TXD. I undid the cable.

Computer -> USB to RS232 ->RS422 ->Naomi I bought this: https://www.amazon.com/dp/B075YGKFC1?ref=ppx_yo2ov_dt_b_product_details&th=1 USB RS232 Pin out Notes you only need 3 wires | CTS/RTS Bridged | You will have to modify a cable| Pin 2 RXD Pin 3 TXD Pin 5 GND Pin 7 CTS Wire this together with pin 8 Pin 8 RTS Wire this together with pin 7 It should look like this

Pining

[config] ; basepath MUST end in a trailing slash! ;basepath = /home/wutno/cards/ basepath = C:\docwe_c\ ; Linux ;serialpath = /dev/ttyUSB0 ; Windows serialpath = COM3 ;serialpath = \.\pipe\YACardEmu ; Which device should we emulate? ; C1231LR / C1231BR / S31R targetdevice = C1231BR ; ; Optional ; serialbaud = 9600 ;Acceptable even & none serialparity = even apiport = 8080 autoselectedcard = card.bin

I am playing this puppy all night long. works

Kamikazi20 commented 1 year ago

Thanks @GXTX

GXTX commented 1 year ago

Thanks again for testing :)