This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Error-correcting code

Error-correcting code
by on (#135624)
In this post about data corruption, Sik mentioned "warnings against checking for data corruption and attempting to restore it though (either through redundancy or through error correction)". I've also wanted to make an NES program generate and display a 2D barcode so that users can photograph the screen and upload it somewhere. Both of these require an error-correcting code.

So is there a free ECC implementation for 65xx series that's stronger than, say, a Hamming code? Or would I have to go back to college to understand enough finite field theory to be able to implement BCH/Reed-Solomon encoding and decoding myself? I got as far as multiplication in GF256, which is the same as software multiplication of integers except for using EOR instead of adding to the high byte. But I never figured out how to calculate a minimal polynomial for a given element.
Re: Error-correcting code
by on (#135633)
BCH-21,31 is really simple, and you can find a reference implementation in the piclist.

I also have a slightly more optimized PIC version, but you'll probably be rewriting it for 6502 ASM anyway.