[Kyle] and an a few of his classmates are wrapping up a microcontroller interfacing class at Purdue and thought it best to send in the results of their efforts. It’s a version of Super Smash Bros. made by just bitbanging pins on a microcontroller.
The hardware for the project is based around a Freescale 9S12c32, an updated version of the 30-year-old M68HC11 microcontroller. For the controls, the guys used a Playstation 2 joystick and buttons housed in an Altoids box, and the actual console is made out of strips of wood stapled together to look like a crate from Super Smash Bros.
There are nine playable characters: Pikachu, Captain Falcon, Yoshi, Donkey Kong, Mario, Luigi, Link, Kirby, and Fox. Despite these characters being only four pixels high, the game looks extremely playable (at least when two players don’t choose the same character). After the break is the video demo of Super Smash Bros: Bitbang edition, along with a gallery of pics showing the console and gameplay. All the code is up on GitHub for your perusal.
[youtube=http://www.youtube.com/watch?v=C4Wj2XaYu2c&w=470]
Go Purdue
This is an exceptional project and I hake to be ‘that guy’ but, hold your phone sideways when taking video.
+1
yeah it has to be the most common mistake and yet the easiest to prevent :P
nothing was harder for me to do than bitbang a VGA reliably on an ARM
congratz!
Im having a really hard time understanding what bitbanging really is. Everything I read never makes anything clear as to what or why. Anyone know of like a good resource or video to help explain it to me?
Bitbanging is doing something in software that you’d normally do with dedicated hardware. Saving cost of extra part(s) and sometimes at the expense of speed or reliability.
In this case, they’re hammering out the pixel data directly to the VGA connection (including the dot clock, Vsync and Hsync pulses, and the like) rather than sending only the pixel data at whatever pace they desire to a different integrated circuit (or circuits) like the Gameduino Shield or the NES’s Picture Processing Unit.
It’s commonly used in the sense of specialized versions of serial protocols like SPI or I2C, or when your hardware doesn’t have the built-in support for an interface. Like generating S/PDIF with a Propeller.
If you’ve read wiki on the subject and still don’t get it this explanation is for you.
To bitbang is to use software instead of hardware to do some form of communication. You may use it b/c your micro-controller(MCU) doesn’t have the hardware peripheral, you may be using that feature already or you may be to lazy to RTFM and find out how to use that feature.
Bitbanging is using software to manually set or check the pin(s) of the MCU or whatever you’re using. It usually refers to more complex endeavors like serial or in the case of this post VGA output.
I can give you more info on this subject if your still in the dark. Let me know.
Bitbanging is simply the name given to the technique of wiggling I/O pins in software.
The simplest example is probably a serial port. Usually you have a UART where you can simply write a byte to a register and the UART hardware takes care of start, stop and parity bits and all the bit timing. The UART will drive its output pin appropriately to send your byte.
‘Bitbanging’ in this case means you write your own loop in software to iterate through the bits in the byte and you set or clear the I/O pin according to each bit at the appropriate time. In the loop maybe there is a delay for the length of the bit cell, or maybe you can do it with an interrupt. Either way, all the work is done in software instead of dedicated hardware.
The reason it’s popular now is because micros are so fast they can emulate many ASIC functions in software just by wiggling the right pins at the right time, and you still have time for your application program too.
I wish I could +1 you for a clear, concise explanation
good work!
M68HC11! Dman, I still have two rug warriors pro around with that MCU. I need to find some time to update them with something else.
What class is this for? Purdue ME only has one microcontroller class (ME586) and I know some of the guys in my research group would be interested in taking more classes.
Great project, boiler up!
Thanks!It’s ECE 362. The pre-req for this class is ECE 270. There were a coupla MEs who took ECE 362 with us this semester. It’s definitely a good class to take.
Is it actually bit-bung? They say they’re sending the video from SRAM using a PLD. That’s hardware!
Anyone looking to play smash at Purdue, check out this link
http://www.smashboards.com/showthread.php?t=160251