How does the Nintendo Light Gun work? (with video)
Filed Under Video Games | 2006-10-29, 17:05
Ahhh the old Nintendo Zapper, aka the Nintendo gun. An object of great joy and entertainment from our childhood. Something we played with day in and day out, but most of us had no clue how it worked. We’d make up stories about it shooting lasers off the tv or it changing the TV screen so that it knew where the gun was pointing, and accepted one of these highly uneducated explanations and continue with the game of Duck Hunt on the old NES, wondering why we could never shoot that stupid dog when he laughed at us.
In the past I’ve read explanations about how the Zapper actually worked, but that wasn’t enough for me. I wanted to see what was inside that plastic shell. So I found some tiny screwdrivers, exacerbated my mild carpal tunnel removing them and managed to get the thing apart. But before we get to the gory, err geeky pictures, a quick explanation for those that are still curious about how it works.
No, the gun does not shoot light. In fact it receives light. When you pull the trigger, the video game quickly changes the screen, so fast that most people don’t even notice it. By using the alterating of color and white light from the tv, the gun uses a photodiode to detect whether it’s scored a hit or not. So in short, the gun decides if you hit your target, not the Nintendo system. Here’s a brief explanation from Wikipedia:
When the trigger was pulled, the game blanked out the screen with a black background for one frame, then, for one additional frame, drew a solid white rectangle around the sprite the user was supposed to be shooting at. The photodiode at the back of the Zapper would detect these changes in intensity and send a signal to the NES to indicate whether it was over a lit pixel or not. A drop followed by a spike in intensity signaled a hit. Multiple sprites were supported by flashing a solid white rectangle around each potential sprite, one per frame.
So, with that said, here’s the picture of the gun mostly dismantled. Click on the image to jump to flickr to see the parts identified.
And here’s a video of what’s happening inside with that familiar “pang!” when you pull the trigger:
Another bubble coming?
Filed Under Geek | 2006-10-18, 18:52
Take a look at these charts, look at the recent acquisitions of MySpace and YouTube, look at the success of PlentyofFish (which is run by 1 person out of his apartment!) and then try to tell me there isn’t another bubble coming? Hopefully this one we’ll go into with a little more knowledge and it won’t burst like the last one. I’m all about getting in and just banking the money. No fast sports cars, just money in the bank to let me live the modest life I want. But it’s not about the money for me so much as it is being able to do something I enjoy and contribute back to society in some way. One reason I’m so happy with the sidekick 3 themes site that I started up a few months ago. It’s rewarding to build a site when starting with a blank notepad and see it take shape. It’s nice to be able to provide something to people that they enjoy. And it’s nice to make some honest money that helps the site pay for itself and buys me a new toy every now and then.
So, what is going to be the next big thing to hit the web? Most of the companies experiencing huge growth haven’t been around for years. They were quick smart ups, started by smart people, without huge bank accounts. They were successful because they tapped into something and did it right. Where is that something that I’m going to provide on a large scale? Where do I fit into the cogs of the internet?
I do not like Internet Explorer
Filed Under Wordpress | 2006-10-18, 12:10
Due to IE not displaying the site correctly, we’ve moved back to a simple layout while we figure out what in the world is wrong. Everything displays exactly how we want it in Firefox, but in IE the side menus were missing, posts wouldn’t show, images wouldn’t low, and the digg buttons wouldn’t display. And then seemingly randomly, without any code changes, different parts of the front page would load. Quite strange and will require some muddling through the code to figure out why IE won’t play nice.
UPDATE: Ok, so it appears that the embedding of a Google Video is what broke things. We pulled it out of a previous post and all is well. I find it odd that Google would give me browser-breaking code. They should know better! Anyways, back to your regularly designed theme. :)
Piercings Gone Bad
Filed Under Body Modification | 2006-10-18, 10:38
Piercing is safe if you know what you’re doing and you listen to your body. People have been piercing their body parts for thousands of years. However, with body piercing moving into the mainstream in the last decade or two, and more and more people getting pierced, it’s not suprising for the media to pick up on the rare cases of really bad piercings. CNN had two articles on their front page related to piercings gone bad today that are reminders of important lessons in piercings.
Lesson #1: Don’t pierce yourself if you don’t know what you’re doing. A 13 year old girl attempted to pierce her own navel and somehow managed to perforate her intestine. She ended up getting a nasty infection and doctors say she was in danger of dying at one point. She dropped from 115lbs down to 70lbs and became incontinent. No piercing is worth that!
Link to article
Btw, the mother was found guilty of neglect by not seeking treatment for her daughter.
Lesson #2: If it still hurts, take it out!
Piercings are not supposed to hurt once they’ve healed up. If it hurts, something is wrong. An Italian teenager was apparently experiencing severe nerve pain that was linked to her tongue piercing. “The Italian teenager said the stabbing pains in her face felt like electrical shocks that lasted 10 to 30 seconds and struck 20 to 30 times a day.” The simple solution? Taking out the piercing.
Link to article
If anyone is interested in the actual medical article on this one, here you go
Some additional articles on piercing and the medical community are also available on the JAMA site.
If you want something pierced, get someone who knows what they’re doing to do it. Your body is your canvas: decorate it, don’t destroy it. And educate yourself before you do it. BMEZine is a great place to find info and experiences on the various ways to modify your body.
Disabling Windows Update Auto Reboot
Filed Under Geek | 2006-10-14, 14:30
If you’re like me, your computer is always on, always connected to the Internet and the monitor is the only thing that gets turned off from time to time. This is great because you can leave a copy of FireFox open with 5-10 tabs of pages/articles that you want to read but don’t have the time to check out now. It’s also great for leaving temporary notes in notepad without cluttering up your desktop with saved files.
All sorts of good reasons, but what happens when Windows Update installs a new update and forces your machine to restart without your permission? *poof* All of that is gone and you’re left staring at a login screen the next morning. Sure there are plugins available to save your session in FireFox, document recovery in Office, etc. but this is all a hassle and should be preventable, right? Luckily it is…
For Windows XP Professional SP2 / Windows 2000/2003
- Click the Start button, select Run…
- Type in “gpedit.msc” (without the quotes)
- Browse into Local Computer Policy->Computer Configuration->Administrative Templates->Windows Components->Windows Update
- Right click on “No auto-restart for scheduled Automatic Updates installations” and select Properties
- Change the radio button to select “Enabled” and hit Ok
- There are several settings in this view that can be changed in regards to Windows Update. Each is well documented so poke around if you want to modify the behavior of Windows Update in another way.
- Reboot your computer one last time for the setting to take place.
For Windows XP Home Edition
Warning, modifying your registry is dangerous. If you don’t know what you’re doing, get the computer kid down the street to do it
- Click the Start button, select Run…
- Type in “regedit” (without the quotes)
- Browse to HKEY_LOCAL_MACHINE \Software\Policies \Microsoft\Windows \WindowsUpdate\AU
- Right click and create a new DWORD Value named “NoAutoRebootWithLoggedOnUsers” (without the quotes)
- Double-click this new value and set the Value data to 1
- Or if you’re lazy, download this file and double-click it to add that value for you and skip the steps above.
- Reboot your computer one last time for the setting to take effect.
So now you can leave all the programs you want running overnight, knowing they won’t have disappeared into the ether sometime around 3:00am when Windows Update checks for new security patches. Just make sure someone is logged in on the computer or else it will ignore this setting and reboot. Now you just need to get an Uninterruptible Power Supply (UPS) and you’ll be covered in the event of power outages as well. Bear in mind though that the updates that are being applied can be quite important in protecting your computer. When you see the message indicating an update required a reboot, do so at your earliest convenience.
Almost A Dot Com Mogul
Filed Under Geek | 2006-10-10, 22:40
I stumbled onto John Chow’s blog tonight and found a post titled “Requirements To Be A Dot Com Mogul”. Let’s see….
* Your income is made from the Internet
Some of it is. At least my part-time re-invest and “toys” money is
* The minimum Internet income level is $10,000 a month (you can not add income from other sources to hit this $10K level)
Working on it. :)
* You have no jobs outside of the Internet
Not yet. I like the benefits of having a job still.
* You have a personal blog with your name as the domain name
Check
* Your blog must be updated at least once per week
Check. Although that should say blogs. I try to post new material at least once a week if not more.
* A Google search of your name must be at the #1 spot
how about #1 and 60% of the front page is related to me? (out of 140,000 results). Now if I could just figure out how to bump that football player who shares my name off the front page.
* You must be willing to help dot com mogul wannabes
Always there to lend a hand, an ear, a bit of advice, some code, a link, whatever.
So I’m part of the way there. Hopefully by this time next year I’ll be able to add the title “Dot Com Mogul” to my resume. Hey, that and a dollar will get me a cup of coffee.
Demographic Info From 26,000 Phished MySpace Account
Filed Under Geek | 2006-10-10, 19:10
So a few days ago LoLo tapped me for some quick PHP-ing to analyze a file of phished MySpace passwords that he had found. For those that don’t know what’s been going on with MySpace and the password phishing, check out this article for an explanation.
So armed with this data, I sat down and imported the file into a MySQL database, cleaning up bits and pieces, and then wrote some scripts to pull out useful data. Not content with just info on the emails and passwords, I started playing around with MySpace’s search page, and wrote a screen scraping script to grab the info of all the users by searching for their emails. It took a few hours to gather all the data, but then I was able to run some useful reports on it. I’ll let you check out Lolo’s full write-up on the thing, including the stats over on his article: Demographic Info From 26,000 Phished MySpace Accounts. If there’s any interest/demand, I’ll clean up the scripts and post the code.
What is my hard drive doing?!
Filed Under Geek, Video | 2006-10-09, 13:10
Ever wondering what goes on in that box as it makes little noises and the light flash? LeTheOnline.net took the top off one and turned on the computer to show you. And another video showing a demo of a harddrive with a little more educational content:
Secure your code!
Filed Under Geek | 2006-10-07, 14:06
Google has launch it’s new Google Code Search which allows you to search publicly accessible source code. Great for programmers, great for hackers, bad for not so attentive webmasters. Google crawls websites and peeks inside archive files (.tar.gz, .tar.bz2, .tar, and .zip) looking for code. Remember when you figured a zipped up file wouldn’t be spidered by a search engine? Not anymore. So check your websites, make sure you don’t have anything sensitive in those zip files in a clear-text text file. Want to know how easy it is to find useful information for not-so-nice actions? Check out this search for the config file for WordPress that contains your database information.
While I think Google has the best intentions, I don’t think this search is going to be a positive thing. The amount of code that might be accidentally exposed as well as the number of people just plain copying code is a bit much. If people want to put their code out there, they should just post it on a website to let all the search engines crawl it.
Traffic Logging with WRTbwlog
Filed Under Gadgets & Hardware, Hacks and Mods | 2006-10-07, 01:32
I’m a stats junkie, I’ll be the first to admit it. Ever since the first few days at college on a T1 line I’ve wanted to keep an eye on how much bandwidth I could burn through. With a few additions to DD-WRT on the Linksys WRT54G router you can see where all your bandwidth is going. The WRTbwlog page has some great info on setting things up, but we ran into a few snags so we thought it was worth a post. Here’s how to test it out to see how you like it:
First, we’ll assume you’ve already purchased a Linksys WRT54G router and flashed the firmware to install DD-WRT. We’re working with DD-WRT v23 SP1 Final (05/16/06) std.
Next you’ll need to go and get a copy of WRTbwlog. As of writing this the version of WRTbwlog that’s actually available on their site does not work with the latest releases of DD-WRT. But never fear, krikkit over on the DD-WRT forums fixed it. You can read all about it in this thread. So we’ll use this copy of his fixed version. But wait, let’s save us some trouble and just download it straight to the router.
Go ahead and ssh into the DD-WRT router. (how to enable ssh) Copy and paste the following commands:
cd /tmp
wget http://www.geeked.info/wp-content/files/wrtbwlog_cust_exp.tgz
tar -xzf wrtbwlog_cust_exp.tgz
rm wrtbwlog_cust_exp.tgz
cd bwlog
./start.sh
This should startup WRTbwlog. If you grabbed krikkit’s version, you’ll probably see a message that says:
ftpget: Unable to connect to remote host (192.168.1.100): No route to host
You can either ignore it or you can download our fixed copy.
Now, from a desktop load up a web browser, hit a few of your favorite websites to generate some traffic, and then go to http://192.168.1.1:8000/traffic.cgi and marvel at the stats. (If your router isn’t 192.168.1.1, replace it with the appropriate IP address obviously). Go surf some sites, download some things, and then go back and refresh the traffic page. Pretty slick, eh?
Only one problem at this point, you’d have to execute the commands above every single time you rebooted your router. If you’re like me, that’s once every few weeks, but it would still be a pain. So let’s get bwlog installed permanently on the router. It’s painless, I promise.
Log into the web interface for DD-WRT and go to the Administration tab->Diagnostics Tab. Most of you can probably just click here.
We’re going to add something so that WRTbwlog is automatically installed and started, but first a comment. If you can, please download the .tgz file and host it on your own server. It’ll be faster for you (and cheaper for me in bandwidth costs). And then replace the obvious text below
In the Commands box paste the following:
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20;
do
sleep 5
cd /tmp
/usr/bin/wget http://www.YOURWEBSERVER.com/PATH/TO/wrtbwlog_cust_exp.tgz
/bin/tar -xzf wrtbwlog_cust_exp.tgz
rm wrtbwlog_cust_exp.tgz
cd bwlog
( ./start.sh & ) &
done
(source)
Click “Save Startup”
Reboot your router, and check http://192.168.1.1:8000/traffic.cgi and hopefully smile. You’re all set!
If you want to take the extra steps to save your traffic logs across reboots you’ll need to look into setting up an FTP backup. Unfortunately with the latest versions of DD-WRT necessary components (ftpput) are missing and this isn’t possible yet. But when it’s fixed, you can check WRTbwlog’s page for more info on this and the rest of WRTbwlog’s features and settings.