tokafondo wrote:
BigEd wrote:
Why did you mention PC < $8000?
The banking system I'm thinking about works by replacing the whole high 32K area everytime a bank is switched out.
What the 6502 would be seeing is the low 32K being always the same. And the high 32K would change completely when the bank registers are changed.
So: if PC <$8000, then no matter how many times the high 32K changes, the next instruction to be processed would be the expected one.
But if PC >=$8000, and the code there changes the bank, then the next instruction wouldn't be the expected one because all what is contained in $8000-$FFFF in different from what was there previously...
...unless what is stored in the new bank is the right instruction to be processed, because that's how it was coded.
Yes indeed, this matches my understanding of what happens.
I see my confusion now: I'd misunderstood what you wrote. You said:
Quote:
That enabling should be made by writing a four bits register. That register would be a latch or flip-flop chip that would be kept static that until reset or changed by the CPU. Those four bits should be maped in location that would fall in the first 32K bank of memory, and should be changed only when the program counter would be pointing to an address =<$7FFF, unless extreme careful programming would allow for switching banks and having code there that would continue running with no problems.
For some inexplicable reason, I thought you were describing an aspect of the proposed hardware, whereas I now see you were noting a constraint which falls on the software. That's fine! (And it has been done, in the past, at least in HP's multi-ROM calculators which cross-jump in a most spaghetti fashion but always with correct code at the destination, AIUI.)
Garth: we have several threads explaining the '816. Perhaps we just need a sticky post which pulls them together. Not everyone who chooses to design an interesting and ambitious 6502 project is unaware of the 816: it would suffice to mention, in one line, the sticky thread, just in case they need guidance. This particular thread struck me as a case of someone going in an interesting direction for reasons of exercising ingenuity, not out of ignorance of the '816.