Questions tagged [z80]

For questions regarding the Zilog Z80 microprocessor

Filter by
Sorted by
Tagged with
3
votes
0answers
77 views

Cannot assemble BASIC with high memory workspace (Z80)

This is a homebrew Z80 computer, using Z80, 64K RAM, EEPROM as well as SIO/0. I am trying to run BASIC, however I need to set the workspace at 0xC000 or higher. The code I am using is similar to https:...
0
votes
1answer
159 views

Does this schematic of the Zilog Z80 central unit contain any other errors? [closed]

For an assigment I have to check this schematic of an Z80 and find possible errors. The schematic looks like this: The left side of this schematic is correct, but we have to find errors in the right ...
0
votes
2answers
150 views

Z80 - “LD (nn), dd” command cycle [closed]

For a university assignment, I have to describe and draw the command cycle of the LD (nn), dd command. To be exact, I was given this command: LD (0x1000), BC which I interpret as putting the low ...
3
votes
1answer
210 views

Z80 - SIO/0 Frequencies

Z80 board with a SIO/0. I am struggling to understand how CPU and SIO frequencies are related, if they are at all. SIO/0 datasheet didn't help much. If I clock both the CPU and the SIO(TX/RX) from a 1....
19
votes
2answers
2k views

Z80 to x86 asm translator?

8086 is source code compatible with 8080. Zilog Z80 extended Intel 8080 with: An enhanced instruction set including bit manipulation, block move, block I/O, and byte search instructions New IX and IY ...
8
votes
1answer
436 views

How does Master System backwards compatibility work on the Megadrive?

I know that the Megadrive contains the Z80 CPU to help control the soundchips for 16-bit games, and that it provides backwards compatibility for the CPU processing of Master System software, but ...
4
votes
1answer
294 views

Building a Memory Management Unit to expand the 16Bit Address space [closed]

I'm in the middle of making an 8Bit computer, I've selected Z80, the 20Mhz version, which is cheap and readily available. Since Z80 has a 16bit address line it can only address 64KB of memory location....
17
votes
6answers
3k views

Are there other examples of CPU architectures mostly compatible with Intel 8080 other than Z80?

When the Zilog Z80 was released, it was marketed as being mostly ISA compatible with Intel 8080, while also providing enhanced features. Likewise, the CPU of the Nintendo Game Boy is a custom ...
4
votes
2answers
368 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 ...
6
votes
3answers
2k views

Z80 string iteration failing

First Z80 project after 6502, a simple looking piece of code giving me hard time. print_char is a working function which prints contents of A to the screen. My first issue is that the following code (...
6
votes
1answer
251 views

Z80, do I need a resistor for pins to Vcc?

Building a Z80 computer after completing one with 65c02. Z80 on my project needs some pins to be tied high (INT, NMI, WAIT, BUSRQ), these are the ones that I don't need for the time being. There are ...
14
votes
1answer
1k views

How can a Z80 assembly program find out the address stored in the SP register?

I'm wondering how to write a program in Z80 assembler that discovers the value stored in the SP register. From what I've seen, the only instructions that touch the SP register are: LD SP, HL/IX/IY EX ...
9
votes
3answers
990 views

Make the “z80asm” assembler place an instruction at a known memory address

I'm writing a very basic OS for my homebrew Z80 computer. As an absolute assembly language beginner, I managed to obtain a working "os plus memory monitor" that can show memory content and ...
4
votes
2answers
168 views

Replacing an 8" disk drive with a newer/smaller drive on an old 8-bit computer?

I used to have an out-phased Danish 8-bit computer as a hobby machine back in the 90's. It had two external 8" floppy drives, and I have kept the old floppies. Now I'd like to salvage my old ...
15
votes
7answers
3k views

Could a Z80 address a total of 128 KB of ROM and RAM?

In a nutshell, could the Z80 address 64 KB of ROM and 64 KB of RAM, or just 64 KB for both RAM and ROM? Unfortunately, I couldn't find an exact and a direct answer to my question while searching. ...
12
votes
1answer
326 views

Ratio of code density between 8080 and Z80

The Z80 was (except for a handful of tiny incompatibilities) a superset of the 8080, adding a number of new instructions as well as the alternate register set. It seems therefore that it must have at ...
5
votes
4answers
432 views

Better way to do Z80 “bank switch & call”?

I have a memory setup where the whole address space can be exchanged (default 2 slots with 2 banks each, but may change depending on "expansion cards" plugged in). Banks are switched by ...
3
votes
2answers
247 views

Z80: Interrupt (IM2) daisy chain for “foreign” peripherals

I'm looking for a way (apart from manually wiring up Fig.15 of The Z80 Family Program Interrupt Structure) to daisy chain "non-Z80-family" devices in an IM2 Z80 system i'm designing. So far ...
0
votes
4answers
212 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 on the internet at information about old consoles it's pretty easy to find out information on CPUs like the 6502, 65816, 68000 & Z80 used in retro computers & consoles like the ...
5
votes
1answer
362 views

Why is my program outputting only zeros to the data bus during I/O operations?

I'm building a breadboard Z80-based computer. As now, I have the CPU hooked up to an EEPROM and an I/O device (an HD44780 character display) with appropriate decoding logic. The ROM chip starts at ...
7
votes
1answer
685 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 ...
1
vote
1answer
218 views

Do I need buffers to drive LEDs from the Z80's main bus? [closed]

I'm designing a Z80 based computer and I want to hook up LEDs to the data, address and control busses (for added cool value). So far, the design is gonna be something like this: One board that the Z80 ...
9
votes
2answers
412 views

Single-stepping a Z80 - only first instruction is successful

I've wired up a simple Z80 circuit, and I've encountered a strange issue: after successfully executing one instruction, the M1 cycle of the NEXT instruction never completes successfully. Here are some ...
1
vote
1answer
191 views

Working on programming a retro z80 computer (SDCC error)

I am working on coding a driver of sorts for a Z80 based computer I am making. I am compiling with SDCC and I have been getting the following? ASlink-Warning-Undefined Global 'data' referenced by ...
2
votes
0answers
138 views

Help debugging a circuit/code for Z80 and TMS9918ANL

I am working on designing a Z80 computer that utilized the TMS9918ANL for graphics. I am currently just trying to make sure the TMS9918ANL is working, so I hooked up the control pins the bus (...
4
votes
2answers
660 views

Z80 PIO Keyboard [closed]

I am working on designing a Z80 computer and I would like to use a PS/2 Keyboard for input. I would like to use a PIO to communicate with it, but I am having trouble finding any documentation online ...
1
vote
1answer
379 views

Using Bresenham's circle algorithm (or another alternative algorithm) to draw an arc [closed]

I'm trying to create some graphics function for a ZX Spectrum (Z80) machine in assembler. I already have the basics except for the arc. I know that there must be some way to draw an arc using the ...
5
votes
2answers
362 views

Why when outputting registers' value the result is a wrong fluctuating value in a Z80 CPU?

I got an EEPROM AT28C64 and loaded it with instructions with my handmade STM32 EEPROM programmer, the instructions are very simple: Load A register with decimal number 85 which is, in binary, ...
5
votes
1answer
244 views

Are all 64k x 4-bit ICs interchangeable for Amstrad-era ZX Spectrum 128k +2/+3?

There were 4 64k x 4-bit Integrated Circuit chips in the Amstrad-era Sinclair ZX Spectrum +2 and +3 models. These are known as the +2A, +2B (both +2 "black"), +3 and +3B (also both black cases). I ...
2
votes
0answers
151 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 ...
46
votes
13answers
7k 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 designed to be an abstraction of a CPU for porting Unix) was not a very easy language to ...
1
vote
0answers
232 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 ...
13
votes
2answers
3k views

In 2020 are there fully assembled z80 devices available at reasonable cost? [closed]

I'm wondering if it is possible to buy an sort of device currently in production that uses a z80 compatible CPU - not an FPGA. I don't want to build a kit or use a soldering iron. I'm also looking ...
18
votes
1answer
1k views

Will disassembling an 8080 program as Z80 code work?

The Z80 is "binary compatible" with the 8080. It adds a bunch of new instructions, but places them all in unused (well, undocumented) opcodes. Does this mean that if I disassemble an 8080 program (...
10
votes
1answer
360 views

How did ZX81 assembly debuggers implement breakpoints?

What techniques were used for implementing breakpoints on the ZX81? Traditionally for the 8086 int 3h is used, for the 8080 on CP/M with DDT RST 7 as single byte replacements, 6502 has the BRK ...
11
votes
3answers
2k views

Decoding Logic and Memory Systems for 8-bit computer - 64K address space

I am creating a minimal Z80 computer with serial output on a breadboard. I have kind of moved up from the last question, where I was executing instructions on Z80 using specific connection of ...
12
votes
2answers
822 views

Did the Commodore 128's Z80 CPU also have full access to the machine's custom hardware?

The C128 was a C64 with an extra CPU as well as extra memory. But the second CPU was a Zilog Z80 while the primary was the usual Commodore CPU, a MOS 6502. The Z80 was there so that CP/M software ...
11
votes
3answers
740 views

Are there games for the C128 that run (mainly) on the Z80 rather than the 6502?

The Commodore 128 was a version of the Commodore 64 that also had a Z80 CPU along with its "native" 6502 CPU so the system could run CP/M as well as C64 software. (As well as more RAM and other ...
7
votes
2answers
702 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 -----------------------...
0
votes
1answer
247 views

4MHz Z80 timing and PAL video generation

Im trying to get some nice colored lines on some old Z80 system synced to the PAL screen, but having some sort of a problem. First I just need to know if my facts are right. I know that on Commodore ...
7
votes
2answers
340 views

Floating control during bus sharing

I'm building a simple Z80 breadboard computer for my hobby. In this question I use Z80 as an example, but I think this may apply to many CPUs that allow for bus sharing. The problem is as follows. ...
19
votes
4answers
3k 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 ...
4
votes
2answers
377 views

ZX Spectrum scroll waiting for user input problem

I'm trying to compile a C program with z88dk for the ZX Spectrum. Using printf(), when the text hits the bottom line of the screen on line 24 the program stops executing until a key is pressed on the ...
4
votes
5answers
658 views

Z88DK ZX Spectrum “%f” printf not working

I'm attempting to compile a program in C for the ZX Spectrum using Z88DK. However, I'm facing an issue when trying to use printf to print out the value of a float. The code I'm trying to compile: #...
2
votes
1answer
343 views

When first CMOS versions of Z80 became available and were they ever used in (non-portable) home computers?

When Z80 first became available on the market in 1976 it was made using NMOS technology. It is the version that is likely to be most familiar to people interested in retro-computers. For example, to ...
14
votes
2answers
816 views

Does the Z80 allow interrupts after processing and ignoring a 0xdd prefix?

I read here that if the Z80 encounters e.g. multiple 0xdd prefixes in sequence, for each 0xxdd except the last it acts almost like a NOP, but does not allow interrupts to occur immediately after "...
18
votes
6answers
5k views

Why did the Z80 with 4-bit ALU out-perform the fully 8-bit Intel 8080?

Looking at the development and architecture of the Z80, it appears to be a scaled-down, cost-reduced (in terms of total system cost), clone of the Intel 8080. It only used a 4-bit ALU. I assume this ...
10
votes
2answers
793 views

Zilog Z80 estimated time discrepancy

I am writing a basic Zilog Z80 assembly language interpreter and something I noticed as I went through the 8 bit load commands is that the estimated times for LD (IX+d), n and LD (IY+d), n are ...
16
votes
12answers
7k views

How can a Z80 assembly program find out its own memory address?

I'm wondering how to write a program in Z80 assembler that discovers its own memory location. I thought that maybe I could somehow load the program counter PC into, for example, BC. Is there a way ...
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)...