Test ROMs
Since beginning of this thread, I was slowly working on the emulator that was abandoned since 2014. It is a must to develop new firmware efficiently, also a great help to figure out details about the architecture that remain unclear due to mistakes and difference in various schematics available, such as memory and I/O maps, keypad matrix layout, and so on. Now, when it starts to taking shape (more on it later), there is something different than the flood of HW reviews to share.
Due to the nature of the platform that was almost like DIY in early years, and due to the way parts were sold in 90s, Z80 boards nearly always has a ROM socket installed (sometimes CPU and other large chips too). As neither parts nor boards were of a great quality, it often was tricky to make the thing work once you assembled it. Thus there was a number of test ROMs from different authors that can test the hardware all the way through, helping you to figure out lots of potential issues ranging from faulty chips to missing connections or short circuits easily. It is a great help in making emulator too, in fact it was a huge help to me. There is normally no such a luxury with emulator development for other platforms, even popular ones.
Test I'm using the most called PHON-LP2.ROM, from 1995. It is one of latest and most complete, judging by the very detailed doc provided with it. It is just 2K, so you can save the 8K ROM banking headache for later. The doc is of course in Russian, so I give just a brief outline of its functionality.
In order to run it requires bare minimum of properly working hardware in order to start, namely no short circuits in CPU address, data, and control lines, correct clock - in other words, functioning CPU.
First it tries to check 8255. If there is some problem with it or related parts (listed in the doc), it shows error message using single digit of the display, as multiplexed display is not possible without these parts working correctly.
Then it tests LED display and multiplexed display circuit that is also used to poll the keypad matrix, by showing each digit with all segments on, then segment by segment. You can visually see if there is something wrong and get leads to possible source of the issues. From now on test displays pseudo-text messages that specify detected issues.
Then RAM gets tested, 6116 and 6164 supported and detected automatically. At this point test can detect missing CS, RAM degradation, and other memory faults.
Test also checks if the data bus pull up resistor array installed, some firmware versions won't function correctly without it, although some makers were omiting it to reduce the costs.
8253 gets tested next. Issues with control signals, lack of RD signal can be detected. Then 8253-generated interrupt gets tested, so you can see if interrupts is not working.
Test also checks optional configuration diodes (kind of jumpers) that enable expanded keypad and other options in some firmware. I'm stuck at this part at the moment.
A dozen of other hardware checks performed then, ones that related to the analog part, such as if phone line is not connected, incoming call detection, and so one.
Finally you can test the keypad, either normal 12 button one, or expanded 24/32 buttons - press buttons, and corresponding LED segments will light up. Turned out to be extremely handy, considering a bit tricky matrix layout and multiplexing shared with the display, plus two different layouts for normal and extended keypads.
If this is still not enough, you can then go into 8255 direct control mode. It allows to enable/disable any output line using the keypad, to help you make further HW checks manually.