Wednesday, 23 May 2012

Formatting FAT32 Volumes Larger Than 32GB & SD Card Alignment

For a long time, flash memory for mobile phones and portable audio players seems to have been stuck at around 32GB.  Many devices report their maximum supported card size as 32GB, but this didn't stop me buying a Sandisk 64GB Micro SD for my Galaxy S2 and playing around with it.

Samsung claim the Galaxy S2 supports a maximum of 32GB via it's Micro SD card slot, but as the owner of AndroidNZ found out, this wasn't strictly true.  He had tried the card in the device, and once I saw that it was working, I decided to take a punt and buy one for myself.

64GB Micro SD card working flawlessly in my Galaxy S2, which claims to only support up to 32GB.

Initially you may run into some difficulty.  When I inserted the card into the phone, the phone said that the card is damaged or unreadable.  It appeared that my card shipped unformatted, which meant it had no filesystem.  The first challenge was to format the card in a filesystem the Galaxy S2 could read.  I tried the Linux filesystems first such as EXT2, EXT3 and EXT4, as the default filesystem FAT32 has a 4GB maximum filesize limitation, and I intended to use my phone as a portable HDD too (very useful for transporting or downloading Linux ISOs if you are caught out with a dead computer).

I found that with the Galaxy S2, EXT2, EXT3 and EXT4 were not supported, which was quite annoying and odd since that the internal memory of the Galaxy S2 uses EXT4.  So why can't it mount EXT4 SD cards?  I had also tried mounting external NTFS HDDs before with no luck, so I knew not to bother wasting my time with that.  I also tried exFAT but still no joy.  Hopefully since the Galaxy S3 supports exFAT the code will be retroported to the S2 (everything crossed).

The card even works on my 2008 Nokia N96!

So unfortunately that left me with FAT32.  For whatever reason, my S2 refused to format the card (but since I formatted the card, my phone will do it no problem now) which meant I had to do it on my computer, and immediately I ran into an old problem.  You see Microsoft impose a 32GB limit on partiton sizes for FAT32 in recent operating systems (XP onward I believe), despite the filesystem supporting partitions up to 2TB on paper.  My only guess is that Microsoft wanted to push NTFS as the dominant filesystem since it's a lot more robust.  I had tried formatting by right clicking the drive in "Computer", through launching diskmgmt.msc via the command prompt, and then even resorting to the CLI format utility, diskpart.  None of which would allow me to create a FAT32 partition of 64GB.

Fortunately, third party partitioning software will allow you to create FAT32 partitions in excess of 32GB, so it was time to find an alternative.

For simple partitioning, I found Easeus Partition Master which has a free version with all the functionality we need (for my final formatting, I eventually decided to use some tools supplied in Linux, but I'll come to that later as it concerns aligning the SD card too).  If you are a little more experienced with computers, or have used Linux in the past and are familiar with the filesystem structure, you could also use a GParted Live CD which boots into a basic version of Debian with the GParted program which is simple to use.

Additionally you could possibly use a Windows 98/ME boot disc or Windows setup disk to get into DOS and run fdisk.  Unfortunately even though I was able to find the boot disk files online, they wouldn't run within 64-bit Windows - they might possibly work within DOSbox though.

Partitioning With Easeus Partition Master
For the purpose of this tutorial I will be using an old 32GB Micro SD card as I have already formatted my 64GB and loaded it up with music and stuff.  The process is identical, but the reported volume sizes will be different.

Upon launching Easeus, you will be shown a screen like the one below.

Note the disk sizes, so that you don't accidentally delete partitions on your HDD!

Easeus is really easy to use, but here's a quick run down for those who might not have partitoned a disk before.

1) Upon opening Easeus, check to see if your SD card has any existing partitions.  The one in the screenshot is blank.  If you have existing partitions, select it by clicking on it, then right click and choose Delete Partition, then click Apply in the top left hand corner.

2) Right click the Unallocated space of the SD card you wish to format and click Create Partition.  Change the default settings to match the screenshot, so we are creating a Primary partition in FAT32.  You can adjust the space used if for some reason you want to create multiple partitions, but in general you just want to select the maximum amount.  The drive letter is not important, so leave that as the default.  Once you are done, press Ok to go back to the main screen.

The first part of creating a FAT32 partition
That's all there is to it, but if you would like to experiment with different cluster sizes which can improve write speeds, perform the final step below.

3) To change the cluster size, right click the partition and select Format Partition and choose a cluster size from the drop down menu.  Press Ok to go back to the main screen and press apply to write the changes.  In general, the larger the disk size, the larger the cluster size you would use.  Using larger clusters can help improve transfer speeds, but at the cost of disk space efficiency.  What this means is that files occupy space on the disk to the nearest cluster size.  So a 12KB file on a disk with a cluster size of 16KB, will use 16KB on that disk, or if the cluster size was 64KB, then that same 12KB file will occupy 64KB.

Aligning the SD Card
If you are comfortable with Linux and command line tools, then we can improve the speed of the SD card by aligning it.  The theory behind this is that SD cards erase/write 128KB blocks which means even if only 10KB in that block changes, the whole thing needs to be re-writtent.  Most formatting tools don't seem to be aware or care about how SD cards work and just format the FAT32 filesystem in the usual way, however better performance can be achieved if the File Allocation Tables end at the border of a block, with the data starting at a new block, rather than some of the FAT using part of a block and the data starting in that same part block.  This makes it easier for the SD card to write full blocks more often than it would if the partition was unaligned.

I found that with my SD card unaligned, I would get write speeds averaging around 6.5MB/s, but once aligned it would manage a consistant 9MB/s, and higher with large files.

Unfortunately I do not know of any SD card alignment tools for Windows when it comes to FAT32, so we will be using a Linux Live CD for this, but if your device supports exFAT, then I've found the official SD card formatter to give really good speeds.

We first need a Linux environment, you maybe already run some linux distro, but if not we can download a Live CD which runs the OS from optical media without installing anything.  I use Opensuse

Here is a link to the original thread.  The guide I will post will pretty much be a simplified version of this based on my own experience as I found the guide a little bit cryptic at first.

Partitioning The Card
1) First, insert the SD card so that Linux detects it and allow it to mount.  If it doesn't mount automatically, you can open the file browser and browse to the card as this will cause it to be mounted.  You may need to have a filesystem on the card beforehand, so you can just format it to NTFS or something in Windows as a temporary measure.

2) Open a terminal window from the progam menu and type:
df -h
df is the disk free command, which shows you the available space on your mounted drives, and the -h switch for "human" readable information, such as MB and GB rather than just bytes.
There are a few pieces of information we need here.  Locate your SD card by its capacity in the list, and make note of the Filesystem and Mounted on columns.



As you can see, my SD card is listed under filesystem as /dev/mmcblk0p1 and under mounted on as /media/15F4-1F1D

I should explain briefly about how Linux's filesystem works.  /dev/mmcblk0p1 is actually referring to a partition on the disk, and the disk itself is known as /dev/mmcblk0 - as you may have guessed, Linux simply suffixes p1, p2, p3 etc to the device name to denote partitions on a device.  /media/15F4-1F1D is the mount point and is the Linux equivalent to a drive letter, eg C:

3) Next we need to unmount the drive.  In the terminal window type (replacing the mount point with whatever your drive is mounted as when you typed df -h):
umount /media/15F4-1F1D

If you don't want to type the whole thing, you can start it off and press Tab to complete it automatically.  If the unmount was successful, you are returned to the prompt.  You can check it was unmounted by typing in df -h again and confirming that it is not in the list.

4) Now we need to change the drive geometry in order to make the 128k easy.  Flash memory works differently from harddrives and do not have physical, sectors tracks or heads, but it still uses that information to organise data.  The aim is to find a combination of sectors, tracks and heads that is evenly divisible by 128KB (131,072 bytes).  The suggested geometry of 224 heads and 56 sectors does that (224 heads x 56 sectors x 512 bytes per sector / 131,072 bytes = 49) whereas the default value (255 heads x 63 sectors x 512 bytes per sector /131,072 bytes = 62.75) does not.
In the terminal window, type the following:
su (then press enter, this enables super user mode, or admin)
fdisk -H 224 -S 56 /dev/mmcblk0

fdisk is the partitioning program, -H sets the number of heads and -S sets the number of sectors.

To confirm this worked, press p to get a list of the partitions and device properties



4) While still in fdisk, we will create the FAT32 partition.  To do this, type the following at the prompt:
d (then press enter to delete any existing partitions - if you only have 1 it is deleted automatically, otherwise you are prompted to enter the number of the partition)
n (then press enter to create a new partition, then select primary partition and then enter through the other options).
x (to enter expert mode)
b (to change the beginning of the data, then select partition 1 and set the start to 1)
r (to return from expert mode)
t (to set the partition type, enter c when prompted for FAT32)
x (to enter expert mode again)
b (to set the beginning of the data to 256 for partition 1)
r (to return from expert mode)
w (to write the changes to disk

You may press q at any time to quit without saving changes.

5) Finally we need to create the aligned FAT32 partition.  We first need to find out how big the FAT tables are going to be, so we can manipulate the size of the tables to finish at the end of an erase block (the 128KB blocks we keep talking about).
At the terminal window, type:
mkfs.vfat -F 32 -s 32 -v /dev/mmcblk0p1
Then press enter to format.  Once done, you will see something like below, giving a read out of the disk.  The line we need is the FAT size which tells us how big a single FAT is (there are two on this disk).


6) We then need to calculate the size of the FAT in bytes, to see if it will end on a whole erase block or not.  What we do is:
FAT size x No. of FATs x 512 bytes per sector / 131,072 = No of erase blocks
In this instance we would have:
14,976 x 2 x 512 =  15,335,424 / 131,072 = 117
Now if at this point the number of erase blocks is uneven, we need to pad that out to fill the erase block.  Simply round up your last result to the nearest whole number and reverse the calculation.

No of erase blocks x 131,072
Which gives us:
118 x 131,072 = 15,466,496

Now we subtrack the original FAT size in bytes, from the erase block aligned FAT size in bytes, then divide by 512 to give us the number of sectors difference to be used as reserve sectors.  This is essentially expanding the amount of space allocated to the FAT in order for it to finish on a complete erase block, so the data starts on a new block.

15,335,424  - 15,466,496 / 512 = 256 reserve sectors

7) Now we know how many reserve sectors are needed to ensure alignment to the erase blocks, we can continue to format with the correct information.
At the terminal window, type
mkfs.vfat -F 32 -s 32 -R 256 -v /dev/mmcblk0p1

The switches used are:
-F 32 (for FAT32)
-s 32 (cluster size expressed as sectors, so 32 x 512 bytes = 16KB clusters)
-R 256 (number of reserved sectors)
-v (device to be formatted)


Once that has completed, you can mount the drive to transfer items to it, or simply remove it and go back to Windows, or use it in your device.

Friday, 16 March 2012

CRT, Upscaling and 2D Games

I'm a big fan of Super Street Fighter 2 Turbo and I play it on GGPO, so I scrutinise every aspect of my setup to achieve the best image and sound quality, and also eliminate lag or at least keep it to the bare minimum.

Just recently I decided to pick up a Sony Trinitron E530 CRT monitor to use with my Xbox so I have a complete setup to take with me to tournaments, but I also now use it at home for when I play Super Turbo on my laptop.  The CRT simply has way better colours and black levels than the laptop panel, not to mention way better motion (this is a huge thing in a reaction based game like ST) so that you can recognise individual frames rather than it being a bit blurry from motion.


The way I have my GGPO configured gives me a perfect 60fps offline, but I got a lot of complaints about lag, despite the fact that it certainly wasn't anything to do with my laptop or the internet connection.  I asked someone on shoryuken.com to share their config file and I found that while the framerate was not as good, I didn't get any complaints about lag.  I can only guess that maybe the Vsync was causing a conflict with the usual way the emulators sync when playing online.

My usual setting before getting the CRT was to use a bilinear filter at the panel's native 1920x1080 resolution and it looked really good, however the config file that I now use, uses a nearest neighbor filter which can look ugly when scaling by a non-whole number.  It was when I was using my CRT when this became apparent.  The default resolution that was set for the monitor when I plugged it in was 1024x768, so I thought, "Ok, I'll go with that".  When I put the game into fullscreen, I noticed the hatching effect on the Super and life meters wasn't consistent in size.


Left: 100%, Right 400%
The hatching pattern in the life and super bars are 1 pixel blocks
Above we have a 100% view of Super Turbo and to the right of it a 4x zoom to show the hatching pattern.  As you can see, the pattern is a grid of single red coloured pixels.  The problem with playing a game like Super Turbo at fullscreen using the basic renderer in GGPO is that it doesn't do any resampling of the image - it literally just multiplies the amount of pixels which means you get this inconsistent effect:



The observant of you will notice that the life bars in the first and second screenshots are different sizes.  The reason for this is because Super Turbo is a 4:3 aspect ratio game, but has a resolution of 384x224 which is closer to widescreen which needs to be stretched to 4:3 for the game to look correct.  This means that the first image was at it's native resolution/aspect ratio, but the second image was with the game running at 1024x768, which is a correct 4:3 aspect ratio.



If we go back to the first image, you can see that the hatching is nice and clean, and the large version is clean too since it's a simple 4x upscale.  The problem arises when you are trying to play a game like this which needs the aspect ratio correcting or that it's native resolution does not translate well to your upscaled resolution.

Since the game's resolution is neither 16:9 or 4:3, it means that in whichever situation you are in, the width and height are being scaled at different factors.  For example to take the 384x224 image from ST and display it on a 4:3 screen at 1024x768, the width is upscaled by 2.666x and the height by 3.429x.  For 1920x1080 that would be 5x for the width and 4.821x for the height, or if you were to run it at 1080p with the correct aspect ratio (1440x1080) it would mean the width gets stretched by 3.75x and height by 4.281x.


Because of how nearest neighbor works where it just increases the number of pixels by whole numbers rather than drawing any inbetween pixels, it causes a problem when being asked to upscale by a non-whole number.


The red blocks should all be the same size, but upscaling to a non-whole number causes this uneven effect since nearest neighbor only uses whole pixels
There are only 2 ways round this, and that is to either use a smarter upscaling algorithm like cubic or linear, or if you have a CRT, to set a custom resolution.


Solution: Custom Resolution
Because of how CRTs work in that they don't have a native resolution as such, it means you can send pretty much any resolution to it up to its supported maximum and it just displays it, without scaling.  If you are lucky, you may even be able to find monitors that will run arcade games at their native resolution but these are rare since a lot of PC monitors won't do this as the resolution and refresh rate is usually too low.  Some people prefer using a bit of upscaling in the emulator to avoid the scanline effect caused by low resolution games on CRT, but then again some people like scanlines and even buy additional hardware to emulate them!

This non-native resolution trait of CRT monitors is particularly useful for 2D/sprite based games which have these weird resolutions that are neither 16:9 or 4:3 since we can set the emulator to upscale the image by whole numbers to avoid the scaling artifacts caused by nearest neighbor.

For example upscaling 384x224 by 4x to 1536x896, the monitor will then display that resolution and fill the screen without additional upscaling.  Rather than being stuck at one resolution like an LCD at 1920x1080, a CRT is able to "adapt" it's resolution, and would be able to display something like 1920x768 should you wish.  It simply means the width would be the same, but it would change the vertical resolution to fill the screen.

If you were to send the upscaled 1536x896 game image to a 1080p LCD panel, it would then have to upscale it again in the monitor logic board to fill the screen (otherwise you would have big black borders where the outer pixels were not in use).  This is bad because generally any kind of LCD based upscaling creates input lag which is why you should always try to use a resolution that matches the number of pixels on your display.  In the case of a PC, it is preferable to use a non-integer upscaled resolution like 1920x1080 with a bit of ugly scaling than it would be to let the monitor handle the upscaling, which is usually not only ugly, but adds input delay.  Some consumer TVs have as much as 50ms input lag, which is around 3 frames.  That's simply unacceptable in a game where reversals must be performed with frame accuracy.

So bear in mind then, that the following guide mainly applies to CRT, but if you don't care about upscaling or incorrect aspect ratios, then these methods can also be applied to LCD.

Creating a Custom Resolution for GGPO
In order to find and create the correct custom resolution for you, you need to know:
1) The native resolution of the game
2) The maximum, native or recommended resolution for your monitor
This assumes that the game was intended for use on 4:3 screens.

In my case, the resolution of the game is 384x224 and the recommended resolution for my CRT is 1600x1200.  If we work back from the width for example, and calculate that 1600/384 is 4.166r, the resulting number you get is not a whole number so you will get the ugly scaling when using nearest neighbor.  In this intance we take the nearest whole number and multiply that by the width of the game, so 384x4=1536 which is our new upscaled width.  Doing the same for the height I get 1200/224=5.357, and if we take 5 as the scaling factor, 5x224 gives us 1120 pixels.

That gives us an integer scaled resolution of 1536x1120.  It's what I would describe as a bastard resolution as it doesn't fit any of the nice round resolutions that you usually find in your graphics driver like 1024x768, 1280x960 or 1600x1200, so we will have to deal with that later but first on to adding the resolution to GGPO.


Adding the Resolution to GGPO
1) First get to a window where you can browse your HDD (C: usually).  If you don't have an icon for "Computer" on your desktop, you can find it in the start menu.

2) Look for the GGPO config folder.  Where it is may depend on your Operating System, or where you put it but generally speaking you need to go into Program Files (x86)\GGPO\config

3) At this point make a copy/backup of ggpofba.ini as this is the settings file that we will be editing.  Once you have done that, open it by double clicking or in a text editor.

4) In the file you will notice the following chunk of text which are the custom resolutions.
// The preset resolutions appearing in the menu
VidPreset[0].nWidth 400
VidPreset[0].nHeight 300
VidPreset[1].nWidth 640
VidPreset[1].nHeight 480
VidPreset[2].nWidth 1024
VidPreset[2].nHeight 768
VidPreset[3].nWidth 1280
VidPreset[3].nHeight 960

In case you haven't figured it out already, we need to add another couple of lines to this with our own resolution which would look like this:
VidPreset[4].nWidth 1536
VidPreset[4].nHeight 1120

5) With that done, save and close ggpofba.ini and run the emulator.  Click Video>Fullscreen Resolution>Other and you should see your new resolution in there.  Select it, then press Alt and Enter to go fullscreen and try it out.

Do not worry if you get a message that the emulator couldn't set the resolution blah blah blah with a load of random numbers.  It generally means that your video driver doesn't see this as a valid resolution, which brings us on to the next part...

Adding the Custom Resolution to the Video Driver
This next part is written for adding the custom resolution to nvidia graphics cards.  If you have an ATI GPU or something else, you should google for advice.

1) On your desktop, right click and choose NVIDIA control panel, then under the Display tab select Change resolution and then Customize.  A popup with a list of standard resolutions will pop up, but we just want to click Create Custom Resolution.


2) Enter your resolution and the refresh rate (usually 60Hz).  I found keeping the timing set to auto works for me, but if you get tearing or judder you may be able to fix that with different timings.  The basic auto timings only allow you to specify an integer framerate, but most games were designed to run at 59.94Hz (the NTSC field rate) so if you can't get smooth scrolling motion, it may be worth playing around with custom timings where you can specify 59.94 fps.

It may also depend on the emulator as some may run at 60fps and others may run at 59.94fps.  In GGPO there is an option to force 60fps, and triple buffering/VSync also helps eliminate tearing but having said that, I think those last 3 settings were what was causing the apparent lag with GGPO before - so try to stick with the basic settings.
 

Once you've tested the resolution and it has passed, it is automatically saved.  You should now be able to run GGPO again at the new resolution.

Friday, 10 February 2012

How to Make Almost Any Wired Device Wireless

Running my Xbox 360 wirelessly without using the official Microsoft wireless adapter is something I've been doing for a number of years now, and it's not that difficult.  I wanted to write this guide for a long time as I believe it's such a better alternative to the grossly overpriced Xbox 360 wireless USB adapter (seriously, it's around 4x the price of the PC equivalent), and more to the point has the potential to be much faster.  Fortunately, I decided to upgrade my wireless bridge which means I'll be revisiting the setup.

Basically it involves taking a standard internet router and putting custom firmware on it that gives it additional features such as wireless bridge mode.  This is what will let your secondary router connect to your internet wireless router, wirelessly which effectively turns it into a wireless adapter or a client just like a laptop.  The clever part is that since your devices connect to it with ethernet cable, they act just like a wired device, so once the initial setup is completed, adding "wireless" devices to your network is as easy as plugging the cable in.  No messing with router passwords or anything ever again.

Top: Xbox 360 with original adapter connected to a wireless router limited to around 20mbps.
Bottom: Xbox 360 connected to a wireless router acting as a bridge, which is connected wirelessly to another router transferring at least 105mbps.




There are numerous advantages to this, which is what stood out to me more than the fact I was getting one over on Microsoft, or saving a good amount of money.  For instance, depending on the router model you go for, it can be cheaper than the Xbox 360 wireless adapter.  My old router was £35 compared to £60 for the USB adapter and since it allowed me to connect multiple devices it meant I didn't have to buy an adapter for each device.


The other big advantage with this method is that you are not bound to the speeds of internal or official wireless adapters.  My PS3 has an internal 54G wireless card which has a real world performance of about 20mbps max which is the same as the original Xbox 360 wireless USB adapter.  Even with the new Xbox 360 built in wireless or the Wireless N adapter, those are dual stream which means they top out at around 60mbps at any realistic range, but since the routers I am using are triple stream I am able to get around 120mbps from them at opposite sides of the house.  Remember that even if you decide to replace your existing router with an E4200 triple stream router, the client must support it which means having 3 antennas, and the Xbox 360 only has two.  It will still work, but it will be limited to around 60-80mbps at best, whereas a triple antenna device can transfer as fast as 230mbps at very close range

Wifi speed ratings are very misleading.  One of the most common standards we will have come across at some point is Wireless G which is rated as 54mbps, but since wireless communications are effectively half duplex in the way they work, the bandwidth available is at best half of the rated link speed or less.  In other words when they rate a device as 54mbps, that's 54mbps shared in both directions, operating in the best theoretical conditions.

Wireless G is fine for a lot of people, but is not so good for streaming high definition movies that can have bitrates peak in excess of 20mbps, or people with fast connections.  With the wireless bridge method, the wireless adapter is in effect external now, it means I can upgrade the routers as and when faster products and new specifications come out, so you are never stuck to a certain wifi speed or spec.  In fact right now, it's the Xbox 360's ethernet port that is the bottleneck in my setup.  If it had gigabit like the PS3, I would be able to download up to 120mbps in theory once Virgin carry out the upgrade in the summer.


Take a look at the above picture. In this typical situation, all devices are competing for wireless bandwidth. If someone is streaming movies from the PC to the PS3, it will take away from the total wireless bandwidth that could be otherwise used for the Xbox 360 causing slower downloads or the real possibility of lag.  The PS3 wireless is limited to around 20mbps, meaning that high bitrate movies could stutter and lag and the Xbox 360's original wireless adapter is also limited to around 20mbps (since it is also Wireless G), which means if you have a connection over 20mbps, you simply won't make the most of it.  What's worst is that if your main router is only Wireless G, then it will only have about 20mbps to share out between all the devices, so if when your brother or sister is streaming films on the PS3 from the laptop and it hits a part of the video that comes close to or exceeds 20mbps, the router will run out of bandwidth meaning there is none left for the Xbox and then your download will stall or game will lag.  You should at the very least ensure you have a high quality wireless router, even if you don't go to the trouble of setting up a second router as a wireless bridge.


Now let's revisit that situation but put a wireless bridge in there.  Straight away you eliminate a lot of potential for wireless bottlenecking, in particular with things like streaming.  Now instead of the laptop having to send the movie data through it's wireless to the router, and from the router through the PS3's wireless, the transfer now just takes place over ethernet, which in this situation is way better since the PS3 has gigabit lan, so do most laptops and the routers used in this example (Linksys E4200) have gigabit ports too.  Not only are transfers faster to the PS3, but lag in movies is eliminated and it has no impact on local users as the wireless link is now only used for internet data, and not communication between devices.  Communication between devices is now done on a switch/ethernet level, unless of course you have another laptop connected directly via wireless to the main router/modem.  Since the PS3 and PC are communicating through the switch, the Xbox 360 is free to request data from the internet using the wireless link as it likes.

One of the other cool things about this setup is that I can share my ethernet laser printer on the network, so if you imagine the laser printer is connected at the same point where the Xbox and PS3 are, and that the laptops in my house connect to the first router on the left, it means I can print wirelessly.

Port forwarding remains unchanged too, and rather than having to set port forwards on both devices, you just set them on the main router.  There is no need to set port forwards on your wireless bridge.

The only real downsides to this method are that it can be expensive if you want a good router (£130 for a Linksys E4200 for example) and that the choices of routers are limited by what are supported by custom firmwares, and at the end of the day, you still require some amount of cable (although if you are like me, all your entertainment stuff tends to be in a corner of the room).  One other limitation that was present the first time I tried this was that when your router is set up as a wireless bridge, other wireless devices cannot connect to it directly as the link is used solely for communications between the wireless routers.  Wireless clients will have to connect to the original wireless router/modem as usual. That said, I'm sure you will agree that the advantages far outweigh the disadvantages.


Flashing the Custom Firmware
For this particular project I will be using DD-WRT again.  Although stability is as much a hardware thing as it is software, my old faithful WRT-54GL has had in excess of 100 days uptime with no signs of getting bogged down with an 8% overclock.  There are two ways to attack this, either check the website to see if an existing/spare router you have is supported (in general, hardware with built in ADSL modems are not supported), or if you are looking to buy some hardware specifically to use as a wireless bridge, check the router database.  I will be using a Linksys E4200 V1 with DD-WRT.  It is currently a work in progress as the hardware isn't really that old in comparison with some of the supported routers.  Normally I would say to stick with tried and tested stable builds and hardware, but my hand has been forced a little into this because the WAN/Internet port on my E4200 was acting funny, so I bought a new one and decided to retire the old one to replace my decrepit WRT54GL.  Although the E4200 is a very good piece of hardware there are certain reasons why it is unlikely that DD-WRT will ever be able to extract the full speed out of it, but people on the forums are saying it should be good for 100mbps over wireless, which is good enough for my use.

1) 30-30-30 Reset
The very first thing you must do is a 30-30-30 reset.  This should be done before and after the firmware upgrade as this clears contents from NVRAM.  If you don't do this, remnants of information may be left in the NVRAM and cause conflicts with the new firmware.

A 30-30-30 reset is as follows.  First with the router switched on and everything else unplugged, hold the reset button in for 30 seconds.  While still holding the button in, pull the power cable out and wait another 30 seconds.  Finally while still keeping the reset button pressed in, connect the power and wait for another 30 seconds.  In all, you should have held the reset button in for 90 seconds continuously.

2) Inital Flash
The next step is an initial flash, which flashes a base version of DD-WRT onto your router, which you may then upgrade later to a version with more features.  The process for flashing can be a little different for each router and may also require different files, so it's strongly advised that you visit the DD-WRT Wiki and look for instructions relating to your specific model.  I'll be using this page for my E4200.  Download the initial flash file, then disconnect all your network connections, turn off wireless and connect the router to be flashed by ethernet cable.  The file I am using for the initial flash is:
ftp://ftp.dd-wrt.com/others/eko/V24-K26/svn16773/dd-wrt.v24-16773_NEWD-2_K2.6_mini-e4200.bin

Load up the web interface for the router you are flashing.  The exact address for these vary depending on model and manufacturer, but in general Linksys stuff can be accessed at http://192.168.1.1  Once you have logged in, find the administration tab and click to browse for and upload the firmware.


Click start and leave the web page open.  Flashing only took about 30 seconds for my router, but the DD-WRT guys say to wait for at least 5 minutes just to make sure.  When that has passed, click Continue and you should be greeted with a screen similar to this:



When prompted for a login, the default username is root and the password is admin.  These can both be changed later.

3) 30-30-30 Reset
As a matter of course, disconnect all network cables and clients then perform another 30-30-30 reset as outlined in step 1.  This will ensure that the NVRAM is cleared of any settings left by the stock Linksys firmware.

4) Upgrading to a Bigger/Newer Build
This step is optional since the initial build you just flashed should be pretty much fully functional, but you will probably want to flash one of the later builds for increased performance, stability and features.  Routers have a limited amount of flash memory, so this will dictate which build you can use.  Check the wiki to see how much flash and RAM your device has.  Recommended builds are sometimes listed in the Wiki for your device, but may not be up to date, so check this thread for recommended builds.  Pay special attention to details in the Wiki about any special requirements your device may have, such as the E4200 must have a build that uses no more than 60KB NVRAM, as denoted by -nv60k in the filename.  Do not use micro builds as they are reported to brick Wireless N devices.

The version I am upgrading to is:
ftp://dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2011/12-12-11-r18000/broadcom_K26/dd-wrt.v24-18000_NEWD-2_K2.6_big-nv60k.bin

Now that you have your device with the initial file flashed and have performed a 30-30-30 reset, you can proceed to upgrade the firmware.  Enter your router's address in your web browser to reach the interface.  If prompted for a username, it is root and password is admin, then find your way to the administration tab and then firmware upgrade from within that.  Again, making sure all other network devices are disconnected and wifi is shut off, select the firmware to be flashed and press upgrade.  Keep the browser window open all the time while the upgrade is in effect and wait for about 5 minutes.

5) 30-30-30 Reset
After 5 minutes has passed and your router has come back online, perform one last 30-30-30 reset.  You are now up and running with DD-WRT and can move on to configuration.


Configuring DD-WRT as a Wireless Bridge
Setting up DD-WRT to connect to your other wireless routers is very easy but we need to change some settings while the router is connected to only your computer as if you try to add it to the network with it's default settings it will likely cause an IP address conflict.

1) Ensuring your wireless is turned off and the only device connected to your computer is the one you just flashed, enter http://192.168.1.1 in your browser to reach the DD-WRT setup page.  At this point it will probably prompt you to enter a new username and password from the last 30-30-30 reset.  Do so and then click the setup tab.

2) Set the WAN connection type to disabled.  Next under the Network Setup header, change the local IP address to an unused one.  Since most Linksys routers default at 192.168.1.1, if we leave the DD-WRT flashed router with the same address it would cause a conflict.  You only need to change the number in the last segment of the address.  I have mine set at 192.168.1.3.  The gateway address should be that of your router that provides the internet connection.  Net mask should be left at 255.255.255.0 unless you have specific needs.  Local DNS is fine if it is left empty.  Check the option, Assign WAN port to switch.  Disable the DHCP server.  Click save settings and then apply.

Click for larger image.
Left page shows defaults and right page shows example settings for wireless bridging (your default gateway and IP settings may vary)


3) Once those settings have been saved and applied, you will have to enter the new address of the router into your browser to continue working in the GUI.  Once you are back into the setup, click the Wireless tab.  Depending on the hardware you have, you may see one or two sections.  Since I am using the 5GHz link, I disabled the 2.4GHz radio.  To set up the 5GHz radio to connect to my other router, set the wireless mode to client bridge, select your network mode from the drop down (5GHz was disabled by default) and under wireless network name (SSID), enter the name of the router you wish to connect to exactly.  Next go to the wireless security tab and enter the wireless key that you use to connect to the main router.  For Wireless N connections the encryption should be set as AES as TKIP will revert to Wireless G speeds.

Click for larger image.
Left page shows defaults and right page shows example settings for wireless settings (page may differ depending on DD-WRT version and how mant radios your device has)


4) Save and apply all settings.  It may also help if you reboot or power cycle your router.


Conclusion
It's pretty much as simple as that.  Of course I have a little experience with networking now so I am familar with most of the terms mentioned in the firmware, but as long as you know the IP address of your modem/router (which is referred to as the gateway) and you know of an open IP address to assign your router, you are good to go.

There are alternatives to this method.  You can actually buy wireless ethernet bridges from the likes of Linksys and Netgear, but in my past experience I found that they were often much lower spec than the routers and the performance just isn't that good.  All they do is flash existing hardware with their own wireless bridge firmware on it and that's pretty much all that device can do.  Flashing your own router with DD-WRT is a much better choice simply because of the amount of options and flexibility DD-WRT gives you.  For example if you ever decide to change how your network is set up or go wired instead of a wireless bridge, you can change some settings in the router and have it do something else ie working as another router or a switch, unlike off the shelf wireless bridges which tend to have such restrictive firmwares that you can't do anything else with them.

There are of course some alternatives too.  Possibly the easiest method of networking between floors without wires is with power line adapters, but I can't comment on how secure they are, much less the performance of them.  Last thing I heard was that the performance was pretty awful.  Basically they use your house wiring and transfer data over the mains.

Of course nothing beats the speed or security of Cat 6 cable and a couple of gigabit switches, but if like me you only need a means of getting internet data from one place to another this works quite well, and the local transfers are very fast over ethernet too.

Thursday, 17 November 2011

Super Turbo Meet 27-29th November

What started out as a weekend in London with Waveskill to play Super Street Fighter 2 Turbo in the Casino (an arcade), has eventually mutated into a meet up with various other players, and a tournament thrown in for good measure.

I'll keep this short and to the point.  Myself and Waveskill were travelling down from Chesterfield and Sheffield to London for what should have been the weekend, however due to working arrangements, we shifted it forward a day and extended it by a day too, so we will be on the road from 27-29th November, which is Sunday, Monday and Tuesday.

I found out the other day that there is a tournament happening in Bristol, which just so happened to be on one of the days we were going to London, so we decided to make a detour and take part in the tournament.  More information about the tournament can be found here.  Here is a brief plan on what we intend to do, and where we intend to be:

Sunday 27th November - Sodium Showdown 4 @ Bristol
We will be leaving earlyish to try and avoid the traffic, although the exact time hasn't been decided.  I'd like to arrive before 12:00 which means setting off at around 08:30 since I am picking up Waveskill, but the venue doesn't open until 14:00, so not sure what I will do to kill time.  Perhaps if anyone else is going to this tournament we could meet up and go and do something.  Drop me a message on Xbox live if you are.

This tournament features Blazblue CS2, Mortal Kombat 9, Ultimate Marvel Vs Capcom 3, SSF2T (HDR I presume), SF3 3rd Strike and of course Super SF4 AE.  Entry to the venue is just £3, and it's only £1 to enter each tournament, so don't expect big cash prizes.  I haven't heard of this event before, but I presume it's going to be pretty small scale, so hopefully I can finish top 3 again!  The line up is quite big for an event I haven't heard before, so I hope they aren't being overly ambitious.  The organiser has also said, "Arc System Works EU will also be there with copies of BBCS and AH3!", so if that means free copies, then I'm definitely there.

Once the tournament is over, we will be heading over to London in the evening where we are staying at the Cumberland Hotel Harrow, which is the I used in 2010 for SVB.  £92 for 2 nights is reasonable, but not including breakfast.  The hotel is in a good location with shops, cash machine and train station all within walking distance.  It will take around 2 hours from Bristol to London, so I'll hopefully set off for the hotel at around 19:00 providing the HDR tournament is done, and spend a couple of hours in the on-site bar, then have some locals in the hotel room once we reach kicking out time as I'm bringing my Xbox.

Don't forget to check the tournament information here

Monday 28th November - Super Street Fighter 2 Turbo @ Casino
Once we've sobered up and had something to eat, we'll head over to Casino.  It's about 45 minutes drive from Harrow and I intend to stay there most of the day, or if the likes of orf, kaos flare or Ryan Hart are there, as long as my money lasts.  I'm guessing we will be at Casino from around late morning (10:00?) to early evening, after which we will check out some of the pubs (around 3 in staggering distance) and probably make our way back to the hotel close to kicking out time with some more HDR casuals.

The address for Leisure Casino Centre is 69 Tottenham Court Road.  Check the full information here or Google maps here.

I will probably be meeting Herbalholic at some point for some arcade ST action, and there's the possibility of TryDodgingThis and/or AnxiousBrute showing up too.  You can get the tube to Goodge Street Station, and as you exit the station turn right and there is a KFC literally next door with Casino being one of the next buildings.

Tuesday 29th November - Super Street Fighter 2 Turbo @ Casino part 2
I haven't planned much for Tuesday but it will likely be a similar setup to Monday with us being in Casino a good part of the day, but we might take some time out to check out some other things, or if anyone is kind enough, to crash at their house and play some locals.

There will be no hotel casuals on Tuesday as we have to check out around 10:00 so we won't have a base for the day.  We will probably make our way back around 20:00 as I'll be dropping Waveskill off, so I'm allowing 3 hours for the return trip.

Don't forget that if you drive into central London, you may get hit with a £10 congestion charge per day, unless you drive a milk float.

If anyone wants to come along and meet up with us at some point drop me a message on Xbox live, by text or facebook.  I also have a twitter now, so keep an eye on that for updates during the 3 days as to what our plans are and where we will be.
https://twitter.com/#!/Zero1_ST

Hope to see you there.

Saturday, 23 July 2011

New Pickup: Victor HP-FX500/JVC HA-FX1000

Some time ago I was looking for some new IEMs to replace my expired Sony MDR-EX90LP.  It was never going to be an easy task, because the EX90 were a very nice pair of earphones.  They were very comfortable, looked great (I'm not exaggerating when I tell you people would stare at them trying to find out what brand they were as I walked past), had very nice build quality, and a nice tone and fair sound stage.  The only thing I could say against them is that they didn't have quite as much bass response as my previous Sony earphones.

Victor HP-FX500, originally only available in Japan, but also sold as JVC HA-FX1000 for almost double the price in the West.  Bargain!

In fact I liked them so much that as soon as they started to show signs of dying (the left earpiece would lose connection, which I found was due to a loose connection in the mould where the single cable splits into two), I looked around online to try and buy another pair.  Sadly, since I had owned them for around 2 years, the range had been revised, cycled out and replaced by the MDR-EX500, which didn't look as comfortable.

The Sony started to die a little while after I bought my K701, so my first point of call was AKG.  I checked out their range and had set my sights on the AKG K370, which cost £50, the same as what I paid for the Sony.  Knowing that AKG is typically more expensive than the equivalent products from other major manufacturers (Harmann is a large company, but in comparison to Sony, could be considered small), and that the K370 also had an inline remote control, I made the assumption that the audio quality might not have been quite as good as my old Sony, so I decided to aim higher and splash out a little more.

During my searching, I came across some very high end/expensive earphones called the Victor HP-FX700 which had gained a lot of attention for being made from wood.  Not only was the enclosure made from wood, but the cone itself was made from a very thin layer too - the theory is that it would help replicate the sound of instruments more accurately.  I knew as soon as I saw them that I wanted these, but at 29,000 yen ($370/£230) the price was too high for me to justify for in ears.

Fortunately, I learned that Victor (known as JVC in the West) offered a less expensive version called the HP-FX500 (which I think was simply an earlier model with the FX700 being a beefed up version released later, rather than the FX-500 being a trimmed down FX700).  The main difference being the driver size, and aesthetics, but at a much more reasonable price of 10,000 yen (or 13,000 yen/£100/$170 by the time I had imported them).
It wasn't until I took these photos that I realised the logo on the earphones is the same logo as HMV use.  HMV Japan is owned by JVC Kenwood holdings.

Victor HP-FX500 First Impressions
The retail package for the earphones comes with 3 sizes of silicone tips, a medium sized pair of foam tips, carry case and an extension cable (since the main cable is just 0.8M long) - pretty standard fare as far as earphones go.

The earphone cable is quite short, which I presume is so that people can connect them to remote controls for portable players and mobile phones.  An extension cord is supplied, but it's thinner and feels of a lesser quality than the main cable.  If you believe things like this make a real difference you might prefer to buy your own extension cable, but I couldn't tell a difference between using the extension and not.  On the subject of the extension cable, a minor annoyance is that the combined length is a little too long to have the cable hanging free with a player at pocket height.  I tend to find the cable swings around what with the weight of the connectors, so you will probably end up bundling it in your pocket.

The headphone cable is the traditional "Y" type, meaning the left and right ear pieces have equal cable length, unlike the more recent designs where the left cable is shorter than the right, so the cable sits on the left and the right earpiece cable goes behind your neck.  I prefer the "behind the neck" type of headphone cable since you can pull the earpieces out when needed and they sit in place around your neck, in contrast to the "Y" cable which you'd have to fuss around and put in your pocket or something.  A minor point sure, but one that could save daily frustration.

They are as comfortable as most other earphones, but my ears felt a little irritated after long term use, but that could be simply because I haven't used canal style earphones for months.  I gave the foam tips a try and they were a lot better, although I prefer the sound I get from my Sony silicone tips.  I also found that after extended listening that they had gradually worked loose since I don't insert them fully into my ears but that might be something to do with the size of the Sony tips, being designed for 13mm drivers and the FX500 being 8.5mm.

At 16 ohms the FX500 are very easy to drive, as is the case with the virtually all in ear earphones and have a frequency response of 8Hz-25kHz, which seems to be about what to expect from decent IEMs.  Something to note about frequency range though.  Frequency range, and frequency response mean different things.  The frequency range tells us the spectrum of frequencies the driver can produce, from lowest to highest.  Frequency response tells us how loud each frequency is played (or how well the driver responds) when a continuous volume sine sweep is played.  This means that you can get some product A can have a frequency range of 25Hz-20kHz and product B can have a range of 5Hz-25kHz, yet it's possible product A will have better bass response.  It may be louder for a given volume, but the driver won't be able to go quite as low as product B.
Check out my section on frequency response graphs

These graphs can be misleading with the dB level since drivers have different impendances, and testers may use different sound levels.  What's important here is the shape of the line.


Out of the box the FX500 come with the medium tips attached, which I immediately switched over to the large tips.  The reason for the change was purely sound related, as in the past I have found I get better bass when using the larger tips, and sure enough I did some testing and it still held true for the FX500.  Using the largest provided the best bass out of the supplied tips, and out of interest I tried the tips from my old Sony EX90 which gave even better bass still.

I would have to put these earphones in the "coloured sound" category, as they aren't neutral.  They exhibit a smiley face style frequency response, which means they have better than average bass and treble response, but the side effect to that is that it can often feel like mids are lacking.  It's not always the case that mids actually are lacking, but more often a case that the bass and treble boost creates that effect.  That's not to say that the sound is flawed or that you would be wishing for more neutrality, this is my opinion purely from an analytical point of view.

The sound signature of these earphones is highly enjoyable.  The bass is deep, detailed and strong.  It's almost akin to the effect a subwoofer gives at low levels but without sounding muddy - an impressive achievement, especially for earphones with a 8.5mm driver.  The treble sits at a good level, giving the higher frequencies a clean, pronounced sound without causing additional silibance (the hissing sound at the end of some words in recordings).

Some people have commented that the treble can be fatiguing, but I have not found this using my Sony tips.  There are also aftermarket foam tips from Comply that have a "wax filter" that also acts to attenuate treble, so if it is an issue, there is always that option.

To sum it up, the sound is crisp and powerful but would have benefitted from a slight boost to the mids.  You will particularly enjoy these earphones if you listen to any bass heavy music or use them outside where bass typically gets drowned out.

The only real sonic weakness of these earphones is the slightly recessed mids, but if that's the price you pay for deep, punchy bass without vocals becoming muddy and crisp treble without silibance, then it's a price worth paying.  I may experiment with some after market tips and post my findings.

Thursday, 23 June 2011

Upgrading the Wireless LAN on a Vaio - Follow Up

As you may have read last time, I had taken on the task of upgrading the wireless card in my Vaio to take advantage of the new 3 stream 450mbps wireless N routers coming out.  The second part of this task was to actually get one of these routers, and get everything running smoothly at the new link speed.

The router I decided to go for is the Linksys E4200.  It's very small and unoffensive, with no glaring LEDs flashing on the front as is the case with so many routers these days.  Apparently, blinding blue LEDs are cool.  No, instead the activity lights on the E4200 are hidden on the back as part of the ethernet ports.  They don't emit much light at all, but you can even turn those off if you like.

Setup was really quite easy.  I never bother with the installation CDs and I just jumped straight into the web interface.  I was surprised to be confronted with a page that looked as though it wanted to force me to install the Cisco Connect software, but there was an option to bypass that.  Something along the lines of, "Continue with an unsecured network".  I guess they are trying to frighten ordinary folk into installing their (presumably dummy proof) software.


Once I had set up most of the stuff using the supplied CAT5e cable (which was nice since it saved me some rummaging), I enabled the wireless and connected.  The moment of truth aaaand....  It connected at 300mbps.

All kind of things were going through my head at this point.  Was the antenna supplied (as a free gift) with the wireless card compatible with 5GHz?  Had the antenna broken once I put the laptop back together?  Did it simply become disconnected from the wireless card?  Are my router settings wrong?  Do I need to do a fresh install of the drivers?

It was frustrating stuff, and worrying thinking of what I might have to do to put it right (ie installing a new antenna - again).  I reviewed all my settings.  I know from researching a bit before hand that the 450mbps link rate is only available on the 5GHz band at 40MHz width, so I set the 5GHz radio to enabled at 40MHz width, disabled 2.4GHz entirely and set the network mode to N only.

Still no joy.  So I pulled up the wireless connection info to see if while I was messing with the settings, if I could find the right combination to get the 450mbps link rate.  I didn't manage it, but as the router was saving its settings, I noticed the link rate jump up from 300mbps to 450mbps.  That was a big relief.  At least now I knew the wireless card was working right and was able to pick up the 450mbps signal.  I googled around a bit and found some suggestions saying that I need to go into the properties for my wireless adapter and set the channel width to auto, otherwise it will force 20MHz, which I had done previously.

There isn't much worth changing in the wireless adapter driver, but I recall a feature called WMM being enabled in the router, but in the wireless driver it was set to disabled.  I don't see what correlation this has to the link speed (since it's just software QoS), but I set it to enabled in the wireless driver and the link speed jumped up to 450mbps.
The upgrade was a success.  Can you believe it?  I can't.
Of course wireless is subject to things called walls and distance, so I unfortunately don't get the 450mbps speed at the other side of the house.  That said, I still get 240-270mbps of rated speed, which is a huge improvement over the embarrasing 108mbps the so called "Super Hub" that Virgin supply.  While I haven't done any proper bandwith testing yet, I do know that I can get my full 100mbps download speed, which was my main motive for performing the upgrade.

The Virgin "Super Hub" on the left, and the Linksys E4200 on the right.  Same location, same wireless card.
This was of course, an expensive upgrade overall (£130 for the router and another £30 for the 3 stream wireless card), but for me tinkering with stuff like this is as much a hobby as it was something that needed to be done.

I had intended to upgrade my network for some time now and never got round to it.  Soon I will buy another E4200, flash DD-WRT on it and replace my old WRT54GL to be used as a wireless bridge, so that then my Xbox 360 and PS3 can also have a taste of 100mbps.  I might actually bother downloading demos then.

At almost half the rated link speed, the Intel 6300 and Linksys E4200 still manage over 11MB/s

Monday, 20 June 2011

Upgrading the Wireless LAN on a Vaio

Just recently, I upgraded my internet connection to 100mbps, but I found I wasn't getting the full speed over wireless.  I was downloading at around 80mbps max despite the fact both my wireless card in the laptop, and the modem/router itself are both wireless N devices and connected at a supposed 300mbps.

Surely if it's connecting at 300mbps, and is in the same room, it should reach 100mbps download no problem, right?

That's what I thought too.  I decided to look into it, and it turns out that this is just the way wireless is.  There are a number of reasons for this and I don't know them all, but I'll offer some suggestions as to why.  The first thing that I found is because wireless is effectively half duple - that means it cannot transmit and recieve at the same time, so that halves your bandwith to 150mbps right there.  The next big one is the CPU in the router itself.  Right now they are operating at around ~500MHz and it has to deal with everything from routing to encryption.  Another thing that will have an effect on quoted speeds are retransmissions due to transmission errors.

The theoretical quoted output of 300mbps is something you never see in real world situations, and in fact, you are lucky if you get 1/3 of that.  Just take a look at this chart.  Not even the fastest dual band wireless N device breaks 90mbps, so where does that leave me?

Well fortunately there are wireless N devices starting to come out that offer higher bandwidths up to 450mbps (which I'll take to mean a real world maximum of 150mbps if my previous experiences are anything to go by).  It is much the same as the current 300mbps wireless N, but where the 300mbps variant of wireless N uses 2 antennas (known as dual/two band/stream), 450mbps uses 3 antennas.  However as you might expect, it's not simply a case of buying a three stream router and expecting it to work.  You need a wireless card with three antennas too.

That presents me with a little problem.  Swapping a two stream wireless card like for like is easy.  Just take the back cover off, remove the old card, install the new card and connect the antennas.  However if I want to upgrade the wireless in my laptop to three stream, not only do I have to take the back off to install the card, I also have to remove the media keys, keyboard, LCD assembly and eventually the LCD panel itself to install the new antenna, since they are installed behind the display.  This was an ambitious upgrade, and essentially entailed a complete teardown of my laptop.

This guide details the process of upgrading a Vaio F12 (but should also work for F11 and F13 models) from the stock wireless card (in this case a dual stream 300mbps Intel Centrino Advanced-N 6200) to a three stream 450mbps Intel Centrino Ultimate-N 6300.  If you are simply swapping a dual stream (2 antenna) card for another dual stream card, you may still find this guide of use.

Please note that this upgrade may not be an option for some laptops.  Some manufacturers (eg. HP) lock the BIOS to only recognise certain brands and model numbers of wireless cards and will reject upgrades.  Even if this isn't the case, there is always the possibility that there will not be enough room in your case, cable path or behind the display to install the extra antenna.  Proceed at your own risk.


The Upgrade Process
Replacing the wireless card is easy, but the difficult part is installing the new antenna.  Do not proceed if you are uncomfortable with taking your LCD apart.

Make sure that you have earthed yourself and that you are not wearing any clothing that generates static electricity.

Things you will need:
  • A PZ0 Screwdriver.  Must have a thin shaft to fit inside the recessed holes.
  • Something thin and flat to push tabs in (eg a flat screwdriver).
  • A knife or something sharp to remove LCD screw covers.
  • Some sticky tape (not required on the Vaio if you use the original sticky tabs).
  • The service manual or a laptop with this website for more detailed information.
  • A three stream wireless card (eg Intel Ultimate-N 6300).
  • An extra antenna.
  • Drivers for your wireless card.
  • A backup of your drive just in case.
Notes:
The service manual is for the Vaio VPCF1 series, which appears to cover the F11, F12 and F13.  It contains exploded views and part numbers, so it's worth keeping just in case.
Drivers should be downloaded before hand unless you plan to connect via ethernet.

Please refer to this website for detailed images on opening the laptop.  It's fairly simple, so I shall just talk through the process.  Refer to this other website for details on removing the LCD later.

Installing the Wireless Card
1) Before you start doing anything to your laptop, create a system image and restore disk Windows backup and restore.  This can be found in Start > Control Panel > Backup and restore.

2) Next go into the device manager and uninstall the old wireless card.  You can get to this by right clicking the Computer icon and selecting Properties.  In Windows 7, there is a link to Device manager in the top left of the window.  Alternatively you can press the Windows key and type device manager in the search box.

Expand Network adapters, right click your wireless card and choose Uninstall.  When the next prompt is shown and it asks if you would like to delete the driver, select yes if you are installing a wireless card that is a different model or brand, or no if the wireless card uses a unified driver (for example, the Intel Advanced-N 6200 and Ultimate-N 6300 use the same driver).


3) Shut down, then remove the power cable and disconnect the battery.  I waited a few minutes with the battery out, and then held the power button in for about 10 seconds to drain any remaining power.

4) Now remove the DVD/Bluray drive.  This is secured by two screws, one in the top left near the power button, and one to the left of the RAM cover.  These have 3 small dots above the hole.

5) Proceed to remove the HDD.  Looking at the HDD cover, there are two screws at the bottom, remove these.  Again these have 2 small dots above the hole.  Once you have removed those screws, gently slide the door toward you to reveal the HDD.  Remove the two screws at the top securing the HDD and slide it left.  Once it is free from the connector, lift it out.

6) Remove the RAM cover.  The screw that secures the RAM cover does not actually come out as there is a retaining clip under it.  What you have to do here is unscrew the door as best you can and then lift it up from the screw side (you should be able to slide a nail under it).

Back in the lab.  Removing the HDD, BD and memory cover before removing the back cover

7) Remove the remaining screws from the back cover.  I placed them on a table in the same position that I removed them from the laptop, but it would be better to draw a quick diagram to save confusion.

8) Now to remove the back cover.  This was tricky at first as I wasn't sure what to expect.  The bottom 1/3 of the cover felt as though it was still secured by something.  I thought that maybe there were screws under the rubber pads but that wasn't the case.

Joe Bleau suggests working from the HDD side and carefully sliding the cover.  When I tried this it felt like it wasn't working (perhaps I was doing it wrong), so the method I used was to start from the opposite end and run my fingernail down the front of the case carefully forcing it apart, working from right to left.  I stopped just as I got to the HDD bay and lifted the case at the right hand end a little which also seemed to lift some of the PCB with it.  With the PCB clear of the lower half of the case, I was able to slide it right (as suggested) and get the back cover off.

I suggest going with the original instruction of Joe's of , "Starting from the hard drive bay side, slide the cover, shake & bake with care & patience & remove the cover."

Patience is definitely the key here.  Fortunately getting the case back on is rather easy.

9) You should be able to see the wireless card easily.  It's just to the left of the RAM and up a little.  Remove the screws securing it and slide it left to remove it.  Carefully turn it over and make a note of which antenna is connected to which port on the board.  The Intel boards are numbered.  It might not even matter which port you connect the antennas to, but if you can connect them to the same numbers, you might as well, right?

Wireless LAN card with the two antennas under it

10) Disconnect the antennas from the original wireless card and then connect them to the new one.  It's a very tight connection and you will find you have to apply a lot of pressure, so just be careful.  Once they have snapped on to the new card, slide it into the slot carefully.

11) Work back from step 8 to reassemble the laptop.  Put the back cover on and install all the drives and screws you took out so it is in original condition.

12) Power on and install the driver/software for your wireless card to ensure it works and is accepted by your laptop.  There is no point going to the trouble of installing a new antenna if the laptop BIOS is set to refuse other brands or models of wireless card after all.

If you are using a wireless card that uses a unified driver (like my upgrade from an Intel 6200 to 6300) and you chose not to delete the driver when you uninstalled it earlier, Windows will detect the card and install the driver automatically.  All that was left for me to do in my case was to enter my wireless password and  set my static IP settings.

If you were upgrading an old two stream card to a newer two stream card, this is all you need to do up to this point.  All further instructions will relate to installing a third antenna for three stream cards.

Installing Another Antenna
1) Power down the laptop and remove the battery and AC adapter.  Hold the power button in for around 5 seconds to drain any remaining power.

2) Flip the laptop over and remove the screws show below.  You do not need to remove any drives for this part of the install, just the battery (for safety, but there are some screws under that which we need to remove).  Removing these will allow us to remove the keyboard, media keys/speaker cover and eventually the LCD assembly.

There are two screws under the battery that you need to get.

3) Turn the laptop back over and open the LCD in the normal positon for use.  Starting with the media keys/speaker cover, start from the side nearest the power switch on the right.  Using a sharp object or your fingernails, push it in and gently lift upward.  Do the same to the left hand side, then run your fingernails across the front of the speaker cover to push in the rest of the tabs.  Carefully lift it upwards once it is free.  You may need to move it around a little or angle the LCD to get it free.

Speaker cover removed.  Excuse the dust, it gets everywhere once you've had the back cover off.

4) Now to remove the keyboard.  Carefully lift up one corner for example near the escape key, then insert your thumbnail and work toward the bottom of the keyboard.  You should feel the tabs pop out.  Do the same for the opposite side.  Carefully lift the keyboard up slightly, and pull it towards the LCD at the same time.  You should feel it pop free of the chassis, but be careful not to damage the connector.  Turn the keyboard over so it is resting on the palm rest.

Now would have been a great time to install a sexy backlit keyboard.  Why do I never think of these things ahead of time?

5) Next we have to remove the media keys as the wifi antennas are actually routed underneath them.  Just remove the three wide screws and unclip the power button connector on the right.  This will give us enough space to move the media keys out of the way so we can lay the new antenna cable.

6) Now remove the screws securing the speakers.  Do not worry if your right speaker only appears to have one screw, this is because it is secured from the other side with the screws that hold the back cover in place.  Fold the speakers inward so they are resting face down.  This will give you access to the LCD hinge screws, but we will come to that later.

7) Now that you have the speakers and media keys out of the way, you should be able to disconnect the wireless antennas and the LCD cables.  The LCD cables are on the left.  The leftmost cable should be pulled upwards gently, and the two smaller cables should slide towards the LCD itself.  It's a really fiddly job and you may find it easier if you pull the cable out of it's trench first.  Moving over to the wireless antennas, this is equally fiddly.  I found it easier to ease them out with a sharp object, or if you want to be careful, whip the back cover off and disconnect them there.  If in doubt, knife them out.

These are the only cables you really need to bother removing

8) With the LCD and antenna cables free, you can now seperate the LCD from the base of the laptop.  If you haven't already, move the speakers aside and that will reveal the hinge screws, 2 on the left and 2 on the right.  They are really long screws and tougher than the others to remove.  Be sure to support the weight of the LCD assembly with your other hand while unscrewing the hinges.  Get someone to help is possible, or use a magnetic screwdriver to make life a little easier.  Once that is done, you should be able to pull the display free from the base.

This is how the iPad was born, when Mr. Jobs thought, "Hey, let's take a laptop and remove everything good about it".  Probably.

9) Now it's time to work on removing the bezel (that's the surrounding of the LCD).  It is very flimsy, so be careful at all times.  First take a sharp object for example a knife and prise out the screw covers.  There are 4 in total, two square covers at the bottom left and bottom right, and 2 round covers in the top left and top right.  Once those are out, remove the screws and place them somewhere safe.

Now work on unsnapping the bezel.  It is held in place by a number of tabs.  I suggest working it from the top left or top right where the round screw covers were and push it apart with your fingernail.  Once you have got a bit of a gap started, go around the bezel unhooking the tabs by pressing inward with a little pressure.  This is a long and frustrating job and is largely trial and error.  Just take your time and be careful not to apply pressure to the LCD itself or scratch it.  I had the most trouble unsnapping the lower half of the panel, in part thanks to the hinges.  It's a similar story with the removal.  Once you have everything unsnapped, pull the bezel toward you (if the hinges are facing away from you) and gently wriggle it free.  This is not an exact science, but you can rest easy knowing that putting the bezel back on is about the easiest part of this whole upgrade process.

10) Now the bezel has been removed, it's almost time to install the new antenna, but first we have to unscrew the LCD panel so we can get behind it to install the new antenna.  Just remove the four screws from the bracket securing the panel to the back of the case (two on the bottom left and two on the bottom right).  When it comes to reinstalling these screws, just look for the arrows pointing to the holes in case you forget where they came from.  You may also use this chance to disconnect the LCD from the inverter so you can completely remove it from the case, which would make life nice and easy, but I chose to leave it connected as the cable was slack enough to give me a enough space to work with.

The hinges seemed more trouble than they are worth to remove, but the new cable just pushes in from the side.

11) With the panel removed (or propped up on a roll of tape in my case), we can go about laying the new antenna cable.  We will concentrate on the connector end because we don't want too much slack cable in the laptop itself - slack cable is easier to store in the LCD as there is much more space.  Align the ends of the connectors according to the mounting position on the wireless board, for example the third antenna connector on my Intel 6300, is between the first and second, so the connector for the third antenna needs to be somewhere between the existing cables in length.

Once you have the connectors aligned as you want, push the remaining cable into the side of the hinge and follow the existing cables to see how it's routed.  This sounds like a pretty vague instruction, but once you see the hinge for yourself, you will know exactly what to do.  This method will be pretty easy if you have removed the panel totally, but if like me you was lazy, you might find it easier to run the whole cable under the panel first, route it through the hinge and then pull it through to suit the required length.  This part is mostly trial and error.

You may notice something that look like tabs.  These are very sticky, and if you pull them up carefully, you can run the new antenna cable under them with the existing ones to keep it nice and tidy.  If you don't have such tabs, normal sticky tape will probably do the job.

Be careful when lifting these tabs.  They are so sticky that they might tear.

12) Once you have your cable routed, it's time to stick the antenna on.  The suggestion is to place antennas at least 12cm apart.  I placed mine somewhere in the middle as it allowed me to get a decent distance from the existing antennas as well as not getting too close to the LCD inverter.  Unfortunately the cable is quite stiff and very curly so the finished result looks kind of rushed.  I tried to route it on the inside of the other cables but it didn't quite work out.  It probably would have been better to go to the right of the cables instead.

Rest your LCD panel in it's mounting position to make sure it fits flush and isn't affected by the new antenna (eg it's not resting on it).

Avoiding a cable crossover was next to impossible thanks to how short the cable for the antenna on the right is.

13) Work back from step 10 to get your laptop back into normal working order.  Pay particular attention at step 7 when reconnecting the cables associated with the panel (LCD cables and wireless antennas).  You may find that it's a bit of a tight fit when putting the antenna cables back into their trench due to the fact you have an extra one.  I was able to get around this by pushing them into the clips with a screwdriver.  Once you have worked your way back through all the steps, power on and enjoy your new speed, but remember that you need a three stream router if you don't already have one.

Not a bad job in the end.

Special thanks once again to Joe (check his website here) for his help.  Without his guide and the excellent links he gave me, I doubt I would have had the confidence to attempt this upgrade.