VOGONS


First post, by jdredd

User metadata
Rank Newbie
Rank
Newbie

Greetings...

I have the IBM Model 30 - 8086 model.

I flashed myself new BIOS chips. 33F4498 / 33F4499 - 01/31/89

This part works fine. All is good.

I can combine the two files, make my edit, and split them back apart.

Only part I can't seem to find anywhere (maybe my google box skills are broke) is how / where to calculate the new checksum value to store in the files before splitting them in to even/odd files
and flashing to the chips.

Anyone got anything on this?

Reply 1 of 2, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie

I haven't looked at an ISA IBM PS/2 BIOS but have looked at AMIBIOS and others before.
Because the checksum calculation sums the whole BIOS and then checks whether it's zero, you don't necessarily know where the checksum is stored. Sometimes you just have to know, such as a byte checksum at F000:FFFE. But, as long as you don't clobber some byte that's actually used, you could theoretically adjust any byte(s) in the image to fix up the checksum.

As for how the checksum is calculated, you could disassemble and try to look for code that looks something like this, e.g. by looking for the immediates f000h and 8000h nearby, or perhaps add reg,ax or even a lodsw/add/loop:

cld
mov ax,0f000h
mov ds,ax
mov cx,8000h
xor bx,bx
xor si,si
sum: lodsw
add bx,ax
loop sum
jnz BadChecksum

Every vendor's checksum loop might be different. That's one for a 16-bit, little-endian checksum, others might checksum only at the byte level, or only checksum the top 32KB, etc.