VDA (and, to a lesser extent, VPA) are more tangibly valuable.
VPA is always high when Program bytes -- actual opcodes and operands -- are fetched. VDA is always high when Data accesses (including stack, general memory and I/O) occur. VDA and VPA can be used to prevent rare but nasty problems involving two groups of I/O chips:
- chips not from the 65xx family, which may have problematic timing restrictions
- any chip which includes registers whose status gets altered when the register is read.
A common example of the latter is the Interrupt Flag Register, as found in the 6522 VIA. Reading the IFR causes its bits to get reset. It's built that way, in order to streamline interrupt service routines. If your computer doesn't include I/O chips from these groups then you can safely ignore VDA and VPA. [see note]
The potential problem has to do with "dead" or unused bus cycles which all 65xx CPU's occasionally produce. During an unused cycle, the address bus isn't necessarily valid and meaningful, which results in a risk that the dead cycle could read an I/O device. Luckily, the invalid addresses are predictable. Some workaround solutions involve a change in programming (for example, avoiding the use of indexed address modes to access I/O). Changes to the system memory map (ie, changing the address where I/O resides) can also help.
Those workaround fixes don't require the use of VDA or VPA. There are two other alternatives:
- If you ignore VPA but do use VDA to qualify I/O accesses then data accesses can touch I/O but dead cycles and operand accesses cannot. This simple solution is usually the most desirable. (The 6522 VIA is especially easy, as it has two Chip-Select inputs. Just run the address-decode signal to the VIA's active-low CS, and drive the active-high CS directly from VDA!
) - Somewhat slower and more complex is OR'ing together VDA and VPA, and using the result as the qualifying signal. I can only think of one reason you'd do this [can anyone else suggest reasons?], and that's when the plan is to use that signal to enable a decoder IC which is responsible for selecting both I/O and memory. It's the shared decoder that makes the OR gate necessary. The decoder needs to be active when code is fetched (from memory); therefore the qualifying signal must account for VPA.
Jeff
Note: I don't have EEPROM experience, but it occurs to me that spurious reads may be an issue (reads may play a role in the programming procedure). Best to review the programming procedure with that in mind, and if necessary protect the EEPROM from spurious reads.