EPROM data rot in my EPROM programmer's EPROM
I recently discovered that some of my custom EPROMS from the 80's and 90's are exhibiting problems due to EPROM bit rot, which falls under the general category of data degredation...or 'data rot'. Bit rot causes any programmed 0 bits to revert back to 1 bits, their un-programmed state. The chip isn't actually harmed, it just loses its prorgamming.
So I erased the affected EPROMs and attempted to re-program them with the APX Eprom Programmer card I bought from Nexo Distribution in March, 1988. But it doesn't work properly because its own EPROM firmware has become unreliable due to...naturally enough...EPROM bit rot.
Unfortunately there's no program disk to fall back on, this programmer runs entirely from its own EPROM. That seemed like an excellent benefit back in 1988, but it poses a problem now. Can I extract a sufficiently-good image of the EPROM programmer's EPROM to enable me to operate it and program a new EPROM for it?
I have a hunch that this EPROM programmer can be used to rescue itself.
This EPROM seems to be reach a data-rot tipping point: if the programmer is cool and hasn't been used recently, its firmware almost works right after the comptuer is switched on. But its firmware quickly fails as spurious 1 bits start appearing where there should be 0 bits.
While viewing the firmware in the Apple Monitor, I noticed that the bad 1 bits would intermittently read correctly as 0. Valid 1 bits always read as 1. Rotting bits would oscillate between 1 and 0. So any bit that ever read as a 0 was probably supposed to be a 0, even if it usually read as a 1.
For the best chance of extracting the firmware, I created a 500-byte ROM Rapid Rescue program in EDASM and stored it in the boot sector of a floppy disk so that it would immediately start extracting the firmware in the APX card at power-on....promptly, immediately, quickly. Without even loading an OS.
And it really seemed to work!
I put the APX card in slot 7, booted the disk, and the 2-sector program immediately copied the firmware into RAM. Then it repeatedly re-copied the data from ROM to RAM by using bitwise-AND operations to test for unreliable 1 bits...suppressing them to 0. It counted the quantity of 1 bits after each pass, and printed the count after each pass. In about 18 seconds, it had reduced the quantity of 1 bits 1433 ($599 hex).
Here's a YouTube video capturing the exciting (?) action.
At that point I broke out of the program, booted an OS, and saved the extracted data to disk. I let the APX card rest for a few hours, then installed it and ran ROM Rapid Rescue again. It stablized at 1433 bits again, so I saved the extracted data on a floppy disk and compared it to the first run -- they were identical.
Had I rescued the original EPROM contents completely? I don't know yet.
Now I need to reverse-engineer the firmware, and proofread it for any bit errors that might still be there.
Then I will try to adapt it into a program that can run from RAM.
And after that, I hope to use the APX card to reprogram its own EPROM and restore itself to normal operation!