Page 1 of 4

Boot Block BIOS flash doesn't work

Posted: Tue Sep 16, 2003 4:45 am
by dos-freak
Hi!

I tried to flash my Chaintech 7AIA5 - Board toaday with the newser BIOS - Version from
http://www.chaintech.com.tw:8008/AP/BIO ... odel=7AIA5

I started the AWDFLASH-Utility via ALT+F2 and inserted a floppy with the new BIOS-file. The utility immediately started to work and in the middle of flashing, it died, because of a read-error on the floppy (i later tested the floppy and there were unreadable blocks where the new bios-file was).
So The system rebooted using the boot-block bios.
It prompts me for a floppy with AWDFLASH.EXE on it (yes, it displays something even with my AGP-Graphics card!). So I downloaded the AWDFLASH-utility from Chaintech, which was suitable for my board and put it on the floppy.
After reading the new BIOS files from the disk, it says: "The Program file's BIOS Lock string doesn't match with your system!"
So I looked in the internet for a solution for this problem and found out, that I had to use the /nbl parameter.
But how can I tell the boot-block BIOS the parameters I want to pass to the awdflash-program?
I read, that I would only have to create an AUTOEXEC.BAT with "awdflash.exe <filename> /options " in it. So I did this but the boot Block BIOS seems to ignore it.
So I tried with older AWDflash-versions. They say "System was not NEW AWARD BIOS Version. Please updata ROM BIOS first ...."
I tried to put other flash utilities on the disk and name it AWDFLASH.EXE, but they don't execure correctly (I think, they are using DOS function calls which are of course not available).
I also tried to put a file with the DOS boot-sector on the disk and name it AWDFLASH.EXE and also copy all the other DOS system-files onto it.. no Luck.
So I'm now really desperate. What would be a Solution to the Problem?
Should I try to disassemble AWDFLASH and bypass the Error-Checking Routine? This would be quite hard for me and if possible, I want to avoid this work.
I hope, someone can help me.

Thanks in advance!

Solved..

Posted: Wed Sep 17, 2003 4:56 am
by dos-freak
Once again, I seemed to have solved the problem myself.
I wrote a little loader, which executes the code in the boot-sector of a Floppy, so that I'm able to load MS-DOS, even when only the boot block BIOS works. It provides us Keyboard, Disk and Disply Interrupts, so that we still can use ms-dos normally.
For the boot block loader's source see below.
I then managed to start awdflash with the /nbl parameter, but it resulted
in a hangup while flashing.
So I finally used uniflash. It told me, that my boot block was invalid And I forced to flash teh boot block too. Now everything works fine again. :-)
If someone else is experiencing the same problems like me, here is how to fix this:

Assuming, that you have the uniflash.exe and your new BIOS .BIN file on you floppy, you need to make it bootable:
For example, type SYS A: in DOS to do so.
Next, you need to compile my litte program below and put it on the disk as AWDFLASH.EXE
Then just insert the floppy, watch DOS booting and then type UNIFLASH to start uniflash and flash your bios.
--> You're done. :)

---- AWDFLASH.ASM ---
; I compiled it using TASM 6.0

IDEAL
P386
MODEL SMALL

CODESEG
ASSUME CS:_TEXT,DS:_TEXT,ES:_TEXT

start: mov ax,cs
mov ds,ax
xor dl,dl
reset: xor ah,ah
int 13h
jc reset

xor cx,cx
xor dx,dx
mov es,dx
mov bx,7C00h
read: mov ax,201h
int 13h
jc read
jmp far 0:7C00h
ENDS
END start

------------------------

Have a nice day.... :)

Posted: Wed Sep 17, 2003 10:33 am
by Rainbow
Very nice work - thanks for that :)
I was thinking of doing this myself when (and if...) a board with bootblock like this came in my hands.

Posted: Wed Sep 17, 2003 2:14 pm
by KachiWachi
Any way we can get the compiled version posted somewhere? Looks like a life saver to those who might need to try this option...

Posted: Wed Sep 17, 2003 2:57 pm
by NickS
Sure; use debug. Here are handy commands:
n boota.com
a 100
(enter code)
<cr>
r cx
11e
w 100
q
This:

Code: Select all

14E8:0100 8CC8          MOV     AX,CS
14E8:0102 8ED8          MOV     DS,AX
14E8:0104 30D2          XOR     DL,DL
14E8:0106 30E4          XOR     AH,AH
14E8:0108 CD13          INT     13
14E8:010A 72FA          JB      0106
14E8:010C 31C9          XOR     CX,CX
14E8:010E 31D2          XOR     DX,DX
14E8:0110 8EC2          MOV     ES,DX
14E8:0112 BB007C        MOV     BX,7C00
14E8:0115 B80102        MOV     AX,0201
14E8:0118 CD13          INT     13
14E8:011A 72F9          JB      0115
14E8:011C EA007C0000    JMP     0000:7C00
is what debug produces when I assemble/disassemble. Does that look right ? It disassembles JB when I assembled JC.

Posted: Wed Sep 17, 2003 4:15 pm
by Rainbow
Should be EXE file... Assembled it using TASM 4.1 and linked using TLINK 7.1.30.1 - seems to be OK.

Binary package

Posted: Wed Sep 17, 2003 11:27 pm
by dos-freak
I have refined the code a bit (now it displays, what it does, maybe useful for debugging), compiled it, added a little readme and put it together in a package, which can be optained at:
http://dose.0wnz.at/awdflash.zip

I hope, that it's useful to somebody and Feedback would be greatly appreciated. Thank you!

dos-freak

Posted: Wed Sep 17, 2003 11:56 pm
by Rainbow
Nice :)
I have some suggestions:
1) rename the archive - "awdflash.zip" name suggests that it contains awdflash - maybe awdblock or awdboot...
2) Modify the docs a bit - older Award BootBlocks can boot directly from the floppy.

done

Posted: Thu Sep 18, 2003 12:08 am
by dos-freak
Ok, now it can be found at:

http://dose.0wnz.at/awdblock.zip

so that nobody is confused. I also corrected the docs. Is it okay now? :)
Thank you for your suggestions!

dos-freak

Posted: Thu Sep 18, 2003 10:23 am
by NickS
Rainbow wrote:Should be EXE file... Assembled it using TASM 4.1 and linked using TLINK 7.1.30.1 - seems to be OK.
It will need to be renamed from boota.com to to awdflash.exe, but I can't think of any reason why it needs to "be" an exe.

.EXE

Posted: Thu Sep 18, 2003 12:31 pm
by dos-freak
Well, it promptf you for awdflash.EXE, so it obviously is able to read and execute the MZ file format, and I think, it expects MZ. So renaming from .COM wouldn't do it.
But if you have a chance, you may give it a try.

dos-freak

Posted: Thu Sep 18, 2003 1:24 pm
by NickS
Ah, OK. You're never too old to learn.
Bring back Basic in ROM, that's what I say. ;)
Now, where's my copy of MASM 3.0 ? I'm sure I put it down here 10 years ago...

MASM

Posted: Thu Sep 18, 2003 1:43 pm
by dos-freak
Well, I already compiled it, just download the package mentioned above.
I also tried to compile it with my old MASM first, but with MASM, my
program only outputted garbage, so I rewrote it for TASM.

Hint: I found the following site in google, where you can download TASM, if you're interested:
http://66.98.132.48/crackz/Tools.htm

dos-freak

Posted: Thu Sep 18, 2003 1:49 pm
by NickS
Thanks, I have downloaded your assembled .EXE. :)

Posted: Thu Sep 18, 2003 3:10 pm
by KachiWachi
Cool Stuff...almost makes me want to kill a board just to try it out 8O :P :!: