View Full Version : how to dump BIOS to a file?
mikey99
May 31st, 2008, 08:21 PM
Is there a utility available to dump the BIOS of a PC or XT
to a file on diskette ? I have a couple of clone XT's that I'd
like to backup the BIOS just in case I ever need to reburn.
I imagine there might be a way to do this using DEBUG with the correct
address. Ideally it would be an image that was ready to burn
with an EEPROM burner in case the current BIOS chip died.
I would prefer not to pull the chips from the mb to copy.
modem7
May 31st, 2008, 08:39 PM
Mbbrutman wrote a utility named 'PCjrcart', available at http://www.brutman.com/PCjr/pcjr_downloads.html
The DEBUG method:
If you know the address at which the BIOS starts and you know the BIOS size, you can suitably modify the following (saves 32K starting at F000 to file MYF000.BIN).
C:\> DEBUG
-N MYF000.BIN (resulting file will be named MYF000.BIN)
-R BX (set BX=0000H/CX=8000H as count of bytes to write, 00008000H = 32K)
BX 0000
:0000
-R CX
CX 0000
:8000
-M F000:0 8000 0100 (copy 32K bytes from F000:0 to offset 0100 in local segment)
-W 0100 (write from offset 0100 in local segment)
Writing 8000 bytes
-Q
mbbrutman
May 31st, 2008, 10:35 PM
Thanks - I didn't want to self promote. ;-)
Debug gives you a pure dump.. PCjrcart can do that too, but it can also scan the BIOS area for extensions. This is useful for dumping the BIOS on cards like SCSI adapters, VGA cards, etc.
mikey99
June 2nd, 2008, 05:08 AM
Thanks for the info. I ran pcjrcart using the rom dump option
and it generated a 64KB file SYS_ROM.BIN. I edited the file
using a binary editor and there is header info like PCJRCART
date, time, filename ,etc.
If I had an EPROM burner, could I burn this file directly to
an EPROM, plug into my machine and it would work ?
Or would I be better off making a 'pure' dump using DEBUG?
mbbrutman
June 2nd, 2008, 06:48 AM
Your ROM is probably not 64K. It is for a Jr, but on the PC and XT it is much smaller. (The PCjr has Diagnostics and other stuff in ROM.) You need to know the size of the ROM for your machine. There are options on pcjrcart for getting particular memory regions. You can do the same thing with debug, but it might be easier with pcjrcart.
I think that there is an option on PCjrcart to suppress the header .. you definitely don't want the header showing up.
evildragon
June 2nd, 2008, 01:23 PM
For some reason, when I dump my model 25's BIOS, it comes out as 37KB.. wtf?
thats when using an EEPROM programmer..
vwestlife
June 2nd, 2008, 02:47 PM
If you run MSD (Microsoft Diagnostics), it will tell you what address region your system ROM occupies, and also for any option ROMs (video, hard drive controller, etc.) you have installed.
Generally if you dump more address space than your ROM actually occupies, the unused space will show up as a stream of 00 or FF hex.
JohnElliott
June 3rd, 2008, 01:58 AM
Generally if you dump more address space than your ROM actually occupies, the unused space will show up as a stream of 00 or FF hex.
Or, if the address lines aren't completely decoded, additional copies of the ROM.
per
June 3rd, 2008, 03:19 AM
C:\> DEBUG
-N MYF000.BIN (resulting file will be named MYF000.BIN)
-R BX (set BX=0000H/CX=8000H as count of bytes to write, 00008000H = 32K)
BX 0000
:0000
-R CX
CX 0000
:8000
-M F000:0 8000 0100 (copy 32K bytes from F000:0 to offset 0100 in local segment)
-W 0100 (write from offset 0100 in local segment)
Writing 8000 bytes
-Q
If you got a REALLY slow computer, you might change -M F000:0 8000 0100 to -M F000:0 7FFF 0100, saving you some nanoseconds :P
You can repeat the process with -N MYF800.BIN and -M F800:0 FFFF 0100 instead if you want the other half of the BIOS.
modem7
June 4th, 2008, 01:04 AM
If you got a REALLY slow computer, you might change -M F000:0 8000 0100 to -M F000:0 7FFF 0100, saving you some nanoseconds :P
Are confusing 'number of bytes to move' with 'last address'?
JohnElliott
June 4th, 2008, 11:12 AM
I wrote a utility to save the BIOS ROM a few years ago (aimed at Apricot PCs, but it should work on genuine IBMs and compatibles as well.
http://www.seasip.demon.co.uk/Misc/saverom.zip
It's a bit more convenient than fiddling with DEBUG.
per
June 4th, 2008, 11:54 AM
Are confusing 'number of bytes to move' with 'last address'?
Look at this:
http://mirror.href.com/thestarman/asm/debug/debug2.htm#M
But it is only a minor detail nobody needs to care about anyways. Both ways work so use the one you prefere.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.