I've got a dead B+. It doesn't work with my usual diagnostic tool (viewtopic.php?f=8&t=14849), but I got some useful leads thanks to Tricky's test ROM (viewtopic.php?f=2&t=10268#p139467). While waiting for bits to arrive, I also wanted to try a couple of other theories, so I've written a few bits of test code myself as well.
One problem I encountered when doing this: where can you store data when RAM doesn't work? If RAM is broken, the stack is no use, so the S register is free, and that does help. But sometimes you just need a memory operand. And on the B/B+, you do actually have some useful options!
Assuming you have a working system VIA:
* VIA T1 latches (16 bits) - easy to access. Changing this can affect the T1 timeout period, but if you've got IRQs disabled it doesn't matter
* VIA ACR (8 bits) - easy to access. The top 7 bits are pretty benign, but port A input latching on the system VIA will probably have an affect on keyboard input
I only needed 16 bits, so that was enough for me, but it got me thinking. If you even have a working user VIA, and can demand nothing connected to user port or printer port, you've got 24 more bits:
* User VIA DDRB/DDRA (16 bits) - easy to access
* User VIA PCR (8 bits) - easy to access
And if you have a working 6845, and don't mind a bit of hassle (and can spare a register for the required register index constant), there are more options!
* 6845 R14 (6 bits)/R15 (8 bits) - inconvenient to access. Changing this will affect the cursor, but you can disable it and nobody need ever know
* 6845 R12 (6 bits)/R13 (8 bits) - inconvenient to access. And this is a bit harder to hide, though you can just disable the display if you don't need it, and you're good
Anybody got any other suggestions?
--Tom
P.S. The VIA shift register might be an option too? But it looks like it's difficult to guarantee that it literally never ever shift. Even in the so-called "disabled" mode, it'll shift if there's a CB1 transition
One problem I encountered when doing this: where can you store data when RAM doesn't work? If RAM is broken, the stack is no use, so the S register is free, and that does help. But sometimes you just need a memory operand. And on the B/B+, you do actually have some useful options!
Assuming you have a working system VIA:
* VIA T1 latches (16 bits) - easy to access. Changing this can affect the T1 timeout period, but if you've got IRQs disabled it doesn't matter
* VIA ACR (8 bits) - easy to access. The top 7 bits are pretty benign, but port A input latching on the system VIA will probably have an affect on keyboard input
I only needed 16 bits, so that was enough for me, but it got me thinking. If you even have a working user VIA, and can demand nothing connected to user port or printer port, you've got 24 more bits:
* User VIA DDRB/DDRA (16 bits) - easy to access
* User VIA PCR (8 bits) - easy to access
And if you have a working 6845, and don't mind a bit of hassle (and can spare a register for the required register index constant), there are more options!
* 6845 R14 (6 bits)/R15 (8 bits) - inconvenient to access. Changing this will affect the cursor, but you can disable it and nobody need ever know
* 6845 R12 (6 bits)/R13 (8 bits) - inconvenient to access. And this is a bit harder to hide, though you can just disable the display if you don't need it, and you're good
Anybody got any other suggestions?
--Tom
P.S. The VIA shift register might be an option too? But it looks like it's difficult to guarantee that it literally never ever shift. Even in the so-called "disabled" mode, it'll shift if there's a CB1 transition
Statistics: Posted by tom_seddon — Fri May 10, 2024 12:11 am