ZX81 ULA-in-a-CPLD

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
1024MAK
Posts: 2156
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZX81 ULA-in-a-CPLD

Post by 1024MAK » Thu Jun 07, 2018 4:06 pm

Andy Rea wrote:
Wed Jun 06, 2018 1:43 pm
1024MAK wrote:
Wed Jun 06, 2018 12:57 pm
@Andy, if you up the price to say £30, you could almost retire at this level of demand :lol:

Of course, you would want someone who suggested this idea not to loose out, so would supply him (me) with a couple of units at cost price (£15) ;)

Mark
For you Mark I'd be quite happy to do a BOGCT offer... For clarity that is Buy One Get Charged Twice :mrgreen:

However it's not really my intention to become rich, I believe a fair price that includes something for my labour is better for everyone.

Regards Andy
Of course, I was only joking...

Mark

nollkolltroll
Posts: 247
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: ZX81 ULA-in-a-CPLD

Post by nollkolltroll » Fri Jun 08, 2018 8:45 am

This is looking good, can't wait to order a couple when they turn up!
/Adam

User avatar
Andy Rea
Posts: 1503
Joined: Fri May 09, 2008 2:48 pm
Location: notts UK

Re: ZX81 ULA-in-a-CPLD

Post by Andy Rea » Fri Jun 08, 2018 7:08 pm

Image

When you know you've got a lot of testing ahead....
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

User avatar
1024MAK
Posts: 2156
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZX81 ULA-in-a-CPLD

Post by 1024MAK » Fri Jun 08, 2018 7:11 pm

Andy Rea wrote:
Fri Jun 08, 2018 7:08 pm
Image

When you know you've got a lot of testing ahead....
8-)

Mark

User avatar
Andy Rea
Posts: 1503
Joined: Fri May 09, 2008 2:48 pm
Location: notts UK

Re: ZX81 ULA-in-a-CPLD

Post by Andy Rea » Wed Jun 20, 2018 10:16 am

The first 10 nearly completed.

Image
Last edited by Andy Rea on Wed Jun 20, 2018 10:30 am, edited 1 time in total.
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

User avatar
mrtinb
Posts: 796
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZX81 ULA-in-a-CPLD

Post by mrtinb » Wed Jun 20, 2018 10:19 am

How do you want orders? On SellMyRetro?
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

rune
Posts: 158
Joined: Thu Sep 04, 2014 8:35 am

Re: ZX81 ULA-in-a-CPLD

Post by rune » Mon Jul 02, 2018 11:38 am

Hi Andy,

i have same question as Martin. I'd like to order/buy two.

Dave

User avatar
Andy Rea
Posts: 1503
Joined: Fri May 09, 2008 2:48 pm
Location: notts UK

Re: ZX81 ULA-in-a-CPLD

Post by Andy Rea » Mon Jul 02, 2018 11:45 am

rune wrote:
Mon Jul 02, 2018 11:38 am
Hi Andy,

i have same question as Martin. I'd like to order/buy two.

Dave
Hi Dave, more will be listed on sell my retro in next few days, see this thread.

viewtopic.php?f=8&t=2928&sid=e4df2a3225 ... c6c88c7c6b

Regards Andy
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

rune
Posts: 158
Joined: Thu Sep 04, 2014 8:35 am

Re: ZX81 ULA-in-a-CPLD

Post by rune » Mon Jul 02, 2018 11:56 am

Thanks Andy,

have subscribed to new topic.

Dave

overCLK
Posts: 18
Joined: Wed Nov 07, 2018 10:12 pm
Location: Spain

Re: ZX81 ULA-in-a-CPLD

Post by overCLK » Thu Nov 08, 2018 7:34 pm

Hello all.
I was really glad to know that finally there are some ULA replacement on modern comodity hardware. Congratulations to the winners! :-)


Half a year ago my only working ZX81 started to show a strange behaviour, some missing pixels always in the same position and also the printed characters were shifted, as if a bit in the character address was not working. Well, I blamed it on the ULA that also started to get even hotter than usual and started to look for some way to fix the problem.

I stumbled upon some projects and among them this thread here, where people was starting to develop some solutions based on the great design by Alwin Henseler. All this CPLD world (and also the ZX81) was new for me, but this was a good reason to try to learn.

I designed a board based on a Xilinx XC9572XL and ordered the minimum batch. After some changes in the clock components managed to get a somewhat stable oscillation only to find out that it didn't work at all. Random behaviour with out-of-sync screens, still garbage screen and even some random characters here and there. Not as elegant as other designs I've seen here, but still...
cpld-testing.png
I was astonished also to find out that disabling NMI generation (by closing the needed jumper) the thing worked! I got the sacred 'K' cursor and I was even able to type a little BASIC program and see it run with tears in my eyes. :-)

So it seemed to me that I was near, but how mistaken I was. Since my broken ULA was still generating a crippled K cursor, I decided to tap in the analyzer to compare the relevant signals with the ULA and the CPLD plugged in.

The first thing I found was that my NMI pulse trains had 31 pulses whereas the ULA ones had 55 pulses. I read in the original project good documentation that the US/UK pin should be pulled-up. So I added a resistor (as you can see in the photo) and that fixed the problem. Anyway I just thought that this shouln't be causing a hung, only maybe some video sync issues.

The problem is that the NMI pulse generation under my CPLD replacement gets eventually disabled for whatever reason, to never be reenabled again. I can see the IOREQ/WR/A1/A1 combination that disables the NMI pulse as happens for each frame, but there is a point when it no longer gets reenabled. For some time I suspected that the Sync circuit could be the reason, because the NMI pulse has different voltage levels, and maybe the circuit (TR1 and friends) is very sensible to the NMI level (even though the relevant NMI level here is zero). I tried to buffer the NMI signal with a TTL buffer with the same results.

This is when I came back to this thread and found the great design from Andy (I love the CPLD disposition and how tiny the board is) I saw that the componentes are pretty the same, except for what I understand is a transistor to amplify the tape input level. But for the rest, no buffers whatsoever, capacitors for the voltage regulator, for the CPLD power lines, cristal polarization and that is all. So I thought that maybe there was still hope. :-)

But I'm not able to figure out why the NMI gets disabled and never enabled again. Even if the NMI generation was not stable or the sync circuit was not generating the needed WAIT states, I would expect a bad video output (out of sync) but not what seems to be a hung of the computer. So I decided to come here and expose the case to the ZX81 experts, looking for some tips to continue with this project. Because currently I'm honestly out of ideas. :-(

So, this is an analyzer capture with the original ULA:
ula.png
always the same pattern. I understand the dense HALT enabled zones match the rendering of the screen, and the two contiguous NMI zones are the lower and upper blank screen lines (with the VSYNC in half).

With the CPLD is pretty the same, but it gets stopped suddenly (sorry I was not able to figure out how to use the same x-scale in the analyzer software, but the timing is pretty the same as in the ULA capture)
cpld.png
If we zoom into the zone where the NMI gets disabled to never be enabled again, my untrained eye cannot detect any problem (neither the other eye).
cpld-zoomed.png
So, why could be that the NMI generation is stopped and never reenabled again? Don't hesitate to ask for further information, analyzer dumps or scope measurements. :-)

I'm afraid this post is finally longer than expected. Congratulations and thanks a lot if you reached this point. :-)

Cheers.

Manuel

Post Reply