New! Dark mode!

Browsing Pinside at night? Getting tired of all the white? Switch to dark mode using the button in the top right (or CTRL-B)!

(Topic ID: 179517)

Z80 Club


By Sheprd

3 years ago



Topic Stats

  • 22 posts
  • 12 Pinsiders participating
  • Latest reply 30 days ago by benheck
  • Topic is favorited by 7 Pinsiders

You

Linked Games

Topic Gallery

There have been 4 images uploaded to this topic. (View topic image gallery).

zilog_z80 (resized).jpg
Matrix (resized).JPG
1024px-Z80_arch.svg (resized).png
Z80 SS (resized).JPG

#1 3 years ago

Need a place to discuss the coolest of early CPUs and machines based on it! I just brought home a Game Plan Old Coney Island, and it brings back a lot of memories of the days that I used to design with the Z80. As I get time, I will post some information on just why the Z80 is such a cool CPU.

Mac

#2 3 years ago

Subscribed. LDIR

#3 3 years ago

Ok, any discussion of the Z80 has to start with an understanding of difference between static and dynamic RAM. Almost all microprocessors use dynamic RAM which is cheaper. The Z80 is somewhat unique in that it uses static RAM. Dynamic RAM requires that you continually "refresh" it with clocked signals. Static RAM, on the other hand, is more like a set of flip-flops that toggle between two states and stays that way until you change it (or remove power). NVRAM is a type of static RAM that retains its state even when power is removed. The Z80 did not have NVRAM.

Why is it cool that the Z80 uses static RAM? Because it allows you to take control of the clock, and gate it, or STOP it, without disrupting the operation of the CPU. If you tried to do that with a 6800, the internal memory would immediately lose the refresh and fail to work.

Why would you want to stop the clock on a Z80? By stopping the clock, you can then pulse the clock signal to "single step" the CPU. Every data line and control signal will act just as they do in full speed operation. You can watch the byte by byte operations of the instructions on the Z80 address and data busses in real time... slowed down to human time.

I built a simple monitor circuit to display the data and address lines, decoded into HEX for easy reading, along with LEDs for the R/W and other control lines. With the simple single step circuit, I could step the operations of the Z80 step by step to debug any software that I wrote. To do this with a 6800, you needed fancy logic analyzers and a "software development system" to do debugging. Even then you could not see the interoperation functions between the hardware chips. This is such a great learning tool that it should be used to teach new engineers how computers really work. Its truly "hands on" when you see data being read from the EPROM at an address, then loaded into a register in the Z80, then rewritten to a different address or to a peripheral chip.

It was also VERY helpful in debugging hardware. If you have a short or open circuit on any of the address or data bus, it was pretty easy to stop the Z80 and see the conflict with a simple oscilloscope or even a volt meter.

Next time, I will talk about some other unique cool aspects of the Z80, such as hardware vectored interrupts and the hardware block move commands.

#4 3 years ago

For those that want to dig deeper, here is a link to a very good online book written back in 1981 that helped the home hobbyist build their own computers: https://books.google.com/books?id=mVQnFgWzX0AC&printsec=frontcover&hl=en#v=onepage&q&f=false

In this book is a single step circuit to allow you to see the machine cycles as operations occur.

Z80 SS (resized).JPG

#5 3 years ago

Does anyone know of any pinball manufacturers other than Game Plan that used the Z80?

#6 3 years ago
Quoted from Sheprd:

Does anyone know of any pinball manufacturers other than Game Plan that used the Z80?

I believe the Data East 128x16 dot matrix displays used a Z80.

#7 3 years ago

Thanks for the book reference!

#8 3 years ago

The arcade games really stepped up their complexity when the Z80 took over. What was it, around 1983?

#9 3 years ago
Quoted from Sheprd:

Does anyone know of any pinball manufacturers other than Game Plan that used the Z80?

Midway's Rotation VIII used a Z80.

Interesting topic! ( although I was a 6502 and 680x guy those days )

#10 3 years ago

My 2nd home brew computer was a Z80 based board. Very easy to use and the Z80 series stuck around for many years.
First home made computer was a Cosmac Elf back in '70s. Also had an old Intel 4004 based computer board. Worked but was slow and difficult to use. Included 4002 memories plus a handful of other really old stuff. Sold it to a computer museum in Germany. And - also had a collection of TRS-80 Model 1s based on the Z80. Bought first of these in 1979 and paid quite a bit for it. Yes... I am old.

Only popular 8-bit processor remaining now is the 65C02.

#11 3 years ago
Quoted from G-P-E:

Sold it to a computer museum in Germany.

Very cool!

#12 3 years ago

Back in the day, Intel had the lion's share of the microprocessor business with their 8080. Federico Faggin and Ralph Ungermann who worked on the 4004 and 8080 at Intel left in 1974 to start Zilog. By 1976 they had created the Z80. The recipe for success when choosing hardware has always been: "Select the software that will meet your business need, and buy hardware that runs that software well." They knew that they could do better than the 8080, and still keep code compatibility. The Z80 was designed from the ground up to be code compatible with the 8080 but have more capability to run the existing base of software better and faster.

Zilog looked at the software that was consuming the clock cycles and set out to offload the software from performing time consuming looping and polling. They put in place clever hardware to automate the tasks and speed up operations. Rather than executing dozens of the 8080 commands to read, write, increment, and loop until a block of data was copied from one location to another, they created new commands that would allow you to write the from, to, and count into registers and then the hardware would complete the action without having to reload the operation code over and over. This was blinding fast and very efficient.

Today, efficiency has given way to ease of use. Programmers don't write code in assembly language and many programmers don't know what goes on down at the hardware level. Higher level languages obfuscate the inner workings but allow the programmer concentrate on writing more complex code rather than simple fast efficient code, and writing code that runs on multiple platforms rather than optimizing to take advantage of unique hardware. Back in the day, resources were scarce. There was only 64K of usable address space, RAM and EPROM were expensive, and you had to make the most given the limitations. Those limitations are long gone, which breeds the bloatware that we have today.

Ken Shirriff's blog is a nice reference for the architecture of the Z80: http://www.righto.com/2014/10/how-z80s-registers-are-implemented-down.html

1024px-Z80_arch.svg (resized).png

1 week later
#13 3 years ago

Working on my Z80 based Game Plan "Old Coney Island!" and realized that none of the documentation includes a switch matrix diagram. Created the one below:

Matrix (resized).JPG

The ACC-RST is the accounting reset button on the CPU board. The grey boxes are switches near the coin door. All others are on the playfield.

Mac

1 week later
#14 3 years ago

One of my many side projects is a Z80 based system. One version was built as a shield style circuit on top of an Arduino Mega. I used the Mega for clocking, and to read/write the data and address bus, providing a simple serial interface. One of these days I need to revisit it.

#15 3 years ago
Quoted from Sheprd:

Ok, any discussion of the Z80 has to start with an understanding of difference between static and dynamic RAM. Almost all microprocessors use dynamic RAM which is cheaper. The Z80 is somewhat unique in that it uses static RAM. Dynamic RAM requires that you continually "refresh" it with clocked signals. Static RAM, on the other hand, is more like a set of flip-flops that toggle between two states and stays that way until you change it (or remove power). NVRAM is a type of static RAM that retains its state even when power is removed. The Z80 did not have NVRAM.
Why is it cool that the Z80 uses static RAM? Because it allows you to take control of the clock, and gate it, or STOP it, without disrupting the operation of the CPU. If you tried to do that with a 6800, the internal memory would immediately lose the refresh and fail to work.
Why would you want to stop the clock on a Z80?

The Static vs Dynamic RAM is usually dependent on the implementation. I've seen dynamic memory used more often with the Z-80 since the Z-80 made it easier to handle the refresh of the memory instead of adding a lot of extra dedicated circuits to do it. To help with random numbers you could pull the R resister that was used to handle the refresh.

Now if you use Static you can avoid the overhead of the refresh and it is easier to keep alive as long as it is powered.

DRAM was cheaper and at the time was often worth the overhead in extra chips, etc.

I wrote a ton of Z-80 code for the old TRS-80 systems back in the 80's and needed the extra speed for the games I was writing. Awesome CPU. You could usually find the the entry point by searching for the bytes for the DI then LD SP, xxxxh. The by byte for the instructions itself would do. Before launching a program most programmers would want to set the stack to a known location and before doing that would disable the interrupts since you don't want to risk an interrupt coming in at the exact moment of changing the location of the stack. They could be enabled later if needed.

#16 3 years ago

The RAM discussion was referring to the internal memory on the Z80 (registers and such), not the external RAM, which as you mention is auto-refreshed by the Z80.

Picture of the original ceramic DIP:zilog_z80 (resized).jpg

#17 3 years ago

You can refresh your Z80 skills by coding a testrom for Gameplan CPU boards. Or for Data East 128x16 Dot boards.
Just a thought Some people will be very happy with those test tools.

3 years later
#18 3 months ago

Inder's Sound boards run off of Z80's. Just found out because one of my Z80's is bad.

#19 3 months ago

The TI-81, TI-82, TI-83, and TI-84 calculators that every high school student and college student own for their math classes still runs on a Zilog Z80. They just increased the frequency every iteration. I always thought that was cool.

#20 3 months ago

Hell, I'm looking at a listing on Mouser right now that shows a whole series of current production iterations of the Z80. Most of them are in modern SMT packagings, but the 'old DIP-40 is still in there. When it comes to processors, I can't think of any that have had the legs of the Z80.

-Hans

#21 3 months ago

It's about the easiest processor to get booted, technically. It has static ram for registers(so, no refreshes required), so you can wire the data bus to ground, the address bus to some LEDs and watch it step through the 64k address space with a manual switch for a clock if you want to.
If you want to get started with it, you might look at Steve Ciarcia's book on building a Z80 computer from scratch.
https://www.google.com/url?sa=t&source=web&rct=j&url=http://www.pestingers.net/pdfs/other-computers/build-your-own-z80.pdf&ved=2ahUKEwjQzN-9ys_qAhXxN30KHSPFBVYQFjAMegQIBRAB&usg=AOvVaw1NYltLapAMZDnUWhyecUjz

2 months later
#22 30 days ago
Quoted from mbaumle:

The TI-81, TI-82, TI-83, and TI-84 calculators that every high school student and college student own for their math classes still runs on a Zilog Z80. They just increased the frequency every iteration. I always thought that was cool.

Yeah even the newest one is based on the eZ80 Acclaim which has a lot of modern IO options.

But mostly I think TI just wants to reuse their 30 year old code

Promoted items from the Pinside Marketplace
650 (OBO)
Machine - For Sale
Brooklyn, MI
From: $ 18.00
Apparel - Men
Pinside Shop
$ 20.00
Various Novelties
GC Pinball
$ 4.49
Electronics
Yorktown Arcade Supply
$ 30.00
Playfield - Toys/Add-ons
3D MODS
$ 28.00
Playfield - Other
Pin Monk
$ 20.00
Playfield - Protection
3D Tech. Pinball Parts
From: $ 42.00
Cabinet - Shooter Rods
ModFather Pinball Mods
$ 32.00
$ 79.99
Cabinet - Armor And Blades
PinGraffix Pinside Shop
$ 65.00
Cabinet - Armor And Blades
Texas Pinball
$ 54.99
Cabinet - Shooter Rods
Lighted Pinball Mods
$ 200.00
Lighting - Interactive
Professor Pinball
$ 20.00
Various Novelties
GC Pinball
$ 22.00
Cabinet - Sound/Speakers
ModFather Pinball Mods
$ 159.99
Lighting - Other
Lighted Pinball Mods
$ 7,599.00
Pinball Machine
Gulf Coast Pinball, LLC
$ 200.00
Lighting - Interactive
Professor Pinball
$ 18.99
Eproms
Matt's Basement Arcade
$ 79.99
Cabinet - Armor And Blades
PinGraffix Pinside Shop
$ 66.95
Cabinet - Shooter Rods
Super Skill Shot Shop
$ 75.00
Playfield - Toys/Add-ons
pinballmod
€ 70.00
Playfield - Toys/Add-ons
Creo Pinball
$ 19.00
$ 175.00
Lighting - Interactive
Professor Pinball
$ 5.00
Electronics
Docent Electronics
$ 269.00
Cabinet - Other
PinGraffix Pinside Shop
$ 19.95
Playfield - Toys/Add-ons
ULEKstore

Hey there! Got a moment?

Great to see you're enjoying Pinside! Did you know Pinside is able to run thanks to donations from our visitors? Please donate to Pinside, support the site and get anext to your username to show for it! Donate to Pinside