Videobrain Prodding

videopain_debug

Yep, I broke out the logic analyzer!  I have hooked it up to the Videopain as I have come to call it.  There’s about 90 probes hooked up.  I used 6 pods which have 16 lines each and a clock.  I can’t quite save the data off the analyzer yet but I am working on it.   This thing is GREAT.  I could watch the code run, and then the CPU died.   I discovered too, that the RAM’s Din and Dout pins were swapped.  The schematic shows Din and Dout swapped so that meant I had to move a bunch of wires on the SRAM chips.  After doing this, I could see the SRAM clearing routine run ONCE at powerup now, instead of each reset.  On subsequent resets it reads the signature byte out of RAM and knows that RAM was initialized already.

After some more RAM writing, and other various things, the CPU writes to the UV201 ASIC and gets hung up.  I tried multiple ASICs, but they all do the same thing.  I have come to the conclusion that I’m fairly certain the schematic has some kind of error on it, which is preventing this from working.  Interestingly the RAM writes, which also stop the CPU work fine.  But when the ASIC is written to, it never resets the flipflop and the CPU stays frozen forever.  Here’s some handy-dandy captures with some code to illustrate this:

videobrain_ramwrite

Here you can see a normal RAM write.  Watch the “RAM WR” signal.  When it goes low, the clock to the CPU (XTAL) stops, which has the effect of stopping the CPU’s output clock below it (PHI0).  As usual, click to embiggen pictures.  This works fine and you can write to RAM as many times as you like, as the RAM init shows.   The logic signals here relate to the following code:

LM ; 43cf 16

XDC ; 43d0 2c

ST ; 43d1 17

DS (IS) ; 43d2 3c

BF $4,A43ce ; 43d3 94 fa

PK ; 43d5 0c

43D1h is the ST(ore) instruction, which writes to RAM.  DC is pointing to 0FE8, which is the address it writes to.

videobrain_death

And here is where it wedges.  It doesn’t crash, it just goes to sleep and never wakes up.  This is the first write to the ASIC.  The code for this is:

DCI $0850 ; 4763 2a 08 50

LIS $4 ; 4766 74

SL 4 ; 4767 15

LR $8,A ; 4768 58

LI $ff ; 4769 20 ff

A476b: ST ; 476b 17

The ST instruction at the end writes to (DC) which is pointing to 0850h, one of the ASIC registers.  Check out the trace:  The address bus is stuck on 0850h, data bus is 0ffh (which is what it’s writing, from that LI $FF),  RAM WR pulsed low to indicate the write, the CPU stops, and that’s it.

At this point I am fairly sure it’s an error in the schematic and I am kinda stuck until I can get a Videobrain to poke, or someone to confirm a few things on the schematic.  I am not quite sure why writing to the ASIC is doing this, while writing to other things does not. That part is kind of a mystery.  The next step is to see if I can solve THAT mystery.  If not I dunno what to do except some external help with tracing some paths on the system.