Dr Jefyll wrote:
Nice to hear about the progress, Jim. (And I, too, would enjoy a photo!
)
Quote:
WDC 65C02S works fine in the existing PCB, using the NMOS logic. I will leave it up to others to debug the Rockwell 6502.
Rockwell 65
C02, you mean -- is that right?
Yes, 65C02
Quote:
I wonder if you'd mind summarizing what you found. I recall from CBM-Hackers that you were using two programs for testing, namely the memory test built into the kernal of a CBM machine, and some sort of 6509-specific test which Michal Pleban wrote. Were there any important revelations, and did you get to a stage where the two tests agree? Using your latest Verilog code in the adapter, what was the verdict re the various CPU's?
As recorded in this thread, after designing the adapter, my first issue was the mis-naming of the PHI lines on the datasheet. With that fixed, the NMOS 6502B would boot the B128 and the memory test (which takes a bit of time) started working, but Michal's test code did not succeed on all tests.
His tests, which are at
https://github.com/MichalPleban/6509-test, perform the following:
- Reading and writing from/to another bank via LDA (zp),Y and STA (zp),Y
- also when crossing a page boundary.
- Reading memory using other (zp),Y instruction (which should NOT fetch from another bank).
- Executing code in another bank.
- Reading back the value written to registers, using both normal instructions and LDA (zp),Y.
The "reading back from registers" tests were the ones that failed.
We *thought* the issue with the register reads was due to contention on the data bus, as my logic could not prevent a real data access at $0/$1 from displaying on the CPU data bus.
As well, a Rockwell 65C02 did not work correctly (failed some of the tests and did not complete the memory test on bootup)
Thus, I implemented a revision of the logic that intercepted the databus and thus can keep values from the motherboard from appearing at the CPU.
The new board performed the same as the original board. Along the way, I modified the $0/$1 register reads to not gate with PHI. After that, the NMOS 6502 started passing all tests. The 65C02 was still not working correctly.
Mike N (of board fame) sent me a 65C02S, and it worked immediately using the same logic as for the NMOS 6502.
Quote:
Re the prospect of using an '816, yes you can treat (VDA AND VPA) as equvalent to SYNC. And I'm not aware of any reason NMI and IRQ need to be treated differently than on earlier 65xx processors, at least as far as the actual inputs go. (But different vector locations are used if you're in Native Mode.)
Well, I am laying out a board now, so let me know if my equations are correct.
Quote:
Not sure if this is what you meant, but I personally think it would be cool if your adapter (which plugs into an existing 6509 computer) could access the full memory space using two different methods -- the legacy 6509 method (for kernel and other existing code) and either an original, improved alternative method or a native mode '816 method for new or ported code. I'm pretty sure that's possible, but unfortunately there aren't that many 6509 computers around, so you might have to satisfy yourself with the intellectual challenge (rather than by supplying a large number of adapters).
(edits)
-- Jeff
I understand and I've already implemented that. In short:
- When the unit boots, it's in "emulation mode". Old $0/$1 behavior is active
- If the developer sends a specific set of values to $0, the extended behavior is activated.
- In extended mode, the bottom 4 bits of the bank address are placed on P0-P3, while the remaining bits are placed on pads on the board. In this mode, $0 and $1 are not accessible as registers, they will store and return data from the main bus
I forgot about the 'E' line on the '816 showing emulation mode state. I *can* create some optimizations:
- Use the 'E' line as the trigger to switch to the new behavior. Downsides are that I think you can switch the 816 to emulation mode in a bank other than 0 and continue executing code
- Use the 'E' line as a trigger to allow switching to the new behavior. This seems pretty straightforward with few downsides.
- Don't use E line at all.
Thoughts appreciated.