ZX81 ULA Discussion

Discussions about Sinclair ZX80 and ZX81 Hardware
User avatar
Paul
Posts: 1604
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: ZX81 Enhanced ULA replacement module.

Post by Paul »

Andy Rea wrote:I would like to do a kind of write-up on how the whole thing has evovled over time. might make an interesting read, but for me that is a big ask, i'm not really one for documenting things
Hi Andy,
some of my friend would like to make a small magazine to be published in mid-march (in German to be sold at our anual meeting).
I was asked to write an article about your ULA. It would be great if you could help me with some input and also some photos, it might be reusable for your story / reused from your story.
As I have to translate it to german you wouldn't need to give it in essay form, just some notes ;)
It would would be really great if you helped with this :)
In theory, there is no difference between theory and practice. But, in practice, there is.
zx80nut
Posts: 108
Joined: Mon May 23, 2011 2:10 pm
Location: A bit north of Cardiff, Wales.
Contact:

Re: ZX81 ULA Discussion

Post by zx80nut »

Hi Andy.
I realised the same last night :-(

I counted the pins, and there aren't enough IOs with the 44-pin Xilinx devices.
I was going to skip the USA/UK as it's not needed, but I wanted the cassette.
The alternative was to off-load the keyboard read to a seperate chip (as on the ZX80), and just have a kb read enable o/p on the CPLD. This would bring it within the 34 IOs but would need 2 chips.

I'll probably go for the Altera Max EPM7064SLC44-10N as it is still in the small package that I wanted, and has 36 IO's
It's a lot more expensive £7.25 + vat, but it is a 5V device so don't need a regulator.

I'll need to install the Altera dev software on my PC.

Swings and roundabouts...
User avatar
RetroTechie
Posts: 379
Joined: Tue Nov 01, 2011 12:16 am
Location: Hengelo, NL
Contact:

Re: ZX81 Enhanced ULA replacement module.

Post by RetroTechie »

zx80nut wrote:Yeah, I've been looking (glazed over a bit) at bodo's sourcecode.
Yeah, couldn't make much sense of it either... ;) then again, I've started reading snippets of Verilog & VHDL here & there, but not really dived into it. The small projects I've done so far, were done using schematic entry. Since you can divide design up in modules (as I have in ULA project), there isn't much you can't do using schematic entry. It's just not the easiest way to do things as a design gets bigger (but at least it can be read by people who don't know a HDL). In Xilinx' ISE suite you can mix & match modules created with schematic entry, Verilog or VHDL as desired (I assume that's true for Quartus as well). Probably I'll move to using Verilog soon...
Andy, Retrotechie, are you guys going to be publishing your sourcecode sometime ?
Planning to, but I'd want to have a 'clean' & feature-complete design before doing so. Right now the hardest steps are done, but design does not yet behave exactly the same as a ZX81, nor is it very robust timing-wise. I understand the philosophy of 'release early, release often', but I don't want to publish a half-baked design, and have others base their 'products' on it. Shouldn't be too difficult to significantly improve what I have now.
Currently I don't know what size chip to get, though, as I don't know how many macrocells are needed. Retrotechie seemed to need more than Bodo, as I the Mach 210 only has 64.
A Mach 210 macrocell != an XC9500 macrocell != an Altera LE. You can't always say up-front whether a design will fit into a specific device. But there's an easy way to check: select a device, go through design -> synthesize -> fit process, and (if it doesn't fit) you'll be sure to get errors stating that chosen device doesn't have enough macrocells or I/O pins. And there's many ways to optimize a design, so far I used few of those... :mrgreen:

If you just want to dabble a bit with programmable logic, get an XC9572 (5V) or XC9572XL (3.3V) in 44-pin PLCC, or XC9572 (5V) in 84-pin PLCC if you want an easy-to-handle package AND be sure to fit a ZX81 ULA in there. 34 I/O's should be enough to replace most ULA pins, but for a full 1:1 ULA replacement I think you'll need a few more I/O's...

If you're aiming for a plug-in ZX81 ULA replacement board, get an XC9572XL in 64-pin QFP housing. This part (seems like Farnell doesn't have it) would be ideal in terms of logic & number of I/O's, but a fitting adapter board would be absolute necessity since it has very fine pitch (0.5mm) between pins.

FWIW: a decent design should be easy to move from one to device to another when the need arises. If you go Altera route I'm sure they have similar parts but I wouldn't know which... maybe Andy knows more?
User avatar
RetroTechie
Posts: 379
Joined: Tue Nov 01, 2011 12:16 am
Location: Hengelo, NL
Contact:

Re: ZX81 ULA Discussion

Post by RetroTechie »

zx80nut wrote:I counted the pins, and there aren't enough IOs with the 44-pin Xilinx devices.
Nope, only 34 I/O's on those.
The alternative was to off-load the keyboard read to a seperate chip (as on the ZX80), and just have a kb read enable o/p on the CPLD. This would bring it within the 34 IOs but would need 2 chips.
Yep I just realized the same. However: for a 'series product' I wouldn't quite rule this out. There exist very small package versions of plain logic IC's, and the 44-pin CPLD's you could then use, are very cheap & easy to hand-solder (even the QFP versions are do-able as long as the part goes onto a board). And ordinary logic IC's are cheap as dirt. ;) It would complicate board layout however, and probably limit extension options too since you'd have very few (if any) pins left.

Btw: if you already have a ZX80/ZX81 clone built using just 74xx IC's, then needing 1 IC beside the CPLD wouldn't matter a bit... :mrgreen:
zx80nut
Posts: 108
Joined: Mon May 23, 2011 2:10 pm
Location: A bit north of Cardiff, Wales.
Contact:

Re: ZX81 ULA Discussion

Post by zx80nut »

I think I'm making progress...

I installed both the Altera and Xilinx software dev and did a crash-course / Google to get me running with the VHDL. After the first couple of blocks of code it started to get easier.
A bit worrying when I first put in some of the blocks of code, as it said I only needed 1 macrocell - I then realised that the optimiser had wiped out much of it as they were not being used. As soon as I put in more of the glue logic, the usage and generated schematic started to look a bit more healthy.
I've done 95% of the coding in VHDL, and it compiles.
Currently, I need 53 macrocells for the Altera (Using Quartus II software) and 58 macrocells according to the Xilinx ISE software.
I think I can remove an interim buffer, though, so I expect that to go down. Code isn't finalised, so this will definitely change, but is within what I was expecting, and will fit the devices that I intend to get.

The coding in VHDL is actually smaller than I expected - haven't tested it yet, though ;)

I'll buy a small selection of CPLDs (as I can use them in other projects).
I need 37 IOs (or 38 if I do the USA/UK) so if I want to use a 44-pin chip then I need to off-load the keyboard read (as mentioned in an earlier post) to, say, a 74LS245 (got lots of them).

Anyway, if I get time, I'll do the Farnell order later today (need other components for other projects as well, so need to make a list first!)

Regards.

Grant.
Jose_Leandro
Posts: 13
Joined: Fri Nov 25, 2011 3:58 pm

Re: ZX81 Enhanced ULA replacement module.

Post by Jose_Leandro »

Andy Rea wrote:
i have seen it on a spanish (i think it was spanish) website but that also was only for personal use i believe.

Andy
[Sorry for my poor english]

Hello

My name is José Leandro. I am a zx spectrum user that enjoy making hardware things (mine and from other).

The spanish website that you say is where I put my articles:

http://trastero.speccy.org/cosas/JL/JL.htm

for ZX81 ,I make 3 articles:

- zx81 video signal. Where I show the video signal from a "bad" ULA 2C184 and a "good" ULA 2C210E.
- Circuits for zx81 video signal. Some mod for video signal that I found in internet and some magazine.
- ZX81 Bodo Wenzel ULA where I made a PCB board with the mach210 ULA from Bodo.

There is one important thing that I wrote in this article. Bodo Wenzel ULA has a big problem

When I made the board and test it in a zx81, I watched a dark image like original 2C184 ULA. The scope showed me that Bodo ULA made the same video signal.

In those days, I was in contact with Bodo and I showed him my problem. We found that Bodo studied the 2C184 ULA and made a perfect clone ( with video signal without poch ) :-(

He told me that he didn't have the software for ABEL and the program for MACH chips. It wasn't a problem because I have all the software and a EPROM programmer that can program this chips.

The problem come because he said me that he used the 100% of MACH210 chips and it's not possible to add a poch circuit inside the chips. The only solution he found was invert the video signal (black paper, white characters). It's a very simple modification in the ABEL code.

I don't have enough ABEL knowledge and the few change I made of original code show me that Bodo said, the compiler can't fix the code inside the MACH ( more that 100%. )

In my website, you can found the original code and "inverted" code for Mach210 chips. If anyone have time and knowledge..........

One thing more. I read the forum ( I say that I like hardware ) and see some progress in order to replace the ULA with a more actual chip. I expect you finally make it and put all the information in a website. Why?

Three months ago, a guy from Greece sent me a email because he has a zx81 with a broken ULA. He saw my article and he had some MACH 210chips. I explain the problem with video signal and I sent him to this forum. He said me that here, there are some progress but not a real replacement (like my solution with bodo chips). Like he couldn't program the MACH, I send him 2 MACH (a normal one and a "inverted" one) . He sent my his "black" mach and two happy person :-)

bye

José Leandro
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: ZX81 ULA Discussion

Post by Andy Rea »

Ah yes that is indeed the website that i saw it on :D

Welcome to the forum José, you should stick around :)

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
Post Reply