Showing posts with label Hacks. Show all posts
Showing posts with label Hacks. Show all posts

March 13, 2011

XBox 360 Dual Firmware Mod

After months of having a 360 that works except the Samsung dvd drive, I finally bought a spare dvd drive off of ebay and decided to try and transplant the firmware from my broken driver to the new one. While I am at it, I might as well make it dual boot between the good firmware and another hacked firmware for other obvious reasons.  Now you might be asking why go through all the trouble when you can just flash the new drive.  Well my old 360 dvd drive was quite dead, to the point that I literally ripped the plcc chip off of the board with full intention of doing a complete brain transplant!  Otherwise there was no easy or cheap way to get the drive firmware key.


The above picture was all the remained of the old board, the traces where ripped up by the epoxy that was placed quite evilly on, around and under the plcc chip.  I had removed this a few months ago and has it in a safe place, waiting to have the time to use it.  Now, if you are reading this planing to do the same, I give you a big warning, if you see blank epoxy on your board, give up now.  My replacement drive had clear epoxy that was nice and soft after heating with a heat run.  However the black on the original board only got brittle making it impossible to not break parts.

Next I went online looking up everything I could find on the firmware.  On the Samung drives, It is stored on a plcc chip next to the large hole in the board. Each chip has a unique key, so you need to have this before you can use any other drives. With my drive not talking to anything, transplanting the entire chip was my last resort.  Next I found http://dwl.xbox-scene.com/tutorial/tightmod360installation.pdf it contained the steps to dual boot my old chip with the new drives one.  This way I did not need to try and remove the current plcc chip, which may destroy the board in the process.  However, it is quite a bit more work and on a whole different difficulty level.  Another warning, do not try to attempt a dual firmware setup unless you have a good soldering iron with temperature control and a very steady hand.  It is easy to get solder everywhere!



I started out with thin ethernet wire to connect the two chips. I connected all of the top lead first but quickly found it was too thick and needed to use the tiny individual strands from twisted christmas tree light wire.  Then it was easy to use long strands and connect the bottom lead first and then stretch and line it up with the top lead.  After each pair of pins where all attached correctly on a side I would trim the extra wire.


This was very delicate work, and preparing the leads was not easy, more then once I needed to carefully clean up a bridged solder connection between leads or wires.  Also it was important to completely tin each strand before trying to connect it, otherwise it would not stick.  The above picture shows how small each wire needed to be, with a penny for reference. These pictures where shown with a magnifying glass.

After that following the rest of the guide was easy, I found some spare 10K resistors and attached them to pin 4 and 15 as the guide shows.  This may differ from what others need to do, as I later needed to switch it to pin 5, as 4 caused the driver to make the 360 show a E65 error. Luckily I was persistent and kept poking otherwise I would have just assumed the drive was dead due to some error on my part.  So you may need to play with pins to get it to work on different drives.

After that I closed up the drive and connected it to the 360.  The drive boots up and reads disks, the old firmware reading games, and the new firmware without the correct key only shows everything as a dvd.  Next I need to get the drive key, but that is for another day.

November 16, 2010

Google Voice app on iPod Touch

Today I was pleased to see that Google had released an official Google Voice app, as the GVMobile+ ones from Cydia where somewhat broken.  What I was not happy with was the device not supported message that I got when trying to sync. Apparently this is only for the iPhone... Well that would not last long.  Below are the steps you need to take to get the app working on a jail broken iPod Touch.

  1. Download the ipa from the iTunes store.
  2. Change the .ipa to .zip and extract the Google Voice folder.
  3. Open and find the payload folder and grab the GoogleDialer.app
  4. Drop the GoogleDialer.app into the /Applications folder on the ipod via sftp.
  5. Respring
Interestingly enough the application works great on an iPod Touch, it just will not install via itunes.  I was looking through the ipa plist, but have not quite figured out what setting causes the restriction. Ideally removing the restriction and repacking the ipa would be best, but as I have it working, I will leave that up to someone with a bit more interest.

EDIT: Now that the official iPod version is out, this is no longer needed, unless you want the iPhone version.

May 15, 2010

Reading plist files

When developing for the mac platform, app preferences are supposed to be stored in ~/Library/Preferences/.  While finding and reading a preference file is easy enough, reading usable information from it is another matter.  This is because in the last couple of system updates (10.5+) the xml based plist files used for preferences are now saved in a binary format, not the UTF-8 format you would suspect.  The tricky part of this is that if you are using the NSDictonary class in Objective-C you will not encounter any problems, but when using any other programing language you suddenly get a mess of garbage text.  Luckily OSX had a built in command to help remedy the issue.  The plutil command converts plists between the text based XML and binary based.

As an example in Java you can use the Runtime class to invoke the command on the fly.

Runtime.getRuntime().exec(new String[]{plutil", "-convert", "xml1", filepath});

To convert a file back once you have read or edited it use this.
Runtime.getRuntime().exec(new String[]{plutil", "-convert", "binary1", filepath});

It is also good check for the lastIndexOf("bplist") as it will alert you if the file is currently in binary form.

October 23, 2009

Installing Quicktime 7 in Snow Leopard 10.6

On small annoyance with 10.6 and Quicktime X is the some important older components do not work yet. So in order to use these older components you will need to install an older version of quicktime 7.

1. First off download quicktime 7 from Apples website here.

2. Right click and select view contents of the Installer and view the Contents folder.

3. Expand the Archive.pax.gz and open the resulting Archive folder.

4. In the Archive/Applications folder drag the Quicktime application to your Utilities folder

5. In the Archive/System/Library/PreferencePanes double click the QuickTime.prefPane and have it install for all users.

6. Register Quicktime pro if you have a license key.

There you have it a easy way to use Quicktime 7 in 10.6 with out having to reinstall your OS.

July 30, 2009

Xbox USB Controller Mod

The xbox I got off of ebay had three controllers with it, however I recently noticed that one of them did not have the breakaway connector I needed to actually use it. So I looked online and found I could get one for $5, however, my cousin was only here for a few days and I wanted to play three person halo 2 matches. So like any resourceful modder I decided to change it to usb.



The basic design of the xbox uses a modified usb port to plug controllers in, with an extra yellow line that seems to be used for the light gun from what I have read. So there is nothing stopping you from changing a controller port to a standard usb port. This will not only let you use an xbox controller with a usb port, but also a keyboard if your dash will recognize it. You can see from the pictures I have drilled out the plug in the fourth port and glued a standard USB port inside. This looks quite nice from the exterior. Next I cut the breakaway end off the controller and connected a usb plug instead. No real brain work was necessary as you simply ignore the yellow wires and match the red black blue and green wires on the inside of the xbox and in the controller wire. After everything is connected, the controller can be plugged in and used like normal. You can get more information and pictures here on how to connect the usb wires.



As an added bonus you can now use the usb xbox controller with your computer as well. Check the links below for the drivers.
Mac Driver
Windows Driver

July 29, 2009

Halo 2 Killtrocity V2

One of the perks of having a modded xbox is that you can mod and play modded games. Halo 2 Killtrocity is a collection of modded halo 2 maps, however the interesting part is that this does not mean only the included maps have been changed, now you can also play on a few included campaign maps as well. Any one up for capture the flag on the large bridge level with tanks! Also to make matters even better, the weapons and vehicles have been altered as well. This ranges from simple skin changes to a gun the fires plasma grenades. (As a side note. I will never play with Norm on that map, I HATE STICKYS). But that is not all, ever want to use the hunter beam cannon, well now you can! There are a ton of vehicles changes as well, but you can find them out on your own. I must say I had a lot of fun playing with my cousin on these maps, however a large group would be even more fun, I guess I will have to start looking into XLink Kai.

Check out the video below to see what some of the changes look like. PLEASE NOTE that the music may not be to your taste (it is not mine) and you may want to mute it as there are no other sounds.


Read more here.

July 19, 2009

XBOX Soft Mod

My friend Matt had soft modded an xbox he got during my last year at school, at first I though it was cool, but did not see any use, however I quickly started to love the ability to stream any media to the big CRT tv we had in the living room. After I graduated I started to miss that ability, as well as having something to play Halo 2 on from time to time. So I went on ebay and found a good deal for an first gen xbox with three controllers, the advanced av pack(s video + optical sound) and the DVD remote kit. All for $33, which is not a bad deal at all. Then after waiting a week for it to arive, stupid ups ground, I finaly got a chance to have some fun with new hardware.

Fist off I read up on the steps to soft mod an xbox, check it out the tutorial here. I had no problem getting my kernel version and using ndure to build a installer, then packing it up and for burning a disk with xboxhdm. However that was when my problems started to happen, first off I could not get the drive unlocked by hot swapping the drive, it ended up not being a swap issue, instead it was a bios problem with the dell model I was using. After a few hours of poking I finally realized I had to plug the drive in first for the bios to know that there was a drive attached then do a double hot swap to the xbox for unlocking then back to the computer. I only figured it out because the drive would only show up if I plugged it in before starting the computer.



After getting the drive hot swapped, I ran into my second problem, the install failed due to lack of space. I am still not sure what was up with this, however after using the restore option twice, I finally decided to try letting it fail and see what happens. This turned out to be fine as it still soft modded the drive, which started up fine, however it was lacking any applications other then the basic dashboard. This was fine as I was able to grab a copy of ConfigMagic and ftp it to the apps folder and then use it to get the EEPROM off the board. This was my main focus as after I got the EEPROM I could always unlock/lock a new hard drive at any time. After I had it backed up I was able to breath easy.

My next step with to change the drive to a 200Gb so I would have plenty of room for movies and other files. This also gave me a challenge as well, as I did not have a DVD drive in the PC I was using, which meant I could not use xboxhdm to format the drive. I was stuck for a bit till I could out that there is a much easier way to clone the drive by using Chimp (Read more Here). I did a test on a 10Gb drive first and it cloned it perfectly. Then I tried the 200Gb, sadly it took three tries, but after stalling and eventually returning to the main menu a few times, it finally moved on to the next menu and I was able to clone it. The nice feature of Chimp is that automatically formats the F partition with the extra space difference between the drives.

Now that I had my drive all set and the xbox soft modded all I needed to do was install XBMC as the dash, which was simple, and then move all my files over to the hard drive, which took the longest till of all. After that I was playing with the built in skins. Matt had the xTV skin that I liked, but I eventually decided on MediaStream as my favorite skin, and I think it is a little easier to use for my family as well.

All in all, a successful and useful mod, now I just need to mod the stock fan, as it is loud and annoying at times.

June 22, 2009

Crunchyland bot

Quite a while back I was having fun working on a javascript exploit bot for an online game called crunchyland, the game itself was rather simple you create a character give it weapons and fight silly monsters that you encounter. The entire game engine was based on flash files that where embedded in html and where linked through javascript. The problem was that I quickly got bored with the game, you click, that is it, not very entertaining past a level or two. However before I moved on, I decided to try to write a bot for it so I could at least get on the leader board. Because there was no way I was going to sit for weeks of clicking, like some of the obsessive kids on the site apparently do. (Get a job!)

It was not too hard a task and gave me a good refresher in javascript dom manipulation. The bot uses an open window and url testing to change and click elements in the window triggered by timers. I also went a step further and had it watch the size of the health bar to heal the player after a certain point. After a week of testing I quickly had my character self level up on my testing server while I did other more productive things, and after a few more days I was on the leader board, with little effort, past the coding, on my part.

I have been waiting a while before releasing it, one to not get kicked of while I was still on the leader board, and to to prevent hoards of script kiddies from also quickly leveling up with no work. Now it looks like the game it not being worked on, and my script does not work completely anymore, so here it is CL Bot (For Safari 3 maybe 4 only). Anyone with some javascript experience could take it further and fix the parts that do not work with the game updates, however I have better things to be doing. Enjoy...

December 28, 2008

RCA to S-Video Converter




A small side project that I had worked on over the break was a S-Video to RCA adaptor. I had wanted something that would not only send all the video outputs from the receiver to the tv as it is set up to do, but to the projector as well. I do not do a lot of projector gaming as it is a bulb life waster, but still it is still nice to have the ability, and it lookd like a interesting project. So I started searching for instructions online, and while there was little information out there, one place I did find is here. The only problem was that the instructions are a bit fuzzy and the pictures do not help, so it took quite a bit of time to get the right pin out.





See the above pin out, which is how I have it wired, and for what I need it seems to work quite well. Also the ceramic capacitor I used was not the exact one specified in the instructions, instead it was a 221B, however it was mentioned "values form around 400 pF to around 10 nF should work somehow acceptably." so I was not concerned as it falls in that range. Plus it was the best I could rip off of an old circuit board laying around.

Now I must say that as was warned, the video quality is not amazing, but it works and was completely free, made from spare parts laying around, so beggars cant be picky. Also I think it would look better if it was S-Video converted to RCA, not the other way around like I am using it for.

October 26, 2008

Hydro Thunder on Mac




Hydro Thunder has to be my favorite racing game ever! Fast boats, amazing tracks, all and all an amazing game. If you have never played, you may want to read this, it will explaine why Hydro Thunder is awesome.

I have had the PSX disk for a while now, but it is annoying to dig out the Playstation just to play it. So I tracked down the PC version (Yes it does exist!) and got it running on my mac through Wine. This was rather simple, just download the latest free build of Darwine here and install it. You may need the unstable 1.1.7 build, because I had issues with it working on the 1.0.1. Install it and then run the wine helper once, after that the Hydro.exe sould auto open with darwine when you double click. Just as a warning, it may crash once due to no 3D card support, if it does, just reopen it and choose the play in window mode at the recovery screen that will come up. Enjoy

UPDATE: There was a question asked about how you can get the game screen to be larger. The problem is that because WINE does not have good 3D support, it will only play in a small window. There are two thing you can do to fix this, you can use the screen zoom feature under Universal Access in the System Preferences to enlarge the window, or you can grab a copy of Crossover Games, which does have 3D support, see my post on it here

September 2, 2008

POSIX Cydia Error Fix

For a few days now, Cydia on my 2.0 FW iPod Touch has been having problems downloading things from the apt.sauric.com repository, aka the source for all unix system items. It just keeps giving POSIX errors, however it does download a little bit each attempt. So for now I just keep retrying, 30 or 40 times till I download all of each update. This is rather annoying, hopefully this will be fixed, or I will be going back to installer when it comes out.

August 17, 2008

Javascript Injection

Did you know you can edit the contents of sites with javascript? Yes you can, however browser security will limit what you can do, so a little ingenuity is needed. Also the Safari web browser seems to be most lenient about javascript injection, where as FireFox is the most preventive. So you might want to use Safari for this type of hacking, no Idea on IE yet.

Try typing in the address bar...


javascript: alert('Hello World');


This not just doing a javascript call, it is actually using the page to call the alert function.

As a more advanced example...

javascript: alert(document.body.childNodes[0].innerHtml);


This will actually display what text is in the first element on the page, hopefully a div, as if there is no text in it it will be blank.

I have been working on a small project which uses javascript injection to play a simple html game for you. Yep, it is a very simple bot. Although it is rather stupid in point, it was fun to get working, as I needed a good refresher in Javascript before I go back to school. Expect to see the finished version posted in a week or two after I finish tweaking it, and leveling up my character.

August 13, 2008

CVS Nightvision Camera





For my birthday I had some trouble thinking a something I wanted, however after a little thought I remembered about how people where able to modify and hack the CVS One Time Use Camcorders. So a trip to the local CVS store got me a model M230 camera to play with.

To take it apart, you remove the back sticker around the lcd. Then remove the four screws, the back cover pops off with a little prying, which leaves just two black screws on the board. When removed the whole circut board lifts up.

I wanted to try the nightvision camara hack, however to do so you must remove the IR filter on the lense assembly, I also wanted to keep the regular camera ability as well, so I had to find another lens that would work. The CS majors that I know will remember the old dead webcams that we could grab from the CS old stuff raffle, and guess what the lens fits! Still this lens also had an IR filter (blue tint not red) as well, so you have to cut it in half to remove it. After removing it and gluing it back together I had the first part of my nightvision camera done. The last part is to track down some IR emitters from a few dead remotes. I wired them up in series to the batteries with a small push switch (white dot right below the lense cover). LEDs require about 1.5V each so 1.5V * 2 = 3V, which is the two 1.5 batteries make by default. This is a rough estimate, normaly they would require a resister to even out the voltage, but this works for all intent and purposes. Make sure to check with a mulimeter when doing this to keep the polarity correct, as LEDs are still diodes. You can see in the second picture the IR emmiters working. Also I can easily switch back to regular camera mode by removing the IR lens and inserting the original back in. I kept the silver lens cover because it looks good, and keeps stuff from falling into the camera body

All that is left it to unlock the camera so I can download movies, to do this you need a custom USB cable that fits the connector at the top. For form information check out camerahacking :: Index for all the details on correct wiring of the usb cable as well as modifications to the camera. My cousin did not think I could do it but I made a tempary one out of tagboard from a paper plate (last picture), and it worked just fine. Sadly my camera has a newer chalenge/response then any current method can unlock, so I am stuck with just a nightvision scope. However, I do plan on waiting for the 17 type response to be broken so I can fully use this camera to its fullest, and play with the firmware.

If you have $30 laying around you might want to pick up one of these camcorders, they are very fun to play with.

July 30, 2008

OpenWrt on Linksys WRT56GL

There was an extra wireless router hanging around not doing anything, so today I want and took the time to play with OpenWRT, and get it installed and setup. OpenWrt is linux firmware for quite a few different routers, but it s best know on the Linksys WRT54(G/GL/GS) series. My friend Matt had gotten another verson of linux firmware running at school on one of the WRT56G routers, so I knew it was posible, I had just never had time/router to play with.

WARNING, As with any firmware update, it could brick your router if something goes wrong, proceed with caution!

Setup was quite easy, go to the site download the Kamikaze firmware bin file and upload using the built in website firmware upload page. By default it is pulling DHCP from the wan side, and is already set up on the lan side. Telnet from terminal into 192.168.1.1 and do a passwd root to chang the root password, afte that you just need to setup wireless and a web interface.

Check out X-Wrt, it is a seprate web interface project working with OpenWRT. To install, SSH into the router and type...


ipkg install http://downloads.x-wrt.org/xwrt/kamikaze/7.09/brcm-2.4/packages/haserl_0.8.0-2_mipsel.ipk

then type

ipkg install http://downloads.x-wrt.org/xwrt/kamikaze/7.09/brcm-2.4/webif_latest.ipk


thsi will install it and run the setup. Afterwards just go to 192.168.1.1 in a webbrowser and finish setting up the router.

I had a wierd error happen after settng up wireless, which stopped the router from working, however I was able to fix this, by putting the router into failsafe mode (unplug, replug, hold down reset button after the DMZ light turns on, stop after it starts blinking). Then set a static address of 192.168.1.2 and set the router address to 192.168.1.1. Then went to the terminal and used telnet to access 192.168.1.1, which took a while to connect, and used vi to change /etc/config/wireless. I removed the "#Remove this comment to annable wireless". After restarting the router this fixed the problem and internet was back again. This could just have been a random error, not sure. You can use the Config Settings page as a guide if you have problems setting up the network and wireless config files.

After that little hickup the webinterface is working fine, and I am surfing on the wirless signal as I type this. Also I have a deep feeling of satisfaction from the fact that I just SSHed into a router, there have been few networking moments more awesome then that.

July 29, 2008

Logictech Quickcam on Vista

I have never been a fan of the software team from logitech, which is too bad, because their hardware is generaly pretty good. One problem I reciently ran into was that the Quick Cam Zoom that my grandparents have does not work on vister <(not a mistake). Luckly some resourceful people have found out how to get it runnin on vista.

1 Download the latest quickcam drivers from any of the new quick cams, it was ver 11.5 at the time.

2 Install, but skip the set up camera part at the end.

3 Download the old 32 bit window xp drivers for the quick cam, ver 8.3.8 or something like that.

4 Install, but at the end it will say it can not update, this is fine.

5 Go to device manager and manualy chose the driver, it is in C:/Program Files/Logitech/Logitec WebCam Drivers/WinNew/PRO

6 Install and enjoy.

Apparently SP1 breaks the audio driver, but when I update I will post that fix too.

July 20, 2008

iPod Touch 2.0 & Jailbreak

Well the 2.0 firmware has been out for a while now, however I was holding off getting it till the iPhone Dev Team finished their new Jail break tool. As of last night that is finaly available, and I quickly grabed it after seeing comments of not too many people with trouble. Sadly this was not the case for me, I finaly got it working, but it took a bit (aka 3hours) of poking.

UPDATE* There is a newer version out, that hopefully has fixed the problems I had.

NOTE: As with all hack, you assume responsibly if something goes wrong and bricks your touch!

First off grab the 2.0 firmware from apple, yes there are other less costly ways, but I can't help you with that. Then grab the pwnage tool (link above). The firmware will take a while to download, so go get a snack... Ok when that is finished run the tool, it will ask you to click the device, then it will find the firmware you downloaded from apple, other wise it will complain and require you to find it. Then it will build a custom firmware for you to install, yes you will need to restore it again later when it is finished. This also take a few minutes, but has a cool pagkaging animation. Please note that you can stop it from putting the pineapple logo through the expert options, which I did because I like the apple logo better.

Here is where i started to have problems, had my touch pluged in, and the next screen finaly shows up with a failed DFU restore, I go back to the site and low and behold...
"Update 3: If you get Error 1600 from iTunes (or if you see in your log a failure to prepare x12220000_4_Recovery.ipsw), try: mkdir ~/Library/iTunes/”Device Support” ; if that directory already exists, remove any files in it. Then re-run PwnageTool. "
So I add that directory, but still no luck, finaly I figured out that I was in restore mode, not DFU mode, the diffrence being that you hold down the home button on restart to go into restore, but for DFU you hold both power and home till it shut off, then keep holding home till the screen goes black, but iTunes will still pop up a message saying you have done restore, that is the key piece of infommation that was missing. Finaly I ran the tool again and this time instead of saying failed it led me through the DFU steps, though I was already in that mode, then told me to used the custom firmware, that was placed on the desktop, to restore the iPod through itunes. You [option] click restore and locate the custom firmware on the desktop, and let it take its time restoring the jailbroken firmware.

Also as a hint, if you are getting a 1600 error with the custom firmware, try redoing the pwnage tool, but this time use expert mode and actualy click the firmware located in ~/Library/iTunes/iPod Software Updates.

Finaly I had it all up and running however there are still a few things I am missing from the pre 2.0 days.
Update... Everything I wanted is now back and available in 2.0!


Things Fixed or Updated...


  • Winterboard gives you themes again... Avoid Customize 2.0 it has too many issues right now

  • BossPrefs has fixed the Mobile Safari download plugin.

  • More apps are avalable between the App Store and Cydia now.

  • I have grown to like Cydia now that it has had some tme to grow, will not be switching to installer 4

  • The 5 icon dock is back, and works with icon dragging!



The root password is still alpine, so it is a good idea to change it. Terminal or ssh...

login root
password: alpine
passwd root
new password: *****
confirm new password: *****



So my oppinion, the app store is worth updating for, especially as more and more is added. I was happy that I no longer need to install email, maps...etc seprate, which saves me time and iTunes now syncs email and bookmarks, (Is this new? It is to me! Maybe I missed it in the last itunes update). Terminal, makeitmine and OpenSSH are already ported and ready to go, and AIM and VNC now are in the app store so I am all set with that. The remote app is also very cool! Even Cydia has grown on me as they have updated it, I don't think I can live without the changes list now, so I do not plan on updating to Installer 4, unless there is something I can only get on it. Also WInterboard is final out, and blows away Customize 2.0 in simpliciy and ease of use when applying themes on the 2.0 fw. I have my theme back now so I am very happy. If you have not updated yor iPod Touch or iPhone yet, now is the perfect time to do so.

May 19, 2008

DDR Pad Controller

Well after about 4 years the pad controller board died. I should have expected this, because I am forcing the circuit to run under much higher resistance then the 2 inches of wire it was designed for, but still 4 years of heavy ues is pretty good. So it was off to staples to grab a new USB key pad. I personally like the Targus Keypads because they are simple and support more then one key press at a time, which is very important for the pad to work correctly.

After getting the keypad I brought it home and took a look at the circuit, it was quite a bit different from the version they had 4 years ago, mostly because it used small contact pad instead of the holes for leads like I was hoping. This was a small set back, however after ripping the contact holder off the board to get access to the solder points I realized that I was going about it wrong. There where some lead holes on the board, just not right there.

I got some very thin copper wire with the insulating coat, and soldered them onto the board. It took some careful placement to correctly solder the wires that where very close to either the contact on the top, or the other solder points on the bottom of the board. Still after an hour of work I had it working, and could test in StepMania that it was indeed working.

All that was left to do was correctly wire it back to the pad. Sadly this was a lot more complicated then I had hopped, because the way I had the old version was slightly different. But I quickly fix this problem and had a wiring diagram to use. All I needed was the up,right,down and left buttons so I have two main wires 4 and 5 that are contacted to the remaining wires to get the correct button press. I am not sure if did something wrong or just shorted something, because after I had it all working for some-reason when you press left and up or down both up and down are pressed. Luckily this does not interfere with game play, it is just a small anomaly.

There you have it, all the instruction you need to make your own pad controller, however I expect that Targus will change the board again before this one breaks, so I am sure I will have to go through this hassle again sometime in the distant future.

January 30, 2008

Download files on iPod Touch

One of the big drawbacks with mobile safari is the fact that you can not download regular files to the ipod. However that has already been fixed by an interesting plugin for mobile safari. Interested? I know I was...

First off grab this file http://www.badongo.com/file/5544413 created by hachu. Then sftp into the iPod Touch, you will need to get a ftp client, I use Cyberduck. Then connect to the iPod Touch, and navigate to /System/Library/Internet Plug-Ins. This is the mobile safari plugins folder. Drop the plugin file you downloaded into this folder and then reboot the Touch by holding down the power button and sliding the red slider. After turing back on the Touch, try going and downloading something, you will see a new screen. This will give you the option to download the file, all downloaded files are placed in a download folder in the root user's media folder. One thing you will also want with this, is the finder for the iPod Touch, it will let you move/manage the downloaded files.

The author of this plugin states "No warranty or liability of any kind, of course. Don't blame me if it somehow messes up your data, though it isn't supposed to affect anything outside the Downloads folder it created." So you are on your own if it does not work, or breaks something. For more information check out the original post here... Enjoy

January 28, 2008

Remove iPod Touch App Space limit

As requested by a friend here are the steps to negate the space limit for apps on a jalbroken iPod Touch. The problem is that the iPod Touch has only a small space alloted for the root folder, where the root users folder does not have such limits. A un-jailbroken touch does not need a lot of space, however after installing even just a few third party apps you will quickly run out. Symptoms of such is installed apps do not work, even though they installed with out a problem, Or you will be prompted with a message saying you are out of space. Ether way you can follow the steps below on a jailbroken touch to get more space.

*UPDATED*
Although this still works under the 1.1.2 firmware, I have recently found the BigBoss Application which is a far safer and easier way to simply move your applications, and free up space on the /dev/disk0s1 partition where perl and other things are installed.


1. SSH into your iPod Touch
You should already know how to do this, if not, you should not be playing with the contents of your iPod!

2. cd /
This will get you to the root directory of the iPod.

3. cp -pr Applications /var/root
This makes a copy of the applications folder in the root and places in the root users folder in the iPod.

4. mv Applications Applications.old
Rename the applications folder in root to .old

5. ln -s private/var/root/Applications /Applications
This makes a symbolic link to the newly copied Applications folder. The iPod will think this is a folder.

6. Power down the Ipod Touch. Hold the black power button till a red slider appears and slide it. Then press it again to reboot. Check to see that everything is working before following the final steps!!!!

7. cd /
Return to the root directory of the iPod.

8. rm -rf Applications.old
This final step removes the old application folder.

Originally figured out with help from Here.

January 11, 2008

Making a code editor in a webpage

One of the big goals that I had over the winter break was to finish the upgrade of the Plymouth AMS website. Is started writing in in xml with a xsl style sheet. Although this is good for simper websites that I am going to be around to keep it up, because this is not the case I had to think of something else. After talking with a more experienced web programer in a workshop, I decided to re-write it in php as a web app. Thus after logging in you could edit the basic html on the site, yet this would leave the more advanced layout out of it. Perfect for what the AMS group will be doing. Ether way it is a huge advance from the front page created website they had before.

All that it will requite is a simple html/text editor written in php. This turned out to be a little more complex then I thought it would be. I started with a simple text area that filled the width of the page. Looks good. But after trying to edit 2 lines I got really annoyed. NO TABS, there was no way to tab, and a programer like me lives for code structure. So now I needed tabs... By default web pages use the tab key to go from one field to another not to add a tab character, luckily after some searching I found this very handy java script that would add tabs to text areas. It works very well, and now I have my beloved tabs again.

So first problem fixed, now another rears its head. This text area allows html code, which tends to have quotes here and there, the Mysql calls to the database I am storing the text in also has both double and single quotes. This does not mix well. Basically once it concatenates the strings together the quoted sections get completely screwed up by the new quotes added to my query. This must be a common occurrence so off I went searching for php functions that would take care of it.

As expected there was a function called htmlentities, basically it converts all applicable characters to HTML entities, aka the escaped form. This takes care of the quote problem, I just save this to the database and edit it when needed, as a bonus the text area field accepts these characters and shows them as they should be with out any problems. Thus there is no need to convert them back when editing the text, only when displaying them in html. See example below...


$query_string="UPDATE `***` SET `***` = '".htmlentities(stripslashes($_POST['***']),ENT_QUOTES)."' WHERE `***` = '***' LIMIT 1";


When displaying the html code from the database it is a little more complicated. First off I wanted this to be a hybrid text/html editor, this when you line return, it puts a <br /> just like a text editor would. To do this use the handy nl2br function, it converts the /n new line characters to <br />. Which looks really good, except that it does every line return, I only want non code style returns so then follow this by str_replace which replaces every "><br />" with just a ">" Thus removing all of the non needed breaks.

The last part is html_entity_decode which convert all HTML entities to their applicable characters. Thus the html is back to normal. You put this all together and it does the job very well.


$message = mysql_fetch_array($result, MYSQL_ASSOC);
$mconverted = nl2br( html_entity_decode($message['text']) ); // Convert back to html code
$removes = str_replace("><br />",">",$mconverted ); // Remove extra br due to code style
$xtpl->assign('message', $removes);