Questions tagged [z80]

The Zilog Z80 microprocessor. Prefer [game-boy] instead for questions about the Game Boy CPU nicknamed the ‘GBZ80’.

Filter by
Sorted by
Tagged with
3 votes
1 answer
181 views

Do Z80 datalines need termination [closed]

If I am using a z80 can you just tie all data lines to the ROM 28c16 or do they need termination via 10k ohm resistors to ground?
4 votes
3 answers
602 views

Compressing a list of records so it can be uncompressed elementwise [closed]

I have a bunch of lists of generic items (byte sequences) and I would like to store them compressed. There are several tools out there that run on modern computers to compress data into as-small-as-...
43 votes
7 answers
8k views

Did any computers use the Z80B?

The Z80 was one of the most popular CPUs of the seventies and eighties. In almost all cases that I know of, the version used was the Z80A, rated for 4 MHz, sometimes clocked a little slower in order ...
26 votes
5 answers
5k 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 ...
5 votes
2 answers
591 views

ZX Spectrum+ 48K with faulty memory writing address

I have ZX Spectrum+ 48k (board issue 6a) with writing to memory issue. When I try to write a value by POKE command to address 49152 (C000h) then it overwrites additionally value with address 16384 (...
2 votes
3 answers
514 views

Z80 to 68000 translator for CP/M

CP/M was mostly portable across systems but most of them were z80 based. It was ported to 8086, 68000 and maybe more but without binary compatibility. No z80 systems that wanted CP/M compatibility ...
13 votes
3 answers
2k views

What's the convention for < > low/high-byte in 8-bit assembler?

It's a little hard to Google for greater-than and less-than symbols in assembler math... If you saw, let's say, 6502 code like... lda #>SOME_LABEL or Z80 code like... ld a,>SOME_LABEL ...would ...
-2 votes
1 answer
162 views

With reference to the Z80-MBC2 retro computer's SD card module: Is it possible to hook it up for dual access by let's say a Pi Zero [closed]

With reference to the Z80-MBC2 retro computer's SD card module: Is it possible to hook it up for dual access by let's say a Pi Zero. So my idea is that if I could do a little hack on the SD card ...
3 votes
1 answer
998 views

Can't get the AY-3-8913 sound chip to work with my z80 (added schematic)

I'm trying to get the ay-3-8913 sound chip to work with my z80 but so far I haven't gotten any sound output yet. I know the chip, my amp circuit and the clock circuit work because it works when I ...
3 votes
2 answers
819 views

Sinclair ZX Spectrum with DivMMC load issue

I use a Sinclair ZX Spectrum Issue 2 with a DivMMC EnJOY! Pro One and the boot process shows no error and I'm even able to enter the file browser but if I choose any game/demo/program I get always ...
55 votes
13 answers
10k views

What languages are better fit for generating efficient code for 8-bit CPU's than C?

I found Why do C to Z80 compilers produce poor code? very interesting as it pointed out that C (which was leveraged to be an abstraction of a CPU for porting Unix) was not a very easy language to ...
15 votes
2 answers
6k 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 ...
8 votes
4 answers
2k views

"Mainframe" with Z80 [closed]

Maybe a silly question but has there ever been a mainframe OS running on a Z80 system, of course with sufficient memory and memory management unit? I'm thinking of a ported MVS running, with TSO, the ...
27 votes
5 answers
5k views

Did underclocking the early Z80 chips improve yield?

The Z80, one of the most successful and well-known of the 8-bit microprocessors, was released in July 1976 at an initial clock speed of 2.5 MHz. The TRS-80 Model I, released the following year, is ...
31 votes
6 answers
3k views

Managing registers/memory effectively on the Z80

I've been writing assembly for the Z80 for some time, lately. Initially, I had no experience with working with 8-bit processors, but after going through a tutorial for my platform and spending a lot ...
11 votes
3 answers
604 views

Can anyone help provide more information regarding an operating system called I/OS by Infosoft in the early 1980's?

The title pretty much says it all. I'm looking for information about an operating system called I/OS by a company called Infosoft in the early 1980's. I think it might have been a CP/M variant and ...
11 votes
1 answer
445 views

Long Term Prevalence of 8080 Code Over Z80 Code in Software Packages

TL;DR: The Z80 was introduced not long after the 8080 and replaced it quickly and almost entirely for personal computing. Still, a large chunk of new software written stayed with 8080 code, making no ...
4 votes
1 answer
229 views

Was the S-83 Personal CP/M CPU used in commercial computers?

The June 1984 edition of Practical Computing magazine (page 43) refers to the American Microsystems Incorporated S-83 CPU as a Z80 compatible CPU with an 8K mask ROM capable of holding Digital ...
2 votes
1 answer
286 views

Is NEC's PC-88VA compatible with N88-BASIC(86)

First, N88-BASIC runs on all PC-88. It's a japanese Z80 computer, but PC-88VA are 16-bit, like the PC-98 and wonderswan. Instead, PC-98 runs N88-BASIC(86), which is different. I think only the PC-98DO ...
8 votes
1 answer
671 views

Z80 interrupt acknowledging

I have a question about the Z80 interrupt handling. This processor has 3 modes: 0, 1, and 2. Modes 0 and 2 are supposed to fetch something from the data bus, and a protocol exists to inform the ...
4 votes
0 answers
280 views

Did the Mega Drive and/or Arcade version of the song "Afterburner" use FM synthesis or samples?

Does anyone know if the Mega Drive or Arcade version of Afterburner use FM synthesis or sound samples for orchestra hit in its song "Afterburner". I find oscilloscope views of each version but I'm not ...
0 votes
4 answers
546 views

How did graphics processing for old 8/16bit consoles work & what are the differences between an FPU/maths co processor & a graphics card? [closed]

When looking at information on the Internet about old consoles it's rather easy to find information on CPUs like the 6502, 65816, 68000 & Z80 used in retro computers & consoles like the NES, ...
25 votes
8 answers
2k views

Separate code and data address spaces on the Z80

Reading through the Z80 datasheet, I noticed something interesting. The Z80 separates its instruction execution into separate phases (which are called "machine cycles" in the official literature, but ...
5 votes
1 answer
702 views

Is there a way to boot CP/M automatically on a Z80 RC2014?

I'm using the RC2014 (Z80), running CP/M. The "24886009" ROM chip (photo below) comes with 32k BASIC, 56k BASIC, SCM and CP/M for SIO/2 serial. When you run CP/M from the RC2014 ROM, you ...
20 votes
3 answers
6k 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?
2 votes
1 answer
195 views

Why does Z80 RC2014 ROM image 88 not have CP/M or BASIC boot options?

While trying to boot to CP/M automatically on my RC2014 Z80, I encountered a problem getting SCM to show a CP/M boot option. According to the docs, ROM address 4000 (88 on the ROM label) is SCM with ...
9 votes
4 answers
1k views

Testing "8-bit readiness" with an emulator or pre-packaged kit

I'm working on a project that intends to implement a dynamically typed language on 8-bit systems. (That is, a CPU with 16-bit pointers and a maximum of 64 kB of RAM. Some language tricks are involved, ...
5 votes
1 answer
334 views

Z80 Bus Control by External Device: /BUSRQ or /RESET?

I'm designing a Z80 system from scratch. My approach is to only have one memory device, a big SRAM, that covers the entire 64 KB memory block. A sub-system on the board will be a microcontroller (MCU)....
6 votes
3 answers
998 views

Z80, best way to page out EEPROM

Trying to design a Z80 based computer that starts from an EEPROM, loads CP/M to RAM and pages out (switches off) EEPROM to allow CP/M to access full 64K RAM. What is a good way of achieving this ? My ...
16 votes
4 answers
4k views

Was the ZX Spectrum used for serious number crunching?

From Eurogamer’s obituary of Sir Clive Sinclair: Sinclair never intended for his computers to be games machines, but that was what the market decided they were. Within the space of a few years, the ...
3 votes
1 answer
267 views

Why memory read (M2) cycle in Z80 is three T cycles and not two?

In Z80 memory read cycle is three T cycles, but, 2nd cycle only does "WAIT", and it appears timing would work with just two cycles unless the "WAIT" does something important. What ...
11 votes
3 answers
890 views

What are examples of providing non-RST instructions for 8080 interrupts?

When a peripheral in an 8080 system generates an interrupt request and the 8080 acknowledges the interrupt, the peripheral is expected to put an instruction opcode on the data bus which the 8080 will ...
8 votes
2 answers
2k views

Can the Z80 Bus Request be used as an NMI?

I was reading the Z80's official manual by Zilog, and there's a passage in the description for the BUSREQ pin that states "Bus Request contains a higher priority than NMI and is always recognized ...
27 votes
4 answers
4k 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 ...
6 votes
2 answers
1k views

How can SPI be used with a Z80 CPU to control an RFM95 LoRa module?

I’m trying to communicate with my Z80 computer (RC2014) using a wireless radio. The easy way to do this is to use something like an ESP8266 (and there’s even an RC2014 module for this), but where’s ...
108 votes
10 answers
42k 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 ...
27 votes
4 answers
17k 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 ...
13 votes
1 answer
934 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 ...
15 votes
3 answers
3k views

Why does this ZX Spectrum machine code "Hello World" routine not produce the expected result?

This is probably an easy one, but I'm stumped. I want to run this ZX Spectrum Hello World routine on my Sinclair ZX Spectrum 48k. I'm going to describe all the steps I took so it's easier to see ...
39 votes
4 answers
8k 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 ...
11 votes
2 answers
1k views

Why does the .z80 emulator-snapshot format have separate fields for the 8-bit refresh register and bit 7 of R?

I've been looking at the .z80 file format for Sinclair ZX Spectrum games. Most docs discussing the format include pretty much this wording: Offset Length Description -------------------------...
17 votes
9 answers
4k 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 ...
38 votes
7 answers
24k views

Comparing raw performance of the Z80 and the 6502

A lot has been said on the internet about the 6502, at 1MHz, being roughly equivalent in performance to the Z80, at 4 MHz. It is said the Z80 has a typical 4 clock ticks per instruction, while the ...
4 votes
3 answers
525 views

Z80: can you transfer the program counter (PC) to a general register (e.g., HL)? [duplicate]

New to Z80, coming from 6502, the instruction set appears hugely CISCY. And yet, I cannot find a simple method to inspect the PC (transfer PC to a general purpose register, e.g., HL). I need this to ...
3 votes
3 answers
965 views

Z80: asymmetric use of B in DJNZ (B is a low byte) vs. BC in LDIR (where B is a high byte)

Am I missing something or is Z80 weird in its use of the B and C registers? If I want to copy memory, I have this super cool LDIR instruction which copies (HL) to (DE) BC times and incrementing HL and ...
16 votes
3 answers
3k views

Z80 is making weird relative jump errors. How can that be?

My little Z80 breadboard project got stuck in the mud where I am pulling my hair out. It looks like the CPU is making a calculation error on a relative jump. Here is my code, and I don't think ZX ...
6 votes
1 answer
468 views

How do I read a port value using Turbo Pascal inline code on CP/M?

After successfully using port[0] to read a port value in Turbo Pascal, I thought I'd try to understand how to do this using inline assembly/machine code. I'm able to write to the port (my OutPort ...
16 votes
1 answer
1k views

Why does the Z80 not have EX DE, IX?

Reading Decoding Z80 Opcodes, There's a section about the 0xDD prefix. This instruction prefix causes the next instruction to use the IX register instead of the HL register. That makes sense. HL and ...
32 votes
2 answers
4k views

Why did the Z80 break 8080 compatibility?

Although the Z80 is nearly fully backward compatible with the Intel 8080, there are minor differences such as the Z80 handling the parity flag differently with certain operations. Why? Would providing ...
4 votes
3 answers
350 views

What would be the value on the data bus for a Jupiter ACE with the Z80 Interrupt Mode 2?

I am writing an emulator for the Jupiter ACE. I assumed the idle bus value would be 0xFF like the ZX Spectrum. Other emulators for the Jupiter ACE seem to assume the same. If there are no peripherals ...