Believe it or not, some video games are still developed for the PC. With video games come cheat codes, and when they’re on the PC, that means using a keyboard. You can easily program any microcontroller to send a string of characters over a USB port with the touch of a button. Believe it or not, a lot of people haven’t put these two facts together. [danjovic] has, leading him to build a simple and cheap USB keystroke generator for quickly typing in cheat codes.
[danjovic] is basing his build around a Digispark, a cheap, USB-enabled ATtiny85 dev board. This, of course, means there’s not a lot of pins to play with – there are only four I/O pins, and one of them is connected to ground by a LED. That leaves only three I/O pins, but [danjovic] managed to put seven different cheats in his project using diodes and something that is almost charlieplexing.
If you’re wondering, this is a very inexpensive project. [danjovic] is using a Chinese digispark clone, a handful of 1N4148 diodes, and a few tact switches. Anyone with a well-stocked part drawer or a tenner on eBay could build this. If you want the proof of work for this project, you can check out the demo video below.
A macro for AutoHotKey or similar would work just about as well. Not as fancy though.
And that’s exactly why nobody is bothering with doing this in hardware anymore, unless they want to stick it as a marketing bullet point on the side of th box…
Well it is nice for a simulator and so.
“Believe it or not, some video games are still developed for the PC.”
The hell is that supposed to mean? Have you SEEN the PC game market lately?
hook, line, and sinker.
…or you could just make a resistor voltage divider with one R fixed and the other switched in by each of number of switches and use just one ADC input!
And since when – “a lot of people haven’t put these two facts together” wrt to USB key macros? Just about every macro keyboard on the market allows you to do this and the Nostromo N52 is infamous for this. You can always add a second and third N52 or macro keyboard to a PC just for autorun macros. And as spacecoyote points out, you don’t even need hardware with HotKey(Net).
I have had issues in the past with using resistors as buttons … Accidentally hitting 2 buttons, power rail fluctuations and lag can all be a problem
Not to mention the inability to put most micros in a sleep state when using the adc in this manor
If you pick resistors that are close to 2^n, multiple keys can be pressed and detected at the same time. This is just a binary weighted DAC. If the ADC uses the same supply, any small variations would affect both the DAC and ADC by the same percentage and the effects be canceled out.
You got to think outside the box.
If you pick the values correctly so that when the key(s) you want to wake up the uC is pressed,it crossed the logic threshold. The digital level pin change should be able to wake up the sleeping beauty. Once it is up, then use ADC to figure out who disturbed the beauty sleep.
It’s getting all a bit theoretical, for something connected to a PC you don’t need it to sleep.
Nicely done!
Yes and o, it’s nice but in desperate need of some sort of enclosure
Nice keycaps! Where can you find those?
Under his Sharpie?
Nevermind I found them on ebay: http://www.ebay.com/itm/100sets-Square-Plastic-Switch-Caps-for-12x12mm-Tact-Switches-Pushbutton-Cover-WH-/181262199882?hash=item2a3411ac4a:g:wKUAAOxyRNJShejj
I think you can get them from digikey … But if you go that far you can get some cherry mx keyswitches and make it real professional looking
I’ve used an Arduino Micro to farm some WoW ressources years ago during the night. And you better add some randomness too, bots were watching hehe.
I did the same on the PS2 using a madcatz IR dongle and using a PC to send the IR codes for each button (after learning each of the ir codes for the button).
I even wrote a small library that could be imported into an ASP.net webpage so you could send the
codes using a web browser.
Back around (IIRC) 1990, I wrote software for an embedded system that hooked an exercise bicycle into the flight game, “Battlehawks 1942.” You plugged your keyboard and joystick into the embedded system, and the system connected to the keyboard port of a PC/AT. Besides passing through any keyboard and joystick information, pedaling the bike generated “increase velocity” keycodes to the aircraft, with the rate of generation dependent on bicycle speed, and the joystick caused varying resistance (harder when climbing, etc.) for the bike. To prevent “coasting,” the app would periodically insert “decrease velocity” keycodes, so you had to keep pedaling in order to keep flying.
We only ever built the one prototype – the boss tried to shop it around unsuccessfully, then took it home for his own use.
There is definitely an advantage to having keys in a configuration and location where they are easy to use.
I use AHK for assigning extra mouse buttons to various things on various software for instance, things that are already available as shortcuts but it’s so much easier and quicker and smoother to have the keys at your fingertips. And the same would apply to a small dedicated hotkey board, which you can put in a location where you are most comfortable with.
And not just games of course, software like drawing programs or video editing packages also benefit.
Some calculators have pretty nice keypads, with real switches instead of rubber domes or other even less satisfactory switches. Might be nice to use those as the input part.
Problem though is to know what calculator has the nice keys, they often come in blister packaging now so you can’t try it. But maybe you got some old calculator lying around though.
I will never forget how to spell ‘gesundheit’ because it was the ‘restore health’ cheat in Grand Theft Auto 3 on the PC… That’s right, if you were getting your ass handed to you, you literally had to type ‘gesundheit’ as fast as you could to keep from dying. :P
https://www.youtube.com/watch?v=zsjTpFR0oYQ
snapper disks velesoft website run zx spectrum 48K and one 128k programs at the full 6MHz nearly double speed wow!…
2016 HAD Troll article of the Year contender, Until December we don’t what will win.
better choice for the micro controller would be a pro-micro or a teensy more I/O and native USB support if you must use a digispark you can carefully cut the trace to the led to give an I/O