*************************************************************************
*                Z80Stealth Spectrum emulator v0.100                    *
*  	         Copyright(c)1999 by Kirill Kolpakov                    *
*************************************************************************

       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. Known problems 
	7. Future plans.
	8. Greetings.
	9. 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. To be exact - perfect z80 cpu emulation is the 
    main task right now. Low-level TAPE support and TRDOS support will
    be added lately. It supports popular file formats - Z80,SNA,SLT,SP,PRG,ACH,
    SIT (snapshots) and TAP (tape image file). 
    TR-DOS Disk format supported: for now only TRD.
    I'm optimizing it almost everyday so future versions will be faster 
    and with more features.	
    From V0.077, 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.

	P100 is required for Adlib version, P133 for SB version.

	2. Features.

	- Spectrum 128 emulation.
	- Pentagon 128/512 emulation with TR-DOS support.
	- Z80 CPU emulation using my own code. All documented and 
	undocumented flags and opcodes.
	- AY-3-8910/12 emulation using Adlib
	- 1818VG93 emulation (not perfect but better than traps)
	- Beeper emulation using Sound Blaster
	- 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,SCL - Load
	  * SNA files have TRDOS flag if Pentagon mode selected
	- Menu to Load/Save files (F1)
	- Speed autodetection and adjustment. You can adjust emu's
	  speed according to your preferences by editing z80s.cfg.
	- If available MMX is used for fast screen drawing 
	- Ability to create PSG files
	- Save BMP or SCR screenshots (F8)

	3. System requirements
	
	- CPU:    P100 is required for Adlib version, P133 for SB version.
	  Adlib version may work ok on some 486 machines.
	- Video:  Any VGA compatible card.
	- Sound:  Sound Blaster compatible sound card for SB version.
	  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.

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

	- New  : TR-DOS support using 1818VG93 emulation
	  (Big thanks to Raul Gomez Sanchez for his help)
	- New  : TRD and SCL tr-dos 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.
	Just run z80s.exe to bootup Speccy 128.
	If you want to load or save a game snapshot or open TAP file(tape image)
	- press F1 for menu.
	
	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 'Load' menu Alt-D to change drive.
	 F2  - PSG file create/close menu.
	 F8  - Save BMP screensot.
         F10 - Exit.
	 F12 - Reset.


        About config file:

	MODEL=128K|PENT choose standart 128K machine or Pentagon
	emulation.
	PENT_512=YES|NO emulate Pentagon with 512Kb of memory or not

	KMOUSE=YES|NO   emulate Kempston Mouse or not
	M_SWAP=YES|NO   swap mouse buttons, you may want to swap buttons for
			some programs
	M_SENSIT=0..6	choose your mouse sensitivity

	SCRSHOT=SCR|BMP choose type of screenshot files: BMP or SCR

	
	Next 3 options only available for Adlib version (z80s_adl.exe):

	ADJUST=YES|NO 	If YES selected then you'll be able to adjust emu's 
			speed using next two values.
			NO means autodetection (default).
	CPU_SPEED=xxx   xxx=100..999 - set your CPU's speed in Mhz.
	MAXSPEED=YES|NO choose if you want maximum speed

	6. Known problems 
	- palette is messed up when using some S3-Trio64 PCI cards
	  (possible solution - buy a newer card :)
	- Smartdrive + plain Dos is not a good idea for my emu. 

	If you know why this happens please mail me and explain. 
	
	7. Future plans.
	
	- Better Pentagon emulation.
	- Scorpion emulation.
	- Better music and sound support.
	- More compability.
	- 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

 Philip Kendall - thanks for Sinclair ZX Spectrum FAQ.  

 James McKay - author of one of the best speccy emulator - X128.

 Raul Gomez Sanchez - another great emulator author.

 Hacker KAY - thanks for your help & trdos rom.

 Dmitry Kozlov - thanks for xTRD (FAR plugin) and sources of td0->trd converter

 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

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



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

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