Tested with a working interleave bios, i de-interleave, interleave again, burn in willem and works fine in motherboard
Now my question, if i de-interleave change 3230 to 3235 in hex, use amichksumcalc3.py,
"R:\test.bin" is 64 kB in size!
Copying "R:\test.bin" to "R:\test.TMP"...
Copying "R:\test.bin" file to "R:\test.TMP"...
"R:\tes […] Show full quote
"R:\test.bin" is 64 kB in size!
Copying "R:\test.bin" to "R:\test.TMP"...
Copying "R:\test.bin" file to "R:\test.TMP"...
"R:\test.bin" copied to "R:\test.TMP".
"R:\test.TMP" seems authentic 64 kB AMI "color" BIOS.
Checksum bytes at 0xFF50 (hex, LE): "1C B9"
Checksum != 0: 1280
Current checksum (hex, LE): "0500"
Fix needed: 64256 (hex, LE): "FB00"
Auto-patch "R:\test.TMP" now? Enter [y/N]: y
Renaming "R:\test.TMP" to "R:\test.PCH"...
Renamed "R:\test.TMP" to "R:\test.PCH".
Patched checksum at 0xFF50: "01 00"
Original "R:\test.bin" remains untouched.
You can now use "R:\test.PCH" with corrected checksum.
Interleave test.PCH and burn... motherboard do 9 beeps error, bios checksum
I think amichksumcalc3.py is doing something brong ?¿
ahyeadudewrote on 2023-10-29, 20:27:Thanks @jakethompson1 for this great guide. I used it to successfully add PS2 mouse support to my 386sx board. […] Show full quote
Thanks @jakethompson1 for this great guide. I used it to successfully add PS2 mouse support to my 386sx board.
I decided to nerd out today and create a AMIBIOS checksum calculator in python based on your find. It can also calculate the 2-byte addition required to make the checksum equal to zero so that it passes that check.
Example output on my PS2 modified bios:
1Checksum does not equal zero!!! 2Checksum: 16 32 byte addition needed to validate checksum: F0 FF
I then added F0 FF to the middle of large blank area of the bios at 0x6000. Can run it again to verify:
1Checksum equals zero 2Checksum: 0
I flashed and it works great. Nice to know if there is a bit-flip down the road (unlikely, I know) the bios should catch it.
Python file attached.
ok! this script works!!!!!! perfect! thanks ahyeadude
I think amichksumcalc3.py is doing something brong ?¿
My script uses the very same checksum algorithm from ahyeadude's amichksum.py. Of course it won't work witch ROM dumps created from two concatenated ROM dump-files (copy /b dump1.rom+dump1.rom bios.rom). I'll check on what BIOS dump you're trying to use it and I'll give you feedback later today.
The word Idiot refers to a person with many ideas, especially stupid and harmful ideas.
This world goes south since everything's run by financiers and economists.
This isn't voice chat, yet some people overusing online communications talk and hear voices.
theelfwrote on 2025-07-19, 21:30:Now my question, if i de-interleave change 3230 to 3235 in hex, use amichksumcalc3.py, […] Show full quote
Now my question, if i de-interleave change 3230 to 3235 in hex, use amichksumcalc3.py,
"R:\test.bin" is 64 kB in size!
Copying "R:\test.bin" to "R:\test.TMP"...
Copying "R:\test.bin" file to "R:\test.TMP"...
"R:\tes […] Show full quote
"R:\test.bin" is 64 kB in size!
Copying "R:\test.bin" to "R:\test.TMP"...
Copying "R:\test.bin" file to "R:\test.TMP"...
"R:\test.bin" copied to "R:\test.TMP".
"R:\test.TMP" seems authentic 64 kB AMI "color" BIOS.
Checksum bytes at 0xFF50 (hex, LE): "1C B9"
Checksum != 0: 1280
Current checksum (hex, LE): "0500"
Fix needed: 64256 (hex, LE): "FB00"
Auto-patch "R:\test.TMP" now? Enter [y/N]: y
Renaming "R:\test.TMP" to "R:\test.PCH"...
Renamed "R:\test.TMP" to "R:\test.PCH".
Patched checksum at 0xFF50: "01 00"
Original "R:\test.bin" remains untouched.
You can now use "R:\test.PCH" with corrected checksum.
Interleave test.PCH and burn... motherboard do 9 beeps error, bios checksum
I think amichksumcalc3.py is doing something brong ?¿
Just took your BIOS from the attached "zida1.zip" - "zida1.BIN". It's not a valid AMI "color" BIOS in this state. It's 32 kB "low" + 32kB "high" ROMs concatenated into 64 kB "zida1.BIN" file!
So, I splitted "zida1.BIN" in half and merged (deinterlaced) the two halves into valid AMI "color" BIOS ROM - "ZIDA.BIN":
The attachment ZIDA.zip is no longer available
And auto-corrected the wrong checksum bytes in "ZIDA.BIN" by using my perfectly fine working script:
1"ZIDA.BIN" file is 64 kB in size! 2Original "ZIDA.BIN" will be copied to "ZIDA.TMP" file. 3Copying "ZIDA.BIN" file to "ZIDA.TMP" file... 4"ZIDA.BIN" file was copied to "ZIDA.TMP" file. 5"ZIDA.TMP" file seems like authentic 64 kB AMI "color" BIOS. 6Checksum bytes read from "ZIDA.TMP" file at address 0xFF50 (hex, LE): "39 4A". 7Checksum for "ZIDA.TMP" file does not equals zero. 8Current checksum (dec): 12240; (hex, LE): "D0 2F". 92 bytes addition to current checksum needed to validate it (dec) 53296; (hex, LE): "30 D0". 10Do you want to auto-patch the checksum bytes in "ZIDA.TMP" file? Enter [y/N]: y 11Renaming "ZIDA.TMP" file to "ZIDA.PCH"... 12Original "ZIDA.TMP" file was renamed to "ZIDA.PCH". 13Checksum bytes replaced in "ZIDA.PCH" file at address 0xFF50 with these values (hex, LE): "69 1A". 14Original unmodified "ZIDA.BIN" file is still intact. 15Now you can use freshly created "ZIDA.PCH" file with corrected checksum bytes.
Do you see the big difference in read and calculated values in the checksum bytes with the output from your adapted version?
1"R:\test.bin" is 64 kB in size! 2Copying "R:\test.bin" to "R:\test.TMP"... 3Copying "R:\test.bin" file to "R:\test.TMP"... 4"R:\test.bin" copied to "R:\test.TMP". 5"R:\test.TMP" seems authentic 64 kB AMI "color" BIOS. 6Checksum bytes at 0xFF50 (hex, LE): "1C B9" 7Checksum != 0: 1280 8Current checksum (hex, LE): "0500" 9Fix needed: 64256 (hex, LE): "FB00" 10Auto-patch "R:\test.TMP" now? Enter [y/N]: y 11Renaming "R:\test.TMP" to "R:\test.PCH"... 12Renamed "R:\test.TMP" to "R:\test.PCH". 13Patched checksum at 0xFF50: "01 00" 14Original "R:\test.bin" remains untouched. 15You can now use "R:\test.PCH" with corrected checksum.
Even did a second run on the fresh copy with corrected checksum "ZIDA.PCH", just to be sure:
1"ZIDA.PCH" file is 64 kB in size! 2Original "ZIDA.PCH" will be copied to "ZIDA.TMP" file. 3Copying "ZIDA.PCH" file to "ZIDA.TMP" file... 4"ZIDA.PCH" file was copied to "ZIDA.TMP" file. 5"ZIDA.TMP" file seems like authentic 64 kB AMI "color" BIOS. 6Checksum bytes read from "ZIDA.TMP" file at address 0xFF50 (hex, LE): "69 1A". 7Checksum for "ZIDA.TMP" file equals zero. 8Deleting "ZIDA.TMP"... 9"ZIDA.TMP" file was deleted. 10No actions needed. 11Original unmodified "ZIDA.PCH" file is still intact.
And here is hex comparison between the original dump with the wrong checksum bytes "ZIDA.BIN" and auto-corrected one (by "amichksumcalc3.py" script) "ZIDA.PCH":
The attachment wrong checksum - corrected checksum.jpg is no longer available
Once again - my original "amichksumcalc3.py" script just works fine. I don't know what you're adapting for older Python versions, but in this case it's your call to not introduce bugs, not mine.
Attaching "ZIDA.BIN" ROM dump in correct unsplitted and merged (deinterlaced) AMI "color" BIOS form - with and without the corrected checksum bytes:
The attachment ZIDA.zip is no longer available
I don't know if you have to split (interlace) "ZIDA.PCH" and concatenate the two resulting "low" ("even") and "high" ("odd") ROM parts into one file to work with you mobo - it's also your response.
P.S. Thanks for the feedback based on "I don't know what I'm dealing with, but your script s*cks". Now for sure no one will try to use my script after reading the first given negative feedback. And I knew it - I didn't have to optimize and improve anything for "amichksumcalc3.py" to be usable and easily readable by everyone.
The word Idiot refers to a person with many ideas, especially stupid and harmful ideas.
This world goes south since everything's run by financiers and economists.
This isn't voice chat, yet some people overusing online communications talk and hear voices.
Out.bin is after deinterleaving and change 20MHz to 25Mhz with hex, out.PCH is after using the amichksumcalc3.py script i ported to 3.4.3, it change 1CB9 to 0100
amichksum.py backported too, tellme this
C:\>R:\amichksum.py R:\out.bin
Checksum does not equal zero!!!
Checksum: 1280
2 byte addition needed to validate checksum: 00 FB […] Show full quote
C:\>R:\amichksum.py R:\out.bin
Checksum does not equal zero!!!
Checksum: 1280
2 byte addition needed to validate checksum: 00 FB
IF i add 00 FB and burn works well
But anyways, if the problem is a mistake in backport to 3.4.3 there no need to check anything else, cool. I can´t test original scripts, im using Win XP
I think for now i is end of the road for me with this 286 motherboard, i dont found any new bios and the mods i made works fine with it
Cool, thanks confirm it works, then maybe is something in conversion to 3.4.3, erase from my message not to confuse. Thanks!
I don't mind your adapted version for older Python. Maybe you've made a mistake with the Zida's BIOS ROM conversion as it comes in pretty messed state (32 kB "low" + 32kB "high" ROMs concatenated into 64 kB "zida1.BIN").
I don't remember what "PEP8 standard" recommends for such an old Python version as 3.4.3. If the script only needs conversion in (print) formatted strings, then there's nothing to be wrong with it.
1"ZIDA.BIN" is 64 kB in size! 2Copying "ZIDA.BIN" to "ZIDA.TMP"... 3Copying "ZIDA.BIN" file to "ZIDA.TMP"... 4"ZIDA.BIN" copied to "ZIDA.TMP". 5"ZIDA.TMP" seems authentic 64 kB AMI "color" BIOS. 6Checksum bytes at 0xFF50 (hex, LE): "39 4A" 7Checksum != 0: 12240 8Current checksum (hex, LE): "D02F" 9Fix needed: 53296 (hex, LE): "30D0" 10Traceback (most recent call last): 11 File "./adaptedcalc3.py", line 186, in <module> 12 new_first_checksum_byte = hex_str2int(int2hex_str(two_byte_addition, 0)) + byte2int(first_checksum_byte) 13 File "./adaptedcalc3.py", line 43, in hex_str2int 14 return int(bytearray.fromhex(hex_str)[0]) + (int(bytearray.fromhex(hex_str)[1]) << 8) 15IndexError: bytearray index out of range
Before the thrown error, at least it managed to correctly read and calculate the checksum bytes for the "ZIDA.BIN" file, and also manage to calculate the right addition needed - just like the original scrip does 😉
I can assure you, that I've already lost more than a day (summary) in testing (including today's tests with your Zida BIOS dump-file) and I've never ever published in this forum some bull*hit code/software written (and/or compiled) by me. I don't know if this "bytearray index out of range" error is due to Python versions syntax or functional incompatibility or there's a bug in your adapted version for Python 3.4.3. I guarantee at 100% that my original "amichksumcalc3.py" script works fine with Python 3.10.xx+ (probably even with Python 3.8.something), but still it's not an "AMI BIOS magic wand". Unfortunately (fortunately for me 😀 ) I've totally lost interest to improve it further, even for compatibility with older Python interpreter versions. I didn't expect the first feedback from someone's real usage to be - "nah, the thing doesn't work right", even if "the thing" is not the original thing, but altered one 😁
The f*ckin' "amichksumcalc3.py" script will remain here as is (in case if I lost it source code and still need to use it) and can be used and altered by anyone as he/she decides. Just don't blame me, if your upgraded/improved/downgraded/whatever-changed version doesn't work as expected anymore 😉
The word Idiot refers to a person with many ideas, especially stupid and harmful ideas.
This world goes south since everything's run by financiers and economists.
This isn't voice chat, yet some people overusing online communications talk and hear voices.