What's new
That is a possible idea (make the user take the card) - or could you have contextual awareness? The card transfer only comes up after the user has actively selected a card, and the card is at it's limit. Do you have awareness of the variable that denotes that the card needs to be renewed/transferred? If you do - that could set a flag for the eject subroutine so that it automatically handles that little bit of card in/out for you?

I do think you are right - i would use this in a public place - and anything to keep it as absolutely dumb as possible means that it will have less chance of going into an error condition.

Matt
 
Last edited:
That is a possible idea (make the user take the card) - or could you have contextual awareness? The card transfer only comes up after the user has actively selected a card, and the card is at it's limit. Do you have awareness of the variable that denotes that the card needs to be renewed/transferred? If you do - that could set a flag for the eject subroutine so that it automatically handles that little bit of card in/out for you?

I do think you are right - i would use this in a public place - and anything to keep it as absolutely dumb as possible means that it will have less chance of going into an error condition.

Matt
a lot of these issues wouldn't be so annoying if we actually interpreted the data that's intended to be read from and written to the magstripe. all we're doing at this point is passing around the data that would be encoded in the stripe. not sure what work has been put in to interpret that data. [for instance, i haven't yet fired up, say, demul, and trapped any routines that make use of the serial port, to watch what happens before and after]

if we actually interpreted the data, then we'd know what's going on, and could make better decisions. all we have at the moment is theorized heuristics based on card flow and inferred user action based upon what the game tries to do to the CRW.
 
if we actually interpreted the data, then we'd know what's going on, and could make better decisions. all we have at the moment is theorized heuristics based on card flow and inferred user action based upon what the game tries to do to the CRW.
not sure about InitD, but I've recently looked at ClubKart, and there was CRC32-ish checksum, truncated to 16bit, followed by some unknown decryption algo. I'd guess InitD uses smth similar.
 
@saturnnights provided some great info a while ago on interpreting print commands. Character data is encoded as shift-jis.

Looking at some print commands from my WMMT logs, and looking at the output on an old card, this game doesn't have much fancy stuff. It's mainly text and some special characters from the shift-jis table such as the circle icon ● (code 819C) - this odd code was not interpreted in my command line output, so it prints a question mark.

The packet of print data for WMMT appears to be the entire print every time, since it can erase. This is going to make image generation quite easy.

Packets come in with lines separated by 0D as the end of line indicator.

There are 10 lines.

Line 1 is the name as it was entered in the game.
Line 2 is the first line of car name.
Line 3 is the second line of car name.
Line 4 is player class.
Line 5 is HP listing - shift-jis encoded - there's an odd character code of 14, which I take to mean it's supposed to make the next character subtext, and or it's some other kind of sizing parameter, because the B that follows gets printed much smaller.
Lines 6-9 represent lines where boxes get filled in with circles.
Line 10 is the online code.

print data interpreted.PNG

So now that I know how to interpret the data, it's going to be a matter of laying it out on a transparent PNG file that can overlay a card image.

Python has a library called Pillow that is able to do this. I've successfully saved some PNG files with text, so I just have to figure out sizing and spacing. :thumbsup:
 
You are correct on the subtext - here is a picture of one of my current cards.

IMG_0309.jpg
 
And a note - I think there are circles and diamonds - some filled in or just outlines (if I am remembering correctly).

Here is an example of one with a not filled in circle.
IMG_0310.jpg


Matt
 
The ascii table lists code 0x14 as Device Control 4, so I'm not sure how that's generally supposed to be interpreted.

My linux shell, via SSH seems to interpret this data pretty well, and even makes the B smaller:
print data interpreted linux.PNG

Here's a proof of concept image generated with PIL with python on the machine I'm using as a card server. It tries to print the character before the B.
test.png
 
@mathewbeall, do you happen to have any print commands from your WMMT2 logs?

WMMT2 appears to use 2 lines for class, where WMMT1 uses just 1 with a larger font.

I can generate some logs easily enough, but wondered if you have any handy from your recent tests.
 
I will check when I get home - I know I have at least two logs saved off fully - I will send them over tonight.
 
There are a couple of errant characters to deal with, and the font for the class on WMMT2 needs to be made smaller since it's on 2 lines, but nothing too bad regarding interpreting it.
test1.png
During expiration and transfer, "USED" gets printed on the existing card without wiping it. It looks like it would get printed after the name.
test2 -used.png
 
There are a few minor things to work out, but I'm generating an image with text that aligns with a card I scanned.

I'm not seeing a lot of information in the print data packet beyond the text, so I don't know how the actual printer knows what size to do everything. It may be that the font loaded into the printer simply has the typical ascii and shift-jis characters sized differently and it's a simple as that. There are the couple of bytes that don't read as characters, so they could be sizing info as well. @saturnnights posted a pdf which may give more info.

In the meantime, I'm simply relying on knowing which line it is and sizing the font accordingly. I'm using a unicode font that may draw some characters differently than the printer. For example, I believe the printer is making a hollow circle whereas the font I'm using has it as a solid circle. I may need to pay attention to how the icons are printed out, perhaps get a representation of them by sending print commands to the printer, and I may ultimately edit the font file to align with the game. As I understand it with the physical printer, there's the potential for a specific character to be overwritten with something custom anyway, so if I know what a given game prints for a given code, I can create a game-specific font file that will end up with images that closely approximate what the physical printer does.
 
that is strange. i am noticing there are many different symbols being use in wmmt2. matthewball cards have solid diamond and open circle but my card has solid circles. wonder why the cards are different.


i am not sure but i think open object means tried the race but lost and solid object means tried the race and won. blank means has not tried the race

my card is img 1091 as can be seen it uses circles

from namco's own webpage for wmmt2 this card uses stars triangles diamonds and circles
 

Attachments

  • IMG_1091.JPG
    IMG_1091.JPG
    591.8 KB · Views: 92
  • 2_1.jpg
    2_1.jpg
    16.1 KB · Views: 178
I just ran a race and lost one - to see if it would do a open circle, it didn't....

I think the circle/diamond might be what level you are on of the race circuits... circle, then diamond and then triangle - and then maybe star? haven't hit the star yet.

Matt
 
Ok sounds like its not going to be easy to figure out.

Was it a race you had already won or a blank race?
 
It was a blank race... I am hoping nothing has to be figured out - hopefully it's just a character that gets printed out via the code....
 
Hmm... maybe I don't need to mess with font conversions for this one then. I'm getting solid circles at the moment, but maybe they should be solid.

Not sure what to make of the variation, though, with the one card showing open circles. Maybe that will just be interpreted correctly.
 
I think it would take care of itself - let me try and come in this weekend and get the Matt card up to where it's on the next level, which should be diamonds, and get that data over to you to see what your routine makes of it.
 
Here's a quick test to see that things are lining up. The text image was generated by my script and I simply put it on top of a card I scanned in a photo editor. Since my server is web-based, the final implementation will likely be a blank card picture with the text picture overlaid on top of it via css/html.
card capture.PNG

Note that the card I started with had the code at the bottom burned onto it, while everything else was blank, so the code generated by my script is sitting on top of one that was already on the scanned card. The benefit to having that printed data was I could capture the color from an actual print and make my rendering look pretty close. :thumbsup:

I still need to do something about sizing down text that comes after the HP/, and I'm experimenting with editing fonts themselves to affect spacing and look and feel, but I'm very pleased so far and am confident this is going to work out and give me the solution I have wanted for a while but didn't think I was going to be able to pursue.
 
Back
Top