The Z64 Bios, autoexec.bat and z64start.bat

How does the BIOS work?


A BIOS image can be divided into 3 different parts:

- A flash-driver, which is resposible that the EEPROM "eats" your image
- Some "information"-area, where e.g. the version-number and checksum is stored
- A virtual bootdisk - thats what you should care about.

Ahh bootdisk sounds good and wow it can also be divided...

- DOS-system-files (remember "format /s"), makes the BIOS act like a virtual bootable disk (drive a:)
- Z64BIOS-files (MRB/ROM/DISK - from here when you create a new one)

Oh, come on - how does it boot ?

1. The Z64 loads the DOS-system-files
2. Then the DOS opens the CONFIG.SYS and sets (loads) the BOOTZ64.EXE as shell (replaces
3. This Bootz64 is responsible for initializing the necessary drivers and to start the Z64-menu (Z64.EXE).

That's all...

Source: readme from

Technical info for BIOS modifications - How it was done:


The Z64 BIOS contains a complete 444k PC BOOT-Disk with PC-DOS drivers.
The virtual-disk was extracted with a HEX Editor from address 01000-6FFFF of the released BIOS file. This BIOS part (a file of 444K) is a PC-disk image.
With WINIMAGE it is possible to read/write/delete the individual files of the 444K image. Most files are compressed with PKLITE, to safe space.
The complete 512K Z64BIOS file can also be used with Winimage, but for extraction of files only, not for changes. It can not save properly.
To make a valid new FlashBIOS the modified 444K file was put back into the original FlashBios file, at the same address used for extraction, The checksum was updated by running the program MKCKSUM.EXE (available in the DX-BIOS source at DEXTROSE).
Command : mkcksum biosfilename 2xx (substitute biosfilename with the actual name of the file and x=version number)

This is the content of the bios file:

The archiv named CRACK contains all included rom patches.
Furthermore you can see the autoexec.bat. This file checks if a z64start.bat is present on the C drive.

This is the autoexec.bat included in the 2.20 bios:

guest >NUL:
drivetst C
if not errorlevel 1 sleep C 4
drivetst D
if errorlevel 1 goto end
join d: C:\DISK-2
drivetst E
if errorlevel 1 goto end
join e: C:\DISK-3
drivetst F
if errorlevel 1 goto end
join f: C:\DISK-4
drivetst G
if errorlevel 1 goto end
join g: C:\DISK-5
drivetst H
if errorlevel 1 goto end
join h: C:\DISK-6
if exist c:\z64start.bat call c:\z64start.bat
a:z64 c

You can use this z64start.bat to copy files from a Zip to the hdd:


1) After making all the partitions, folders, ROMs etc. on the HD. I add the file:


(Which can be just a text file made with Notepad?)

And this contains the following:

if exist C:\disk-4\ZIPstart.bat call C:\disk-4\ZIPstart.bat

Where "C:\" is the HD.
"disk-4" is the partition that the Zip drive becomes if it is connected? (So if I had 4 partitions on the HD, would this naturally be disk-5???)

2) Then to update the particular folder that I want I'd have to have the file ZIPSTART.BAT on the Zip disk that I had the ROM on.

And this'd contain:

copy /B C:\disk-4\new\*.* C:\new\*.*

3) Then could I use the File Copy function from the OSD when the ROM file is safely on the HD to get the ROM into the right folder?


Are you familiar with the PC startup sequence ?
The Z64 starts like a PC, but since it is an embedded PC system, the boot-drive A: is coded in the BIOS chip and not as removable diskette. The Z always boots from the internal drive A. The ZIP drive and others attached have then the drive letters C:, D: ...
With HD&ZIP attached, the HD is drive C.

To let you take over the boot-process, the ZIP/HD BIOS has a command in the boot, to check for a DOS-BATCHfile (z64start.bat) on drive C:.
This jump is just before running the Z64.EXE program:

From the internal Z/HD BIOS autoexec.bat:

if exist c:\z64start.bat call c:\z64start.bat
a:z64 c

In your "Z64START.BAT" you can use
- all internal DOS commands
- The programs and files in the BIOS drive A: (read only)
- all additional programs you supply with the ZIP or HD (e.g. a new Z64.EXE, a SysInfo tool)
The only problem is, that you don't have a standard screen and keyboard.

Sample 1:
This sample shows how to call a batch-file on the ZIP disk when you have HD and ZIP attached. On my harddisk with 3 partitions the ZIP drive (when attached) is mounted as DISK-4. The path depends on how many partitions your HD has. The ZIP will be the last drive. Copy the following lines as z64start.bat file to the main directory on your HD.

if exist C:\disk-4\ZIPstart.bat call C:\disk-4\ZIPstart.bat

Sample 2:
This sample copies all files from folder NEW on the ZIP to folder NEW on HD -Autoupdate-Prepare your HD as in SAMPLE1 and place the following ZIPstart.bat file on the ZIP-Disk

copy /B C:\disk-4\new\*.* C:\new\*.*

Sample 3:
BACKUP your SAVE files from HD to ZIP disk Prepare your HD as in SAMPLE1 and use an empty ZIP with the following ZIPstart.bat file You will also need the DOS LHA archiver LHA255E.EXE For viewing the archives, I use the free Windows PowerArchiver

C:CD \disk-4LHA a -r1x1s1z1n2 C:\disk-4\SAVE C:\*.RAM C:\*.MPK C:\*.EEP