*************************************************************************
*                                                                       *
*               Z80Stealth ZX Spectrum emulator v0.200                  *
*  	      Copyright(c) 1999,2000 by Kirill Kolpakov                	*
*                                                                       *
*      	       AY-3-8910/YM2149F emulation, ESS driver:            	*
*		   Copyright(c) 2000 by Hacker KAY           		*
*************************************************************************

       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. Future plans.
	7. Greetings.
	8. Contact me.

        DISCLAIMER
 ----------------------------------------------------------------------------
  USE THIS PROGRAM AT YOUR OWN RISK. I'M NOT RESPONSIBLE FOR ANYTHING YOU DO
   WITH IT. ANYWAY YOU DON'T HAVE TO WORRY BECAUSE IT'S NOT INTENDED TO BE
                                HARMFUL AT ALL.

  	        Z80Stealth IS FREEWARE  AND CAN BE DISTRIBUTED 
		    FREELY AS LONG AS IT IS NOT MODIFIED.
 ----------------------------------------------------------------------------


	1. Introduction.

    Z80Stealth is the Speccy 128 and Pentagon 128/512 emulator for DOS 
    but it works OK under Win98. Main goal is to emulate Speccy's hardware 
    as close as possible. Main features: very good z80 emulation, emulation
    of beeper,AY-3-8910/YM2149F,Covox using Sound Blaster,ESS688 or WSS.
    KP1818VG93 emulation, menus to load/save/browse your collection 
    of Speccy's snaps,tapes,disks.
    It supports popular file formats - Z80,SNA,SLT,SP,PRG,ACH,SIT (snapshots)
    and TAP (tape image file). 
    TR-DOS Disk format supported: TRD & SCL.
    I'm writing & optimizing it almost everyday so future versions will 
    be faster and with more features.	

	2. Features.

	- Spectrum 128 emulation.
	- Pentagon 128/512 emulation with Betadisk/TR-DOS support.
	- Z80 CPU emulation using my own code. All documented and 
	undocumented flags and opcodes.
	- AY-3-8910/YM2149F emulation 
	  Includes Digital sound feature.
	  ABC/ACB/BAC stereo modes.
	  Excellent noise emulation.
	  Sound is almost 100% close to the real AY/YM chips!
	- KP1818VG93 emulation
	- Beeper,Covox,SounDrive emulation.
	- Compability: almost everything works ok
	- Interrupt modes 0,1,2.
	- Keyboard issues 2 and 3 emulation
	- Register R emulation.
	- Shadow screen support.
	- Kempston joystick emulation (arrow keys and CTRL).
	- Kempston mouse emulation.
	- File formats:
		SNA*,Z80,SLT,SP,PRG,SIT snapshots - Load/Save
		TAP - Load
		TRD - Load/Save
		SCL - Load
	  * SNA files have TRDOS flag if Pentagon mode selected
	- Menu to Load/Save files (F1)
	- If available MMX is used for fast screen drawing and sound mixing
	- Ability to create PSG or EPSG files. Read about EPSG in z80s.faq
	- Save BMP or SCR screenshots (F8)
	- Supports SB Pro, SB16, ESS688 and WSS compatible sound cards.

	3. System requirements (minimum)
	
	- CPU:    P133+ is required. 
	- Video:  Any VGA compatible card.
	- Sound:
	  Sound Blaster Pro compatible sound card for 
	  44Khz 8bit mono,22Khz 8bit stereo modes
	  Sound Blaster 16,ESS688 or WSS compatible sound card for 
	  44Khz 16bit stereo mode.
	  Sound Blaster clones may work may not. SB Live! is supported.
	- Memory: 256 megs i think. Just joking :)) This will work with
	  almost every amount of memory.
	- OS:     DOS,Win95,Win98.

	4. Whats new.
 
 27/04/2000 v0.200
	Warning: Please read whats new & docs and edit z80s.cfg carefully 
		 before mailing me about something not working :)
	- New  : Updated AY-3-8910/YM2149F emulation code by Hacker KAY:
	  - Added YM2149F emulation
	    (please note that YM emulation is slower than AY emulation
	     due to the nature of this chip)
	  - Added ABC & BAC stereo modes
	  - Support for new sound modes: 44Khz 16bit stereo & 22Khz 8bit stereo
	    ( AY-3-8910 DAC values by V_Soft, YM2149F values by Hacker KAY )	
	  - Now sound is almost 100% close to the real AY/YM chips!
	  - Excellent noise emulation! 
	- New  : Updated sound engine:
	  - new mode: 44Khz 16bit stereo for SB16   (SB_OUT=2 in z80s.cfg)
	  - new mode: 22Khz 8bit  stereo for SB Pro (SB_OUT=3 in z80s.cfg)
	  ! new !   : ESS688 engine by Hacker KAY:
	     supports 44Khz 16bit stereo mode (SB_OUT=4 in z80s.cfg)
	     autodetects BaseIO port,IRQ,DMA for these cards
	  ! new !   : experimental WSS engine by Illuminator:
	     supports 44Khz 16bit stereo mode (SB_OUT=6 in z80s.cfg)
	     you need manually type in BaseIO port,IRQ,DMA values in z80s.cfg
	     for these cards
	     no mixer control for this mode yet
	     so far this mode only tested with Yamaha YMF718/719	
	 - Bugfix: fixed problem with IRQs >7
	- !New!: removed cpu autodetection.
	  You must set USE_MMX=YES|NO switch in z80s.cfg manually!
	- New  : Betadisk/TRDOS: up to 4 floppy drives are now supported
	- New  : SounDrive emulation!
	- New  : Rewrote beeper emulation again.  
	- New  : 4 switches to turn on/off Covox/SounDrive emulation, change
	  stereo mode and music chip type "on the fly"
	  Simply press F1 for snapshot menu and you'll see what I'm 
	  talking about
	- New  : rewrote Z80 engine here and there
	- New  : some modifications to screen drawing procedures
	- New  : you can save AY(YM) output log files in 
	  EPSG format. Read more about EPSG in z80s.faq
	- New  : E(PSG) file output is buffered so you'll
	  get no sound glitches on fast machines 
	- Bugfix: Fixed t_states for several opcodes.
	- Bugfix: 'Ctrl(Alt)-Fn,Esc' bug fixed.
	- Bugfix: Fixed very rare bug with several opcodes
	  overwriting ROM.
	- Bugfix: Small fix in TAP loading routine.
	- Bugfix: Small fix in Z80 snaps loading routine.
	

 15/02/2000 v0.150 'Millennium release'
	- New  : New AY-3-8910 emulation code (including AY's digital
	  sound emulation & ACB stereo mode) by Hacker KAY.
	- New  : Wrote my own SB engine which uses auto-init DMA  mode
 	  to produce clean sound. Sampling rate is 44100. Also you can
	  choose between stereo and mono output (SB_OUT= option in z80s.cfg).
	  And there's a lot of new options in z80s.cfg to control SB mixer.
	- New  : Rewrote beeper emulation routines. 
	- New  : Z80Stealth supports AY-LPT. There's 3 new options
	  for AY-LPT in z80s.cfg.
	- New  : Covox emulation! 2 new options in z80s.cfg :
	  COVOX=YES|NO, COV_P=XX
	- New  : Added support for TRD disk images of 2x40,1x80,1x40 disks
	- New  : KP1818VG93: Write Sector(s) command support. Added this
	  hotkeys to the disk menu : 
	    F6 - Toggle write protection	
	    F9 - Save disk to file
	  For safety: you cannot overwrite files with readonly attribute.
	- New  : Border line-by-line rendering.
	- New  : Now you can set default directories for snaps/tapes and
  	  disk images (SNAPDIR= and TRD_DIR= options in z80s.cfg)
	- New  : Hotkey (F11) to avoid Kempston joystick/Keyboard conflict
	  in some games (Sabre Wulf, Atic Atac).
	- New  : Updated FAQ (z80s.faq).
	- New  : Adlib version is discontinued.
	- Bugfix: Port #FDDF is used for Kempston mouse Y-coord.
	- Bugfix: Crash if TRD image file>655360 bytes long	
	- Bugfix: Fixed problem with directories which have r/o,hidden,
	  system attr.

 11/12/99 v0.100 'Betadisk/TR-DOS support release'

	- New  : Betadisk/TR-DOS support using KP1818VG93 emulation
	  (Big thanks to Raul Gomez Sanchez for his help)
	- New  : TRD and SCL TRDOS disk images support.
	- New  : Menu to load disk images (F3).
	- New  : Kempston Mouse emulation. 
	  You can adjust mouse sensitivity in z80s.cfg
	- New  : Pentagon 512Kb emulation.
	  You can switch between 128/512Kb memory by editing 'PENT_512='
	  value in z80s.cfg
	- New  : Port #FF emulation. This fixes problems with Cobra, Arkanoid
	  now works.
	- New  : Added support for SP,PRG,ACH,SIT snapshots (Load/Save).
	- New  : Added support for SCR screenshot format again.
	  Choose screenshot format (BMP or SCR) by editing z80s.cfg	
	- New  : Added TRDOS flag support to SNA snapshots. Now SNA is the
	  default snapshot format if Pentagon emulation selected.
	- New  : Rewrote CB xx, DD CB d xx, FD CB d xx opcodes emulation.
	  About 5% faster.
	- Bugfix: Fixed problems with reading files which
	  have readonly,hidden,system attributes.
	- Bugfix: Fixed 'Runtime error 2' if filename contains ' symbol.
	- Bugfix: LD A,R & LD A,I set P/V flag correctly (Kolobok 2 works).

 10/11/99 v0.079
	- New  : SLT files support (SLT is a special snapshot format for
	  multilevel games). If slt snapshot is opened then slt is the 
	  default format for saving.
	- New  : Now you can change drive to browse you files. 
	  (F1->Load... -> Alt-D to change drive). 
	- Bugfix: Rewrote procedures working with tape images. This fixes
	  crashes caused by custom loaders.
	- Bugfix: file browser fixes ('attr=0' and 'xxx.yyy dir' bugs fixed)

 21/10/99 v0.078
	- New  : SB routines optimizations. Now SB version is 40% faster
	  and requires P133.
	- New  : Improved file browser. Now it remembers last browsed directory
	  and shows files alphabetically

 09/10/99 v0.077 'Sound Blaster support release'
	- New  : Beeper emulation using Sound Blaster! 
	  Note that now Z80Stealth comes in two varieties: 
	  1) Adlib version (z80s_adl.exe). Includes AY-3-8910/12 emulation.
	  This version is faster than SB version but has no Beeper sounds emulation.
          2) SB version (z80s.exe) uses Sound Blaster to emulate Beeper sounds.
	  (If you have problems with SB version  or do not have SB card
	  then use Adlib version. Sound Blaster clones may work may not.
	  Current SB version requires P166.)
	- Bugfix: Crash under Qemm and some emm386 configurations. 

 01/10/99 v0.065 
	- New  : Now my emu draws screens line by line (as real Speccy)
	  instead of simple redrawing every 1/50 sec. This fixes gfx
	  problems (flicker) in some games (for ex. Puzznic,Joe Blade 2).

 27/09/99 v0.060 
	- New  : Rewrote screen drawing procedure.It autodetects MMX-compatible
	  CPUs and uses MMX if available. Much faster than previous one even
	  on non-MMX CPUs. By default there's NO frameskipping now (dont
	  forget to overwrite old z80s.cfg by a newer one from z80s_060.zip)	  
	- Added: Keyboard Issue 2 emulation
	- Added: Menu to create/close PSG files (F2)
	(PSG file is a log of AY-3-8910 outs, you can play it with
	your favourite AY-3-8910 player)
	- Bugfix: z80 emulation fix (Robocop 2 and Blava demo)
	- Bugfix: Z80 snap loader fix (Technician Ted)
	- Bugfix: TAP loader fix (Turbo Outrun)
	- Bugfix: very rare write to ROM fixed (Joe Blade 2)
	- Bugfix: adjusted speed of virtual Speccy - now it's a bit slower
	  but closer to real one

 19/09/99 v0.050 'Music Support Release'
	- Added: AY-3-8910/12 emulation using Adlib!
	- Added: CPU Speed Autodetection 
        
 16/09/99 v0.040 
	- Added: Support for TAP files (tape image file).
	  You can select them in the menu (F1). After TAP file is opened
 	  you can load it as you did it on real Speccy. But don't forget
	  that some tapes will load only in 128K mode others in 48K.
	- Added: Saving snapshots in Z80 format
	  (this is default saving format but you can save your snaps in SNA
	  format if you enter filename ending with ".sna" or ".SNA" extensions) 
	- Added: Hardware Reset (F12)
	- Added: AY emulation (reading/writing AY regs)
	- Added: Speccy Speaker emulation using PC Speaker 
	  (just for fun :) by default disabled but you can enable it by
	  editing z80s.cfg)
	- Bugfix: pc counter in CPDR/CPIR instructions
	  (Match Day & Match Day 2 are working ok now)

 29/08/99 v0.030
	- First release with  User Interface (F1).  Now  you  can
  	  easily browse/load/save your snapshots ( Long filenames
	  are supported if emu works in Win98 ).
	- Few minor bugfixes.

 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.
	Ok first you must edit z80s.cfg - there's comments for 
	every option so it's not very difficult.
	After that just run z80s.exe to bootup Speccy 128 or Pentagon.
		
	
	About TAP files:
	 After selecting tape file you can load it as it was on real Speccy:
	Tape Loader in the 128K menu or go to 48K Basic and type LOAD "".
	If game doesnt load you should try both methods.
	
         Keys:

	 F1  - Load/Save snapshots menu. 
	       In this menu:
		F5 - AY(YM) stereo mode
		F6 - Music chip type
		F8 - Covox On/Off
		F9 - SounDrive On/Off
               In 'Load' menu Alt-D to change drive.
	 F2  - PSG file create/close menu.
	 F3  - Load/Save disk images.
	       In this menu:
		F4 - Remove disk
		F6 - Toggle write protection on/off
		F9 - Save disk 
	 F9  - Pause.
	 F8  - Save BMP screensot.
         F10 - Exit.
	 F11 - Hotkey to avoid Kempston joystick/Keyboard conflict
	 F12 - Reset.


	6. Future plans.
	
	- Better Pentagon emulation.
	- Debugger.
	- Scorpion,Profi emulation.
	- More compability.
	- A lot of other small things and bugfixes.

	7. 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

 Hacker KAY - the author of AY-3-8910/YM2149F emulation for Z80Stealth!
  Also thanks for your support,ideas,bugreports...

 Illuminator - thanks for writing WSS driver for my emu!

 Paul Pavlov - thanks for creating VT - it rulez
  Hope we'll meet at CC'000

 Philip Kendall - thanks for Sinclair ZX Spectrum FAQ.  

 Raul Gomez Sanchez - author of one of the best speccy emulator

 Dmitry Kozlov - thanks for your FAR plugins and sources of td0->trd converter

 Sergey Vladimirovich Bulba - author of AY-3-8910/12 Emulator. Thanks for info
   about PSG files. 

 Rodolfo Edison Guerra - author of SpecBASE. Thanks for supporting my
   emu in SpecBASE and for sending soluting of 'emm386' trouble

 Miodrag Stancevic - thanks for your report about trouble with Blava demo &
   saying that my emu is a bit faster than a real Speccy.

 Thomas Harte - thanks for your letter about Puzznic. It gave me the idea
   to implement line-by-line rendering in my emu.	

 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.

 Harald Thunem - thanks for HTScreen library


	8. Contact me.
	  
	e-mail: Mr.Kirill@mtu-net.ru	
	Feel free to drop me a letter.

	Z80Stealth homepage: http://z80.da.ru (under construction)