Ŀ
 Spec256v1.2     (C) 1999 by Iigo Ayo Blzquez (inigoayo@writeme.com)    
Ĵ
           Sinclair ZX Spectrum emulator in 16/256 colors mode             
Ĵ
 Code:           Iigo Ayo Blzquez (inigoayo@writeme.com)                 
 256c graphics:  David Goti      (sagan69@teleline.es)                     


        1. - Introduction

        2. - Contents

        3. - Requirements

        4. - Basic features

        5. - Keys and menus

        6. - Debugger

        7. - Supported games

        8. - History

        9. - To do

        10. - Known bugs

        11. - Contact

        12. - Gratitudes

        13. - Contributions

        1. - Introduction
       -------------------

  The development of this emulator has made without no spirit of profit
nor benefit of any other type. It can and it must distribute in a free
way. Use this program at your own risk. We dont't take any responsability
of any damage this program may produce.

   The changes that some games have suffered are with the only intention to
take advantage of the graphical power the PCs offer us today. The texts that
make reference to the original authors or companies never will be modified.

   Amstrad allows using and distribution the contained ROM files since we do
for emulation purposes.

        2. - Contents
       ---------------

The present distribution of Spec256 corresponds to version 1.2 and is
composed by the file sp256v12.zip which contains the following archives
inside:

        spec256.exe  - > Spectrum emulator   
        spectrum.rom - > Original ROM of Spectrum 48K
        spec256.cfg  - > Configuration file   
        leeme.txt    - > Documentation in Spanish   
        readme.txt   - > Documentation in English

Moreover, the ZIP contains the directories corresponding to the Spectrum 256
color mode games currently supported.
In order to make a correct extraction of the files and to generate correctly
the directories, we will have to use the parameter -d with PKUNZIP or the
WINZIP.

In these directories we'll introduce the 256 colors games files. A directory
per game.

        3. - Requirements
       -------------------

For the correct operation of Spec256 you will need at least a PC 486DX4-100
with 4Mb of RAM and a VGA graphic card with at least 256Kb. The operating
system required is DOS although it works under Windows 95/98 too.
Although in this version it is not needed, in the following versions
it will require a compatible Sound Blaster card to reproduce the sound of
Spectrum 128K.

        4. - Basic features
       ---------------------

What is Spec256?

Spec256 is an Spectrum emulator very similar to the already existing
Spectrum emulators. But, what makes different to this emulator?
It's its exclusive capacity to load games in 256 colors mode, that is, with
the improved graphics but maintaining and needing the original code
of the program for its correct operation.
When Spec256 is running, it is not simulating a single Z80 processor. In a
parallel way it's simulated a fictitious processor denominated Z80_GFX.
This processor use its own memory region in which each position is 64 bits
width. The Z80_GFX is able to move data and to operate with them so we can
use its results to obtain games in 256 colors.

This is, in a similar way, like a Harvard architecture processor, the Z80_GFX
uses the Z80 memory region for executing its instructions (instruction code
fetching) but the results aren't stored in the region belonging to the Z80.
They are stored in a exclusive zone for it (MEMORY_GFX) from where it obtains
and keeps the data with which operates. This memory zone has  65536 positions
in which each word is 64 bits width (8 color planes).

Spec256 is done completely in 32 bits assembler and although Spec256 would
have to overcome in speed (by obvious reasons) to the most of the existing
Spectrum emulators it doesn't do it because we must consider that by each
instruction that is simulated by the Z80, Spec256 simulates another of the
Z80_GFX that works with data 8 times bigger.
Although it is not absolutely certain, it's like Spec256 was emulating
several Z80 processors simultaneously.

Summarizing the features of Spec256:

        - Sinclair ZX Spectrum 48K emulation in traditional way:
          - Z80 emulation   
                - Documented and undocumented Instructions
                - Timing of the instructions
                - Interruption modes 0, 1, 2 and NMI with debugger control
                - R Register
          - Supports Joystick Kempston, Sinclair 1 and 2, Cursor/Protek/AGF
            using the joystick of the PC
          - Spectrum beeper through the speaker     
          - FEh port (Keyboard and border color)

        - ZX Spectrum 48 emulation in enhanced mode (256 colors)

           - Z80_GFX emulation. "8 planes graphic processor"
                 - The most of Z80 instructions are emulated but working
                   with 64 bits register instead 8 bits.
        - Debugger:

            - Debugger for Spectrum (Z80/Z80_GFX)
                  - Z80 memory window, Z80_GFX memory window, Z80 registers
                    window, Z80_GFX register window, program & stack window
                  - Dynamic change of windows.
                  - Address changing in each window.
                  - The memory can be saved in files.   
                  - The spectrum screens can be viewed in standar or 256
                    colors mode.
                  - PCX screenshot captures (16 or 256 colors mode)
                  - INT interruption forcing.
                  - Memory values can be modified (Z80 & Z80_GFX).
                  - Z80 Registers can be modified.
                  - Trace mode execution (step into).
                  - Step over mode execution (step over).
                  - Go until an address execution (go until).
                  - Toggle execution breakpoints (up to 10)
                  - Toggle unlimited memory breakpoints for R/W operations.
            - NMI forcing simulation.

            - PCX screenshot captures (16 or 256 colors mode)

            - The speed emulator can be adjusted.

            - Joystick selection and calibration.  

            - Snapshots format supported:

                  - Snapshots loading
                        - .Z80 format versions 1.45, 2.0 y 3.0 (48K games)
                        - .SNA format (48k)
                        - .GFX extra format for 256 colors games.
                  - Snapshots saving
                        - .Z80 version 1.45 (48k)
                        - .SNA format (48k)
                        - .GFX extra format for 256 colors games.

        5.- Keys & Menus
       --------------------

        F1 - Help

        F2 - 16 colors mode: With this key you can see the Spectrum in its
             original mode, that is 16 colors or standard mode.
        F3 - 256 colors mode: With this key you can see the Spectrum in 
             256 colors mode. This mode it's used when you load a 256 colors
             mode game. You can also active this mode with standard
             Spectrum games but you won't watch any improvement.
        F4 - PCX Screenshot capture: Captures the Spectrum screen you are
             watching and saves the image in a PCX file whose name will be
             IMAGEnnn.PCX where nnn its the number of the image captured
             and automatically is increased.
             The screen stored will be in 256 colors if F3 mode is activated
             or 16 colors mode if standard mode is activated (F2).
        F5 - Load Snapshot: You can load a standard snapshot. You can load
             .SNA or .Z80 formats (48k).
        F6 - Save Snapshot: You can save the Spectrum memory and registers
             state in a file. By default the storage will be in .Z80 format.

        F7 - Load a 256 colors game: You can load a 256 colors game. For 
             loading games in this mode you will need to allocate the file games
             in their respective directories.

        F8 - Save a 256 colors game: You can save the Spectrum 256c memory 
             and registers of both processors: Z80 & Z80_GFX.
             The files will not be stored in the current game directory to 
             prevent changes. They will be stored in the Spec256 directory.
        F9 - Change settings: You can activate the special options menu.

                J - Select joystick type you will use with the PC joystick.
                        - Kempston
                        - Sinclair 1
                        - Sinclair 2
                        - Cursor/Protek/AGF
                C - Joystick calibration. This is needed if you want your
                    joystick work fine.
             NUM+ - Increase emulator speed. If the emulator is running
                    in a fast machine, this option avoid the wait states
                    the emulator waits between the intructions execution.  
             NUM- - Decrease the emulator speed. This option inserts wait 
                    states between instruction execution.
                S - Select the Spectrum Hardware to emulate. At this moment,
                    only the Spectrum 48k is available.
                B- Enables/Disables the Spectrum speaker (beeper).

             The options modified in this section will be save in a    
             configuration file. (spec256.cfg)            

        F10 - Activates the debugger.


        F11 - Force a NMI: You force a Non Maskable Interruption and the
              the debugger activates for watching the process in detail.  

        F12 - Reset: The Z80 resgisters state is initialized.

        ESC - Exit from emulator.

        6.- Debugger
       --------------

   The debugger is not completely finished because my idea is to create some
additional functions like read/write in in/out ports, breakpoints in ports,
data search, and so on.
In any case, I think the debugger implemented in Spec256 is the best Z80
debugger that a Spectrum emulator has.

The keys are the following:

        TAB - Changes the active windows: With this key you can select the  
              window over you're going to operate. The possible windows are:
                - Memory_Z80
                - Memory_GFX
                - Registers_Z80
                - Registers_GFX
                - Program_Z80
     CURSOR -
PAGUP/PAGDO - With these keys you can move between the data of the active 
   HOME/END - window.

      SPACE - This keys let you to enable/disable breakpoints over the 
              memory position pointed by the cursor.
              You can toggle breakpoints in the memory window and the program
              window.
              The debugger will be activated before execute the instruction
              that has the breakpoint if this is over the Program window and  
              if the breakpoint is over a memory position, the debugger will be
              activated after the instruction that fetched or read the data.

      INTRO - With this key you can modify the value of the memory position  
              or register pointed by the cursor.      
              If you press ESC during the introduction, the changes will be
              cancelled.

         F1 - Stores a memory image: The Spectrum memory will be saved in a
              64Kb file whose name will be MEMORYnn.BIN.

        F2 - Watch and select the 16 colors mode.

        F3 - Watch and select the 256 colors mode.

        F4 - PCX screenshot capture.

        F5 - INT forcing: Forces the Z80 to process the interruption routine.
             For processing the routine, the interruptions must be enabled.

        F6 - Change address: Selects which is the first address of the       
             active window.

        F7 - Execute/Trace: Executes a Z80 instruction (and Z80_GFX). If
             the instruction is a subroutine call (CALL/RST) the debugger
             enters into the subroutine.

        F8 - Step Trace: Executes a step. Like F7, but the CALL/RST
             instructions are processed in a single step.

        F9 - Execute until: Executes instructions until the processor reachs
             the instruction pointed by the cursor.

        F10 - Run/Exit: Exits from the debugger and cotinues the normal
              execution.

        ESC - Exits from the debugger.


        7.- Games supported
        ---------------------

   Spec256 supports the most Spectrum 48K fames in .Z80 & .SNA formats like
whatever emulator. If you want to load games, you must to use F5 and select
the file that contains the game.

You can download a lot of games from Internet.

More information in http://www.emulatronia.com

Moreover, Spec256 v1.2 supports the following games in 256 colors mode:

      Directory      Name (Author)      Gfx improvement (256col)
     ------------ -------------------- --------------------------
       JETPAC     Jet Pac (Ultimate)            David Goti
       SABREW     Sabre Wulf (Ultimate)         Iigo Ayo
       UNDERW     Underwulde (Ultimate)         David Goti
       KNLORE     Knight Lore (Ultimate)        Iigo Ayo 
       GAMEOVE1   Game Over 1 (Dinamic)         David Goti
       GAMEOVE2   Game Over 2 (Dinamic)         David Goti
       PHANTIS1   Phantis 1 (Dinamic)           David Goti
       ARMYMOV1   Army Moves 1 (Dinamic)        David Goti
       ARMYMOV2   Army Moves 2 (Dinamic)        David Goti
       PROFANAT   Abu Simbel Profanation (Dinamic) Imanol Zalbidea
       SOLOMONS   Solomon's Key (Probe)         Alberto Rodrguez
       CYBERNOI   Cybernoid (Hewson)            Alberto Rodrguez


If you want to load any of these games you must download them for the 256
colors mode and after it you must copy them to their own directories

More information in http://www.emulatronia.com/emusdaqui/spec256/index.htm

        8.- History
       -------------

        * 10/97 - First ideas for developing an emulator with these features
        when I saw the Manic Miner version for PC.

        * 11/97 - Z80_GFX Processor emulator developed. The project it 
        wasn't a madness and it can be developed and implemented.  


        * 12/97 - The project is discontinued because there is not interest.

        * 06/99 - David Goti insists me every weekend for continuing the  
                  project. A lot of bugs are fixed and the debugger is
                  implemented.

        * 07/99 - The first Beta version is released in Emulatronia, the
                  official page of Spec256.

                http://www.emulatronia.com/emusdaqui/spec256/index.htm

        * 09/99 - First official release of Spec256 v1.2. Spec256 simulates
                  classical spectrum 48K games and 256 colors mode games.    

        9.- To Do 
        ----------

     Today, there are a lot of thins to do. Our goal is simulate 128K games.
With this mode, we'll can improve games like "La Abada del Crimen".

In any case, we've to do:

        * Spectrum 128K emulation. 

        * PSG AY-8910 sound through a Sound Blaster card.

        * Emulates different keys combinations with the PC (delete, cursors,...)

        * Imrpove .Z80 & .SNA. formats. Do the 128K versions.

        * Create new functions for the debugger.

        * Fix the bugs that appear in the emulator.

        * Make a Z80_GFX using True color.
        
       10.- Known Bugs
      -----------------

        * It's neccessary to synchronize HALT with the vertical retrace.

        * The joystick routine implemented must be replaced because 
          the BIOS function loses a lot of time reading the joystick
          and decrease the emulation speed.


        11.- Contact
       ---------------

        Emulator: Iigo Ayo (inigoayo@writeme.com)

        Graphics improvements in 256 colors games:
                David Goti      (sagan69@teleline.es)

        12. - Gratitudes
       ----------------------

   To Emulatronia, the best page in Spanish about emulation.

        URL: http://www.emulatronia.com

   Thanks to Pts & Dev from Emulatronia for the courage unselfishness 
   they've demostrated in the project and for the difussion of the  
   development with the web page and for the Spec256 logo. 

   To Ishmair, whose M.A.Z.E. (Multi Asm Z80 Engine) initial development 
   I took for starting Spec256.  

   To Da Vinci, the Knight Lore FAN N1 

   To Sir Clive Sinclair for designing an incredible machine.

   To Ultimate for developing games with advanced technics you couldn't
   imagine in a Spectrum and release the best games in the Spectrum history.


        13.-Contributions
       -------------------

   If the Spec256 project likes you and you are interested in improve your
Spectrum favorite game with 256 colors graphics, send us an e-mail (see
Contact section) and we'll send you the information needed for starting
the project.
