I have an eprom where the checksum is the 16bit sum of the entire eprom. The problem is that correcting the checksum changes the checked data since the checksum resides within the checked data. Is there an algorithm that I can apply to generate the checksum that will account for this conundrum?
I tried calculating the checksum with the original value in place. The sum 16 calculator provides a new checksum but once you change the checksum to the new value, it is no longer valid. I tried zeroing out the checksum but the same thing happens. I tried computing it a bunch of times in a row to see if it would home in on a value that checks itself correctly, also with no joy. You end up chasing your tail, the new value is not valid once you update it. I'd figure there has to be a formula or bit flipping trick but I can't wrap my head around it. It's too vague a concept to get anything useful from google. Can someone enlighten me?