Questions tagged [z80]

For questions regarding the Zilog Z80 microprocessor

Filter by
Sorted by
Tagged with
0
votes
1answer
136 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 ...
1
vote
0answers
105 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
1answer
472 views

Z80 PIO Keyboard

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
194 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
315 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
193 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 ...
1
vote
0answers
122 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 ...
41
votes
12answers
6k 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
120 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 ...
17
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
297 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
653 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 ...
10
votes
3answers
456 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
578 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
168 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
312 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
224 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
528 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
216 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
764 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 "...
16
votes
5answers
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
742 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
6k 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)...
9
votes
2answers
319 views

Where to share/who may be interested in IEEE 16 bit half float library for Zilog Z80?

I have recently developed a half-float/16-bit float library (link to Github) for Zilog Z80. It was a part of my project to run some neural network and graphics POCs for ZX Spectrum. The library uses ...
15
votes
1answer
1k views

What are the “ports” used via IN/OUT, vs. the PEEK/POKE address space?

This is something of a followup to How much control of TRS-80 Model III disk drives was possible from its Cassette (ROM) BASIC? but on a more general topic: I know that PEEK and POKE enable direct ...
13
votes
4answers
2k views

Accelerators for Z80 micros?

I am familiar with the various accelerator products that were developed over the years to improve the performance of popular 6502 home micros. A short list of the particularly well known devices would ...
2
votes
1answer
459 views

How much did it cost to develop the Z80 CPU?

How much did it cost, in dollars at the time, to develop the Zilog Z80 CPU? According to Wikipedia, The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. ...
4
votes
2answers
948 views

Z80 Interrupt Mode 2 - How does the CPU know the device address of the interrupting device to execute IN A,(*)?

I've read about the Z80 interrupt priority daisy chain and it hasn't answered my question. When using interrupt mode 2, the Z80 needs to form a 16-bit address for an interrupt service routine. The ...
12
votes
3answers
2k 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 ...
6
votes
2answers
287 views

Why isn't the 'restrict' keyword useful in SDCC when compiling for Z80 target? [closed]

Context SDCC claims to support C11. I use it to write games on Z80 target (for fun and experience). C11 defines restrict C11 specifies the restrict keyword on pointers, which can improve generated ...
10
votes
3answers
3k views

Disable memory refresh on Z80

Is there a software method of disabling memory refresh on the Z80? Or would it be acceptable to create a hardware method of disabling the address bus during the refresh cycle? If I switch off the ...
38
votes
1answer
3k views

Z80 CPU address lines not stable

I just got a Z84C0020PEC and wired it up to test it, using this circuit: Except that I've added LEDs to A0 through A9. It appears that A0 through A6 operate correctly, but A7 though A9 (I've not ...
5
votes
1answer
292 views

How can I change the MSX function keys using ASM?

How can I change the texts assigned to MSX function keys using Z80 ASM?
4
votes
4answers
1k views

How slow is Z80 compared to Arduino Uno?

How slow is z80 compared to Arduino Uno when they read an output pin if the Z80 is 2.5Mhz?? I/O cycle and cpu herz and is there anything else to consider?
5
votes
1answer
222 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
2answers
1k 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 ...
11
votes
2answers
937 views

Is there any difference between Т34ВМ1 and КМ1858ВМ1/3?

In the Soviet Union, Z80 compatibles were manufactured under at least the following designations: Т34ВМ1 КМ1858ВМ1 КР1858ВМ3 At least some of these were manufactured from the U880 masks that were ...
2
votes
2answers
313 views

Will the circuit work normally if different chip speeds (eg 8088-2 and 8255-1)

Old processors came out with support chips. That is, there was a family - the processor and its chips. Over time, the same kits came out with higher frequencies. Will the circuit work properly if ...
3
votes
5answers
588 views

How to teach the Z80 to count milliseconds and microseconds like Arduino?

I make a homebrew (for hobby) game console on Z80A, and I need help. Now I'm stuck - I need to be able to count milliseconds and microseconds in the code. For example, how it is done in Arduino : ...
5
votes
1answer
497 views

Z80N multiply compared to MC68000 [closed]

According to this answer (How did multiply instructions work in the various 68ks?) the MC68000 can take up to 70 clock cycles to multiply. The ZX Spectrum Next's FPGA based Z80N has a MUL DE ...
24
votes
1answer
1k 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 ...
15
votes
2answers
635 views

What is known about the internal workings of the Z80?

There is a wonderful project called Visual6502, and I've used it from time to time to figure things out, like exactly the difference between rti and rts. It is good to see which control lines were ...
3
votes
2answers
404 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 ...
5
votes
4answers
1k views

How does the Z80 determine which peripheral sent an interrupt?

My understanding of how interrupts (and more specifically, interrupt daisy-chaining) works in the Z80 is limited, to say the least, so if I get anything wrong please correct me. Anyway, let's say I ...
24
votes
1answer
3k views

Where does the Z80 processor start executing from?

Strangely I can't find this information anywhere online -- I've thoroughly looked at the datasheet, and I've searched things like "Z80 program counter initial value" -- but I can't find anything! My ...
-1
votes
1answer
529 views

What does ld a,(hl) do in this piece of Z80 ASM code, and why is HL incremented?

ThinkPositive equ 1 PrintChar equ &BB5A org &8100 ld hl,Introduction call PrintString call NewLine ld hl,Message call PrintString ret PrintString: ld a,(hl) cp ...