YAZE-AG-2.01 is the final release of version 2.01

This document describes only the new features of yaze-ag-2.01.

Look to the document yaze.doc for the other features (yaze-1.00).


My english is not so good, I hope you understand what I write here. --- CONTENTS: ========= 0. GLOSSARY 1. FEATURES 2. DEVELOPMENT 3. KNOWN BUGS 4. Some words to BOOTSYS (CP/M 3.1 loader) 5. New option and new monitor command 6. CP/M disks 7. Mounting directories (work around) 8. Following files are in the yaze-ag package (yaze-ag-2.01.tar.gz) 9. Optimizing and speedtest 10. My old real Z80 System   0. GLOSSARY: =========== bios Is the part of the bios which is witten in Z80 assembler. It acts as an interface to the yaze-bios. Here are central definitions (drive tables, yaze control table (YCT), ...) which are essential for the whole system. yaze-bios Is the part of the bios which is written in C.   1. FEATURES: ============ I took the idea of the page tables from Michael Hardt and built a simulated MMU. The default definitions of the MMU are 16 tables with 16 page pointers (page size 4 KB) per table. You can run on yaze-ag-2.01 CP/M 2.2 or superdos (file: yaze.boot) with or without the MMU and 64 KB like the older version yaze-1.10 or you can run CP/M 3.1 or ZPM3 from Simeon Cran (file: yaze-cpm3.boot) always with the MMU and RAM up to 1MB. You can start CP/M 3.1 by simply executing the file CPM3.COM under CP/M 2.2 or CP/M 3.1 (for example with a new bios version). The new CP/M 3.1 loader BOOTSYS (see above) relocates and starts the appended CPM3.SYS and if CP/M 3.1 is running firstly all will be transferred from bank 1 (TPA) to bank 0 (SYS bank) with an interbank move (XMOVE/MOVE). The CP/M 3.1 bios (acts as an interface to the yaze-bios) and the yaze-bios (bios.c) uses the MMU intensive like a real Z80 CP/M 3.1 System (destination/source bank for read/write disk and interbank moves, multi-i/o is also implemented). Ten new options are described in the Makefile. Following features are implemented: simz80.c I made some optimizations and made the necessary changes to embed the MMU. (See above the file simz80.c, the option -DMMU and above "Optimizing".) MMU with 16 tables to 16 page pointers (page size 4 KB). A bank switch over the bios is simple done with a pointer and very fast (see *mmu in the new module mem_mmu.[hc]). I made a lot of changes in all modules to embed the MMU in the whole system. You can run CP/M 3.1 (bootfile: yaze-cpm3.boot) or CP/M 2.2 (yaze.boot) on yaze-ag-2.01. You can start CP/M 3.1 by simply executing CPM3.COM (bootsys.com+cpm3.sys). (yaze-cpm3.boot is identically with cpm3.com) BOOTSYS Bootsys is a new CPM3.SYS loader. It was necessary because the CPM3.SYS grows over 32K and the CPMLDR or ZPM3LDR does not load this big file. (See above "Some words to BOOTSYS".) CP/M 3.1 All fundamental and essential functions are made for running CP/M 3.1 . The following features are not necessary but CP/M 3.1 supports it: DATE implemented XMOVE/MOVE implemented - this supports sector size > 128 Bytes (Default sector size is now 2048 bytes.) MULTIO multi-i/o is also implemented and runs very well. Following features are NOT implemented char devices not yet implemented - Yaze uses the I/O-byte like CP/M 2.2 . I will do this in the future.   2. DEVELOPMENT: ================ I developed under Solaris 8 (sparcv9) and Linux (kernel 2.4.x) and used gcc version 3.x.x also under Solaris. I tested yaze-ag-2.01 also under FreeBSD and DEC-Unix (alpha processor) - it works also there. I tried to use the SPARC-C-Compiler (cc) under Solaris. Everything will be compiled but yaze-ag does not run. I don't know why and so I use the gcc also for SPARC machines. I had a lot of fun in developing the bios and the yaze-bios for CP/M 3.1, but sometimes I was stunned - but I found the errors :-) . (see above section "My old real Z80 system") The known bugs of development version 12, 13, 14 and 15 are now solved. Now you can mount/unmount disks over the monitor. You can also mount/unmount UNIX directories under CP/M 3.1 which you can connect to a CP/M drive. That was the last known bug of the executable yaze_bin and development version 14. Development version 15 (yaze-ag-1.20-15) was the last development version. Since this pre release 2.00 you can use the "cdm" utility (CP/M Disk Manager) also under Linux. That was the last known bug of the last development version 15. I start with with the further deveopment now: Look to chapter 3 "Known Bugs" and chapter 7 "Mounting directories" there I describe what I want to do (reread of unix directories when you give CTRL-C or a disk reset). The next development versions will be called yaze-ag-2.10-xx (xx will be 01, 02, ...) You will find the development versions under ftp://ag-yaze:yaze@xylopia-upload.mathematik.uni-ulm.de/devel/ 18. December 2003 Andreas Gerlich (email: Andreas.Gerlich@mathematik.uni-ulm.de) (University of Ulm, Germany)   3. Known BUGS: ============== Timothy Wagner and Carl Mascott reports a complex bug in yaze-ag-2.00. I found this error also when I work with the emulator (and with drives which are connected to a unix directory) and so I test also the old version yaze-1.10. This bug is also in yaze-1.10! I take the code to access unix directories from yaze-1.10 (see old version on the web page). Bug report 1: When you use the feature to connect a directory to a CP/M drive (A: - P:) this works if you use it to copy files from a directory to a disk-file under yaze-ag. But if you use it to import files from a Directory to compile sources and run programms while you edit source files with vi under Unix/Linux the emulator crashes after some time when you often access files on the drive which are connected to a directory. THIS BUG IS FIXED IN VERSION 2.01 !!! Bug report 2: When you have two unix files like "Source.z80" and "source.z80" this are two different files under unix. CP/M does not handle upper and lower case of file names. All file names are holded upper case in the CP/M directories. When a unix directory was mounted and there was files like the two z80 files yaze-1.10 and yaze-ag-2.00 creates two CP/M directory entries with the name "SOURCE.Z80". This was a problem and the emulator crashes. THIS BUG IS FIXED IN VERSION 2.01 !!! Bug report 3: When you use also the feature to mount unix directories to a CP/M drive, the problem is that if you edit a file with vi or nedit under unix the emulator don't know about this changes or new files until you make a "remount". THIS BUG IN NOT FIXED !!! A remount (work around) is described under chapter 7 "Mounting directories". I start with further development. Have a look also to chapter 2 "Development". In yaze-ag-2.01 there are only this known bug! I mean there are no further errors but if you find one feel free and send an email to me. If you miss a feature feel free and send an email to me, too. 18. December 2003 Andreas Gerlich (email: Andreas.Gerlich@mathematik.uni-ulm.de) (University of Ulm, Germany)   =========================================== 4. Some words to BOOTSYS (CP/M 3.1 loader): =========================================== The BIOS3 under Z80 (acts as an interface to the yaze-bios (bios.c) with the files BIOSKRNL.Z80, YDRVTBL.Z80, MMU.Z80, YCT.Z80 and SCB.Z80, linked with BNKBDOS3.SPR and RESBDOS3.SPR to CPM3.SYS by GENCPM.COM (see drive P:)) supports all 16 drives from A: to P: . All tables for these drives (defined in YDRVTBL) are very big - CPM3.SYS is 44KB! All tables are defined to handle disks up to 64 MB. Greater disks will not work, but it is possible to create them in the monitor in yaze-ag (and cdm) and then you have to change the definitions in YDRVTBL.Z80/SYSDEF.LIB. When CPM3.SYS gets over 34KB, CPMLDR (ZPM3LDR cannot run with my loader bios ?!?!) cannot load this big file (I don't know why and I don't want to debug it). So I had to look for another way to load CPM3.SYS. I search for informations of the file structure of CPM3.SYS. So I developed BOOTSYS.Z80. It relocates the resident and banked part (if present) held in the joined CPM3.SYS and jumps into the bios to start CP/M 3.1. | BOOTSYS works very well. BOOTSYS.Z80 is written, so that BOOTSYS runs also | on a real CP/M System. If the cp/m vectors are present BOOTSYS prints the | messages over the bios (conout), if not, it uses the yaze-bios directly | over the HALT instruction. BOOTSYS should be run always under a real | Z80 CP/M 2.2 system to start CP/M 3.1 (I use Z80 instructions). If CP/M 3.1 is always running BOOTSYS try to move BOOTSYS+CPM3.SYS from bank 1 to bank 0 switch to bank 0 and relocates and start CP/M 3.1. Under YAZE-AG-2.01 BOOTSYS is in the position to start always CP/M 3.1 under CP/M 3.1! WHY? In YAZE-AG-2.01 the XMOVE and MOVE routines are definded outside the Z80 memory in C and the short routines to call the yaze-bios are in the resident part of the bios, so all works well under YAZE-AG-2.01. If in a real Z80 CP/M 3.1 system the XMOVE/MOVE routines are placed in the banked part of a bios (possible if a DMA make the interbank transfere) then it can be that this parts will be overwritten when bootsys+cpm3.sys are transfered from bank 1 to bank 0. In this case you can not make a new start of CP/M 3.1 under CP/M 3.1. You must run CPM3.COM from CP/M 2.2 (You generate CPM3.COM by "PIP CPM3.COM=BOOTSYS.COM,CPM3.SYS"). How BOOTSYS works and what conditions are necessary to run under CP/M 3.1 is described in README_BOOTSYS. BOOTSYS+CPM3.SYS is also in the file yaze-cpm3.boot which is loaded instead of yaze.boot if the C-compiler option -DBOOTSYS is defined in the Makefile. It is the same file like CPM3.COM on drive A: . I transfer it to Unix/Linux and name it yaze-cpm3.boot.   5. New option and new monitor commands ====================================== You can call yaze-ag with the option '-1'. This option force sector size 128 bytes. Normally sector size is 2048 bytes under CP/M 3.1. Under CP/M 2.2 yaze-ag uses always sector size 128 bytes. If you go with the sys.com utility into the monitor you can give the new command '128'. This forces sector size 128 byte, too. This option was necessary because some disk edited utilities (like DED.COM) does not work with sektor size 2048. I expand the mount command. If you give "mount -v" you will get very detail informations about the connected drives/directories if you have started CP/M 3.1.   6. CP/M disks ============= I describe here only the changes in the disk header of a <CPM_Disk>. Look for details to chapter 6. (CP/M disks) in yaze.doc. The new disk header occupies the first 128 BYTES of the file and has the new format: 0 - 9 <CPM_Disk> 10 - 15 a null-terminated ascii comment (may be empty) new 16 version (0 = yaze-1.06/1.10, 1 = yaze-ag-2.xx) 17 - 31 a null-terminated ascii comment (may be empty) 32 - 33 sectors per track 34 block shift factor 35 block mask 36 extent mask 37 - 38 disk size max 39 - 40 directory max 41 al0 42 al1 43 - 44 check size (always zero) 45 - 46 track offset new 47 psh (used if version=1 and CP/M 3.1 is running) new 48 phm ( " " " " " " " " " ) 49 - 127 unused (zeros) If version is 0 the sektor size is set to 128 bytes (psh=0, phm=0) in the DPB of the corresponding drive. Psh and phm are only used under CP/M 3.1 if version is 1. You can alway transfere disk files between an old version of yaze (1.06/1.10) and yaze-ag-2.01. The new disks looks under yaze-1.10 like a disk with sektor size 128 bytes. The new fields are ignored. You can also use your old disk files of yaze-1.10/1.06 under yaze-ag-2.01. The field version is in disk files from yaze-1.10/1.06 always 0. The fields version, psh and phm are used only in yaze-ag-2.xx and if CP/M 3.1 is running. The default sektor size is 2048 bytes (psh=4, phm=15). I change also the default value of sektors per track to 128. (The old value was 26). You can set 128 byte sektors (psh=0, phm=0) for all disk with the flag "-1" or the new monitor command "128". This was necessary because some disk edited utlilities (like DED.COM) does not work with sektor size 2048 bytes.   7. Mounting directories ======================= Under "KNOWN BUGS" I describe a bug in coherence with the use of directories which are connected to a CP/M drive. When you use this feature you can do the following: For example you want to compile a source file which you edit with vi or nedit under Unix/Linux. You have the problem that yaze-ag does not know about new files or the changed size of a changed file (under CP/M there are the old size because CP/M makes not the changes). To fix this problem you can produce for example following submit file: compile.sub: ; ; do not make an umount, mount makes first an umount internally ; sys mount c ./project ; ; this (re)mounts the directory ./project to CP/M drive C: ; (this is like a remount) ; ; you do not need to copy the source file to a drive which ; uses a disk file !!! ; ; ; Now compile the source ; m80 d:source=c:source.z80 ; ; compile c:source.z80 and put the compiled version on d:source.rel ; (drive d: must be a disk file because unix directories are always ; mounted read only) ; "sys mount c ./project" make an remount of the directory "./project". The mount command (of the monitor) makes internally first an umount and then reads the whole directory once more. Yaze-ag knows at this moment about new and changed files in the unix directory ./project. I start now with the further development of yaze-ag: TODO: When you give a CTRL-C at the command prompt all drives are reset and the directories will be reread. This works for all drives which are connected to a disk files (disk files are only changed by CP/M). In yaze-ag-2.01 this works not for drives which are connected to a unix directory!!! It is necessary to make a complete reread of the unix directory. I will fix that problem in the new development cycle. (I have a look to the source code and I have to do a lot of changes to realize an automatic remount of all drives which are connected to a unix directory. I will use the login feature of the BIOS function SELDSK. SELDSK is called with an "Initial Select Flag" in register E. If it is set it means "drive is selected for the first time". This flag is also set wenn you give CTRL-C at the command prompt (CCP) or a program resets the disk system over the BDOS function 37) The next development versions will be called yaze-ag-2.10-xx (xx will be 01, 02, ...) You will find the development versions under ftp://ag-yaze:yaze@xylopia-upload.mathematik.uni-ulm.de/devel/ 18. December 2003 Andreas Gerlich (email: Andreas.Gerlich@mathematik.uni-ulm.de) (University of Ulm, Germany)   8. Following files are in the yaze-ag package (yaze-ag-2.01.tar.gz): ==================================================================== MD5 checksum md5_yaze-ag-2.01 The md5 checksum file of the final release of version 2.01. With this md5 checksum file you can check all files. Use "md5sum -c md5_yaze-ag-2.01" to check all files (see "man md5sum"). md5_yaze-ag-2.00 The md5 checksum file of the final release of version 2.00. md5_yaze-ag.2.00-pre The md5 checksum file of the pre release of version 2.00. There you can check which files are different between the final release and the pre release. Documentation (in doc/) 00-INDEX.doc A brief index of the documentation of yaze-ag INSTALL-2.01 describes the install process of version 2.01 README-2.01 README to final release 2.01 yaze-ag.doc The documentation only of the new features of yaze-ag-2.01 yaze.1 Man page to yaze-ag cdm.1 Man page to cdm (CP/M Disk Manager) README_BIOS3_Z80 README of the CP/M 3.1 BIOS files (*.Z80) README_BOOTSYS README of the new CPM3.SYS loader BOOTSYS README-1.10 README of the features of the old version 1.06/1.10 yaze.doc The documentation of the old version 1.00 to 1.10 In the directory doc_html/ there are the same documentation but in HTML format. Makefiles Makefile_linux Makefile for Linux (copy it to Makefile) Makefile_solaris Makefile for Solaris (copy it to Makefile) Makefile_freebsd Makefile for FreeBSD (copy it to Makefile) The different modules (I have made a lot of changes in all modules): yaze.c Source of the main (only this file is different to the pre release) yaze.h belonging to yaze.c mem_mmu.c Some definitions and routines for usage the emulated (new) MMU in YAZE-AG-2.01. mem_mmu.h The central definitions for memory access. All other (new) modules uses this definitions in dependence of -DMMU if defined or not. simz80.c The Z80 interpreter. I made a lot of changes for usage the MMU (over mem_mmu.h) because the memory access goes over the interface macros GetBYTE, GetWORD PutBYTE, PutWORD which are defined in mem_mmu.h. This macros uses the selected MMU-table to manipulate the Z80-memory. BUT I DON'T CHANGE THE ALGORITHM OF ANY Z80 INSTRUC- TION !!! I MADE THE CHANGES VERY CAREFULLY !!! The test utilities zexall.com and zexdoc.com works very well !!! Any instruction is OK !!! (see above "Optimizing") simz80.h Definitions of the Z80-Register and some fundamental macros for simz80.c and other modules. simz80.pl If you want to experiment with the Z80-simulator you (perl-file) can use this file. I have transfered all changes which I made in simz80.c !!! This perl-script produce a simz80.c with all changes I made. bios.c The yaze-bios with CP/M 3.1 extensions. It uses also GetBYTE, GetWORD, PutBYTE, PutWORD to manipulate the Z80 memory. The CP/M 3.1 extensions will be switched on if -DMMU is defined in the Makefile. monitor.c The monitor for yaze-ag. Now you can mount/unmount disk files under CP/M 3.1. You can mount/unmount UNIX directories to a CP/M drive, too. That was one of the last known bugs in the development version 14. In version 2.00-pre and 2.00 of yaze-ag there gives a version for solaris and a version for linux of monitor.c. In version 2.01 of yaze-ag there gives only one monitor.c. I use now #ifdef to differ between the versions between solaris or linux etc. . yaze.boot It contains Superdos a CP/M 2.2 replacement. I take it from yaze-1.10. It is used if -DBOOTSYS is NOT defined. You can also boot Superdos (CP/M 2.2) with yaze -l -1 -b yaze.boot yaze-cpm3.boot This file contains BOOTSYS + CPM3.SYS to start (new) CP/M 3.1. If -DBOOTSYS is defined this file will be loaded at 0100H instead of yaze.boot (CP/M 2.2). It is the same file like CPM3.COM on Drive A:. I transfer it to Unix/ Linux and name it yaze-cpm3.boot. It will be generated under CP/M 3.1 by P:Y.SUB with PIP CPM3.COM=BOOTSYS.COM,CPM3.SYS (If -DMMU is not defined while -DBOOTSYS is defined yaze-ag will exit when the CP/M 3.1 bios starts and uses funtions for the MMU or CP/M 3.1 of the yaze-bios.) .yazerc The startup file for yaze-ag (see above). The other files are the same as in the yaze-1.10 distribution. yaze-DISK-Files which are defined in .yazerc: A: BOOT_UTILS BOOT disk with CCP.COM some ZINC- and other utilities. See 0-README.1ST for the contents of this drive. B: CPM3_SYSdsk Disk with all CP/M 3.1 utilities. The command HELP.COM gives help to all CP/M 3.1 utilities. (In the help file HELP.HLP I add the new section "YAZE-AG".) F: ZINC A copy of the ZINC project from John Elliott G: TEST-UTILS-1.10 The test utilities of version yaze-1.10. This test utilities test the Z80 simulator (simz80.c). All changes in simz80.c are OK. H: HI-C-Compiler A copy of the HI-C-Compiler. I: UNIXLIKE UNIX like utilities. See UTOOL*.MAN and the *.DOC files. M: MMU-Utils Here are some test utilties for the simulated MMU in yaze-ag. Use it only under CP/M 2.2 (yaze.boot) or CP/M 3.1 will be crash. Only MMUPRINT does NOT made any changes in the MMU, you can use it to see the status of the MMU under CP/M 3.1 . You start CP/M 2.2 with the options yaze -l -1 -b yaze.boot O: ZPM3N10 A copy of ZPM3N10 from Simeon Cran. See there the files VERSION.NOT and ZPM3.TXT. In yaze-ag I use ZPM3. There is also a copy of ZPM3N10.PMA. P: BIOS3 The disks with which I developed the CP/M 3.1 bios which act as an interface to the yaze-bios. There is also the source of BOOTSYS (Sorry the comments are in the german language ;-)). 0-README.1ST declares the files containing in this disks. It is the same file like README_BIOS3_Z80. On every disks are a file with the name 0-README.1ST. This file describes the contents of the disk.   9. Optimizing and speedtest: ============================ I made also some work for optimize in simz80.c. If you compile yaze-ag-2.01 without -DMMU and without -DBOOTSYS, yaze-ag-2.01 will be compiled like the last yaze version (yaze-1.10) with only 64K and the default use of CP/M 2.2 (yaze.boot). On my faster machine (291 MHz, AMD K6-2 3Dnow) SAVAGE.COM needs: yaze-2.01 3.690 secs (4.750 secs with MMU) yaze-1.10 3.980 secs Zexall.com needs: yaze-2.01 596.120 secs (774.040 sec with MMU) yaze-1.10 638.890 secs 4.0MHz Z80 11688.000 secs (reference) That correlates rather a ~ 60.4 MHz Z80 (with MMU) (messured with unix command "time")   10. My old real Z80 System: =========================== I have at home an old Z80 ECB-Bus-Sytem (4Mhz) (1982-1989). The terminal is an another ECB-BUS-Card and is it's own Z80-System with a CRT-Chip from Motorola. To the ECB-Bus it schows like a 8251 Intel Chip and it is very fast. For some ECB-Bus cards (CPU-, RAM-, Floppy-Card) of this system exists a CP/M 3.1 implementation of a german company, but I made a lot of extensions. So I add some ECB-Bus cards: a RAM-disk with 1,2 MB, an EPROM-Disk with 256 KB, a CMOS-RAM-disk with 64KB and a battery (on this is CPM3.SYS), an ECB-Bus-Card as a harddisk interface to an OMTI 5510 (IBM-XT HD controller) with an old 5 MB HD ;-) , and a Card with a clock. I made the bios extension succesive for this new 4 drives and the clock. I think I have through this work a lot of practise to develop a CP/M 3.1 bios and this contribute the development of the bios and yaze-bios of yaze-ag. -- 18. December 2003 Andreas Gerlich (email: Andreas.Gerlich@mathematik.uni-ulm.de) (University of Ulm,Germany) END of yaze-ag.doc
Look to the document yaze.doc for the other features (yaze-1.00).