(Topic ID: 123680)

Hypothetically, how could one interface a pin to a computer?

By PinballShoppe

9 years ago


Topic Heartbeat

Topic Stats

  • 11 posts
  • 5 Pinsiders participating
  • Latest reply 9 years ago by thedefog
  • No one calls this topic a favorite

You

Linked Games

No games have been linked to this topic.

    #1 9 years ago

    Something I've been pondering over is the notion of logging every switch, sensor and coil, every input and output, and score during a game. This data could be used to replay the game in a software simulation, as well as meta-gaming such as RPG-like experience points, levelling and achievements.

    It occurred to me that the best way to collect this data might be to interface at the EPROM connector, and run the game's ROM in a virtual machine. A processor-level man-in-the-middle attack.

    Alternatively, would there be a way to log from another IO board? It wouldn't get the score, but that could be scraped from the DMD board.

    Just your random thought for the day. Cheers!
    -y

    #2 9 years ago

    What kind of game? B/W Should be pretty easy with a p-roc. The new stern SPiKE system is also just CAN and you could probably sniff the traffic with a $20 car cracker off of Amazon.

    The tricky part is translating the switches into something you care about. The game code probably also handles a lot of stuff like debouncing that'll mess with your results if you're just looking at the raw inputs.

    #3 9 years ago
    Quoted from PinballShoppe:

    Alternatively, would there be a way to log from another IO board?

    Well, to get the score you are going to have to either access the display or the memory. Otherwise, everything else you could just follow back in the schematic and find a valid entry point. Optimally, you would grab everything directly from the cpu/memory, but that will take some work and would be different for every game. A lot of the mods intercept those signals today, and I think oga and pinballmiked have done some of the dmd based logic, take a look at the modding threads.

    -Wes

    #4 9 years ago

    Ooh - the p-roc looks like just the thing, thanks!

    No game in particular, just blue-sky thinking. It could even make an interesting AI experiment - an automated pin that learns how to play itself.

    #5 9 years ago

    Basically, you just monitor the switch and lamp matrix outputs. I believe the Pinduino does this. It wouldn't be anything more magical than having all the positive lines monitored when they are high and having your ground monitored (pulled high with a pullup resistor so when they are grounded, a zero means that ground was switched in). You then feed that to a high impedance input for your computer, arduino, or whatever.

    #6 9 years ago

    Wouldn't it make more sense to monitor the RAM, since that is where all the instructions are going to be written? If you made a list of memory addresses from the assembly code of the original ROM, then just use another little endian system like any x86 architecture and an intercept and pipe it back through to the machine, and you will be able to do just what VPINMAME does in debug mode and monitor the matrixes you are in business.

    #7 9 years ago
    Quoted from PinballShoppe:

    It could even make an interesting AI experiment - an automated pin that learns how to play itself.

    Would have to throw Image processing into the mix, but YES, you could do this. GET TO IT MAN!

    -Wes

    #8 9 years ago

    Yep, this all could be done in a lower level method with an ATmega328 or similar, just monitoring logic states and write code that interprets those states. Probably easier than the RAM method, but more coding involved as you have to interpret the actions of all those states per-game.

    #9 9 years ago
    Quoted from PinballShoppe:

    Ooh - the p-roc looks like just the thing, thanks!
    No game in particular, just blue-sky thinking. It could even make an interesting AI experiment - an automated pin that learns how to play itself.

    Note that this video was on a MUCH earlier p3 prototype. Who knows what multimorphic has up their sleeves nowadays?

    #10 9 years ago
    Quoted from thedefog:

    Yep, this all could be done in a lower level method with an ATmega328 or similar, just monitoring logic states and write code that interprets those states. Probably easier than the RAM method, but more coding involved as you have to interpret the actions of all those states per-game.

    If I were doing it, and I was trying to figure out what was going on in the game. I would just watch the lamps and maybe monitor the sound. There is a guy I believe is swapping out his ted nugent pinball sounds with a raasperry pi, so I think he is just getting it to recoginize sounds and subbing in whatever which I think wouldn't be that hard since there isn't a lot of different sounds or noise.

    #11 9 years ago
    Quoted from Det_Deckard:

    If I were doing it, and I was trying to figure out what was going on in the game. I would just watch the lamps and maybe monitor the sound. There is a guy I believe is swapping out his ted nugent pinball sounds with a raasperry pi, so I think he is just getting it to recoginize sounds and subbing in whatever which I think wouldn't be that hard since there isn't a lot of different sounds or noise

    All you would have to do is look for that memory address being written, then have the raspberry pi play a sound when it shows. Not totally simple, but not too difficult a thing to do if you are familiar with older processors. The older games have cpus running slow enough that you can physically watch the bits shift on the data & address lines with a scope. That certainly makes things easier.

    Reply

    Wanna join the discussion? Please sign in to reply to this topic.

    Hey there! Welcome to Pinside!

    Donate to Pinside

    Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!


    This page was printed from https://pinside.com/pinball/forum/topic/hypothetically-how-could-one-interface-a-pin-to-a-computer and we tried optimising it for printing. Some page elements may have been deliberately hidden.

    Scan the QR code on the left to jump to the URL this document was printed from.