Wondering if a "dead test" ROM is feasible on the QL.

A place to discuss general QL issues.
stephen_usher
Super Gold Card
Posts: 553
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by stephen_usher »

I've updated the Github repository: https://github.com/stephen-usher/Sincla ... l-Diag-ROM

It may be useful now... at least to do memory testing as it now detects RAM expansions, sizes them and then runs an "own address" test and March test on it. Still not sure about the lower RAM RAM failure output as I'm going to have to revisit that.

P.S. This is how it looks currently. The "serial port" output is being sent to the terminal window I used to start the emulator (along with some IPC diag messages)

DiagROM.jpg


stephen_usher
Super Gold Card
Posts: 553
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by stephen_usher »

First test on real hardware... using the "let the Winbond W27C512 EEPROM overrule the system ROMs" trick.

Hack a ROM cartridge so that it passes all address lines through to the EEPROM and voila!

IMG_4446.jpeg

The masked ROMs must only pull down data lines but the Winbond EEPROM must actively drive them *HARD*.

Anyway, first test on a stock system shows that there's an issue with my expansion memory detection code due to sqlay3 looking like it has a bug where memory seems to be one byte too short.

IMG_4445.jpeg

With the Trump Card installed I have to hit the reset button to get the machine to boot but then it works fine, and verifies that my Trump Card's memory is good.

IMG_4447.jpeg

So, overall a success. I can dig a serial cable out now and see if that works.


stephen_usher
Super Gold Card
Posts: 553
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by stephen_usher »

Memory test and byte-to-hex issues fixed... Onward!


stephen_usher
Super Gold Card
Posts: 553
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by stephen_usher »

Serial port output now works.

A combination of my code having the incorrect sense when testing the transmit buffer full bit in the ZX8302 cstatus register and the ZX8302 documentation I have being wrong.

For the latter the document says that the baud rate bits are 000 for 75 baud going up to 111 for 19200 baud. In actual fact the bits are flipped. 4800 baud in the documentation is stated as '101' but that's actually 600 baud and it should be '010' instead.

All working now. I've swapped over to using ser2 as well as with the serial cables I have it was easier to verify the connection and, to be honest, it doesn't matter as long as it's documented.

IMG_4450.jpeg


User avatar
Dave
SandySuperQDave
Posts: 2805
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by Dave »

Pr0f wrote: Thu Apr 24, 2025 5:40 pm The ROM port is active for any address in the lower 64K
Not quite. All the signals except the ROM SELECT signal alias every 64K. So it repeats all the way through address space with an extra pin that lets you divine if the access is in the first 64. So the ROM port is ALWAYS active but not always selected.


stephen_usher
Super Gold Card
Posts: 553
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by stephen_usher »

Well, that was an adventure.... The IPC documentation is wrong again.

To send data to the IPC you clock it in by writing 000011x0 to the IPC write register, checking that the IPC has got it vis the ZX8301 status register at $20(zx83base).

Once the IPC has got all the nibbles it thinks that it needs for the command it now goes into output mode.

You clock the bits in by writing 00001110 to the IPC write register and wait for the busy bit in the status register to go low, at which point bit 7 holds the data bit... but you'd better have copied the register into a CPU register first when you're checking the status.

The documentation (and the source comments in the emulator) state that you use 00001101 to clock the data out. This is not the case.

Anyway, I now have this working on real hardware but the emulator I'm using isn't putting anything into the status register at all, which threw me for a loop for most of the afternoon.


stephen_usher
Super Gold Card
Posts: 553
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by stephen_usher »

It turned out that the emulator required the status register to be read twice to get the correct contents!

Now tests the beep and if a key on the keyboard has been held down. Github updated. The updated comments in the code can wait until tomorrow.


stephen_usher
Super Gold Card
Posts: 553
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by stephen_usher »

Oh, and this is what it does so far...

https://youtu.be/Uvuj6TJSwe4?si=QIvUdCgJWScVfTcK


martyn_hill
QL Wafer Drive
Posts: 1097
Joined: Sat Oct 25, 2014 9:53 am

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by martyn_hill »

This is a really useful utility, Stephen - well done for persevering!


Derek_Stewart
Font of All Knowledge
Posts: 4756
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Wondering if a "dead test" ROM is feasible on the QL.

Post by Derek_Stewart »

Hi,

Looks great, I will get a test bed setup and try it on non-working QLs


Regards,

Derek
Post Reply