Questions tagged [z80]

For questions regarding the Zilog Z80 microprocessor

Filter by
Sorted by
Tagged with
25
votes
4answers
5k views

Z8410 DMA chip as GPU?

There are basically two ways to design a 2D graphics system: Provide lots of hardware support in the form of tiles, hardware scrolling and sprites, to put together each frame on the fly from a small ...
95
votes
9answers
35k views

Why do C to Z80 compilers produce poor code?

When reading some other questions about compiling C for the Z80, How much benefit should be expected on a more advanced compiler for z80/r800 based computers? Native C compiler for Sinclair ZX ...
45
votes
2answers
12k views

How did the Z80 instruction set differ from the 8080?

The Zilog Z80 microprocessor, known for its use in the ZX Spectrum, was designed to be a backwards-compatible extension to the Intel 8080 processor. It introduced several new instructions to the 8080'...
31
votes
2answers
3k views

What is the relative code density of 8-bit microprocessors?

When RAM is at a premium, as it was in the old days, a greater code density of an instruction set can be a substantial advantage. (Click saver: Code density refers loosely to how many microprocessor ...
21
votes
3answers
6k views

Wiring a Zilog Z80

I've recently got hold of an old Zilog Z80 microprocessor and I know how to clock and test it. I do not however know how to connect RAM, I/O ports, control switches (for programming instructions into ...
24
votes
5answers
6k views

Why did Pokémon Red have so many overflow bugs?

(This question also applies to other Game Boy games, but Pokémon seems to be one of the best-documented.) Pokémon Red & Blue (Red & Green in Japan) is a pair of Game Boy games about capturing &...
19
votes
4answers
4k views

How did integer multiplication work in 8-bit BASIC without CPU support

I've recently been teaching my 11 year old binary multiplication, which is on the UK maths syllabus at secondary school. We have used long multiplication, eg shift and add. This has made me wonder ...
24
votes
2answers
4k views

How did Z80 multiprocessing work in the Namco Galaga hardware?

Galaga was a popular arcade game developed and released by Namco (Midway in N. America) in 1981. It had amazing, fast, smooth 2D-sprite graphics, and relied on Namco hardware that utilized 3 Z80 CPUs ...
24
votes
4answers
3k views

Use of undocumented opcodes

I figure this is fitting for Retrocomputing.SE because CPUs like the 6502 and Z80 and the PDP-8, and probably others, have undocumented instructions and will happily execute them, in contrast with ...
13
votes
7answers
3k views

Z80 and video chip contending for random access

Back in the 8-bit days, I used 6502 computers, where the story about memory access was easy to understand. RAM chips of the late seventies and early eighties could do 2 MHz (or a bit more e.g. 2.6 in ...
19
votes
2answers
2k views

First computer emulator in Windows

I released my ZX Spectrum emulation Wspecem, and GPL sources first time publicly in the Internet at large, the 15th May 1996, for Windows 95. I am quite sure it was the first ZX Spectrum emulation ...
18
votes
5answers
4k views

Why does the Z80 have a half-carry bit?

The Z80 apparently had a 4-bit ALU, and computes 8-bit values in two stages. The half-carry bit preserves the carry from bits 3 to 4. Why did the designers of this chip choose to preserve that value ...
8
votes
1answer
651 views

Breakeven number of bytes for programmable DMA

Contemporary with the old 8-bit chips, existed powerful but unsung programmable DMA controllers like the Zilog 8410 and the Intel 8257, that could copy data from one memory location to another, much ...
55
votes
8answers
9k views

How were Western computer chips reverse-engineered in USSR?

The British ZX Spectrum computer had many clones in the Eastern Bloc. It seems many of them were built using Russian-made chips from the Angstrem factory in Zelenograd in/near Moscow. The Russian ...
37
votes
16answers
10k views

Did anyone ever use the extra set of registers on the Z80?

The Z80 has the surprising feature of a second set of registers. I suppose these were intended to be used for rapid task switching or interrupt handling, though I think if I were programming a Z80 ...
36
votes
5answers
6k views

How do I Interface a PS/2 Keyboard without Modern Techniques?

I'm attempting to build a Z80 homebrew computer to teach myself the basis of electronic design. I planned to start from something simple, like a ROM, some SRAM, a video chip and a Z80-PIO. I'd like to ...
28
votes
4answers
14k views

How did 8 bit processors perform 16 bit arithmetic?

How did 8 bit processors such as the Z80 and 8080 perform 16 bit arithmetic? They have an 8 bit data bus, so how does the ALU perform 16 bit arithmetic on the register pairs? Z80 architecture diagram ...
30
votes
2answers
5k views

Zilog Z80 freezes while binary counting up to 65 536 (2^16)

A few days ago, I got Z80A CPU from eBay. So I tried to run it with classic 555 timer as a clock signal generator. I connected the 8-bit data bus of the CPU to the ground to "simulate ROM" (00 for NOP)...
40
votes
10answers
13k views

Fastest non-emulated CP/M Z80-based computer ever built?

What were the fastest CP/M computers ever built? I'll restrict this to the Z80 variant of CP/M, no CP/M-86, CP/M-68k etc. Z80 compatibles with higher clock frequencies or more instructions/clock or ...
27
votes
1answer
2k views

In the original Z80 layout, where are the "traps" located? And what are their effects?

According to Zilog Oral History, Zilog only had a tight schedule to design the Z80. Facing the potential competition, Federico Faggin and Masatoshi Shima were worrying about Japanese semiconductor ...
24
votes
5answers
2k views

How much benefit should be expected on a more advanced compiler for z80/r800 based computers?

I am self studying about compilers, and get hands on very good textbooks about the subject. I am thinking in develop a compiler using the almighty llvm infrastructure to cross compile to old computers,...
17
votes
3answers
4k views

How much did the 6502 and Z80 cost?

It is said that the 6502 was cheaper than the Z80. As of 1978, what were the actual prices of the two chips, in wholesale quantity?
22
votes
4answers
4k views

Why does the Z80 include the RLD and RRD instructions?

The Z80 has an instruction RLD, which apparently treats the lower 4 bits in the accumulator and the full 8 bits in (HL) as a twelve bit integer which it then rotates left by 4 bits. The carry flag ...
14
votes
3answers
3k views

Why do only the low 7-bits of the R register increment?

On the Z80 the R register is 8 bits wide, as evidenced by LD A,R and LD R,A And every M1 cycle, R increments by 1. But the uppermost bit does not participate in this increment. R will not go from 0x7F ...
9
votes
1answer
603 views

Is S-100 alive?

1) Is S-100 still supported or available for serious home brew? Does anyone still actively sell new boards, cases, designing, support, etc? If not, then about what year did S-100 development stop? 2) ...
34
votes
2answers
2k views

Can the two CPUs in a Commodore 128 run at the same time?

The Commodore 128 has two CPUs. One is some variant of the 6502, and the other is a Z80. One CPU is there for compatibility with the Commodore 64 and the other is there presumably to give basic ...
19
votes
5answers
2k views

Uptime in ZX BASIC

How can I obtain the uptime of a Sinclair ZX Spectrum machine (ZX48, ZX128, or Pentagon clone) via their BASIC interpreter? Specifically, the same value used by RANDOMIZE 0 to seed its PRNG. I would ...
17
votes
4answers
5k views

How fast is memcpy on the Z80?

I gather the fastest way to implement memcpy (copy a certain number of bytes from one place in memory to another) on the Z80 is to use an instruction called LDIR. But how fast is the result, when ...
11
votes
3answers
1k views

z80 crashes after executing some instructions

I'm building my own Z80 computer but I'm having a very strange problem. Consider this code: ld a,0xaa out (00),a jp a That works as expected, outputting 0xaa on port 0x00. Now consider this code: ...
10
votes
2answers
3k views

Is the Game Boy Sharp LR35902 object-compatible with the 8080/Z-80?

(Note: by "object-compatible" I mean that the opcodes and their following operands are the same—the assembler produces the same output for equivalant assembler mnemonics. This of course ...
10
votes
1answer
987 views

Is I/O port 0xFE reserved on the eZ80?

TL;DR Following on from OmarL's comment, to the closed question, Why did the Spectrum Next choose Z80 on FPGA?: But also, the eZ80 is not compatible with the ZX Spectrum because it uses port FE for ...
9
votes
1answer
544 views

When were the various frequency Z80 CPUs introduced?

The Z80 was introduced, as I understand it, at a clock speed of 2 MHz. Later, Z80-based computers at 3.5 MHz started showing up. In what year did this faster clock speed become available? (In ...
9
votes
4answers
3k views

How do Z80 Block Transfer instructions work?

I'm familiar with the Hitachi 6309's block transfer instructions (TFM). It can work as a "poor man's" DMA controller or Blitter, and is one of the things that makes the 6309 the best 8-bitter of all ...
4
votes
3answers
2k views

Z80 16-bit I/O port addresses

The Z80 indirect I/O instructions are a little quirky: the instructions with the standard mnemonic in r, (c) (where r is a stand-in for any of the normal registers) actually puts the register pair bc ...
2
votes
0answers
306 views

Why did the Spectrum Next choose Z80 on FPGA? [closed]

I'm curious to understand why the Spectrum Next uses Z80 on an FPGA instead of something like at eZ80? I would have imagined they would choose the eZ80 since it is still a production part. Anyone ...