Hi,
I tried to use the script. But something went wrong...
Atmega chip programmer.
Written by Nick Gammon.
Entered programming mode OK.
Signature = 0x1E 0x98 0x01
Processor = ATmega2560
Flash memory size = 262144 bytes.
LFuse = 0x01
HFuse = 0x99
EFuse = 0x00
Lock byte = 0xFF
Clock calibration = 0x00
Bootloader address = 0x3E000
Bootloader length = 7434 bytes.
Type 'V' to verify, or 'G' to program the chip with the bootloader ...
Erasing chip ...
Writing bootloader ...
Committing page starting at 0x3E000
Committing page starting at 0x3E100
Committing page starting at 0x3E200
Committing page starting at 0x3E300
Committing page starting at 0x3E400
Committing page starting at 0x3E500
Committing page starting at 0x3E600
Committing page starting at 0x3E700
Committing page starting at 0x3E800
Committing page starting at 0x3E900
Committing page starting at 0x3EA00
Committing page starting at 0x3EB00
Committing page starting at 0x3EC00
Committing page starting at 0x3ED00
Committing page starting at 0x3EE00
Committing page starting at 0x3EF00
Committing page starting at 0x3F000
Committing page starting at 0x3F100
Committing page starting at 0x3F200
Committing page starting at 0x3F300
Committing page starting at 0x3F400
Committing page starting at 0x3F500
Committing page starting at 0x3F600
Committing page starting at 0x3F700
Committing page starting at 0x3F800
Committing page starting at 0x3F900
Committing page starting at 0x3FA00
Committing page starting at 0x3FB00
Committing page starting at 0x3FC00
Committing page starting at 0x3FD00
Written.
Verifying ...
Verification error at address 3E000. Got: 0xFF Expected: 0x0D
Verification error at address 3E001. Got: 0xFF Expected: 0x94
Verification error at address 3E002. Got: 0xFF Expected: 0x89
Verification error at address 3E003. Got: 0xFF Expected: 0xF1
Verification error at address 3E004. Got: 0xFF Expected: 0x0D
Verification error at address 3E005. Got: 0xFF Expected: 0x94
Verification error at address 3E006. Got: 0xFF Expected: 0xB2
Verification error at address 3E007. Got: 0xFF Expected: 0xF1
Verification error at address 3E008. Got: 0xFF Expected: 0x0D
Verification error at address 3E009. Got: 0xFF Expected: 0x94
Verification error at address 3E00A. Got: 0xFF Expected: 0xB2
Verification error at address 3E00B. Got: 0xFF Expected: 0xF1
Verification error at address 3E00C. Got: 0xFF Expected: 0x0D
Verification error at address 3E00D. Got: 0xFF Expected: 0x94
Verification error at address 3E00E. Got: 0xFF Expected: 0xB2
Verification error at address 3E00F. Got: 0xFF Expected: 0xF1
Verification error at address 3E010. Got: 0xFE Expected: 0x0D
Verification error at address 3E011. Got: 0xFF Expected: 0x94
Verification error at address 3E012. Got: 0xFF Expected: 0xB2
Verification error at address 3E013. Got: 0xFF Expected: 0xF1
Verification error at address 3E014. Got: 0xFF Expected: 0x0D
Verification error at address 3E015. Got: 0x02 Expected: 0x94
Verification error at address 3E016. Got: 0xFF Expected: 0xB2
Verification error at address 3E017. Got: 0xFF Expected: 0xF1
Verification error at address 3E018. Got: 0x0C Expected: 0x0D
Verification error at address 3E019. Got: 0xFF Expected: 0x94
Verification error at address 3E01A. Got: 0xFF Expected: 0xB2
Verification error at address 3E01B. Got: 0xFF Expected: 0xF1
Verification error at address 3E01C. Got: 0xFF Expected: 0x0D
Verification error at address 3E01D. Got: 0x0E Expected: 0x94
Verification error at address 3E01E. Got: 0xFF Expected: 0xB2
Verification error at address 3E01F. Got: 0xFF Expected: 0xF1
Verification error at address 3E020. Got: 0xFF Expected: 0x0D
Verification error at address 3E021. Got: 0xFF Expected: 0x94
Verification error at address 3E022. Got: 0xFF Expected: 0xB2
Verification error at address 3E023. Got: 0xFF Expected: 0xF1
Verification error at address 3E024. Got: 0xFF Expected: 0x0D
Verification error at address 3E025. Got: 0x12 Expected: 0x94
Verification error at address 3E026. Got: 0x13 Expected: 0xB2
Verification error at address 3E027. Got: 0xFF Expected: 0xF1
Verification error at address 3E028. Got: 0xFF Expected: 0x0D
Verification error at address 3E029. Got: 0xFF Expected: 0x94
Verification error at address 3E02A. Got: 0xFF Expected: 0xB2
Verification error at address 3E02B. Got: 0xFF Expected: 0xF1
Verification error at address 3E02C. Got: 0xFF Expected: 0x0D
Verification error at address 3E02D. Got: 0xFF Expected: 0x94
Verification error at address 3E02E. Got: 0xFF Expected: 0xB2
Verification error at address 3E02F. Got: 0xFF Expected: 0xF1
Verification error at address 3E030. Got: 0xFE Expected: 0x0D
Verification error at address 3E031. Got: 0xFF Expected: 0x94
Verification error at address 3E032. Got: 0xFF Expected: 0xB2
Verification error at address 3E033. Got: 0x19 Expected: 0xF1
Verification error at address 3E034. Got: 0xFF Expected: 0x0D
Verification error at address 3E035. Got: 0xFF Expected: 0x94
Verification error at address 3E036. Got: 0xFF Expected: 0xB2
Verification error at address 3E037. Got: 0xFF Expected: 0xF1
Verification error at address 3E038. Got: 0xFE Expected: 0x0D
Verification error at address 3E039. Got: 0xFF Expected: 0x94
Verification error at address 3E03A. Got: 0xFF Expected: 0xB2
Verification error at address 3E03B. Got: 0xFF Expected: 0xF1
Verification error at address 3E03C. Got: 0xFF Expected: 0x0D
Verification error at address 3E03D. Got: 0xFF Expected: 0x94
Verification error at address 3E03E. Got: 0xFF Expected: 0xB2
Verification error at address 3E03F. Got: 0xFF Expected: 0xF1
Verification error at address 3E040. Got: 0xFF Expected: 0x0D
Verification error at address 3E041. Got: 0x20 Expected: 0x94
Verification error at address 3E042. Got: 0x21 Expected: 0xB2
Verification error at address 3E043. Got: 0xFF Expected: 0xF1
Verification error at address 3E044. Got: 0xFF Expected: 0x0D
Verification error at address 3E045. Got: 0xFF Expected: 0x94
Verification error at address 3E046. Got: 0xFF Expected: 0xB2
Verification error at address 3E047. Got: 0xFF Expected: 0xF1
Verification error at address 3E048. Got: 0x24 Expected: 0x0D
Verification error at address 3E049. Got: 0xFF Expected: 0x94
Verification error at address 3E04A. Got: 0xFF Expected: 0xB2
Verification error at address 3E04B. Got: 0xFF Expected: 0xF1
Verification error at address 3E04C. Got: 0xFF Expected: 0x0D
Verification error at address 3E04D. Got: 0x2E Expected: 0x94
Verification error at address 3E04E. Got: 0xFF Expected: 0xB2
Verification error at address 3E04F. Got: 0xFF Expected: 0xF1
Verification error at address 3E050. Got: 0xFF Expected: 0x0D
Verification error at address 3E051. Got: 0x28 Expected: 0x94
Verification error at address 3E052. Got: 0x29 Expected: 0xB2
Verification error at address 3E053. Got: 0xFF Expected: 0xF1
Verification error at address 3E054. Got: 0xFF Expected: 0x0D
Verification error at address 3E055. Got: 0x22 Expected: 0x94
Verification error at address 3E056. Got: 0xFF Expected: 0xB2
Verification error at address 3E057. Got: 0xFF Expected: 0xF1
Verification error at address 3E058. Got: 0xFE Expected: 0x0D
Verification error at address 3E059. Got: 0xFF Expected: 0x94
Verification error at address 3E05A. Got: 0xFF Expected: 0xB2
Verification error at address 3E05B. Got: 0xFF Expected: 0xF1
Verification error at address 3E05C. Got: 0xFF Expected: 0x0D
Verification error at address 3E05D. Got: 0x2E Expected: 0x94
Verification error at address 3E05E. Got: 0xFF Expected: 0xB2
Verification error at address 3E05F. Got: 0xFF Expected: 0xF1
Verification error at address 3E060. Got: 0xFF Expected: 0x0D
Verification error at address 3E061. Got: 0xFE Expected: 0x94
Verification error at address 3E062. Got: 0xFF Expected: 0xB2
Verification error at address 3E063. Got: 0xFF Expected: 0xF1
Verification error at address 3E064. Got: 0xFF Expected: 0x0D
7218 verification error(s).
First 100 shown.
Type 'C' when ready to continue with another chip ...
The number on Verification error(s) oscillates between 7128 and 3100
Suggestions?

EDIT: Got it working by changing
// slow down SPI for benefit of slower processors like the Attiny
SPI.setClockDivider (SPI_CLOCK_DIV64);
to
// slow down SPI for benefit of slower processors like the Attiny
SPI.setClockDivider (SPI_CLOCK_DIV128);