Post subject: Hi, I just made a Raspberry Pi SNESBot
Joined: 10/9/2013
Posts: 8
Hi there, I've been messing around for the last couple of weeks trying to make a SNESBot with my Pi and I'm happy to announce I finally got the b*gger working! Woo yay etc I'm sure this isn't the first and hopefully it won't be the last Pi controlled SNESBot, but I'd thought you guys might be interested in it. My first approach is probably very familiar, wire up the Clock, Data and Latch pins straight into the GPIO and try to bitbang the data out. Even though the benchmarks I read for the Pi's GPIO said it might be possible, what I found was that it just wasn't quick enough to clock out the data. Latchs seemed to be sensed OK so I moved onto my next attempt. This involved taking a knock off SNES controller (again, this is probably very familiar to certain readers) and tried wiring up 12 GPIO pins to the controller PCB. I'm normally pretty good with soldering, I work on pinball tables and have done the odd custom SNES cart, but for some reason the tracks just kept on lifting and I was getting nowhere. This lead to my third attempt, which involved buying 2 4021 shift registers and cloning the SNES controller hardware. I then set about writing the code to drive it and was pretty disheartened when I found out that although I could get it to work, it wasn't any where near reliable enough. Live input (a PS1 controller plugged into the USB port in the Pi) seemed to be ok but it just desynced all the time when I was playing back recorded data. Not a happy chappy :-( After spending a couple of days pouring through my code (and squashing a few bugs in the process) I was ready to give up and admit to all the people who had told me that it just wasn't possible with the Pi and I should use a microcontroller like everyone else. I was lying awake last night when at 3AM I had an idea and went to the shed to check something. Like an idiot I had wired up the 3.3V output to the 4021 Vcc, after I switched it to the proper 5V I fired off a recording and lo and behold, there was Orchid hitting 42 hit combos again and again and again without missing a bit. To say I was pleased is an understatement. Right now, I can play using live input with any USB input device (SMB on a real SNES with a keyboard is hilarious) and recording and playback from my disgusting simple file format works a treat. All I'm doing is copying the evdev event and the latch it occured on into a file, then replaying that data out. Most carts are working fine, I've only done a little bit of testing but I can run over 10 minutes of playback without any desyncs, which I'm very pleased about. Even managed to get a synced playback of SuperGB Tetris, which I really didn't think it would be able to do due to the latch speed doubling (120Hz rather than 60Hz). This is the same rate as the Nintendo controller test cart and I'm guessing it's because the CPU can poll the controllers more as it is doing less/offloading onto the Z80 in the SuperGB. Next steps are to write a couple of file importers so I can start running some of the videos on the site on real hardware, look into some more fun features like auto-fire/button-macros etc. Maybe even have a shot at Netplay just for sh*ts and giggles. I'm pretty pleased with the low budget I've managed to do this on, with a minimal part count but the wiring leaves a lot to be desired. When I get around to making my Mk4 board I'm hoping to tidy up a lot of it. Here's the schematic I came up with: And here's the code I am using, don't laugh, I'm not a great programmer which is why I am so amazed it actually works! https://github.com/SonnyJim/snesbot
Joined: 7/2/2007
Posts: 3960
You should drop in on this thread; dwangoAC and True are both trying to do similar things. It's great to hear you were successful! Oh, and welcome to the forums. :)
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Joined: 10/9/2013
Posts: 8
Here's a link to a youtube video of it in action, sorry about the poor quality! Link to video
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
Derakon wrote:
You should drop in on this thread; dwangoAC and True are both trying to do similar things. It's great to hear you were successful! Oh, and welcome to the forums. :)
Not trying, I have succeeded ;) Well, OK, haven't tested on SNES because I don't have one, just NES, but it should work fine.. I designed the device with 2 player, multitap on both ports playback. See the above linked thread for details. Sonny_Jim, too bad you weren't in IRC earlier, you could have followed the progress or participated. I have a working PIC32 implementation with direct serial out (no other parts except level shifters), an fm2 parser and replay script. Because of the way NES controllers work fm2 playback isn't the greatest, but raw polled works well (I have verified 5 new games including a 2-player game). It should be better on SNES though. Will work on snes9x movie format parser once I get an SNES.
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Joined: 10/9/2013
Posts: 8
I had a dig through that thread but it's a bit hard to follow as the information I'm interested in is so spread out.
Because of the way NES controllers work fm2 playback isn't the greatest, but raw polled works well
I'm pretty new to all this TAS stuff, what's fm2? Also I'd be very interested in the snes9x parser, I'm just about to start writing my own but there's no point inventing the wheel twice if you get what I mean.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
fm2 is the movie file format produced by FCEUX
It's hard to look this good. My TAS projects
Joined: 10/9/2013
Posts: 8
Ah makes sense. I need to do a bunch of reading up on things so I can understand what the hell a lag frame is, along with everything else lol.
Pimpin' ain't easy
You got the Tokyoflash watch as well? Badass, isn't it? Had mine for 12 years now. http://www.tokyoflash.com/en/watch_museum/pimp/pimpinainteasyss/
Joined: 10/9/2013
Posts: 8
Well, I finally got my SNESBot running the SMAS Lost levels run thanks to a bit of help from Ilari. I used his polldump.lua script and then wrote an importer for my Bot and was amazed it actually worked. But, I'm leaving this site now. True was such an obnoxious person to me in IRC and I've accomplished the goals I've wanted, so there's no reason to hang around. Cheers guys, and thanks again Ilari! EDIT: Crappy video! http://youtu.be/da7j4CaIf8g
Personman
Other
Joined: 4/20/2008
Posts: 465
:( If you read this, Sonny_Jim, I beg you not to judge the character of the community as a whole by the words of one person. And True, I wasn't there, so I have no idea if the side of the story presented here is reasonable, but in general, I would urge you (and everyone) to err on the side of kindness when interacting with strangers on the internet, especially those who, like Sonny_Jim, are less technically experienced in a particular area than you, and have come to our community for support. We lost a lot of potential value here, not to mention turning a person off of the site who might have gone on to derive a lot of enjoyment from it themselves.
A warb degombs the brangy. Your gitch zanks and leils the warb.
Player (80)
Joined: 8/5/2007
Posts: 865
I'm no saint and I sometimes like to be a bit adversarial, but I can honestly say that at times, this is the most condescending community I've been a part of. I can think of three separate users just off the top of my head who have frustrated me by speaking down to me or belittling me. As a result, I like to keep a relatively low profile and stick to my work (slow as I may be). On the flip side, I should also say that there is an abundance of kind, supportive, and/or professional people on these boards, so it's just a mixed bag overall. Sonny_Jim, you've done something that is impressive and inspiring and I, for one, would be glad to see more contributions from you. If you don't wish to make your presence known day-to-day, at least pop up every now and again to share your latest work(s). And if the response isn't uniformly positive (which it never is): haters gonna hate.
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Signing the petition to see Sonny_Jim again!
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Emulator Coder, Skilled player (1113)
Joined: 5/1/2010
Posts: 1217
Apparently he got really annoyed... Also, based on some /query discussions on IRC, he had 8Mbit SNES EPROM cart (and used that to try to verify some Speedy Gonzales run, which of course didn't work[*]). [*] No surprise. I knew about instability of that game and that it wouldn't be verifiable.
BigBoct
He/Him
Editor, Former player
Joined: 8/9/2007
Posts: 1692
Location: Tiffin/Republic, OH
His profile says that his last visit was yesterday, so he's at least lurking. I'd love to see the community gain another talented engineer as well.
Previous Name: boct1584
Joined: 10/9/2013
Posts: 8
Hi there, I do pop my nose in every now and again to see if there has been any advancements as I'd really like to run something other than the SMAS run on my hardware. For the record, I have fairly thick skin and I'm used to the odd troll, but when I asked the moderators to have a word with True and they told me 'He's just like that, there's nothing we can do', which is nonsense if you ask me. Even a simple kick would of shown him that behaviour like that, especially towards new members is unacceptable. So it was both a failure of an established member to realise when he was being a jerk and a failure of a mod to realise they could actually do something to change the the situation.
Spikestuff
They/Them
Editor, Publisher, Expert player (2643)
Joined: 10/12/2011
Posts: 6438
Location: The land down under.
Sonny_Jim wrote:
So it was both a failure of an established member to realise when he was being a jerk and a failure of a mod to realise they could actually do something to change the the situation.
true is a jerk, the reason they cannot do anything is because they know it's all for play. true is actually nice once he drops the "*being a dick" card. He actually is quite helpful at times... yes this person has helped me one hands worth. No-one truly can understand true... it's his persona... he will try to get under your skin... he technically did that to you... just ignore him or treat his comments as jokes. It's hard, I know, I've been down that path whenever true confronted me, I usually ignore him if he starts "being a dick". Everyone can be trusted... just some aren't very open.
*I always called it, him being a dick.
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
Sonny_Jim wrote:
Hi there, I do pop my nose in every now and again to see if there has been any advancements as I'd really like to run something other than the SMAS run on my hardware.
working on it
Sonny_Jim wrote:
So it was both a failure of an established member to realise when he was being a jerk
there was no failure it's what you wanted after all but this is the first I've heard of such chatter, I lol'd
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Joined: 10/9/2013
Posts: 8
the reason they cannot do anything is because they know it's all for play.
Again, I disagree. They have the power to make it clear to him that his behaviour is unacceptable, yet refuse to even bring it up with him. I do this as a hobby and as such, I don't expect to have to put up with abuse in the pursuit of my hobby. As I've said, his attitude is damaging towards this community because people will not want to have anything to do with him and from what I gather, I'm not the only person who feels like this.
there was no failure but this is the first I've heard of such chatter, I lol'd
This is my point entirely. You don't see any problem with your behaviour and you think it's all a big joke. This isn't the first time you've 'heard of such chatter' as I discussed with you in IRC *at length* why you shouldn't act like the way you do. You are taking pride in the fact that you act like an asshole when really you should be embarrassed.
it's what you wanted after all
Not really, what I wanted was you to realise that the way you behave is damaging to your community and perhaps change the way you treat people new to the hobby in the future.
Personman
Other
Joined: 4/20/2008
Posts: 465
fwiw, I agree with you completely, and empathize thoroughly with your desire to leave. No one should have to put up with that crap when they are trying to bring real value to a new community, and it's extremely ungrateful of us to tell you to just deal with it. I personally hope that you and True can find a (possibly moderator-mediated?) solution that lets you feel comfortable sticking around, because I think you would be a great asset to our community and find value here yourself, but I can't fault you in any way for wanting to remove yourself from a hostile situation. True, I don't know you or your intentions or your culture. I'm not going to judge you to be a bad person or a troll. But it would be super cool if for the sake of TASVideos you could find it in yourself to respect Sonny_Jim's wishes, and either moderate your tone or refrain from talking to him at all.
A warb degombs the brangy. Your gitch zanks and leils the warb.