Questions tagged [z80]
The Zilog Z80 microprocessor. Prefer [game-boy] instead for questions about the Game Boy CPU nicknamed the ‘GBZ80’.
188
questions
5
votes
2
answers
546
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 (...
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
3
answers
471
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 ...
-2
votes
1
answer
143
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 ...
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 ...
11
votes
1
answer
422
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
227
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 ...
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 ...
2
votes
1
answer
260
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
649
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 ...
2
votes
1
answer
182
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
310
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)....
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
229
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 ...
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
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 ...
3
votes
3
answers
934
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 ...
4
votes
3
answers
477
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 ...
5
votes
1
answer
680
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 ...
5
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 ...
6
votes
1
answer
447
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 ...
2
votes
2
answers
358
views
From an electrical and software engineering perspective, ignoring available software, should I go for the Z80 or 65C02? [closed]
This might be a weird title but I noticed that recommendations for one over the other usually go into a direction that is not too helpful for me.
I would like to build an 8 bit computer and picked ...
14
votes
5
answers
4k
views
How did early video terminals convert ASCII into font graphics?
I'm building a Z80-based breadboard computer from scratch to learn more about simple processors, and I'm a bit stumped when it comes to the base concepts of building a text-based terminal.
I've got an ...
10
votes
2
answers
642
views
Simulating a 8085 using a Z80?
I am studying the replacement of a 8085 with a Z80 (I am aware that they are not pin-compatible, the solution is to be made in a board of new design rather than on the old board). The sole reason is ...
5
votes
1
answer
452
views
Z80 CPU and nested/reentrant NMI
According to multiple documentation sources, non-maskable interrupts (NMIs) can be nested (or reentrant) in a Z80 microprocessor.
This is, upon a /NMI signal pulse, the CPU will interrupt the current ...
20
votes
5
answers
4k
views
How did old computers address far more than 64K of memory despite only having a 16 bit address bus?
I have an old Sharp PC-G830 pocket computer from the '80s that has 32K of RAM and 256K of ROM. I also have a simple single board computer I built with 128K of RAM and a few megabytes of ROM from a ...
13
votes
1
answer
787
views
Z80 refresh pin, is it tri-state or not
I'm planning out a protocol bridge between ZX Spectrum clone system bus and an FPGA-based extension device.
I am considering adding bus request/acknowledge support for DMA purposes, but reading "...
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
2
answers
352
views
How does the serial port on the RC2014 get addressed?
I see on the schematic that /M1 and A7 go to CS0 and CS1 respectively. As I recall, both of these need to be high for the chip to be selected. And A6 goes to CS2, which needs to be low for the chip to ...
11
votes
4
answers
2k
views
Could the Z80 do interference-free video as the 6502 could?
Technically this isn't just about video since it applies to any regularly
scheduled DMA¹ from a non-CPU subsystem, but video is the most common
application of this technique so I'll use that as the ...
1
vote
1
answer
305
views
How does RETN return from NMI on the Z80 in the event of nested NMI?
I was trying to learn how the Sega Master System works. The NMI occurs when the pause button on the console is pressed. So I wrote an NMI handler that makes a beep when the NMI occurs, then waits for ...
9
votes
1
answer
2k
views
Why does the Z80 JP (absolute) instruction always take 10 states to execute?
I've looked at a few different websites and they all agree that a JP nnnn instruction (where nnnn is a 16-bit address) always takes 10 states to execute.
According to what I've read, all of the ...
12
votes
1
answer
1k
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 ...
4
votes
1
answer
334
views
ZX Spectrum coordinates to bitmap conversion subroutine acting strange
I originally posted this question on stackoverflow, but I wrote a little program that converts coordinates stored in the b and c registers of the z80 into their corresponding memory address for the ZX ...
4
votes
3
answers
345
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 ...
9
votes
3
answers
2k
views
C++ compilation for the Z80 and 6502?
I know it's almost heresy to ask something like this, but ...
We have C compilers for the Z80/6502 and there used to exist a thing called the Comeau C++ compiler, that produced C code as output. There ...
14
votes
1
answer
3k
views
Good Z80 disassembler/decompiler on modern equipment?
I have a hobby project with an old CP/M-80 system, where I now would like to disassemble/decompile some compiled code – a ROM and some small executables – into assembly source so I can regenerate the ...
5
votes
2
answers
513
views
Is there a way to work around the maximum clock rate of Z80 PIO chips?
I would like to assign a Z80 PIO chip to my homebrew Z80 "computer". Unfortunately, what I've recently noticed in the datasheet, chip version which I actually have: Z0842006PSC can handle ...
7
votes
1
answer
2k
views
The proper way to shift a byte using a Z80
In a nutshell, why can I not shift a byte using this way?
LD A, 11110000b ; I want this to be 00001111b
LD C, 4
SRA C
OUT (0), A ; doesn't give correct number
What is the proper way of shifting a ...
4
votes
0
answers
351
views
Source code for Logo in z80
I look for a source code for Logo written in z80 (the complete language, not only the turtle part). I found the dissasembly of Terrapin Logo for Apple 2e but it is 6502. Ideally, it would fit in 16K. ...
7
votes
2
answers
894
views
Did any ZX Spectrum clones use the Z80's interrupt mode zero?
The standard Sinclair ZX Spectrum only used mode 1 and mode 2 interrupts but the Z80 also has a mode 0 interrupt that the original Speccy never used.
But there were many exotic clones of the ZX ...
7
votes
3
answers
1k
views
How long are interrupt requests remembered on the Amstrad CPC?
I'm trying to emulate an Amstrad CPC 464. Currently, I'm working on interrupt handling and I'm wondering: Some Z80 instructions, like EI or decoding multiple consecutive 0xdd prefixes don't accept ...
4
votes
2
answers
302
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
1
answer
439
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
2
answers
384
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 ...
5
votes
1
answer
880
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....
21
votes
3
answers
3k
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 ...
11
votes
1
answer
2k
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 ...