Despite documentation on the ZX8302 ULA registers and the IPC (keyboard/beep/RS232 receive) co-processor being between unclear and down right absolutely wrong I managed to get it working. Much consternation also caused by the emulator I'm using requiring the status register to be read twice to get the correct value which the original hardware doesn't.
Anyway, I can make it beep, run the internal loopback test and read the keyboard. This was the major sticking point and I can now move forward and work out how to create the main test menu and then write the main tests.
Anyway, this is what it looks like:
Re: General Stuff(tm)
Posted: 12 Jun 2025 14:45
by stephen_usher
The ROM now has a useful error report if the base RAM test fails.
I spent all the morning completely re-writing the code and replacing it with something which actually works.
capture.jpg
It outputs the faulting address and bit map to the serial port and then writes coloured bands into video memory. If at least one RAM chip is working and the display system can output then this will be useful information.
The first band denotes which memory bank the error occurred in, white for the lower 64K and black for the upper.
The following seven bands denote the status of bits 7 -> 0.
Re: General Stuff(tm)
Posted: 13 Jun 2025 22:10
by stephen_usher
So... trying to get serial port receiving working.... Looks like I'm going to enable interrupts and use an interrupt service routine. Also, the IPC protocol looks to be far more complex that what I'd gathered from the emulator code.
Having found the code used in the Minerva QDOS replacement ROM I'm going to have to rewrite all my keyboard reading code again as well and make that interrupt driven.
Trying to use polling for this doesn't work as the IPC crashes if you poll it when it hasn't raised an interrupt.
Re: General Stuff(tm)
Posted: 16 Jun 2025 21:00
by stephen_usher
Much "fun" with interrupts today.
Designed and build a set of interrupt service routines. Tested it all in an emulator... worked a treat for reading the keyboard.
Eventually tested on a real machine... *CRASH* or *HANG* or *CRASH* *REBOOT*.
Even if the interrupt routine was a mere "rte" it would hang the machine.
Eventually, after many hours and a discussion on the QL Forum discord tried a different way of writing to a register in the chipset and it finally worked.
This means that I have a reliable, interrupt driven method of reading not only the keyboard but also the serial ports, which can be used in future for the menu system. It also indirectly tests the interrupt system.
Re: General Stuff(tm)
Posted: 21 Jun 2025 20:59
by stephen_usher
Well, the second (and last) outing of the Zero 1 model railway layout didn't go very well. Mid morning the Zero 1 master control unit just stopped working. Well, it turned on but didn't respond to commands. I'm wondering if the TMS1000's internal SRAM has failed or the chip has suffered another failure, as there's very little else on the system to go wrong.
Re: General Stuff(tm)
Posted: 23 Jun 2025 19:25
by stephen_usher
Well, the Zero 1 master control unit's problem was due to the carbon paint I used on the rubber membrane. Some of it rubbed off and stuck to the PCB, shorting multiple key pad pads. The TMS1000 wasn't happy when that happened. Once I cleaned the excess carbon off the unit worked again.
Oh, and I've finished the serial port test on the QL diagnostic ROM so I've declared it good enough to use. There are no interactive tests but as long as the machine is minimally alive you should get useful information out of the serial port.
Re: General Stuff(tm)
Posted: 26 Jun 2025 21:43
by stephen_usher
This evening I decided to take a look at the Amazon special "Nankadf" "bench power supply" I bought a few years ago and didn't use 'cos the output was awful.
So, this is the main PSU board:
IMG_4474.jpeg
As you can see it's a simple switch mode power supply with some additional circuitry. There's a TL494C PWM control IC, which is probably controlling the output voltage.
On the output side it just has a coil (inductor basically) and some 2200uF caps and that's it! No wonder if you put any reasonable load on it at 5V you get a choppy hell on the output.
Even at low power it has difficulty holding the voltage. Here is what the output looks like when you switch on a 0.1 amp device at 6V:
IMG_4475.jpeg
The voltage dips massively, with a spike down to 1.8V and then it recovers any overshoots to 7V before the capacitor depletes and it goes back to 6V.
When you turn the power supply off the voltage drops slowly as the large capacitors drain. Not great if you want to turn off the power to the device quickly and the capacitors will defeat any current limiting circuit the PSU is supposed to have.
Re: General Stuff(tm)
Posted: 07 Jul 2025 23:13
by stephen_usher
Just to note... Bambu Lab light grey PLA is a good colour match for the TT, or at least the original VME blanking plate.
I finally got around to designing and building a VME port blanking plate which I can mount the Lightning USB ports to, along with Serial 1. (No space for Serial 2 unfortunately.)
IMG_4485.jpeg
Re: General Stuff(tm)
Posted: 09 Jul 2025 14:50
by stephen_usher
I've had a delivery from JobDone...
IMG_4487.jpg
A QL motherboard, variously dead chips and some other stuff to help with the diag ROM development. Should help, I hope.
Re: General Stuff(tm)
Posted: 09 Jul 2025 15:00
by rubber_jonnie
stephen_usher wrote: 09 Jul 2025 14:50
I've had a delivery from JobDone...
IMG_4487.jpg
A QL motherboard, variously dead chips and some other stuff to help with the diag ROM development. Should help, I hope.
Nice, I'd like to see the write up on the repair :)