[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself


View post   

File: 251 KB, 1819x652, Z80A.jpg [View same] [iqdb] [saucenao] [google]
715554 No.715554 [Reply] [Original]

Can we get a Z80 thread going? I have been researching this little processor for the past few months and I love it. I have started to learn the Z80's assembly language (using muh TI-84+) and love it. Anyone else have any cool projects made with the Z80?

Helpful Links:
http://en.wikipedia.org/wiki/Zilog_Z80
http://www.cpu-world.com/CPUs/Z80/
http://map.grauw.nl/resources/cpu/z80.pdf
https://www.princeton.edu/~achaney/tmve/wiki100k/docs/Zilog_Z80.html
http://segaretro.org/Zilog_Z80
http://www.autometer.de/unix4fun/z80pack/
http://www.retrothing.com/2013/07/remembering-the-zilog-z80-microprocessor.html

Bible:
http://z80.info/

>> No.715557

>>715554
>Anyone else have any cool projects made with the Z80?
Not the Z80, but I mostly /diy/ with ARM cortex mcu's, I am still learning assembly for ARMv7 but it is pretty useful to know since there is always far more documentation on bare metal than the C library the vendor provides.

Z80 builds do look like fun though: https://www.youtube.com/watch?v=Cwda3-tXSMo What are you going to build?

>> No.715561

>>715557
I really want to end up making something like https://www.youtube.com/watch?v=DQ3vQW2Fs_w, but currently do not have the mooney or time for it.

>> No.715615

>>715554
>based Z80
Once upon a time I had an IEEE-696-bus computer based on Z80B (6MHz) running CP/M 2.2. Good times, good times..

>> No.715621

>>715554
Why did you choose such a dated piece of hardware to work with?

>> No.715622

>>715621
Not OP, but I'm guessing because of the sheer amount of documentation out there about the Z80

>> No.715666

>>715621
>dated piece of hardware
This. Can you even get these any more? Are they now a form factor the size of a pinhead? And how do you get a memory chip that is small enough to work with them -- it's an 8-bit bus, isn't it, with 16 bits of memory addressing? So 64K of RAM? (Not 64G or 64M, but 64K!!!)

>> No.715671

>>715666
>Can you even get these any more?

Oh fuck yes. Brand new from Zilog.

>Are they now a form factor the size of a pinhead?

Nope. You can still get 'em in DIP40 packages.

>how do you get a memory chip that is small enough to work with them

You get 'em the same place you got the Z80.

You really have no idea how many Z80's are out there running control applications do you?

>> No.715685

>>715554
1983 is when I got my Timex Sinclair 1000 with an add on 16KB of RAM. the built in interpreter BASIC but the real fun came when you started to explore the Z80 instructions and added assembly subroutines. Z80 is the 1st assembly language instruction set I learned.

the only real project was a small program to turn morse code into text that I wrote.

there are a lot of Z80 based industrial control systems still out there, and I once worked with a audio / video matrix swtich that had a Z80 for it's CPU

>> No.715691

>>715666
my guess is that OP wants to cheat on his exams by hiding formulas in apps.
that's the only reason my maths/physics class learnt z80. you know there is a mario port for that thing?

>> No.715694

>>715666
Z80 has a 16-bit address bus. You can easily get 64kB static RAM for a couple bucks, now, and by the way you'd be surprised how much you can get done in a 64kB address space, writing code in compiled C or direct assembly language.

>> No.715956

>>715671
>You really have no idea how many Z80's are out there running control applications do you?
Not so much in new designs. There's a reason Zilog went bankrupt and got bought out.

>> No.715991

>>715956
No, true, but that was inevitable as more powerful controllers became cheaper. There's still more than enough out there running systems that the Z80 will around for decades. Hell there are still minicomputers out there running industrial control systems.

>> No.716005

>>715956
There is no longer a cost difference between manufacturing an 8-bit MCU and a 32-bit MCU.

The original reason Intel added an on-board GPU to their processors: the die had to be big enough to connect all the pins to, the CPU didn't need that much space so they filled the unused space with a GPU! It's similar with MCUs: the die has to be big enough to connect all the pins to, so for any MCU with a lot of I/O pins, the die is big enough to fit a basic 32-bit processor.

>> No.716024

>>715694
>compiled C for massive time saving
this anon knows whats up

>> No.716050

>>715671
>You really have no idea how many Z80's are out there running control applications do you?
True, I don't. I am older than probably 95% of the people who post here, and the Z80 was a cutting edge design while I was in grade school. I know that there are old machines still chugging along, steam belching from their circuit boards, oxcarts hauling bits along their data paths, but I don't know why it would be a good idea to pick one of those setups for a new design.

I'm not sure what we use at work nowadays. The drawings I get just show "MCU" as a little box with lines sticking out of it. I think the chip has built-in Bluetooth, though, because why not.

>> No.716051 [DELETED] 

>>716024
Wave if you know the three-XORs memory swap trick.

>> No.716054

>>716024
Handcoded assembler FTMFW.

Wave if you know the three-XORs memory swap trick.

>> No.716097

>>716054
apparently using xor is bad practice because its obfuscation. standard is to use adds instead.
fucking comp sci people ruin everything

>> No.716105

>>716097

Apparently using Gotos and jumps is bad, even though every fancy if..then..else and iterative operations are changed into jumps and branch after compilation.

>> No.716107

>>716054
I know the trick but don't bother using it

>> No.716140

>>716097
The XOR trick is bad nowadays because it is a code pessimization. A modern OoO CPU can do the register swap using register renaming, while the XOR introduces read-after-write hazards which stall the pipeline.

>>716105
Once you've worked on software of non-trivial size you'll know why modern software engineering practices exist.

>> No.716149

>>716050
>but I don't know why it would be a good idea to pick one of those setups for a new design
See, you take that statement a little further, and you get the kids that post here all the time who think they need a Raspberry Pi running a full-blown OS just to make an LED blink on and off, when $0.25 worth of discrete parts will do the job. Modern general-purpose microprocessors require so much external circuitry to do anything, and can't be breadboarded, and microcontrollers, as sophisticated as they are, are often too small. Z80 used to be a general-purpose processor running an actual OS, single-threaded or not, and it requires only a single supply voltage, a little memory, and what peripheral interfaces you think it needs. You can do quite a bit in a 16-bit address space, you just have to not have the bloated-software mindset that modern coders seem to have.

>> No.716160

>>716149
And you can do all the Z80 can do and a fuckton more in a single-chip solution. The only valid reason for using a Z80 is because you want to. Even emulating a Z80 in a mid-range MCU is more convenient than using the real thing.

>> No.716170

>>716140
>A modern OoO CPU can do the register swap using register renaming, while the XOR introduces read-after-write hazards which stall the pipeline.

Yes, but we're talking about a Z80. It's a pure CISC CPU with a 16bit memory bus, immediate decode, and what, two general purpose registers? XOR swap can make a lot of sense.

>> No.716172

>>716160
You can drive TTL logic directly with a Z80 (DIP40). Can't do that with a fancy 32bit MCU.

8bit CPU's like the Z80, 8051 and even the 6502 have their place.

>> No.716173

>>716170
>16bit memory bus

Address bus, even.

>> No.716176

>>716172
What are buffer ICs? Also, not a concern for new designs.

>> No.716211

>>716176
>What are buffer ICs?

Unnecessary if you use something that can drive TTL directly.

>Also, not a concern for new designs.

It is for hobbyists and it is if you're going for cost reduction.

>> No.716267

>>716211
>It is for hobbyists and it is if you're going for cost reduction.
A three-dollar microcontroller and a 30-cent buffer will be a lot cheaper, simpler and use less space than a Z80, RAM, ROM and all the support components needed. And no-one uses TTL logic anymore.

>> No.717324
File: 113 KB, 560x658, 1414426857793.jpg [View same] [iqdb] [saucenao] [google]
717324

what happened to op? gave up due to all the negative responses?

>> No.717529

>>717324
Most Likely. Is that yours?

>> No.717541

>>717529
Yes busted, cannot handle negativity really depressing am taking meds to curtail anxiety.

>> No.717564

>>717541
pls don;t kill self

>> No.717593

>>717564
Thanks for the sympathy, tough though, gets really depressing esp. during Halloween holiday.

>> No.717600

>>717593
i;m so sorry

>> No.717622

>>717600
It is anons like you that give the mentally ill any genuine hope of scaling that dark and gloomy abyss of despair. Bless you!!!

>> No.717897

>>717622
thanks

>> No.717901

>>717541
>>717564
>>717593
>>717600
>>717622
>>717897
>/diy/ - Shitposting

>> No.717921

z80 Basic
http://www.youtube.com/watch?v=G2qJkNlncxs

how to build a z80 computer
http://www.allthingsmicro.com/projects/build-a-z80-based-computer

the original z80 computer
http://en.wikipedia.org/wiki/ZX80

>> No.718052

>>717921
>the original z80 computer

But that's wrong, there were Z-80 CPU boards made for S-100 motherboards before the ZX80 came out. S-100 computers were the first to be Z-80 based.

>> No.718209

>>717541
Chill, brah. We are trying to help you overcome your Z80 addiction. You can survive this. You will be stronger for it.

>> No.718215

>>716149
Not the same at all. Intentionally using obsolete technology just to be antiquated is very different from using overkill just because you don't know how to do it any better.

>> No.718225

>>718215

>TTL chips and discrete logic
>Obsolete technology

What?

>> No.718235
File: 1.29 MB, 2304x1728, imgp3265-burroughs-bx350-board.jpg [View same] [iqdb] [saucenao] [google]
718235

>>718225
Not him, but open any modern or semi-modern device. Quite often there are no 7400 series (or 4000 or whatever) chips at all, or at most very few of them. Times of pic related have been long gone.
And the real TTL, as in transistor-transistor logic, has been dead for decades.

>> No.718329

>>718225
You may not have noticed, but the whole world switched over to CMOS logic ages ago. Discrete logic is still used, but in fine pitch surface mount.

>> No.718337

>>718225

Nobody uses discrete logic at all anymore if they have any choice in the matter. You want as much of the logic done on a single chip as you can manage, because that reduces part count and, by extension, cost. It's not like it's truly dead, but it's more or less a last-ditch effort to avoid stepping up to a more expensive MCU/CPU.

Discrete logic in DIP sockets is dead in consumer electronics and has been for quite a while. About the largest thing you're likely to see in most electronics (outside of power-handing circuitry) is going to be in an SOIC.

I also don't understand why you say modern MCUs require a bunch of extraneous circuitry when that's outright wrong. It's perfectly common to find them ready to run, often to the point of sporting their own on-chip memory and a few peripherals. On the extreme end of that, you have something like the PSoC, containing CPU, memory, programmable analogue fabric, programmable digital fabric, and a ridiculously complex routing system that lets you tie whatever input/output functionality you want to almost any pin. They require absolutely _nothing_ to function other than a power supply.

>> No.718379

>>718337
>Worked at a laser tag with old air hockey table
>Read manual and laugh after figuring out that its a TTL logic board.
>Laugh hard and female co-worker worries about me

>> No.718409

>>718235
they still teach it in university because its possible but not practical to use it for most projects. which makes it good for avoiding plagiarism because there arn't endless tutorials to copypasta on instructables for it.

>> No.718556

>>718337

I'm not the guy you were talking to before, I was just wondering Why you said TTL logic is dead while like >>718409 said, they still teach it in universities.

>> No.718557

>>718556
They teach you all kinds of obsolete shit, which is good to know, but not particularly useful in practice.

>> No.718561

>>718556

Because it's still a good idea to learn how it works. Despite it being generally avoided in the name of profit margins, it's not like you'll never have to deal with discrete logic. Besides, while the possibilities of logic gates are obviously monumental, the basic building blocks are not. It doesn't exactly eat up so much of a semester that it's worth ignoring. Especially considering that at least knowing the tl;dr: of how microchips work is kind of important, whether or not it ends up being relevant to your job description.


As someone else pointed out, actual TTL has been gone for a long time, being completely supplanted by the various MOS processes, but that doesn't change all that much from a design point of view.

>> No.718576

>>718561
Well, you can leave out all the tiny capacitors and your circuit will still work.

xMOS is a closer approximation to the ideal gate than TTL.