W1zzard
05-24-2004, 07:59 AM
[pagE=Introduction]
Introduction
http://www.techpowerup.com/articles/34/images/flashchip.jpg
The video is BIOS is a small piece of code (typically <64 KB), which is stored inside a small chip on your video card. When the VGA card receives power, the BIOS is loaded into system memory and immediately executed by the CPU.
On startup, the BIOS initializes the video card:
Initialize the GPU
Detect number of memory chips, chip size, access mode
Enable memory access and set proper timings
Detect if external devices (analog VGA, DVI, TV-out) are connected and enable them
Set core and memory clock
Enable power management
Set fan speed (if supported by the board)
After these tasks are completed, the display will turn on and display what's happening next - usually the motherboard's POST screen.
Once you boot into Windows, the display driver takes over all video functions and the BIOS is no longer used. However, it remains accessible for execution. Actually, manufacturers like ATI added a handful of functions which can be invoked from within Windows, for example to change power management settings on a mobile GPU.
Why flash the BIOS?
Originally, the video BIOS was stored in a ROM (Read Only Memory) and could not be replaced. Nowadays it is located in a flash memory chip (that's why it's called 'flashing').
The reason for this move was that like every other piece of software, the BIOS had programming errors, or an issue was detected in the hardware for which a workaround had to be found. So the manufacturers just gave out an updated BIOS to a customer to fix the issue.
The more interesting use is to mod cards. For example, on the X800 Pro VIVO you can unlock additional pipelines by changing the BIOS. How so? Inside the BIOS is a small block of information which tells the GPU how many pipelines it should run at. If you replace the original BIOS with a BIOS which tells the GPU "16 Pipelines!" .. well, then you are running 16 pipelines.
Another good use is to change the default clocks of the card. As you remember from above, the BIOS sets the core and memory clock. On the last page of this article we will cover the different BIOS editors and their use.
Sometimes a new BIOS increases performance as well. However, my personal experience is that this difference is rather small. However, if you do upgrade your video BIOS for this reason, make sure you run benchmarks before and after.
[pagE=Required Tools & Getting into DOS]
Required Tools
You will need the BIOS which you want to flash on the card. A good place to search is our ATI BIOS Collection (http://www.techpowerup.com/vgabios).
Next, you will need a flashing utility. A list of ATI flashing utilities can be found at the end of the ATI BIOS page.
[todo: add table with utils here]
How to boot into DOS
BIOS flashing is a very low-level process. A complex operating system like Windows only interferes with this. The hardware abstraction layer of Windows does not allow direct access to the hardware, except for system drivers. Also multitasking poses a risk. During flashing the BIOS chip wants a new piece of data every certain timeframe. What if Windows now switches execution to another process and puts your flashing on-hold? *poof* BIOS code inside flash is bad. If this is not detected, your card will be unusable. Even worse, what if Windows crashes during flashing? Good luck trying a reboot with only 50% of BIOS code.
Video card manufacturers have recently released Windows utilities which can flash from within Windows. Still, the more reliable method to flash a BIOS by booting into DOS.
The most common ways to boot into DOS are (in no particular order):
Floppy
CD/DVD
USB stick
HDD Partition with DOS installed
bypass startup files on Windows 9x
[page=Making a bootable floppy]
Making a bootable floppy
On Windows XP and up this is very easy.
Insert floppy into floppy drive
Open My Computer
Right click on floppy drive
Select "Format..."
Put a checkmark to "Create an MS-DOS startup disk"
Click on "Start"
http://www.techpowerup.com/articles/34/images/floppy.gif
Alternative
If you have an older version of Windows you can download the bootable floppy image XP creates here (http://www.techpowerup.com/articles/34/images/floppy.ima). Use WinImage (http://www.winimage.com/) to copy it on your disk.
Download and install WinImage
Open the downloaded floppy.ima file
Insert floppy into floppy drive
Click on "Write Disk". When using a brand-new floppy, click "Format and write disk".
http://www.techpowerup.com/articles/34/images/winimage.gif
Now that you have a bootable floppy, you will have to put the appropriate flashing utility and the BIOS on the disk. You do this by just copying the files onto the floppy.
Booting from the floppy
On many systems the default boot order does not check the floppy drives. To enable this, you go into your motherboard BIOS and find an option "First boot device" or similar. Change it to "Floppy", exit and save. Now the system should boot from your floppy.
http://www.techpowerup.com/articles/34/images/bootfloppy.jpg
[page=Making a bootable CD/DVD]
Making a bootable CD/DVD
http://www.google.com/search?hl=en&q=how+to+make+a+bootable+cd
Booting from the CD/DVD
On many systems the default boot order does not check the CD-ROM. To enable this, you go into your motherboard BIOS and find an option "First boot device" or similar. Change it to "CDROM", exit and save. Now the system should boot from your floppy.
http://www.techpowerup.com/articles/34/images/bootcdrom.jpg
If you have a SCSI drive, you will have to enable the adapter's own BIOS (option ist often called 'enable host bios') and also select the drive as Bootup LUN.
Now you have to select 'Boot Other' / 'Add-in PCI' / 'SCSI' or similar in your motherboard BIOS.
[page=Making a bootable USB stick]
Making a bootable USB stick
The easiest way is to use the HP USB Stick format tool (http://www.techpowerup.com/articles/34/images/SP27213.exe). It will work with any USB stick from any manufacturer.
Use the settings "FAT" and "Create a DOS startup disk":
http://www.techpowerup.com/articles/34/images/hpusb.gif
Extract this ZIP file (http://www.techpowerup.com/articles/34/images/USBImage.zip) and point the "using system files" location to it.
When the format is complete copy all files from that ZIP file onto the USB stick.
Additionally you need your flashing tools, just copy them onto the USB stick as well.
Booting from the USB stick
To actually boot from the USB stick you have to tell your motherboard BIOS to use it.
In your BIOS you will find an option which controls in which order boot devices are tried, or which lets you select what to try 1st, 2nd, 3rd.
We created our USB stick in HDD mode, that's why you have to select Hard Disk for the device and make sure it tries your USB "Harddisk" before your regular HDD (look for "Hard Disk Boot Priority").
http://www.techpowerup.com/articles/34/images/boothdd.jpg
On some strange motherboards the USB stick is detected as floppy so if the Hard Disk setting does not work, try the other USB- settings and ultimately try disconnecting your HDD and selecting 'Hard Disk' as first boot device.
http://www.techpowerup.com/articles/34/images/bootusbfdd.jpg
[page=Making a bootable DOS partition]
Making a bootable DOS partition
If you plan on regularly flashing Bioses, it is a good idea to create a new HDD partition with DOS on it. The advantage is that you have more storage available, that the boot times are considerably faster and that you do not have to start searching for your floppy/CD/USB stick every time you need it.
Harddisks are split up in so called partitions, which create logical disk drives with their assigned letters. Even if you have only one C: drive, you have one big partition spanning over the whole harddisk. Unfortunately, there is no standard way to make an existing partition smaller, to accomodate space for a new partition. However, 3rd party utilities like Partition Magic (http://www.google.com/search?hl=en&q=partition+magic) or BootIt NG (http://www.google.com/search?hl=en&q=bootit+ng) can do it.
In order to create a new partition you must have unallocated space of the size for the new partition.
To create a new partition, either go to Disk Management (Control Panel -> Administrative Tools -> Computer Management) in Windows or use the fdisk utility under DOS.
http://www.techpowerup.com/articles/34/images/diskmgmt.jpg
The new partition has to be created as primary, a good size is 32-64 MB. Next, you format the disk with the FAT filesystem (do not use NTFS).
Once you got the partition created and formatted, you somehow have to get the system files onto it.
[add text here how to get an operating system on the partition]
Booting from the Partition
Now with your bootable partition ready, you probably want it listed in the Windows 2000/XP boot menu. You do this by using a Windows command-line tool called BootPart (http://www.winimage.com/bootpart.htm).
Run it without any arguments and it will display a list of partitions on your system:
http://www.techpowerup.com/articles/34/images/bootpart1.gif
Find the right partition number in the output, in our case 2. Add it to the boot menu by typing:
bootpart partition_number image_filename displayed_name_in_bootmenu
The image filename is a file in which bootpart stores the bootsector of the partition. I like to use C:\boot.dos. So for our example we would type:
bootpart 2 c:\boot.dos DOS
http://www.techpowerup.com/articles/34/images/bootpart2.gif
I find the boot menu's default delay of 30 seconds annoying for day to day usage. That's why I set the timeout to 1 or 2 seconds (System Properties -> Advanced -> Startup & Recovery -> Settings -> Time to display the list of operating systems).
Whenever I need to boot into DOS, I press the down cursor key quickly before the boot menu comes up. Now the cursor moves down one option and the timout is stopped, so the menu is shown and I can select whatever I want to boot.
[page=Bypassing startup files on Win9x]
Bypassing startup files on Windows 9x
You have to press Shift+F5 when Windows is starting. The best moment to do this is when the "Verifying DMI data" message appears, right before the Windows startup screen is displayed.
http://www.techpowerup.com/articles/34/images/boot9x.gif
This hotkey works on all versions of Windows 95, Windows 98 and Windows ME. It does not work on Windows NT, XP and up.
[pagE=Instructions: ATI - DOS]
ATI: DOS
These instructions apply to both atiflash and flashrom, command-line syntax is the same. When using flashrom replace "atiflash" by "flashrom".
Download the BIOS file (ATI BIOS collection here (http://BIOS.techpowerup.com)) and put it on a bootable floppy/usb stick/CD. Check www.bootdisk.com on how to get a boot disk.
The ATI BIOS collection has a new feature which serves you a bootable floppy image or bootable iso CD image with the BIOS you want on it. Click on "Advanced" when in the BIOS list.
Download an ATI flashing utility (http://BIOS.techpowerup.com#flash) and put it on this disk too.
http://www.techpowerup.com/articles/34/images/atiflash.gif
Reboot your computer with the boot disk and run atiflash -s 0 oldbios.bin to save your old BIOS just in case you might need it at a later time.
Now run atiflash -p 0 newbios.bin Replace newbios.bin with the filename of the downloaded BIOS file.
If you are trying to flash a BIOS for a different card then you will get a security warning that the BIOS does not match your card. If you are absolutely sure that the BIOS is compatible you can use the -f parameter to force flashing. For example atiflash -f -p 0 BIOS.bin
Reboot your computer
Done
[pagE=Instructions: ATI - Windows]
ATI: Windows
To flash your BIOS from within Windows you have to use the ATI Winflash Utility, find it in our downloads section (http://www.techpowerup.com/downloads/Utilities/BIOS_Flashing/ATI).
http://www.techpowerup.com/articles/34/images/atiwinflash_small.jpg (http://www.techpowerup.com/articles/34/images/atiwinflash.gif)
The interface is pretty straightforward - load the BIOS image, click on program. Done.
Try closing as many programs as possible before the flash. It wouldn't be too good for your video card if your MP3 playing software messed up something with the sound card driver which displays a bluescreen and then halts the whole system.
[pagE=Instructions: NVIDIA - DOS]
NVIDIA: DOS
Download the BIOS file and put it on a boot disk. Check www.bootdisk.com on how to get a boot disk.
Download nvflash (v4.41 (http://www.techpowerup.com/articles/34/images/nvflash441.zip)) and put it on this disk too.
Reboot your computer with the start diskette and run nvflash -b oldbios.bin to save your old BIOS just in case you might need it at a later time.
Now run nvflash -f newbios.bin Replace newbios.bin with the filename of the downloaded BIOS file.
http://www.techpowerup.com/articles/34/images/nvflash.gif
If you are trying to flash a BIOS for a different card then you will get a security warning that the BIOS does not match your card. If you are absolutely sure that the BIOS is compatible you can use the -p and -u parameters to force flashing. For example nvflash -p -u -f BIOS.bin
Reboot your computer
Done
[pagE=Instructions: NVIDIA - Windows]
NVIDIA: Windows
WinFox
[page=Recovering from a bad flash]
Recovering from a bad flash
Use an old PCI card to boot your system while your AGP card with the corrupted BIOS is still installed. Your system should initialize the PCI card first. If this does not happen, remove the AGP card and turn the computer on with only the PCI card, go to your BIOS Setup and change the "Init Display First" option to "PCI". Now reinstall the AGP card. Your system should boot normally with the PCI card as primary display adapter. You can now re-flash the corrupted BIOS or use another one. Make sure you are flashing the right card by using the -i (ati) or -a (nvidia) command line option.
[pagE=Video BIOS Editors]
BIOS Editors
Introduction
http://www.techpowerup.com/articles/34/images/flashchip.jpg
The video is BIOS is a small piece of code (typically <64 KB), which is stored inside a small chip on your video card. When the VGA card receives power, the BIOS is loaded into system memory and immediately executed by the CPU.
On startup, the BIOS initializes the video card:
Initialize the GPU
Detect number of memory chips, chip size, access mode
Enable memory access and set proper timings
Detect if external devices (analog VGA, DVI, TV-out) are connected and enable them
Set core and memory clock
Enable power management
Set fan speed (if supported by the board)
After these tasks are completed, the display will turn on and display what's happening next - usually the motherboard's POST screen.
Once you boot into Windows, the display driver takes over all video functions and the BIOS is no longer used. However, it remains accessible for execution. Actually, manufacturers like ATI added a handful of functions which can be invoked from within Windows, for example to change power management settings on a mobile GPU.
Why flash the BIOS?
Originally, the video BIOS was stored in a ROM (Read Only Memory) and could not be replaced. Nowadays it is located in a flash memory chip (that's why it's called 'flashing').
The reason for this move was that like every other piece of software, the BIOS had programming errors, or an issue was detected in the hardware for which a workaround had to be found. So the manufacturers just gave out an updated BIOS to a customer to fix the issue.
The more interesting use is to mod cards. For example, on the X800 Pro VIVO you can unlock additional pipelines by changing the BIOS. How so? Inside the BIOS is a small block of information which tells the GPU how many pipelines it should run at. If you replace the original BIOS with a BIOS which tells the GPU "16 Pipelines!" .. well, then you are running 16 pipelines.
Another good use is to change the default clocks of the card. As you remember from above, the BIOS sets the core and memory clock. On the last page of this article we will cover the different BIOS editors and their use.
Sometimes a new BIOS increases performance as well. However, my personal experience is that this difference is rather small. However, if you do upgrade your video BIOS for this reason, make sure you run benchmarks before and after.
[pagE=Required Tools & Getting into DOS]
Required Tools
You will need the BIOS which you want to flash on the card. A good place to search is our ATI BIOS Collection (http://www.techpowerup.com/vgabios).
Next, you will need a flashing utility. A list of ATI flashing utilities can be found at the end of the ATI BIOS page.
[todo: add table with utils here]
How to boot into DOS
BIOS flashing is a very low-level process. A complex operating system like Windows only interferes with this. The hardware abstraction layer of Windows does not allow direct access to the hardware, except for system drivers. Also multitasking poses a risk. During flashing the BIOS chip wants a new piece of data every certain timeframe. What if Windows now switches execution to another process and puts your flashing on-hold? *poof* BIOS code inside flash is bad. If this is not detected, your card will be unusable. Even worse, what if Windows crashes during flashing? Good luck trying a reboot with only 50% of BIOS code.
Video card manufacturers have recently released Windows utilities which can flash from within Windows. Still, the more reliable method to flash a BIOS by booting into DOS.
The most common ways to boot into DOS are (in no particular order):
Floppy
CD/DVD
USB stick
HDD Partition with DOS installed
bypass startup files on Windows 9x
[page=Making a bootable floppy]
Making a bootable floppy
On Windows XP and up this is very easy.
Insert floppy into floppy drive
Open My Computer
Right click on floppy drive
Select "Format..."
Put a checkmark to "Create an MS-DOS startup disk"
Click on "Start"
http://www.techpowerup.com/articles/34/images/floppy.gif
Alternative
If you have an older version of Windows you can download the bootable floppy image XP creates here (http://www.techpowerup.com/articles/34/images/floppy.ima). Use WinImage (http://www.winimage.com/) to copy it on your disk.
Download and install WinImage
Open the downloaded floppy.ima file
Insert floppy into floppy drive
Click on "Write Disk". When using a brand-new floppy, click "Format and write disk".
http://www.techpowerup.com/articles/34/images/winimage.gif
Now that you have a bootable floppy, you will have to put the appropriate flashing utility and the BIOS on the disk. You do this by just copying the files onto the floppy.
Booting from the floppy
On many systems the default boot order does not check the floppy drives. To enable this, you go into your motherboard BIOS and find an option "First boot device" or similar. Change it to "Floppy", exit and save. Now the system should boot from your floppy.
http://www.techpowerup.com/articles/34/images/bootfloppy.jpg
[page=Making a bootable CD/DVD]
Making a bootable CD/DVD
http://www.google.com/search?hl=en&q=how+to+make+a+bootable+cd
Booting from the CD/DVD
On many systems the default boot order does not check the CD-ROM. To enable this, you go into your motherboard BIOS and find an option "First boot device" or similar. Change it to "CDROM", exit and save. Now the system should boot from your floppy.
http://www.techpowerup.com/articles/34/images/bootcdrom.jpg
If you have a SCSI drive, you will have to enable the adapter's own BIOS (option ist often called 'enable host bios') and also select the drive as Bootup LUN.
Now you have to select 'Boot Other' / 'Add-in PCI' / 'SCSI' or similar in your motherboard BIOS.
[page=Making a bootable USB stick]
Making a bootable USB stick
The easiest way is to use the HP USB Stick format tool (http://www.techpowerup.com/articles/34/images/SP27213.exe). It will work with any USB stick from any manufacturer.
Use the settings "FAT" and "Create a DOS startup disk":
http://www.techpowerup.com/articles/34/images/hpusb.gif
Extract this ZIP file (http://www.techpowerup.com/articles/34/images/USBImage.zip) and point the "using system files" location to it.
When the format is complete copy all files from that ZIP file onto the USB stick.
Additionally you need your flashing tools, just copy them onto the USB stick as well.
Booting from the USB stick
To actually boot from the USB stick you have to tell your motherboard BIOS to use it.
In your BIOS you will find an option which controls in which order boot devices are tried, or which lets you select what to try 1st, 2nd, 3rd.
We created our USB stick in HDD mode, that's why you have to select Hard Disk for the device and make sure it tries your USB "Harddisk" before your regular HDD (look for "Hard Disk Boot Priority").
http://www.techpowerup.com/articles/34/images/boothdd.jpg
On some strange motherboards the USB stick is detected as floppy so if the Hard Disk setting does not work, try the other USB- settings and ultimately try disconnecting your HDD and selecting 'Hard Disk' as first boot device.
http://www.techpowerup.com/articles/34/images/bootusbfdd.jpg
[page=Making a bootable DOS partition]
Making a bootable DOS partition
If you plan on regularly flashing Bioses, it is a good idea to create a new HDD partition with DOS on it. The advantage is that you have more storage available, that the boot times are considerably faster and that you do not have to start searching for your floppy/CD/USB stick every time you need it.
Harddisks are split up in so called partitions, which create logical disk drives with their assigned letters. Even if you have only one C: drive, you have one big partition spanning over the whole harddisk. Unfortunately, there is no standard way to make an existing partition smaller, to accomodate space for a new partition. However, 3rd party utilities like Partition Magic (http://www.google.com/search?hl=en&q=partition+magic) or BootIt NG (http://www.google.com/search?hl=en&q=bootit+ng) can do it.
In order to create a new partition you must have unallocated space of the size for the new partition.
To create a new partition, either go to Disk Management (Control Panel -> Administrative Tools -> Computer Management) in Windows or use the fdisk utility under DOS.
http://www.techpowerup.com/articles/34/images/diskmgmt.jpg
The new partition has to be created as primary, a good size is 32-64 MB. Next, you format the disk with the FAT filesystem (do not use NTFS).
Once you got the partition created and formatted, you somehow have to get the system files onto it.
[add text here how to get an operating system on the partition]
Booting from the Partition
Now with your bootable partition ready, you probably want it listed in the Windows 2000/XP boot menu. You do this by using a Windows command-line tool called BootPart (http://www.winimage.com/bootpart.htm).
Run it without any arguments and it will display a list of partitions on your system:
http://www.techpowerup.com/articles/34/images/bootpart1.gif
Find the right partition number in the output, in our case 2. Add it to the boot menu by typing:
bootpart partition_number image_filename displayed_name_in_bootmenu
The image filename is a file in which bootpart stores the bootsector of the partition. I like to use C:\boot.dos. So for our example we would type:
bootpart 2 c:\boot.dos DOS
http://www.techpowerup.com/articles/34/images/bootpart2.gif
I find the boot menu's default delay of 30 seconds annoying for day to day usage. That's why I set the timeout to 1 or 2 seconds (System Properties -> Advanced -> Startup & Recovery -> Settings -> Time to display the list of operating systems).
Whenever I need to boot into DOS, I press the down cursor key quickly before the boot menu comes up. Now the cursor moves down one option and the timout is stopped, so the menu is shown and I can select whatever I want to boot.
[page=Bypassing startup files on Win9x]
Bypassing startup files on Windows 9x
You have to press Shift+F5 when Windows is starting. The best moment to do this is when the "Verifying DMI data" message appears, right before the Windows startup screen is displayed.
http://www.techpowerup.com/articles/34/images/boot9x.gif
This hotkey works on all versions of Windows 95, Windows 98 and Windows ME. It does not work on Windows NT, XP and up.
[pagE=Instructions: ATI - DOS]
ATI: DOS
These instructions apply to both atiflash and flashrom, command-line syntax is the same. When using flashrom replace "atiflash" by "flashrom".
Download the BIOS file (ATI BIOS collection here (http://BIOS.techpowerup.com)) and put it on a bootable floppy/usb stick/CD. Check www.bootdisk.com on how to get a boot disk.
The ATI BIOS collection has a new feature which serves you a bootable floppy image or bootable iso CD image with the BIOS you want on it. Click on "Advanced" when in the BIOS list.
Download an ATI flashing utility (http://BIOS.techpowerup.com#flash) and put it on this disk too.
http://www.techpowerup.com/articles/34/images/atiflash.gif
Reboot your computer with the boot disk and run atiflash -s 0 oldbios.bin to save your old BIOS just in case you might need it at a later time.
Now run atiflash -p 0 newbios.bin Replace newbios.bin with the filename of the downloaded BIOS file.
If you are trying to flash a BIOS for a different card then you will get a security warning that the BIOS does not match your card. If you are absolutely sure that the BIOS is compatible you can use the -f parameter to force flashing. For example atiflash -f -p 0 BIOS.bin
Reboot your computer
Done
[pagE=Instructions: ATI - Windows]
ATI: Windows
To flash your BIOS from within Windows you have to use the ATI Winflash Utility, find it in our downloads section (http://www.techpowerup.com/downloads/Utilities/BIOS_Flashing/ATI).
http://www.techpowerup.com/articles/34/images/atiwinflash_small.jpg (http://www.techpowerup.com/articles/34/images/atiwinflash.gif)
The interface is pretty straightforward - load the BIOS image, click on program. Done.
Try closing as many programs as possible before the flash. It wouldn't be too good for your video card if your MP3 playing software messed up something with the sound card driver which displays a bluescreen and then halts the whole system.
[pagE=Instructions: NVIDIA - DOS]
NVIDIA: DOS
Download the BIOS file and put it on a boot disk. Check www.bootdisk.com on how to get a boot disk.
Download nvflash (v4.41 (http://www.techpowerup.com/articles/34/images/nvflash441.zip)) and put it on this disk too.
Reboot your computer with the start diskette and run nvflash -b oldbios.bin to save your old BIOS just in case you might need it at a later time.
Now run nvflash -f newbios.bin Replace newbios.bin with the filename of the downloaded BIOS file.
http://www.techpowerup.com/articles/34/images/nvflash.gif
If you are trying to flash a BIOS for a different card then you will get a security warning that the BIOS does not match your card. If you are absolutely sure that the BIOS is compatible you can use the -p and -u parameters to force flashing. For example nvflash -p -u -f BIOS.bin
Reboot your computer
Done
[pagE=Instructions: NVIDIA - Windows]
NVIDIA: Windows
WinFox
[page=Recovering from a bad flash]
Recovering from a bad flash
Use an old PCI card to boot your system while your AGP card with the corrupted BIOS is still installed. Your system should initialize the PCI card first. If this does not happen, remove the AGP card and turn the computer on with only the PCI card, go to your BIOS Setup and change the "Init Display First" option to "PCI". Now reinstall the AGP card. Your system should boot normally with the PCI card as primary display adapter. You can now re-flash the corrupted BIOS or use another one. Make sure you are flashing the right card by using the -i (ati) or -a (nvidia) command line option.
[pagE=Video BIOS Editors]
BIOS Editors