System test rom/Board

Modern, Memotech inspired, hardware projects
Martin A
Posts: 797
Joined: 09 Nov 2013 21:03

Re: System test rom/Board

Post by Martin A »

I reached the attachment limit on the last post. So for anyone that's interested, here's the source code, and the listing output from the assembler.
Source.zip
Source and listing
(23.36 KiB) Downloaded 493 times
User avatar
1024MAK
Posts: 757
Joined: 24 Dec 2012 03:01
Location: Looking forward to summer, in Somerset, UK

Re: System test rom/Board

Post by 1024MAK »

8-) 👍

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer in Somerset later in the year :D

Not as many MTXs as Dave! :lol:
User avatar
AndyKey
Posts: 74
Joined: 12 Aug 2012 01:29
Location: Southampton, UK
Contact:

Re: System test rom/Board

Post by AndyKey »

Cool tool. Much better than my testcard.
{{{ Andy
stephen_usher
Posts: 325
Joined: 27 Nov 2016 19:58

Re: System test rom/Board

Post by stephen_usher »

Looks amazing!

I’ve just had a thought though... What if the graphics chip has a problem?

Would there be a way to maybe send diagnostic data out of the parallel port if the diagnostics find a graphics chip fault? I imagine that this is the first thing that you initialize. Maybe sending a “booting diagnostics” message to the parallel port anyway just to show that the system isn’t completely dead even if there’s no display?
Bill B
Posts: 590
Joined: 26 Jan 2014 16:31

Re: System test rom/Board

Post by Bill B »

A few years back I had an idea for a slightly more complex test board, which would solve the display issue.

If you pull the Z80 /BUSREQ pin low (which is on the edge connector) the Z80 stops and floats all the signals. It is then possible to probe all the hardware from outside.

So my idea was a board containing (probably) a 40 pin PIC chip, a small LCD text display, and a button or two. The board would ground /BUSREQ, and then the PIC chip, running from its own internal EEPROM, would probe the MTX hardware and report results on the LCD.

This approach has the advantage that it could be used whatever the state of the MTX. No need to disable internal ROMs.

But then, unlike Martin, I never did anything about it :oops:
Martin A
Posts: 797
Joined: 09 Nov 2013 21:03

Re: System test rom/Board

Post by Martin A »

stephen_usher wrote: 23 Apr 2019 09:58 Looks amazing!

I’ve just had a thought though... What if the graphics chip has a problem?

Would there be a way to maybe send diagnostic data out of the parallel port if the diagnostics find a graphics chip fault? I imagine that this is the first thing that you initialize. Maybe sending a “booting diagnostics” message to the parallel port anyway just to show that the system isn’t completely dead even if there’s no display?
If the VDP were dead but the rest of the system OKish, then the sound chip would initialise. Black screen and no tone, being the indicator of no VDP or really bad VRAM.

However, there's one spare pin on the GAL, which can probably sink enough current to run a small LED. Running a "heartbeat" from the main menu might be possible.

Or borrowing from Bill's idea, maybe the pin could be used as select for a small LCD display. I have an 8 character display in a box "somewhere".
Martin A
Posts: 797
Joined: 09 Nov 2013 21:03

Re: System test rom/Board

Post by Martin A »

I went with a small LED connected to the spare pin and 5v supply line. That way the GAL is sinking current rather than sourcing it.

The default for the pin is to output low so if the CPU doesn't start the LED will stay on, to confirm there's power to the board.
Now with blinkenlight
Now with blinkenlight
heartbeat.jpg (68.22 KiB) Viewed 10369 times
The LED will flash at approx 1hz when the diagnostic rom is at the main menu. When running the MTX roms, the LED will flash when the OS switches between the B and C roms as the R0 rom page line is used as the blink control.

The simple monitor is progressing, I've started work on a z80 disassembler to complement the hex dump. The 8k rom will be pretty much full once that's done. Not using any ram makes for somewhat inneficient code (at least that's my excuse!).
Martin A
Posts: 797
Joined: 09 Nov 2013 21:03

Re: System test rom/Board

Post by Martin A »

Monitor code completed. The test rom will now list Z80 code as well as dump it. There's a couple of hundred spare bytes free in the rom, which is about a 50-50 mix of code and data tables.

Short routines can be input in Hex using the E command and then listed back, and for the really adventurous they can be run with the G option.

Screen shot is from the emulator, though this time it's been tested on a real MTX.

There was a minor issue with the last rom binary I put on here. On the real MTX there were issues reading the keyboard. The keyboard code has been slowed down, previously it wasn't allowing enough time for the resistors on the board to pull the sense lines high when moving through the matrix. That was resulting in phantom key presses being picked up. Doubling the time between changing the sense lines cured that.
Disassembling Z80 code with no Ram
Disassembling Z80 code with no Ram
build234.jpg (47.59 KiB) Viewed 10358 times
32k rom image arranged with system roms in order (OS, then basic, then assem) and then the test rom as the last 8k.
Binary.zip
Rom binary dump
(23.9 KiB) Downloaded 472 times
And finally the Excel file of the board layout. Drawn from the back, it's the master diagram for the point to point wiring on matrix board. It shouldn't be too hard to construct a proper schematic from.
Layout2.pdf
Layout of the test board
(223.54 KiB) Downloaded 487 times
User avatar
1024MAK
Posts: 757
Joined: 24 Dec 2012 03:01
Location: Looking forward to summer, in Somerset, UK

Re: System test rom/Board

Post by 1024MAK »

Excellent work

ImageImageImage

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer in Somerset later in the year :D

Not as many MTXs as Dave! :lol:
stephen_usher
Posts: 325
Joined: 27 Nov 2016 19:58

Re: System test rom/Board

Post by stephen_usher »

Indeed!

I just hope that I can get my machine into a state something like this will be useful. I've got a lot components arriving on Wednesday meaning that I can replace practically every chip except the video memory, PAL, ROMs and sound chip.
Post Reply