hoglet wrote:
gfoot wrote:
I'll develop some tests, maybe port the Dorman suite but it seems not quite what I need here. The RAM read/write stress test I already wrote ran fine overnight, for over 12 hours, at 25.175MHz.
I think it might well be worth trying the Dormann tests.
I went ahead and did that this evening, and it was indeed worth it as it uncovered a lot of issues, if somewhat indirectly!
I rigged up a crude serial output port using the four-chip circuit I built about a year ago - 74HCT594 + 74HCT166 + 74HCT74 + 74HC40103 - and used the VIA's T1 to time the gaps between 115200 baud bytes. And fixed the off-by-one error you pointed out last year
That allowed setting up the Dormann suite's "report.i65" module to send readable reports to the serial console rather than just hanging when tests fail. This is an optional component to the tests which you can enable and customize if you want/need such output - the core tests are designed to be run from a monitor or emulator that allows breaking and inspecting the program counter and memory, to figure out what's wrong when they get stuck.
I then spent several hours reattaching the bus capturer and logic analyser and running the decoder to try to work out why on earth it wasn't working. The decoder was very useful here - it revealed a lot of cases where the CPU was reading values that were different to what was meant to be in the EEPROM. It wasn't obvious at first that this was happening, because the decoder was happy to report that the CPU was acting exactly as expected given the data it was receiving - the decoder didn't know what was meant to be in the EEPROM. Perhaps that'd be an interesting feature to add - preloading the memory for its verification system to run based on.
Eventually I realised that the transition from $80FF to $8100 wasn't working properly. The oscilloscope revealed what looked like faint echos on the A8 line - pulses only reaching about 1V, while other pulses were at the full 5V. After checking for correct power and ground on relevant ICs (as that's usually what I suspect when a digital signal is not at the right voltage) and then just blaming a transceiver being faulty, eventually I realised that I had miswired the EEPROM and shorted two of the address lines together, and mixed up a few of the others. So then I felt sorry for the innocent transceiver!
I think this wiring error didn't show up previously because I was using a smaller EEPROM and basing the code at $E000, and as such a lot of the address lines were high anyway, meaning I guess when they were shorted together nothing bad happened. The Dormann suite is over 16K though so it needed the full 32K EEPROM.
With that fixed, the 6502 tests ran without problems. The 65C02 tests are failing though and I don't have the energy at the moment to decipher the format of the error message it displays - I'm going to leave figuring that out for another day! Edit: Oh, I get it... the first number is a memory address (e.g., near the top of the stack) and the numbers after that are the next few bytes from that address. So it failed at $2581 and we can see some data from its zero page and data segment. Still a mystery for another day
Code:
Started testing
regs Y X A PS PCLPCH
01FA 00 C0 02 B0 81 25
000C 7B 7B 7B 00 7B C0 FB
0200 F0 1C 0F 41 28 7B 00 00 00 00
press C to continue or S to skip current test