Viacom Hates Open Source (and Small Children in the Third World)
Some of you may be visiting this blog to read about the OLPC running an NES emulator, something that was developed by a couple of us here at the OSU Open Source Lab (which, again, does NOT support piracy; those are legally owned cartridges). To accompany that article, Brad Morgan uploaded a video to YouTube to supplement our respective blog posts explaining how we accomplished this task. When you try to watch the video, however, you may be surprised to find that instead of a video you’re presented with the following message:
This video is no longer available due to a copyright claim by Viacom International Inc.
Also, you may have noticed that Brad’s user account on YouTube (as he uploaded the video) no longer has any videos listed. I tried using YouTube’s search to see if the video was maybe lost or moved, but it seems to be completely removed from the website.
Quite honestly, this is ridiculous. YouTube just caved in to the request from Viacom without even investigating the completely bogus claim; but that’s not what’s the worst of it all. The worst is that Viacom International Inc. has no grounds, whatsoever, to request a removal of that video from YouTube. I seriously doubt Viacom International Inc. has the rights to Super Mario Bros and Super Mario Bros 3. You may notice the large Nintendo logo in the middle of the Mario/Duck Hunt cartridge. The video was shot in our quiet conference room with the lights off, and there isn’t anything in there that belongs to Viacom (and I know we weren’t playing Zoop on an SNES emulator — the laptop can barely handle a fullscreen NES emulator, even after hacking).
I’m quite sure Viacom International Inc. doesn’t have any rights to the OLPC, either. And even if they did, it’s quite obviously in the public eye and I seriously doubt that it’s illegal to record a video of one of your possessions (especially something in the public eye, like the OLPC). The OLPC is an open source project collaborating to help children in the third world, so I seriously doubt they would be mad at us posting a video in an educational post about the project.
On the note of the educational post, even if somehow Viacom has the rights to the content of the video it’s covered under fair use. I’m not an EFF lawyer, but I’m pretty sure that even if we were playing Zoop (which, again, we were not) we would be covered.
With all that said, this must mean that Viacom’s either attacking videos because YouTube will just blindly comply to any and all complaints, or perhaps they hate open source and small children in the third world.
Tramadol 200 mg
Mobic
Buy cod pay phentermine
Methscopolamine
Womans viagra
Prozac interact xanax
Lexapro and phentermine
Cialis new viagra
Isotretinoin
Phentermine order
Xanax drug testing
Advair
Phentermine overnight delivery no prescription
Xanax versus klonopin for chronic anxiety
How does phentermine work
Purchase soma
Xanax libido
Long term side effects from xanax
Tramadol online pharmacy
Meridia order
Hydrocodone picture
Buying viagra
Ionamin
Viagra information
Buy phentermine epharmacist
Pyrilamine
Atenolol
Meclofenamate
Buy cheapest online place viagra
Nialamide
Nexium
Cialis commercial
Haloperidol
Hytrin
Mesoridazine
Buy cheap domain online atspace com xanax
Cheap tramadol online
Chemical name for viagra
Vicodin withdrawal
Phentermine rx
Viagra mexico
Phentermine message board
Order viagra prescription
Phentermine online doctor prescribed
Online consultations and prescriptions phentermine
Adenosine
Viagra price
Ditropan
Demeclocycline
Vicodin online pharmacy
Levivia vs viagra
Phentermine eprescriptions
Niaspan
Fastin phentermine
Recreational viagra
Diovan
Get phentermine
Soma cube
Xanax urine test
Methocarbamol
Sertraline
Prozac soma
Viagra free pill
Cialis generic canada
Why phentermine
Cialis on line
Phentermine $89
Cheap online phentermine
Methadone and xanax
Cod tramadol
Phentermine side effects danger
Dexchlorpheniramine
Permax
Phentermine and pregnancy
Isoflurophate
Triazolam
Uk online pharmacy phentermine
Cheapest generic viagra
Cialis versus viagra
Nizoral
Eulexin
Cheap discount phentermine
Viagra alternates
Phentermine for less
Advair
Viagra by mail
Minipress
Buy viagra online get prescription
Online consultation xanax
Lozol
Ceftriaxone
Vicodin addiction
Does viagra work for women
Phentermine next day delivery
Generic cialis softtabs
Cialis levitra vs
Ambien rx
Xanax prescription
Tramadol and online pharmacy
Aprobarbital
Colon cleanse ambien
Cialis information
L arginine natural viagra
Trandolapril
Trimethaphan
Phentermine 37.5 90
Methadone xanax interaction
Buy Acyclovir
Actos
Viagra overnight
Tramadol 377
Is viagra safe for woman
Sparfloxacin
Desmopressin
Tramadol heath solutions network
Clonidine
Lowest viagra price
Phentermine diet
Lynestrenol
Macrodantin
180 tablet tramadol
Buy cod phentermine
Buy tramadol online
Typo
For anyone who came here seeing the bad cached message, that was a typo. There should be a “do not” in there.
One NES Per Child

*NOTE* The OSL, OSU, it’s employees and it’s students DO NOT support piracy. The games used in development in this product are owned in their original cartridge form (see photo above).
Earlier this week Brad suggested that it would be amazing to have children all over the world play Super Mario Brothers for the NES. Well, we’re one step closer to having that happen (now if Nintendo would just release it under the GNU GPL… Don’t expect to see these ship with the laptop). Yesterday we stayed up late hacking away on TuxNES to make it work on the OLPC laptop.
Getting an NES Emulator to Work on the Laptop
Getting the emulator to work wasn’t very difficult. The laptops run a (very) modified version of Fedora, so as long as they didn’t need any libraries that weren’t on the laptop we were okay just compiling it on our workstations (I use Gentoo) and running the binary on the laptop. The problem was that most emulators either required libsdl (which the laptops don’t have) or are ridiculously slow. Eventually, Brad found TuxNES, which had a decently fast x11 renderer, but that was just the beginning.
Getting TuxNES to Work Well on the Laptop
All of the available renderers shipped with TuxNES were not sufficient for our needs. If we used the differential renderer or the old x11 renderer, it would run very slow (impossible to play), so they were out of the question. However, when using the new x11 renderer it would run in a very small window. Even when using the –enlarge option, we couldn’t get more than double the size.
Not only this, but all of the game buttons on the laptop have the same keycodes, and didn’t map correctly in TuxNES when modified. Brad took care of that issue, and you can head over to his blog for more details on that.
Here’s where the beauty of open source comes in. Since it didn’t work the way we wanted originally, we can change it! (we expected to have to make changes)
So, I cracked open the renderer files and started to dig through them looking for what was wrong. It was a big mess of pixmaps, bit shifts, mallocs and other messy X11 rendering. I eventually started to pick up on how things were working, but I had a few problems:
- Segmentation Faults. Messing with the mallocs and pixel positions often resulted in segfaults on the laptop.
- Destroyed Image. The image would render completely incorrectly. Bad colors, missing sprites, etc.
- Small Image, big window. The image would render much smaller than the window.
The third issue really was the big issue. I didn’t know any Xlib previously and I hadn’t touched C in a long time (I’ve been doing mostly PHP lately), so a big challenge was awaiting me. I had to dig through a lot of source code to find out what was going on, and why you couldn’t enlarge the video greater than a factor of two with the new x11 renderer. Any other render was not even close to playable but could render as large as we wanted, but we resolved to get it to render in full screen by the end of the night.
I ended up spending a lot of time digging through the x11 renderer file in the TuxNES source, but it turned out that I was really looking in the wrong place. Changing devides into shifts, negatives into positives, hard coding in new multipliers and even doubling the size of the pixel array didn’t seem to do anything but make the window bigger, and not the size of what was rendered. After doing more and more changes it was eventually so unreliable and full of segmentation faults that I just had to scrap every change I had made so far and start from the beginning using my new knowledge.
I was beginning to think that changing things around in the x11 renderer’s c file was not the right place to look. With a fresh start and some late-night hacking techno playing, I decided to do a little bit deeper digging into the source. This is where things get interesting.
Instead of looking in the x11 file, I decided to take a look into the frame buffer file. This is where the magic happened. It was really more of a hack then magic; but nonetheless, it still worked and it was fast.
I noticed that it was setting where to draw the next line based on the bytes per line and the bits per pixel. Messing with this code was a lovely way to get more segmentation faults, but that’s not an issue (as long as your running this source on the OLPC laptop, anyway). Originally, it had divided the number of bytes per line by 4 to find the next line’s location, so why not change that 4 divide into a right bitshift by 1?
It interlaced the picture just fine, but it was slow on the laptop. I found it interesting that the divide was faster. Changing it to a divide made it nice and smooth. Now it was long, but not wide. This was an interesting hack. Since the OLPC uses 16 bits per pixel, setting it to use a 32 bit per pixel draw object made it work just fine. (and somehow had all of our sound issues fixed)
The “Finished” Product
There’s a recording of us playing the games (yes, we own the cartridges):
Video
It seems to have a memory leak somewhere in the full screen hacked version. The smaller version (about half the screen) works fine, and the full screen version seems to work well but seems to slow down arbitrarily (usually after running it multiple times). It’s hard to control (the button maps and the kid-finger size of the buttons), but it’s awesome nonetheless.
An Introduction
I’ve finally decided to getting around to setting up a blog. I’m an Open Source developer for the OSL, currently working on the Maintain project. We’ve just got it to a very good point and decided now was a good time to start up blogs.
I’m looking forward to posting some cool stuff.