Questions tagged [z80]
The Zilog Z80 microprocessor. Prefer [game-boy] instead for questions about the Game Boy CPU nicknamed the ‘GBZ80’.
217 questions
7
votes
0
answers
285
views
Z80 Memory Bank Switching
Edit: sorry it's so many words. I thought it might be helpful to share as much as I have learned so far as possible.
Also, here's the link to service manual that includes the schematics.
https://www....
1
vote
3
answers
422
views
How to automatically set the random seed in Microsoft Z80 BASIC?
I am trying to find a way to automatically set the random seed in Microsoft Z80 Basic 4.7b on an RC 2014, as one would in Sinclair BASIC with RAND or RANDOMIZE.
I have got as far as understanding that ...
11
votes
3
answers
1k
views
16-bit comparisons setting both zero and carry flag on 8080/Z80
I have a routine cpBCHL that compares the contents of BC and HL and returns the carry set appropriately:
; ----------------------------------------------------------------------
; ♠BCHL ♣A ♡* ...
20
votes
4
answers
3k
views
What was the last commercial Z80-based computer sold?
Obviously, with the rise of retro in computing, today there are lots of Z80-based machines in the retro market. Thus, I would exclude anything later than maybe 2005 or obviously targeted at the "...
9
votes
2
answers
2k
views
Space Invaders ships remaining not initialized
I'm referencing this Space Invaders code.
(I'm porting this to another processor and I'm trying to understand it.)
The p1ShipsRem variable doesn't seem to be initialized, but it is tested early in the ...
8
votes
1
answer
483
views
Original Space Invaders message routine with delay
I'm referencing this Space Invaders code.
Could someone explain why the PrintMessageDel routine checks for a delay value of one instead of zero?
The interrupt service routine decrements the isrDelay ...
4
votes
0
answers
217
views
CF Card Issues - DIY Z80 COMPUTER from scratch - CP/M frozen after boot
has anyone here ever had a similar problem? I'm basically trying to use my CF card interface board that used to work with another memory card, which unfortunately got damaged (my fault). Now I only ...
11
votes
0
answers
337
views
What was and where can I find OS-1 for the Z80?
On page 269 of the June 1980 issue of BYTE there is an advertisement from Electrolabs (in Stamford, CT) for an operating system called OS-1, a "new Unix-like operating system for Z-80."
Did ...
4
votes
1
answer
217
views
What's the max output current for Z80 PIO output pins - (Z84C2010VE6)?
I'm working with a Zeal 8bit board and I want to connect the pins from Z80 PIO Port A to external components, let says LEDs. With a 2.2k resistor and a 5V power supply the calculated current is 1.5 mA....
4
votes
1
answer
329
views
In a 48K Spectrum why are there 5 successive contended cycles in JR?
In a 48K Spectrum, the contention pattern for the JR instruction (see e.g. https://sinclair.wiki.zxnet.co.uk/wiki/Contended_memory) is:
pc:4, pc+1:3, pc+1:1, pc+1:1, pc+1:1, pc+1:1, pc+1:1
There is ...
18
votes
1
answer
2k
views
Why does the ZX Spectrum ROM set I register, then wait 24 T-states?
I’m doing some low-level, interrupt-based Z80 Spectrum programming, and, investigating the ROM, found this oddity (clipped from The Complete Spectrum ROM Disassembly), in the ROM initialisation/...
9
votes
1
answer
615
views
Is there a mistake in the code sample in “Programming the Z80” performing 16-bit by 8-bit division?
Programming the Z80 (3rd edition) has the following code sample (section 3 p.135) for division of a 16-bit dividend by an 8-bit divisor returning an 8-bit quotient in L and an 8 bit remainder in H:
...
7
votes
1
answer
465
views
How does the Z80 NMI edge detection work?
The Z80 user manual (um0080.pdf) is basically useless for finding out many details about NMI. The diagram is broken and there's no mention that it's edge-triggered rather than level-triggered like INT ...
10
votes
3
answers
1k
views
How was MP/M’s time sharing implemented?
MP/M, the multi-user sibling of Digital Research ubiquitous CP/M, implemented time-sharing in a way that appears to be very efficient. Processes don’t appear to see each other’s memory and performance ...
9
votes
1
answer
266
views
Triggering Amstrad BASIC/System errors from machine code
I'm writing some machine code that's intended to be executed from BASIC with a CALL and I'd like to trigger genuine errors just like running ERROR 5 (Improper argument) from BASIC.
I have the book The ...