The 0x05555 rom address is hardcoded, and i need to offset this address to the base rom address of the actual chip being flashed. rom chip 1 has a base address of 0x800000, so it needs to do 0x800000 + 0x5555 = 0x805555 ... There are more such sequences centralized in a couple of functions. However, I don't want to always do this addition when flashing for each byte, so i need to rework the logic a bit so the overall program has a good performant logic. However, what i'll do is to first update the program and make it fully functional, and then work on performance improvements.
Get rid of these hard-codings.
The 0x05555 rom address is hardcoded, and i need to offset this address to the base rom address of the actual chip being flashed. rom chip 1 has a base address of 0x800000, so it needs to do 0x800000 + 0x5555 = 0x805555 ... There are more such sequences centralized in a couple of functions. However, I don't want to always do this addition when flashing for each byte, so i need to rework the logic a bit so the overall program has a good performant logic. However, what i'll do is to first update the program and make it fully functional, and then work on performance improvements.