VOGONS


Reply 60 of 80, by theelf

User metadata
Rank Oldbie
Rank
Oldbie

Thanks guy, understand!!

i made two script, to interleave in python and de interleave

interleave to flat

#!/usr/bin/env python3
# Compatible with Python 3.4.3

import sys

if len(sys.argv) != 3:
print("Usage: interleaved_to_flat.py input_interleaved.bin output_flat.bin")
sys.exit(1)

input_file = sys.argv[1]
output_file = sys.argv[2]

try:
with open(input_file, "rb") as f:
data = f.read()
except:
print("Error reading input file.")
sys.exit(1)

half = len(data) // 2
flat = bytearray(len(data))

for i in range(half):
flat[i*2] = data[i] # bytes pares (primer mitad)
flat[i*2 + 1] = data[half + i] # bytes impares (segunda mitad)

try:
with open(output_file, "wb") as f:
f.write(flat)
print("Conversion complete. File saved as:", output_file)
except:
print("Error writing output file.")

and flat to interleave

#!/usr/bin/env python3
# Compatible with Python 3.4.3

import sys

if len(sys.argv) != 3:
print("Usage: flat_to_interleaved.py input_flat.bin output_interleaved.bin")
sys.exit(1)

input_file = sys.argv[1]
output_file = sys.argv[2]

try:
with open(input_file, "rb") as f:
flat = f.read()
except:
print("Error reading input file.")
sys.exit(1)

even = flat[::2]
odd = flat[1::2]

interleaved = bytearray(even) + bytearray(odd)

try:
with open(output_file, "wb") as f:
f.write(interleaved)
print("Conversion complete. File saved as:", output_file)
except:
print("Error writing output file.")

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 ?¿

Reply 61 of 80, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
ahyeadude wrote 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:

Checksum does not equal zero!!!
Checksum: 16
2 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:

Checksum equals zero
Checksum: 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

here is addapted to python 3.4.3

#!/usr/bin/env python3
# loads amibios and calculates checksum (16 bit sequential) and value needed to validate (if checksum != 0)

import sys

try:
bios_file = sys.argv[1]
with open(bios_file, mode='rb') as file:
bios_data = file.read()
except:
print("Usage: amichksum.py path_to_rom.bin")
sys.exit()

block_count = int(len(bios_data) / 16)
checksum = 0
for block in range(0, block_count):
bios_block = bios_data[block*16:block*16+16]
block_checksum = 0
for byte_pair in range(0, 8):
hi = bios_block[byte_pair*2+1]
lo = bios_block[byte_pair*2]
byte_pair_hex = '{:02X}{:02X}'.format(hi, lo)
byte_pair_dec = int(byte_pair_hex, 16)
block_checksum += byte_pair_dec
block_checksum %= 65536
checksum += block_checksum

checksum %= 65536
if checksum != 0:
print("Checksum does not equal zero!!!")
print("Checksum:", checksum)
two_byte_addition = '{:02X} {:02X}'.format((65536 - checksum) & 0xFF, ((65536 - checksum) >> 8) & 0xFF)
print("2 byte addition needed to validate checksum:", two_byte_addition)
else:
print("Checksum equals zero")
print("Checksum:", checksum)

Reply 62 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
theelf wrote on 2025-07-19, 21:30:

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.

Reply 63 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
theelf wrote 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:

"ZIDA.BIN" file is 64 kB in size!
Original "ZIDA.BIN" will be copied to "ZIDA.TMP" file.
Copying "ZIDA.BIN" file to "ZIDA.TMP" file...
"ZIDA.BIN" file was copied to "ZIDA.TMP" file.
"ZIDA.TMP" file seems like authentic 64 kB AMI "color" BIOS.
Checksum bytes read from "ZIDA.TMP" file at address 0xFF50 (hex, LE): "39 4A".
Checksum for "ZIDA.TMP" file does not equals zero.
Current checksum (dec): 12240; (hex, LE): "D0 2F".
2 bytes addition to current checksum needed to validate it (dec) 53296; (hex, LE): "30 D0".
Do you want to auto-patch the checksum bytes in "ZIDA.TMP" file? Enter [y/N]: y
Renaming "ZIDA.TMP" file to "ZIDA.PCH"...
Original "ZIDA.TMP" file was renamed to "ZIDA.PCH".
Checksum bytes replaced in "ZIDA.PCH" file at address 0xFF50 with these values (hex, LE): "69 1A".
Original unmodified "ZIDA.BIN" file is still intact.
Now 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?
"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.

Even did a second run on the fresh copy with corrected checksum "ZIDA.PCH", just to be sure:

"ZIDA.PCH" file is 64 kB in size!
Original "ZIDA.PCH" will be copied to "ZIDA.TMP" file.
Copying "ZIDA.PCH" file to "ZIDA.TMP" file...
"ZIDA.PCH" file was copied to "ZIDA.TMP" file.
"ZIDA.TMP" file seems like authentic 64 kB AMI "color" BIOS.
Checksum bytes read from "ZIDA.TMP" file at address 0xFF50 (hex, LE): "69 1A".
Checksum for "ZIDA.TMP" file equals zero.
Deleting "ZIDA.TMP"...
"ZIDA.TMP" file was deleted.
No actions needed.
Original 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.

Reply 64 of 80, by theelf

User metadata
Rank Oldbie
Rank
Oldbie

Cool, thanks confirm it works, then maybe is something in conversion to 3.4.3, erase from my message not to confuse. Thanks!

I found a new bios for my motherboard that work after modding https://theretroweb.com/motherboards/s/zida-td60c#bios 2cgm001.bin

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

thanks to help to everybody

Reply 65 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
theelf wrote on 2025-07-20, 08:21:

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. But anyway, I don't have any will to improve/(back)port/refactor the script further, especially after I'd to prove, that it works as expected, while no one else here wants to confirm this.

P.S. To clarify the situation with all these script versions, just tried your Python 3.4.3 adapted script from your post. I'm on Linux with Python 3.10.12 and here's what I got with using it on "ZIDA.BIN" (the restored one, but with the wrong checksum bytes):

"ZIDA.BIN" is 64 kB in size!
Copying "ZIDA.BIN" to "ZIDA.TMP"...
Copying "ZIDA.BIN" file to "ZIDA.TMP"...
"ZIDA.BIN" copied to "ZIDA.TMP".
"ZIDA.TMP" seems authentic 64 kB AMI "color" BIOS.
Checksum bytes at 0xFF50 (hex, LE): "39 4A"
Checksum != 0: 12240
Current checksum (hex, LE): "D02F"
Fix needed: 53296 (hex, LE): "30D0"
Traceback (most recent call last):
File "./adaptedcalc3.py", line 186, in <module>
new_first_checksum_byte = hex_str2int(int2hex_str(two_byte_addition, 0)) + byte2int(first_checksum_byte)
File "./adaptedcalc3.py", line 43, in hex_str2int
return int(bytearray.fromhex(hex_str)[0]) + (int(bytearray.fromhex(hex_str)[1]) << 8)
IndexError: 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 script does 😉 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/backported version for Python 3.4.3 and I don't care as it's yours work, not mine.

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 can guarantee at 100%, that my original "amichksumcalc3.py" script works fine with Python 3.10.xx+ (probably even with Python 3.8.something), yet still it's not an "AMI color BIOS magic wand". Unfortunately (but fortunately for me 😀 ) I've totally lost the interest to improve it further and this includes changes for compatibility with older Python interpreter versions. I didn't expect the first feedback from someone's almost 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 its 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.

Reply 66 of 80, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
analog_programmer wrote on 2025-07-20, 08:40:
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 […]
Show full quote
theelf wrote on 2025-07-20, 08:21:

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. But anyway, I don't have any will to improve/(back)port/refactor the script further, especially after I'd to prove, that it works as expected, while no one else here wants to confirm this.

P.S. To clarify the situation with all these script versions, just tried your Python 3.4.3 adapted script from your post. I'm on Linux with Python 3.10.12 and here's what I got with using it on "ZIDA.BIN" (the restored one, but with the wrong checksum bytes):

"ZIDA.BIN" is 64 kB in size!
Copying "ZIDA.BIN" to "ZIDA.TMP"...
Copying "ZIDA.BIN" file to "ZIDA.TMP"...
"ZIDA.BIN" copied to "ZIDA.TMP".
"ZIDA.TMP" seems authentic 64 kB AMI "color" BIOS.
Checksum bytes at 0xFF50 (hex, LE): "39 4A"
Checksum != 0: 12240
Current checksum (hex, LE): "D02F"
Fix needed: 53296 (hex, LE): "30D0"
Traceback (most recent call last):
File "./adaptedcalc3.py", line 186, in <module>
new_first_checksum_byte = hex_str2int(int2hex_str(two_byte_addition, 0)) + byte2int(first_checksum_byte)
File "./adaptedcalc3.py", line 43, in hex_str2int
return int(bytearray.fromhex(hex_str)[0]) + (int(bytearray.fromhex(hex_str)[1]) << 8)
IndexError: 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 script does 😉 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/backported version for Python 3.4.3 and I don't care as it's yours work, not mine.

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 can guarantee at 100%, that my original "amichksumcalc3.py" script works fine with Python 3.10.xx+ (probably even with Python 3.8.something), yet still it's not an "AMI color BIOS magic wand". Unfortunately (but fortunately for me 😀 ) I've totally lost the interest to improve it further and this includes changes for compatibility with older Python interpreter versions. I didn't expect the first feedback from someone's almost 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 its 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 😉

Sorry you lost time, dont worry, i already have working bios, but dont remember what i change to do, was like a month ago, old project!

Reply 67 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
theelf wrote on 2025-09-02, 18:40:

Sorry you lost time, dont worry, i already have working bios, but dont remember what i change to do, was like a month ago, old project!

No problems, buddy 😉

The original thing was well tested (by me) and still working (I've used it for me at least three times for different 386 AMI BIOSes). I remember, that no more than two fellow forum members asked me to make such an improved version... and in the end no one else really needs it. At least I've trained my typing skills 🤣 And you know - breaking someone else's code is much more easy and lot of fun 😁 I'm done with this stupid Python script for good.

Last edited by analog_programmer on 2025-09-02, 19:27. Edited 1 time in total.

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.

Reply 68 of 80, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
analog_programmer wrote on 2025-09-02, 19:21:
theelf wrote on 2025-09-02, 18:40:

Sorry you lost time, dont worry, i already have working bios, but dont remember what i change to do, was like a month ago, old project!

No problems, buddy 😉

The original thing was well tested (by me) and still working (I've used it for me at least 3 times for different 386 AMI BIOSes). I remember, that no more than two fellow forum members asked me to make such an improved version... and in the end no one else really needs it. At least I've trained my typing skills 🤣 And you know - breaking someone's code is much more easy and lot of fun 😁 I'm done with this stupid Python script for good.

Sorry dont know was a interest of you, because i change something in script and use a different bios and everything was fine, but i delete later because i already burn to eproms. On my motherboard bios 1.3 is stable, but 1.5 have problems even if both run. But dont remember what i do to have a 1.3 working one with the python script

I have a lot of problem with bios in this motherboard, because i use a 16GB CF card and AWE64 GOld, and with all bios i found in internet, both cF card give me writing problems, and awer64 was unstable. Finally i fix my original 1.3 bios, and all problems gone

thanks for script, love to resurrect old hardware

Abut python, i ise windows XP as my main OS, then latest official version was 3.4, there is unofficial new version, but normally i preffer to addapt scripts

Reply 69 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
theelf wrote on 2025-09-02, 19:26:
Sorry dont know was a interest of you, because i change something in script and use a different bios and everything was fine, bu […]
Show full quote

Sorry dont know was a interest of you, because i change something in script and use a different bios and everything was fine, but i delete later because i already burn to eproms. On my motherboard bios 1.3 is stable, but 1.5 have problems even if both run. But dont remember what i do to have a 1.3 working one with the python script

I have a lot of problem with bios in this motherboard, because i use a 16GB CF card and AWE64 GOld, and with all bios i found in internet, both cF card give me writing problems, and awer64 was unstable. Finally i fix my original 1.3 bios, and all problems gone

thanks for script, love to resurrect old hardware

Abut python, i ise windows XP as my main OS, then latest official version was 3.4, there is unofficial new version, but normally i preffer to addapt scripts

A couple of posts above this - there's still attached some AMI BIOS from Zida for your board (in the second attachment - "ZIDA.PCH" is the name of the fixed bin-file). I succesfully fixed it by the last version of the script. You may try the fixed BIOS if it will be more stable.

And why you're using such an ancient winbooze? Switch to Linux - there's some really good new light distros for older machines.

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.

Reply 70 of 80, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
analog_programmer wrote on 2025-09-02, 19:35:
theelf wrote on 2025-09-02, 19:26:
Sorry dont know was a interest of you, because i change something in script and use a different bios and everything was fine, bu […]
Show full quote

Sorry dont know was a interest of you, because i change something in script and use a different bios and everything was fine, but i delete later because i already burn to eproms. On my motherboard bios 1.3 is stable, but 1.5 have problems even if both run. But dont remember what i do to have a 1.3 working one with the python script

I have a lot of problem with bios in this motherboard, because i use a 16GB CF card and AWE64 GOld, and with all bios i found in internet, both cF card give me writing problems, and awer64 was unstable. Finally i fix my original 1.3 bios, and all problems gone

thanks for script, love to resurrect old hardware

Abut python, i ise windows XP as my main OS, then latest official version was 3.4, there is unofficial new version, but normally i preffer to addapt scripts

A couple of posts above this - there's still attached some AMI BIOS from Zida for your board (in the second attachment - "ZIDA.PCH" is the name of the fixed bin-file). I succesfully fixed it by the last version of the script. You may try the fixed BIOS if it will be more stable.

And why you're using such an ancient winbooze? Switch to Linux - there's some really good new light distros for older machines.

No way!!! love XP, I’ll use it until its last breath. I really not like linux, i will only switch to linux when XP is not working anymore for me, but for now, works great

About bios, yes sorry, was 2.30 not 1.3, my mistake, yes this is my original version, was corrupted, finally i fix it, i did not see the attachment, thanks

Reply 71 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
theelf wrote on 2025-09-02, 19:51:

No way!!! love XP, I’ll use it until its last breath. I really not like linux, i will only switch to linux when XP is not working anymore for me, but for now, works great

Well... I'll never install or use any winbooze after 7 😁 And it's ancient too. But Linux is free and gives freedom 😉

theelf wrote on 2025-09-02, 19:51:

About bios, yes sorry, was 2.30 not 1.3, my mistake, yes this is my original version, was corrupted, finally i fix it, i did not see the attachment, thanks

Look here:

analog_programmer wrote on 2025-07-20, 04:09:

Attaching "ZIDA.BIN" ROM dump in correct unsplitted and merged (deinterlaced) AMI "color" BIOS form - with and without the corrected checksum bytes:

-> ZIDA.zip <-

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.

The first attachment "ZIDA.ZIP" contains only the dump-file with the broken cheksum. The second attachment "ZIDA.ZIP"(Am I stupid to not give another name?) contains both files - fixed & broken.

I also gave you a direct link to download the proper archive (second "ZIDA.zip") in my previous post:

analog_programmer wrote on 2025-09-02, 19:35:

... there's still attached some AMI BIOS from Zida for your board (in the second attachment - "ZIDA.PCH" is the name of the fixed bin-file).

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.

Reply 72 of 80, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
analog_programmer wrote on 2025-09-02, 20:01:
Well... I'll never install or use any winbooze after 7 :D And it's ancient too. But Linux is free and gives freedom ;) […]
Show full quote
theelf wrote on 2025-09-02, 19:51:

No way!!! love XP, I’ll use it until its last breath. I really not like linux, i will only switch to linux when XP is not working anymore for me, but for now, works great

Well... I'll never install or use any winbooze after 7 😁 And it's ancient too. But Linux is free and gives freedom 😉

theelf wrote on 2025-09-02, 19:51:

About bios, yes sorry, was 2.30 not 1.3, my mistake, yes this is my original version, was corrupted, finally i fix it, i did not see the attachment, thanks

Look here:

analog_programmer wrote on 2025-07-20, 04:09:

Attaching "ZIDA.BIN" ROM dump in correct unsplitted and merged (deinterlaced) AMI "color" BIOS form - with and without the corrected checksum bytes:

-> ZIDA.zip <-

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.

The first attachment "ZIDA.ZIP" contains only the dump-file with the broken cheksum. The second attachment "ZIDA.ZIP"(Am I stupid to not give another name?) contains both files - fixed & broken.

I also I gave you a direct link to download the proper archive (second "ZIDA.zip") in my previous post:

analog_programmer wrote on 2025-09-02, 19:35:

... there's still attached some AMI BIOS from Zida for your board (in the second attachment - "ZIDA.PCH" is the name of the fixed bin-file).

Windows if free too! never paid for it, dont like vista+ latest windows i like is XP

I checked the bios you attached, and have some small byte difference with mine when compare both, but like i said, i erase all script to check checksum, only keep 2 eproms, bios and backup, and continue with other stuff, thanks

Reply 73 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
theelf wrote on 2025-09-02, 20:32:

I checked the bios you attached, and have some small byte difference with mine when compare both, but like i said, i erase all script to check checksum, only keep 2 eproms, bios and backup, and continue with other stuff, thanks

As I can see from my old post, the correct checksum bytes for it are "69 1A", so if I'm not mistaken the correct checksum in hex is 0x1A69:

file.php?id=223765&mode=view

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.

Reply 74 of 80, by feipoa

User metadata
Rank l33t++
Rank
l33t++

Looks like my Ubuntu 18.04 LTS installation only has Python 3.6.7-1 installed, which is the latest option for the standard repository. From the dialogue, it sounded like only Python 3.10.12 has been tested working, and a conversion to Python 3.4.3 was a mess. As such, to avoid uncertainty, it seems like I should install Python 3.10 from a PPA repository, however I'm not sure if it will work correctly. Ubuntu 20.04 might be needed for 3.10. Some quick searching suggests these series of terminal commands may do the job:

sudo apt update && sudo apt upgrade -y
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10
python3.10 --version

Alternately, I see a python3-alt snap package, which covers Python 3.8 thru 3.13. Also available is a snap for just Python 3.8.0.

Plan your life wisely, you'll be dead before you know it.

Reply 75 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
feipoa wrote on 2025-09-05, 09:21:
Looks like my Ubuntu 18.04 LTS installation only has Python 3.6.7-1 installed, which is the latest option for the standard repos […]
Show full quote

Looks like my Ubuntu 18.04 LTS installation only has Python 3.6.7-1 installed, which is the latest option for the standard repository. From the dialogue, it sounded like only Python 3.10.12 has been tested working, and a conversion to Python 3.4.3 was a mess. As such, to avoid uncertainty, it seems like I should install Python 3.10 from a PPA repository, however I'm not sure if it will work correctly. Ubuntu 20.04 might be needed for 3.10. Some quick searching suggests these series of terminal commands may do the job:

sudo apt update && sudo apt upgrade -y
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10
python3.10 --version

Alternately, I see a python3-alt snap package, which covers Python 3.8 thru 3.13. Also available is a snap for just Python 3.8.0.

Yeah, it seems like the attempt for script conversion/backporting for Python 3.4.3 compatibility was unsuccessful. Python version 3.4.3 doesn't support "f-formated" string literals and probably some newer features.

You can first try the original script with your Python version 3.6.7 (3.6 and newer versions support "f-formated" strings) and if there are some other errors, then try to install newer Python version - at least 3.8.xx. Don't worry - the script won't touch anything in the original BIOS ROM dump-file as it is automatically copied to a temporary .tmp file and the script only works with this temporary copy. The original ROM dump-file always remains untouched.

You can also install some recent Python version on winbooze and use the script with it: "python amichksumcalc3.py <name-of-ROM-dump-file>".

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.

Reply 76 of 80, by feipoa

User metadata
Rank l33t++
Rank
l33t++

That's a good idea to start with the existing 3.6.7 version of Python. I'm not too family about the differences between versions. It will not be until Fall that I have time to work on anything computer related. My home renovations are taking way longer than expected and this was the first summer I couldn't take the kids camping.

As for Windows, I don't use it on anything modern; I stopped using Windows once XP updates ended in 2019.

I'm surprised that nobody else has tested this script. A few long timers here have gone silent. Perhaps this was a universal summer for renovations.

Plan your life wisely, you'll be dead before you know it.

Reply 77 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
feipoa wrote on 2025-09-05, 10:32:

That's a good idea to start with the existing 3.6.7 version of Python. I'm not too family about the differences between versions.

I wrote the script as for Python 3.8 version compatibality. And now I see, that the "ternary operator" (simple one line "if-else" conditional expression) was not supported prior 3.8 version. And I used that too. So, unfortunately, the script won't work with Python versions older than 3.8 for sure. Sorry.

I really didn't expected anyone to be using an older Python version than 3.8 at this point, since even that is considered outdated.

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.

Reply 78 of 80, by feipoa

User metadata
Rank l33t++
Rank
l33t++

Thanks for the note.

Given the nature of the forum, I wouldn't be surprised if users are wanting older revisions to work, after all, there's HWinfo for DOS being developed, as well as HWinfo for Win95. There's other modern vintage software being written as well. Since my ROM programmers, SRAM testers, and video scalar don't work out-of-the-box in Ubuntu, I still use Windows XP for these and other vintage hacks. I wouldn't be opposed to having a Python3 for XP script working, but I am also OK with trying the workarounds in Ubuntu 18.04. 18.04 LTS is on extended support until April 2028, which is about the date I'd upgrade my primary OS.

Plan your life wisely, you'll be dead before you know it.

Reply 79 of 80, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie

Look, if you want Python 3.6 compatibility version - it may be done quickly as it's a matter of changing a couple of lines containing "ternary operator".

For example line 211:

print(f'Now you can use freshly created "{patched_bios_file_name}" file with corrected checksum bytes{" and removed checksum hack" if hacked else ""}.')

Has to be replaced with next lines:

if hacked:
print(f'Now you can use freshly created "{patched_bios_file_name}" file with corrected checksum bytes and removed checksum hack".')
else:
print(f'Now you can use freshly created "{patched_bios_file_name}" file with corrected checksum bytes.')

And line 214:

print(f'Manually hex-edit checksum bytes in "{new_bios_file_name}" file{" with removed checksum hack" if hacked else ""} at address 0xFF50 with these values (hex, LE): "{int2hex_str(new_first_checksum_byte, 0)} {int2hex_str(new_second_checksum_byte, 0)}".')

Has to be replaced with next lines:

if hacked:
print(f'Manually hex-edit checksum bytes in "{new_bios_file_name}" file with removed checksum hack at address 0xFF50 with these values (hex, LE): "{int2hex_str(new_first_checksum_byte, 0)} {int2hex_str(new_second_checksum_byte, 0)}".')
else:
print(f'Manually hex-edit checksum bytes in "{new_bios_file_name}" file at address 0xFF50 with these values (hex, LE): "{int2hex_str(new_first_checksum_byte, 0)} {int2hex_str(new_second_checksum_byte, 0)}".')

I think, this is all needed for Python 3.6.xx compatibility "backporting", but I won't install second obsolete Python version to test it.

Python 3.4.xx compatibility...

As for Python 3.4.xx - nah! I don't think it will be so trivial to change the "b-formatted" strings like in line 131:

idx = file_bytes_data.find(b'\x2e\xad\x03\xd8\xe2\xfa\x74\x06')

And in line 135:

idx = file_bytes_data.find(b'\x2e\xad\x03\xd8\xe2\xfa\xeb\x06')

These "b-formatted" strings must be supported in Python 3.6.xx and newer. And for Python 3.4.xx compatibility it also needs "f-formatted" strings to be changed to older syntax.

Do you see how responsive and helpful I am trying to be, even without "please, could you fix it for me?" 😀 And I still haven't received a single positive feedback comment for the stupid script.

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.