• Please review our updated Terms and Rules here

how to dump BIOS to a file?

mikey99

Veteran Member
Joined
Jun 15, 2006
Messages
1,142
Location
NC , USA
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.
 
Last edited:

modem7

Veteran Member
Joined
May 29, 2006
Messages
8,274
Location
Melbourne, Australia
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).

Code:
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

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,277
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

Veteran Member
Joined
Jun 15, 2006
Messages
1,142
Location
NC , USA
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

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,277
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

Veteran Member
Joined
May 29, 2007
Messages
1,645
Location
Tampa Florida
For some reason, when I dump my model 25's BIOS, it comes out as 37KB.. wtf?

thats when using an EEPROM programmer..
 

vwestlife

Veteran Member
Joined
May 2, 2008
Messages
5,196
Location
central NJ
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.
 

per

Veteran Member
Joined
Jan 21, 2008
Messages
3,006
Location
Western Norway
Code:
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.
 
Last edited:
Top