home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / emulator / spectrumaga / zxam_spectrumaga.doc_eng < prev    next >
Text File  |  1995-02-27  |  20KB  |  488 lines

  1. ›[0m›[0 p
  2.                        ›[0;1;33;40mZXAM SPECTRUM EMULATOR AGA v1.3 ß›[0m
  3.               © 1994 WareSoft All rights reserved
  4.               by Antonio J. Pomar Rosselló
  5.  
  6.  
  7.  
  8.  
  9. ›[0;1mDISTRIBUTION›[0m
  10.  
  11.    This program is FreeWare.  The program  can    be  freely distributed provided
  12. that all the associated files are distributed with the program itself.    Neither
  13. the  program nor  their  associated files  must  be  modified  in any way.  The
  14. complete distribution  package can be compressed  with    LHA,  LHarc  or similar
  15. for distribution convenience.  No charge  must be  made for use or distribution
  16. of this package.
  17.  
  18.    The complete distribution package contains:
  19.  
  20.     ZXAM_SpectrumAGA    The executable file (with icon).
  21.     ZXAM_SpectrumAGA_FAST    A faster version of the emulator (with icon).
  22.     ZXAM_SpectrumAGA.DOCeng This is the english DOC (with icon).
  23.     ZXAM_SpectrumAGA.DOCesp Spanish translation of the DOC (with icon).
  24.     README!!        Notes for distribution (with icon).
  25.     LEEME!!            The same, but in spanish (with icon).
  26.     INTERFACE.IFF        Diagram of the cassette interface (with icon).
  27.     DIGIT_INTERFACE.IFF    Digitalization of my interface (with icon).
  28.     powerpacker.library    To load compressed spectrum programs.
  29.  
  30.    This software is provided 'AS IS'  without  warranty  of  any  kind,  either
  31. expressed or implied. By using this package you agree to accept the entire risk
  32. as to the quality and performance of the program, or even of the DOC.  The same
  33. applies to the  tape interface.  It is prohibited to  build and  sold the  tape
  34. interface for profit. The interface must be build for personal use only.
  35.  
  36.    All trademarks and Copyrights of products mentioned    in  this  document  are
  37. acknowledged by the author.
  38.  
  39.    In the DOC of the  Spectrum Emulator 1.7 I have read that  AMSTRAD has given
  40. special permission for emulator authors to use the Spectrum's ROM code.  Anyway
  41. the Spectrum's ROM is copyright to AMSTRAD.
  42.  
  43.    The powerpacker.library is © Nico François.
  44.  
  45.    The Sinclair ZX Spectrum Emulator V1.7 is © Peter McGavin.
  46.  
  47.  
  48.  
  49.  
  50. ›[0;1mREQUIREMENTS›[0m
  51.  
  52.    This program  needs WorkBench 3.0 (v39)  or higher to run,  the AGA    chipset
  53. and a  68020 CPU,  or better.  In short,  an Amiga 1200 or 4000.  It needs  the
  54. powerpacker.library too,  to load the compressed Spectrum programs, in LIBS: or
  55. in the same directory of the executable.
  56.  
  57.    Is VERY convenient  that you have 32 bits FAST memory.  With FAST memory the
  58. speed, and the sound, will be A LOT better.
  59.  
  60.  
  61.  
  62.  
  63. ›[0;1mINTRODUCTION›[0m
  64.  
  65.    Well, maybe you have guessed that this program is a Sinclair ZX Spectrum 48k
  66. emulator,  with all those lovely attributes and only one channel of 1 bit sound
  67. (sob...).
  68.  
  69.    This is a very very ßeta version.  It is unfinished,  but I have  decided to
  70. release it  with the aim  that the  people test  the emulator  (and love it, or
  71. maybe hate it...) and give me their opinion and ideas about it.
  72.  
  73.    Actually this emulator  is mainly a hack,  that  access directly  to the AGA
  74. hardware.  The final version will be much more    friendly (as much friendly as I
  75. can manage to do it) with the operative system and with the hardware.
  76.  
  77.  
  78.  
  79.  
  80. ›[0;1mSPECTRUM PROGRAM FORMATS›[0m
  81.  
  82.    Before  you    can  understand  the function  of some of  the gadgets    of  the
  83. program,  you must  learn something  about the    format of the Spectrum programs
  84. (often called ›[0;1ms›[0mnapshots).
  85.  
  86.    On the disk, a Spectrum program is simply a file that contains a copy of the
  87. 48k of RAM  of the Spectrum,  along with all the registers  of the Z80 CPU (the
  88. CPU of the Spectrum).
  89.  
  90.    The    problem  is  that  every Spectrum  emulator  (on any computer)    uses  a
  91. different  format to  save the memory  and  the registers.  That  means that  a
  92. program saved with an emulator will not load into any other emulator.
  93.  
  94.    Instead of create my own format for the  Spectrum program I have  decided to
  95. support several formats of programs. You can decide what format you want to use
  96. for the programs, or use the emulator as a format conversor too.
  97.  
  98.    The two formats that I know,  and that I have included in the emulator,  are
  99. called (provisionally) PC and MIRAGE. These formats are:
  100.  
  101.      PC:  This is the format used by a nice  emulator for the IBM PC,  and
  102.      compatibles, programmed  in Spain by Pedro Gimeno.  The executable is
  103.      called  SPEC386.EXE  and  the  version  I    know  is the 0.99D ß. This
  104.      emulator needs  a 386DX at 25MHz,    with a 256k cache,  to approach to
  105.      the original Spectrum speed.  These files are  49190 bytes  long  and
  106.      have a .SP extension appended to the name.
  107.  
  108.      MIRAGE: This is the format  used by the Spectrum Emulator 1.7, a very
  109.      good emulator for non-AGA machines.  These files are 49179 bytes long
  110.      and have the  .snapshot extension    appended to the name.  I recommend
  111.      that you change the  extension to .mirage,  because it  looks like if
  112.      all the emulators    are using the  same extension.    The format version
  113.      supported by the  ZXAM emulator is the post-1.6 version,  that stores
  114.      correctly the border color.
  115.  
  116.    I know about another  emulator (KGB Spectrum Emulator v1.2) but I don't know
  117. the format of their files.  Anyway, it is very buggy,  and is incompatible with
  118. KickStart 2.0 and higher.
  119.  
  120.    If you know any other format (for any computer, like Amiga, Cray, MAC, Atari
  121. or PC) please send to me the information that you have,  along with a disk with
  122. several games saved in that format.  In the next version of the emulator I will
  123. support that format.
  124.  
  125.  
  126.  
  127.  
  128. ›[0;1mRUNNING THE EMULATOR›[0m
  129.  
  130.    You can  run the emulator from  WorkBench or SHELL.    If you run it  from the
  131. SHELL,    it will "detach" from  the SHELL window  and will search  the program's
  132. icon to read the ToolTypes.
  133.  
  134.    Any problem at startup will be reported by a requester.
  135.  
  136.    Available ToolTypes are:
  137.  
  138.     PATTERN=    Here you can put the pattern (or 'filter') for the
  139.             filerequester. Take a look at the user's manual of
  140.             your Amiga to learn how to use these patterns.
  141.  
  142.     PATH=        The directory  where you have the  Spectrum games,
  143.             if  you  have  any.  The filerequester    will  open
  144.             itself over that directory  (I have a directory in
  145.             my Hard Disk with 232 compressed games [4.7Meg]).
  146.  
  147.     DEFFORMAT=    The default  format used to save  the programs (PC
  148.             or MIRAGE).  Anyway,  you can change this with the
  149.             suitable gadgets.
  150.  
  151.  
  152.  
  153.  
  154. ›[0;1mPROGRAM'S WINDOW›[0m
  155.  
  156.    The window has  several gadgets to load, save, etc.. All the gadgets with an
  157. underlined letter means that pressing that letter on the keyboard is like click
  158. on the gadget.
  159.  
  160.    The gadgets are:
  161.  
  162.    Load  Program  .-  Opens the filerequester to choose the spectrum program
  163.      that you want to load.  The emulator will detect the format of the file
  164.      and then will load it in the Spectrum's memory. IMPORTANT: the programs
  165.      can be compressed with  PowerPacker.  That  means to save    lots of disk
  166.      space. If you load a file    that the program don't know,  the Spectrum's
  167.      memory  will be  trashed with  that file,    but this  is harmless.    This
  168.      version of the emulator  CAN  load programs from tape,  but you need to
  169.      build the interface described in INTERFACE.IFF. 
  170.  
  171.    Reload.-  Reloads the  last loaded  program,  that appears in the 'loaded
  172.      file' box.
  173.  
  174.    Save program.- Saves the complete memory and registers of the Spectrum in
  175.      the format selected with the  "SAVE FORMAT" gadgets.  Actually they are
  176.      saved uncompressed.
  177.  
  178.    POKE.- Guess what...
  179.  
  180.    "SAVE FORMAT" box .- Inside this  box there are  4 gadgets to  select the
  181.      format you  want to use  to save the Spectrum programs. Only 2 of these
  182.      gadgets can be used. The other two are reserved for a future own format
  183.      (maybe, if I nedd it...).
  184.  
  185.    RUN .- Starts  the emulation.  During  the emulation  the  multi-task  is
  186.      stopped and the emulator takes TOTAL control over the machine.  You can
  187.      return to the WorkBench by pressing the HELP key.
  188.  
  189.    Reset & RUN.- Like RUN but forcing a RESET of the Spectrum.
  190.  
  191.  
  192.  
  193.  
  194. ›[0;1mMENUS & KEYBOARD›[0m
  195.  
  196. ›[0;1m   ›[0mAll the gadgets with an underlined letter means that pressing that letter on
  197. the keyboard  is like click on the gadget.  The help key brings  the 'About...'
  198. requester. The ESC key quits the emulator. The TAB, an Shift+TAB, key activates
  199. and moves through the integer gadgets.
  200.  
  201.    In the menu you can find the 'About...' and 'Quit' items.
  202.  
  203.  
  204.  
  205.  
  206. ›[0;1mTHE SPECTRUM'S KEYBOARD›[0m
  207.  
  208.    In the emulation the  keyboard is like the  one of the Spectrum,  with  some
  209. 'special' keys:
  210.  
  211.      <-   Deletes a char (Shift+0)
  212.      Ctrl Like pressing Caps+Symbol (E mode)
  213.      Alt  Like Symbol Shift
  214.      Del  Like Shift+1 (Edit)
  215.      Help Returns to WorkBench
  216.      Esc  RESET!!!
  217.      F1   Switches between color/black&white modes. In CHIPMEM-only systems
  218.       the DMA load of the memory slows down the CPU. If you switch to the
  219.       black&white mode the DMA load is much smaller, thus the emulator
  220.       will run about 10% faster and the sound will be A LOT better.
  221.      F2   In black&white mode inverts the image.
  222.      Cursor keys  Like the original cursor keys of Spectrum+ (Shift+5 6 7 8).
  223.      ,      (key on the right of M) is the ',' (Symbol+N)
  224.      .      (2ª on the right of M) is the '.'(Symbol+M)
  225.      ´      (3ª on the right of M) is the '"' (Symbol+P)
  226.      Ñ      (key on the right of L) is the ':' (Symbol+Z)
  227.      ;      (2ª key on the right of L) is the ';' (Symbol+O)
  228.  
  229.    (Symbols referent to the spanish Amiga 1200 keyboard)
  230.  
  231.    The keypad works complete.
  232.  
  233.    The Kempston joystick is emulated with the Amiga joystick.
  234.  
  235.    Maybe you will notice that you can't press simultaneously 2 keys in the same
  236. row of the keyboard.  This is because you have an Amiga 1200,  and its keyboard
  237. simply behaves in this very particular way.  You can test it with any  of those
  238. keyboard-playing Spectrum games (all the games!).
  239.  
  240.  
  241.  
  242.  
  243. ›[0;1mEMULAT›[0mION
  244.  
  245. Details about the FULL version:
  246.  
  247.     - The original Spectrum ROM is inside the executable.
  248.     - The R register is fully emulated.
  249.     - In the F register the 2 unusued bits aren't emulated, and the
  250.       emulation of H and N is partial.
  251.     - The BCD is fully emulated.
  252.     - All the undocumented instructions of the Z80 CPU are emulated.
  253.     - Interrupt mode 0 is like interrupt mode 1 (RST $38).
  254.     - No NMI (for what?).
  255.     - The border is emulated on the copperlist. That means that you
  256.       can't do fancy border effects, but the BORDER command works.
  257.     - The transfer intructions are emulated at 32 bits level.
  258.     - You can run the emulator in color or black&white mode, and
  259.       can switch the modes while running. This is mainly for computers
  260.       with only CHIP memory.
  261.     - FLASH fully emulated.
  262.     - Sound emulated at OUT instruction level.
  263.     - The kempston joystick is fully emulated at IN level.
  264.     - Only partial screen sincronization. Some games will 'blink',
  265.       for the moment.
  266.     - The Spectrum screen is PAL 15KHz. Sorry, but no VGA monitors.
  267.     - The screen is genlock compatible.
  268.     - The emulator works even if VBR is not 0.
  269.    >>>>>>>>> Addendum for version 1.3 ß <<<<<<<<
  270.     - Loads from tape, by means of a patch in the Spectrum's ROM.
  271.     - Saves to tape in REAL TIME, that means, is the Z80 emulation that
  272.       is sending the sound to the tape, even with an Amiga 1200 without
  273.       FAST and in colour mode (!!).
  274.     - The border is nearly perfect.
  275.       
  276.     Details about the FAST version (v1.3 ß):
  277.     - No BCD emulation. That means that the BASIC will print the numbers
  278.       with strange symbols, but the calculatios are still correct. Some
  279.       games don't print correctly the score.
  280.     - The internal timings are less accurate. Some programs may behave
  281.       in strange ways.
  282.     - No R register emulation.
  283.     - No SAVE to tape, and no stabilized sound.
  284.     - No LOAD from tape.
  285.     - The border is of slow type.
  286.     (really, the FAST version is only for PLAYING!!)
  287.     - The speed difference between the FAST and FULL versions is about
  288.       5% to 10% (depends on the program). Actually, I use the FULL version
  289.       with my Amiga 1200 because I prefer an emulation more accurate.
  290.     
  291.  
  292.  
  293.  
  294. ›[0;1mTECHNICAL INFO›[0m
  295.  
  296.    Program written in  assembler from the  first lines to the full 11096 actual
  297. lines (111926 lines when expanding MACROs!!!).    In my Amiga 1200 with hard disk
  298. the Devpac 3.02 assembles the emulator in 1 min 58 secs  (3 min 50 secs with no
  299. hard disk,  and 4 min 53 secs for the last version  assembled with my Amiga 500
  300. Plus). Well, if programming is fun... BIG programming is BIG fun!
  301.  
  302.    This is my third program in assembler. I began to program it in my Amiga 500
  303. Plus  with 2 Meg of  RAM and 3 floppy drives.  As soon as I could  buy an Amiga
  304. 1200 I had converted the emulator to AGA-only and 68020 code.
  305.  
  306.    I began the emulator to experiment  with the 68020 code.  At the beginning I
  307. was programming conditionally in 68000 and 68020 code, and testing the emulator
  308. in the Amiga 4000/030 of a friend.  With the new Amiga 1200 I have experimented
  309. with the AGA chips, and discarded totally the 68000 and OCS/ECS code.
  310.  
  311.  
  312.  
  313.  
  314. ›[0;1mPRE-HISTORY (jurassic?, NO! Around summer 1993!›[0m)
  315.  
  316.    The     first     black&white/CLI-only  version,   with    ManicMiner  inside  the
  317. executable,  worked in 10 days (phew!).  Since then there are 6 different color
  318. emulation systems,  and 4 major restructurations of the Z80 emulation.    None of
  319. the pre-AGA versions has been released to the public.
  320.  
  321.    This  is not a  full time  project.    While  developing  the emulator  I  was
  322. studying  a little  automations course,  developing  the MPMaster  program  and
  323. practising my laziness.
  324.  
  325.  
  326.  
  327.  
  328. ›[0;1mHISTORY›[0m
  329.  
  330.       Version  Internal
  331.            version
  332.  
  333.     1.0 ß    39.00      (11-March-94)
  334.         -First public release.
  335.  
  336.     1.1 ß    39.01      (2-April-94) (renamed ZXAM_SureCrash)
  337.         -Audio filter off when emulating. Restored at exit.
  338.         -Disabled nearly all of the interruptions. The sound is
  339.          now a lot better.
  340.         -The system keyboard handler 'freezes' after a while.
  341.          I have to use this handler because of the new keyboard
  342.          hardware of the Amiga 1200 (snort!).
  343.  
  344.         39.02      (19-April-94)
  345.         -Added the ZOOM gadget to the window.
  346.         -The #%$&! system keyboard handler is still 'freezing'.
  347.  
  348.     1.2 ß    39.03      (26-June-94)
  349.         -¡At last! Fixed the problem with the system keyboard handler.
  350.         -Now, if you press the Caps Lock key the system will be
  351.          informed correctly about its state.
  352.         -Available the FULL (complete) and FAST (faster) versions.
  353.          The FAST version is about 10% faster, but it is a less
  354.          detailed emulation (no BCD, no R register, etc...).
  355.  
  356.         39.04      (27-June-94)
  357.         -The emulator 'detachs' from the SHELL window.
  358.         -The icon ToolTypes will be read even if the emulator runs
  359.          from the SHELL.
  360.  
  361.         39.05      (29-June-94)
  362.         -No more audio problems. If a player (like Delitracker) is
  363.          playing when starting the emulation, it will be stopped
  364.          until return to the WorkBench (at least, with the players
  365.          that I have).
  366.         
  367.         39.06
  368.         -The Timer-B of CIA-B is allocated.
  369.         -Preparatory version with some synchronizations with CIA Timer
  370.          for future implementations of LOAD/SAVE to tape.
  371.         
  372.     1.3 ß    39.07        (7-July-94)
  373.         -First attempt of patching the ROM LOAD routine. Now you can
  374.          LOAD from tape even in colour mode, with an Amiga 1200 with
  375.          no FAST memory, and even with the FLASH working during the
  376.          LOAD (!!). The patch seems to be very good, and works
  377.          perfectly over the Amiga 1200 and Amiga 4000/030, but needs
  378.          testing in other configurations.
  379.         -Synchronized the OUT instruction. With this we have REAL
  380.          TIME SAVE (not patched!!), and a pure tone BEEP. Some games
  381.          now sounds A LOT better, but other have slowed down a little.
  382.          
  383.         39.08        (11-July-94)
  384.         -REAL border! Now, if there is enough speed, you can see the
  385.          fancy border effects that some programs do.
  386.         -Readjusted the proportion of bright added to the colours when
  387.          BRIGHT 1. Now looks much more like the original Spectrum.
  388.         -Readjusted the LOAD patch. Still loads very well, but now
  389.          reacts better to the BREAK, HELP ans ESC keys.
  390.         -¡At last! I have managed to do that the lines counter of
  391.          Devpac 3.02 "turns around" for the second time. Now the
  392.          assembled lines (with the macros expanded) are 133637 (!!).
  393.         
  394.         39.09        (16-July-94)
  395.         -Fixed the problem of the LOAD patch and OUT instruction with
  396.          the border. Now the border is nearly perfect. Some border
  397.          changes are missed because of interferences between the CPU
  398.          and the copperlist. To see the border lines while LOADing or
  399.          SAVEing is more than enough.
  400.         
  401.  
  402.  
  403.  
  404. ›[0;1mFUTURE (near future?... or FAR future?)›[0m
  405.  
  406. When finished there will be two versions:
  407.  
  408.    - FAST version: with external tape loader (like the Spectrum Emulator 1.7).
  409.      Some things, like BCD, R register, etc... aren't emulated.
  410.  
  411.    - FULL version: with REAL TIME LOADING (like the real Spectrum). It will
  412.      load anything, even the protected programs. It will run over Amiga
  413.      4000, and maybe over Amiga 1200 with FAST 32 bits. The emulation will
  414.      be almost complete. Anyway, in this version the patch will be optional.
  415.  
  416.    As soon as I can  get some true FAST memory    for my Amiga 1200 I will  begin
  417. to work seriously in the Real Time Loading.  Without FAST memory the Amiga 1200
  418. can't run fast enough for real time loading.
  419.  
  420.    Anyway,  I am developing a shared  library  that will  make any tape-loading
  421. routine  useless.  This  is the 'clairvoyance.library',  that will  foresee the
  422. contents of any  tape without even having to connect the cassette-player to the
  423. computer.  In the  future  there  will be  a floppy disk version,  and maybe  a
  424. network version.
  425.  
  426.  
  427.  
  428.  
  429. ›[0;1mACKNOWLEDGMENTS›[0m
  430.  
  431.    I wish to thank to:
  432.  
  433.    - Fco Javier Cocaña Galán, Leonardo Cocaña Galán and Juan A. Estela Valín
  434.      for their friendship and suggestions.
  435.    - Commodore-Amiga Inc for create the very best computer in the world.
  436.    - Motorola for their powerful and flexible microprocessors.
  437.    - Nico François for create the reqtools.library and powerpacker.library.
  438.    - Jan van den Baard for the incredibly useful GadToolsBox.
  439.    - IBM and Atari for create so bad computers, making very easy my choosing
  440.      for the Amiga.
  441.    - Miguel Barnosi, Sysop of TANIT-BBS, for sending the emulator to various
  442.      BBSs of Spain.
  443.  
  444.  
  445.  
  446.  
  447. ›[0;1mCONTACTS›[0m
  448.  
  449.    If you have    any information about file formats, please, send it to me along
  450. with a    disk with some    programs saved    in that format.  If  you find  some bug
  451. (NAH!)    report    me the    conditions in that  it was  found  (processor,    memory,
  452. etc..). If the problem is with a Spectrum program, send it to me.
  453.  
  454.    I would like  if you can send me a letter about the speed of the emulator in
  455. your computer. I have tested the emulator in an Amiga 4000/030 with FAST memory
  456. (runs a  bit faster that the real Spectrum)  and in my    Amiga 1200 without FAST
  457. (sob!).  To report  me the  speed you  can measure  the  time  taken  for  some
  458. operation  that I can reproduce  in my 1200 and  Spectrum +2A, like a RESET,  a
  459. BASIC loop  (please,  send me the listing of the loop),  or any other thing.  I
  460. am very interested  in the  speed over  an Amiga 1200 with  FAST 32 bits and an
  461. Amiga 4000/040.
  462.  
  463.    For sending suggestions, bugs, information interchange, etc., contact me  at
  464. the following address:
  465.  
  466.              Antonio J. Pomar Rosselló
  467.                C/ Alférez Cerdá  nº 13-bajos
  468.               Palma de Mallorca 07014
  469.                  Baleares (Spain)
  470.  
  471.  
  472. Palma de Mallorca 16-July-1994
  473.  
  474. NOTE:  my knowledge of    English is  VERY limited,  and    this  text  is    a  good
  475. sample    of  this  fact.
  476.  
  477. IF (you=spanish) OR (you KNOW spanish) THEN
  478.   GOTO ZXAM_SpectrumAGA.DOCesp : REM The spanish DOC in much more detailed!
  479. ELSE
  480.   READ ZXAM_SpectrumAGA.DOCeng : REM Sorry. I hope that you don't get headache!
  481. ENDIF
  482.  
  483. NOTE2:    if you know about  a Dragon 32    emulator for  the Amiga,  please let me
  484. know.  I know a friend    of mine that  wants that I program such  an emulator. I
  485. think that some times there is a justification for murder...(AARGH!!).
  486.  
  487.  
  488. ›[0m›[1 p