Você está na página 1de 10

Z-80, fabricado pela Zilog, é um processador de 3º

geração, o qual possui ótimos recursos, e pode ser


utilizado de maneiras infindáveis. Considerado como um
processador de 3º geração, o Z-80, utilizado nos
computadores da família TK, vídeo game GENESIS, e
atualmente, também transferido para as tecnologias de
DSPs da ZILOG, é um excelente processador. Sua
arquitetura é muito pratica.
O microprocessador Z80 é uma CPU de 8 bits com
barramento de endereços de 16 bits, capaz de endereçar
diretamente 64KB de memória. Ele tem uma linguagem de 252
instruções de base e com 4 bytes reservados como prefixos,
acessando adicionalmente 308 instruções. O Z-80 foi criado
após o 8088 e contem as 78 - 8088 opcodes como uma sub-base
para sua linguagem.
A sua estrutura contem um acumulador, e 6
registradores de 8 bits que podem ser configurados como 3
registradores de 16bits. Em adição aos registradores gerais, um
ponteiro ponteiro de pilha, um contador de programa e 2
registradores de índices (ponteiros de memória) são providos no
processador. Enquanto como na maioria dos sistema como o
80486 ou 68000 series, o Z80 é extremamente pratico para
pequenas aplicações de controle. O que o torna o Z80 mais
prático ainda na construção de circuitos, é o sistema de refresh
automático para memórias DRAMs, o que facilita em muito o
seu uso.
O processador Z80 na sua estrutura básica é construído
em um invólucro DIP de 40 pinos. É fabricado em modelos A, B
e C, diferindo-se somente em sua máxima freqüência de trabalho
(do seu clock). Ele também é fabricado em configurações de
microcontrolador com varias configurações de RAM e EPROM
internos.
Pino # Sinal (Ativo em nível alto)
1 A11
2 A12
3 A13 {Address bus}
4 A14
5 A15
6 CLK (clock, rising edge trig)
7 D4
8 D3
9 D5 {Data bus}
10 D6
11 +5 VDC
12 D2
13 D7
14 D0
15 D1
16 INT (Interupt Request)
17 NMI (Non-maskable Interupt Request)
18 HALT (Active low)
19 MREQ (Memory Request, active low)
20 IORQ (I/O Request, active low)
21 RD (Read, active low)
22 WR (Write, active low)
23 BUSAK Bus Request Acknowloegmnet, active low)
24 WAIT
25 BUSRQ (Bus Request)
26 RESET
27 MI (Maskable interupt, active low).
28 REFSH (Refresh timing, active low)
29 GND
30 A0
31 A1
32 A2
33 A3
34 A4
35 A5
36 A6
37 A7
38 A8
39 A9
Max. Clock Speed: Z80 - 2.5MHz, Z80A - 4MHz

Power Requirements: Z80 - 5V@60mA, Z80A -


5V@90mA

Operating Temp: 0 - 70 deg C.

Min. Instruction time: 1uS (@4MHz)

Max. Instruction time: 5.75uS (@4MHz)

No. of Instructions: 158 (78 instructions of 8088


are a subset)

Internal Registers: 14

Stack: RAM
Z80Stealth Spectrum emulator v0.024 by Kolpakov Kirill
PLEASE READ THIS DOC CAREFULLY BEFORE RUNNING EMULATOR
THANKS FOR YOUR INTEREST IN MY WORK

1. Introduction.
2. Features.
3. System requirements
4. Whats new.
5. Usage.
6. Know problems
7. Future plans.
8. Greetings.
9. Contact me.

1. Introduction.

Z80Stealth is the Speccy emulator for DOS but it works OK


under
Win98. Main goal is to emulate Speccy's hardware as close
as
possible. To be exact - perfect z80 cpu emulation is the
main task
right now. Low-level TAPE support, TRDOS and sound support
will
be added lately. It supports two popular snapshot formats -
Z80 and SNA (both 48k and 128k).
I'm optimizing it almost everyday so future versions will be
faster
and with more features.
P100 is the minimal cpu for this version.

2. Features.

- Spectrum 128 emulation.


- Pentagon emulation (no disk emulation yet).
- Z80 cpu emulation using my own code. All documented and
undocumented flags and opcodes.
- Compability: almost everything works ok
- Interrupt modes 0,1,2.
- Register R emulation.
- Shadow screen support.
- Kempston joystick emulation (arrow keys and CTRL).
- Supports SNA and Z80(all versions) snapshot formats
- Speed adjustment (not autodetection!). You can set emu's
speed according to your preferences.
- Save BMP screenshots (F8)

3. System requirements

- CPU: P100 is required for usable speed.


- Video: Any VGA compatible card.
- Sound: Any card right now :) cause sound core is not
finished.
- Memory: 256 megs i think. Just joking :)) This will work
with
almost every amount of memory.
- OS: DOS,Win95,Win98.

4. Whats new.

16/08/99 v0.024
- Save BMP screenshots (F8).
- Fixed: BRIGHT RED color.
- Fixed: loading snapshot files with Read-only attribute.
- A lot of asm optimisations in the cpu emulation core.
You will notice that speed increased if you set
MAXSPEED=YES in z80s.cfg.
- Optimized screen update procedure a bit
(removed two instructions from the plot drawing part of
screen update procedure)
- Exe linked with dynamic libraries -> size decreased
- Exe packed with new exe packer

19/07/99 v0.023
- Bugfix: potential crash with old CPUs not supporting
RDTSC instruction.

12/07/99 v0.022
- Speed adjustment added! Look at z80s.cfg - there's two
new options:
CPU_SPEED=xxx (your cpu speed in Mhz) and MAXSPEED=YES|NO.
Don't forget to edit these values after reading this.
- Small bugfix in z80 snapshot loading routine.

05/07/99 v0.021
- Bugfix: several games (for example Chronos 128) now work.

01/07/99 v0.020 This is a big update:


- 128K and Pentagon emulation.
- Few cpu core fixes.
- CAPS SHIFT and GRAPH keys are emulated.
- Kempston at port #DF.
- More compability - now almost everything works ok.
- New section in this doc - System requirements.
- Changes in config file - take a look.

25/05/99 v0.017
- Bugfix: Joe Blade 2 now works.

21/05/99 v0.016
- Fixed some cpu emulation routines - a lot of games now
work
(for example Elite, 3 Weeks in paradise).
- Kempston joystick via keyboard(arrows+CTRL) implemented.
- Optimized screen routine a little.
- Added Know problems section in this doc.

16/05/99 v0.015
- Fixed DAA instruction - now time counter Spy Hunter works.

14/05/99 v0.014
- Fixed crash under real DOS.
- Fixed big slowdown in Win98 which occasionally happened.
- Added config file - z80s.cfg.

12/05/99 v0.013
- Fixed keyboard emulation - now int9 in protected mode
handles everything.
- Cursor keys now working.
- S**t happened-this version crashes under DOS but works
perfectly
under Win98:)).

09/05/99 v0.012
- Rewrote screen update procedure - now it's asm only
- Some cpu emulation speedups.

07/05/99 v0.011
- Everything 'cause it's the first public version.

5. Usage.
In current version you can work in 128/48K Basic ( just run
z80s.exe ) or load a game snapshot - type in command prompt
something like this: z80s cobra.sna.
F8 - Save BMP screensot.
F10 - Exit.
On exit (F10) emulator writes snapshot (dump.sna) and
dump of screen
memory (dump.scr).
About config file:

CPU_SPEED=xxx (xxx=100..9999 - it's your CPU's speed in Mhz)

MAXSPEED=YES|NO If NO selected then emu will work at


normal
Speccy speed. YES is a must setting for CPUs slower than
Pentium 100.

FRAMERATE=x (x=1..9) if x=1 then there's no frameskipping,


if x=2 then
every second frame is drawn etc. Default value is 2.

MODEL=128K|PENT choose standart 128K machine or Pentagon


emulation.

6. Know problems
- palette is messed up when using some S3-Trio64 PCI cards
(possible solution - buy a newer card :)
If you know why this happens please mail me and explain.

7. Future plans.

- Finish Pentagon emulation.


- TAP loading.
- Scorpion emulation.
- Graphic User Interface.
- Music and sound support.
- More compability.
- 256Kb,512Kb,1M of memory (no joke - russian spectrums have
this
(or even more when using SIMMs) amount of memory)
- A lot of other small things and bugfixes.

8. Greetings/Thanks.

My Family - thanks for all. I love you.


Sean Young - thanks a lot for your docs about z80
Martin van der Heide - World of Spectrum is the best
James McKay - author of one of the best speccy emulator - X128.
Raul Gomez Sanchez - another great emulator author.
K.Uglekov - wrote best speccy emulator/debugger.
Oleg Prokhorov - thanks for 32lite.exe. One of the best dos32
exe packer.
Eugene Roshal - wrote FAR - best Win32 file manager.