Concise Record of Changes to Z88DK Releases ------------------------------------------- z88dk v2.2 - xx.xx.xxx Detailed but incomplete changelist: - [all] Compressed data can now use ZX0 compression tools - [all] math32 optimisations - [appmake] Compressed ROM data sections can now use zx0 - [classic] features.h added for improved portability - [classic] ZX0,1,2 decompression functions added - [classic] MBF32 8085 and Z80 instruction optimisation - [classic] sccz80 8080, 8085, gbz80 l_ primitive reentrancy - [classic] string function loop overhead optimisation - [classic] string callee functions 8080, 8085 safe - [classic] AM9511 math library support for 8085 - [classic] +cpc: Screen driver fixes - [classic] +cpc: Banking support - [classic] +cpm: Amstrad, Televideo, Bondwell disc creation - [classic] +cpm: support for Bondwell 2 console and graphics - [classic] +cpm: Amstrad PCW Graphics library - [classic] +cpm: New subtypes for Bondwell 12/14 and 2 - [classic] +cpm: Removal of code that made it incompatible with the z180 - [classic] +cpm: GSX graphics library - [classic] +cpm/msxdos1: fcntl speedup via caching - [classic] +gl: GL6000 support improved - [classic] +micro85: Support for the homebrew Micro85 added - [classic] +msx: (msxdos) Time functions now available - [classic] +pc88: Graphics reworked and optimised - [classic] +radio86: New target for the Radio86 family - [classic] +sam: Extensively reworked and improved - [classic] +sol20: Support for the PTC Sol 20 added - [classic] +vg5k: 8x10 fonts and UDGs now usable - [classic] +ts2068/zxn: "fatpix" available in hires mode - [classic] +z88: Support for the OZ5 apps and shell - [classic] +zx: Improved Interface 1/Microdrive support - [classic] +zx: esxdos and plus3 fcntl enhancements - [newlib] ZX0 decompression functions added - [newlib] +rc2014: Support for shadow RAM copying (disabled by default) - [newlib] +rc2014: 8085 CPU support through hybrid classic library - [newlib] +zxn: dot files are now created correctly - [sccz80] Temporary files now removed on windows - [sccz80] Bug fixes + optimisations - [sccz80] Debug information using -debug - [ticks] Start of symbolic debugging - [z80asm] Now supports assembling undocumented 8085 instructions - [z80asm] Replace --cpu=r2k with --cpu=r2ka - [z80asm] Macros are now supported - [zsdcc] Upgraded to SDCC 4.1.6 r12555 (bugfixes) z88dk v2.1 - 07.02.2021 Detailed but incomplete changelist: - [classic] WYZTracker is now available for AY music and SFX - [classic] Vortex Tracker2 is now available for AY music and SFX - [classic] PSGLib is now available for SN76489 music and SFX - [classic] Interrupt code is now 8080 clean - [classic] +altair8800: Bare metal target available - [classic] +c128: Generic console and 1 bit sound - [classic] +cpm: Vector06c, z80pack disc creation - [classic] +cpm: Support for VTI, VDM and VIO graphic boards - [classic] +dai: New target - [classic] +gb: Banking now works for both sdcc and sccz80 - [classic] +gb: MBF32 floating point maths is now available - [classic] +gl: New target: Genius Leader machines (incomplete) - [classic] +homelab: New target: Homelab 3/4 machine - [classic] +homelab2: New target: Homelab 2 machine - [classic] +krokha: New target: Krokha (tiny) console - [classic] +lm80c: New target for the homebrew LM-80C - [classic] +lviv: New target for the Lviv/Lvov PK-01 - [classic] +msx: Banking now works for both sdcc and sccz80 - [classic] +msx: MegaROMs can now be created - [classic] +pc88: Bootable discs can be created - [classic] +ondra: New target - [classic] +special: New target - [classic] +svi: Generic console now works again - [classic] +vector06c: New target - [classic] +zx: The enter key now works with ROM input - [classic] +zx: Banked code support. - [classic] +zx: 128k .TAP and .DSK images can be created - [classic] +zxn: New target: Spectrum Next - [classic] all: IEEE-754 16 bit (adjunct) maths library - [classic] all: DAI 8080 (Am9511) 32 bit maths library - [newlib] +rc2014: APU Module (Am9511) support - [newlib] +zx: WYZTracker is now available - [newlib] all: IEEE-754 16 bit (adjunct) maths library - [sccz80] genmath/math48: Fixes to builtin ldexp implementation - [sccz80] Bitfields now work on the 8080 - [sccz80] Code generator fixes for gbz80 - [sccz80] Support for long long integer types - [sccz80] Support added for IEEE-754 16 bit floating point numbers - [sccz80] Support added for Am9511 32 bit floating point numbers - [sccz80] Support for generating __interrupt functions - [z80asm] Linking speed cleanup - [z80asm] db/dw/ds etc synonyms are now accepted - [zsdcc] Upgraded to SDCC 4.0.7 r12036 (bugfixes) z88dk v2.0 - 03.02.2020 In addition to the usual collection of bugfixes and enhancements, this release of z88dk contains some major new features which are noteworthy: * A (mostly) IEEE-754 compliant maths library is available for both classic and newlib. * The sccz80 compiler and classic +cpm and +pmd85 targets now support generating binaries that run on 8080 hardware * The sccz80 compiler and classic +gb target can now generate ROMs for the Nintendo Gameboy The more detailed (yet incomplete) changelist is below: - [appmake] Autobooting +3 discs can now be created - [appmake] MSX-DOS format discs can now be created - [classic] Interrupt handlers can now be added on many targets - [classic] TMS9918 platforms now support Modes 0 and 1 for gencon - [classic] +aquarius: Microsoft 32 bit floating point support - [classic] +cpm: Many new disc formats supported - [classic] +cpm: -subtype=kaypro83 - two graphics modes - [classic] +cpm: Improved getk() behaviour - [classic] +cpm: Support for Excalibur 64 (-subtype=excali64) - [classic] +cpm: Support for 8080 machines (-clib=8080) - [classic] +cpm: Support for Sony SMC-70/SMC-777 (-subtype=smc777) - [classic] +cpm: Support for Sharp X1 (-subtype=x1) - [classic] +fp1100: Graphics support is now available - [classic] +gb: Nintendo Gameboy support added - [classic] +g800: ANSI terminal and graphics improvements - [classic] +hemc: Hübler/Evert-MC support added - [classic] +hgmc: Hübler Grafik-MC support added - [classic] +kramermc: Kramer MC support added - [classic] +laser500: Microsoft 32 and 64 bit floating point support - [classic] +mc1000: Microsoft 32 bit floating point support - [classic] +msx: MSXDOS2 library available via -subtype=msxdos2 - [classic] +msx: UNAPI support is now available - [classic] +mtx: Serial port support - [classic] +myvision: Support for the Nichibutsu My Vision - [classic] +pasopia7 Toshiba Pasopia 7 support added - [classic] +pencil2: Support for the Hanimex Pencil II - [classic] +pmd85: Support for the Tesla PMD85 family - [classic] +s1mp3: Preliminary support for the s1mp3 player devices - [classic] +sms: Support for Gamegear with -lgamegear - [classic] +spc1000: Graphics are now supported on the TMS9928 - [classic] +sv8000: Support for the Bandai Supervision 8000 - [classic] +trs80: Microsoft 32 and 64 bit floating point support - [classic] +trs80: TRSDOS support - [classic] +tvc: Preliminary support for Videoton TVC - [classic] +ts2068: gencon supports hires and multicolour modes - [classic} +vz: Support for graphics - [classic] +x1: Graphics and console improvements - [classic] all: IEEE-754 32 bit maths library - [classic] all: BBC BASIC 40 bit maths library - [sccz80] #1102: Trailing comma support in struct initialisation - [sccz80] Optimisation rule fixes and improvements - [sccz80] Support added for 32 and 64 bit floating point numbers - [sccz80] #1132: Struct assignment and parameter passing supported - [sccz80] #1141: Support for named address spaces - [sccz80] #1133: Support for bitfields - [sccz80] 8080 and gbz80 support added - [z80asm] Now supports assembling 8080/5 code using both Intel and Zilog syntax - [z80asm] Now supports assembling gbz80 code - [z80asm] Supports many emulations for cross-processor compatibility - [zsdcc] Upgraded to SDCC 4.0.0 r11535 - [newlib] +scz180: Support for this target - [newlib] +zxn: ZX Spectrum Next architecture renamed z80n - [newlib] +hbios: Support for RomWBW HBIOS API - incl RetroBrew and RC2014 z88dk v1.99C - 19.01.2019 This release of z88dk contains many significant changes over the 1.99B, significantly increasing the number of supported systems, improving source code compatibility between the two compilers and natively supporting more z80 derivative CPUs. The major changes are detailed below: * sccz80 has seen many changes, included frontend parsing enhancements and code generator optimisations * sccz80 accepts the same extension syntax as zsdcc * The sccz80 preprocessor has been changed to ucpp which is C99 compatible * z80asm now supports Rabbit 2000/3000, z180 and ZX Next CPUs * Appmake can now generate disc images for many CP/M machines * Classic supports several new targets * Classic provides a standard VT52 console for many targets * newlib now provides extensive support for the ZX Spectrum Next * newlib support for the RC2014 and z180 has been significantly improved A more detailed (incomplete) changelist follows: - [classiclib] The value of FOPEN_MAX can now be controlled at link time with -pragma-define=CLIB_FOPEN_MAX=YY. The default for YY is 10. - [classiclib] #571: The atexit stack size can be configured with CLIB_EXIT_STACK_SIZE - [classiclib] #666: A lightweight terminal is now available for many targets - [classiclib] stdio can be disabled with -pragma-define:CRT_ENABLE_STDIO=1 - [classiclib] A new port to the Pacman arcade hardware is availble - [classiclib] Bug fixes for memrchr() and gets() - [classiclib] Compiler intrinsics are now available - [classiclib] fmemopen() and funopen() are now available - [classiclib] +pc6001 ROM cartridge support - [classiclib] +test target now supports amalloc and command line arguments - [classiclib] printf format %s now supports a precision field - [classiclib] printf format %x, %p, %X, %B now disable the + flag - [classiclib] printf now supports 64 bit values when used with sdcc - [classiclib] +c128 improvements - [classiclib] [math48] #108: Single parameter library math functions now work correctly - [classiclib] +rcmx000 support has been restored and optimisations applied - [classiclib] builtin functions are enabled for both sccz80 and zsdcc, disable them all with -D__DISABLE_BUILTIN or individually with __DISABLE_BUILTIN_[function] - [classiclib] +sms fixed an issue with tile corruption due to sdcc compatiblity code being inserted in the wrong place - [classiclib] +nc100 graphics support has been added - [classiclib] +msx fixed an initialisation error that prevented ROMs from working correctly - [classiclib] +ts2068 screen printer doesn't force hires screen - [classiclib] +zx ROM screen printer now available - [classiclib] +zx Non ROM based stdin is now available - [classiclib] +zx Default console font can be changed at compile time (CRT_FONT/CRT_FONT64) - [classiclib] +zx FZX based screen printer is now available - [classiclib] imported obstack, balloc and adt libraries from newlib. balloc can now be configured in the same was as newlib (-pragma-define:CLIB_BALLOC_TABLE_SIZE=n) - [classiclib] Marked adt and balloc classic apis as deprecated - [classiclib] +cpc cpcrslib has been imported - [classiclib] CPC, MSX, SVI, ZX81, Galaksija, Sam, X1, Z1013 port improvements - [classiclib] New ports for Casio PV-1000, PV-2000, FP-1100, Colecovision, Coleco Adam, Mitsubishi Multi8, Alphatronic PC, NEC PC-8800, Dick Smith Super80, Z80 TV Game Console, Bandai RX78, Sharp MZ2500, Samsung SPC-1000, VTech Laser 350/500/700 - [classiclib] +m5 ROM cartridge support - [classiclib] SC-3000 target now runs on SG-1000 console - [classiclib] +aquarius 8k ROM cartridges can now be created - [classiclib] inkey() implementations for Jupiter Ace, Sord M5, PV-2000, SC-3000, VZ-200, TRS80, Exidy Sorcerer, Alphatronic PC, Camputers Lynx, VG5K, Super-80, SVI TRS80, - [classiclib] SMS stability improvements - [classiclib] [all] New kbhit() implementation - [classiclib] Now shares ctype, string and most of stdlib with newlib - [classiclib] +gal Galaksija hires graphics is now supported - [classiclib] +svi 80 column and rs232 support - [newlib] +sms devKit SMS has been incorporated - [newlib] +zxn Extensive support for the ZX Spectrum Next - [newlib] +rc2014 Many enhancements for the RC2014 - [newlib] +vgl Support for the V-Tech Genius Leader - [newlib] +z180 Support for bare-bone z180 boards - [newlib] +yaz180 Support for YAZ180 - [sccz80] #36: Defining an extern variable with @ no longer exports symbol - [sccz80] #9: The sdcc directives __z88dk_fastcall and __z88dk_callee are now supported. Additionally __preserves_regs() is ignored. - [sccz80] #81: Now supports const qualifier for assigning read-only data to ROM - [sccz80] #94: Right to left parameter passing is now supported with __stdc directive - [sccz80] #112: Typedef pointers are now supported - [sccz80] Optimisations for long multiplication - [sccz80] #109: Callee functions now cleanup correctly without corrupting return values - [sccz80] #103: Bug fixes around double + int/long operands - [sccz80] #98: Bug fix for handling expressions with a const on lefthand side - [sccz80] #90: Bug fix for result of comparison - [sccz80] #118: static doubles can now be initialised - [sccz80] #116: Optimisations for operations with constants - [sccz80] Constant floating point expressions are now folded - [sccz80] [math48] #104: Non commutative FP operations with constant on left now work - [sccz80] #138: Aggregate (arrays, structs) auto variables can now be initialised - [sccz80] #139: Added support for __naked directive to prevent generation of any code for marked functions - [sccz80] #78: __sfr (__banked__) __at [address] [name] syntax is now supported for IO ports. Specific code is generated for Z80, Z180, Rabbit compilations. - [sccz80] #26: A whole bunch of casting issues have been resolved - [sccz80] #176: sizeof() now works on a wider range of lvalues - [sccz80] #155: The section names used by sccz80 can now be configured - [sccz80] #188: sccz80 now provides builtin functions for memcpy, memset, strcpy, strchr - [sccz80] #220: sccz80 now supports __critical blocks and functions - [sccz80] #275: don't swallow white space before constant L,U,S modifier - [sccz80] ZX Next specific code can now be generated - [sccz80] #419: Extern function declarations are now accepted with blocks - [sccz80] #452: Declaration parser rewritten - [sccz80] #452: Multi dimensional arrays are now supported - [sccz80] #452: Function pointers can now be defined with parameters - [sccz80] #481: z180 mlt instruction is now used - [sccz80] #485: Functions marked __z88dk_sdccdecl use sdcc calling spec for chars (and become r->l) - [sccz80] #489: Loop variables can now be defined in the initialisation clause of a for statement. Additionally, variables can be defined anywhere, not just at the start of a block. - [sccz80] #493: The __func__ directive is now supported - [sccz80] #501: sccz80 now supports the sdcc __at (0xnnnn) syntax for variable and function placement - [sccz80] #514: sccz80 now supports flexible members at the end of struct definition - [sccz80] #519: The preprocessor has been switched over to ucpp which is C99 compatible - [sccz80] #495, #615, #658: Performance optimisations - [sccz80] #641: Improved support for far pointers and banked calling - [ticks] [classiclib] #101,#106: Now supports the +test target - [ticks] [classiclib] File IO is now available - [ticks] A debugger is now available - [ticks] Now supports Rabbit, z180 and ZX Next, ez80 cpus - [ticks] Now supports ZX Next MMU paging - [z80asm] Rabbit 2000 and 3000 are now fully supported - [z80asm] Z180 is now fully supported - [z80asm] ZX Spectrum Next CPU extensions and Copper Unit are supported - [z80asm] #442: Globs are now supported in filenames and .lst files - [z80asm] #159: Environment variables ${VAR} in filenames and .lst files - [z80asm] #222: +zx and +zx81 options to z80asm to generate .tap and .P files - [z80asm] #248: Filler byte for DEFS and ALIGN can be given in command line - [z80asm] #341: Produce debugger-friendly map files with symbols of C and ASM lines - [z80asm] #429: Add PHASE and DEPHASE directives - [z80asm] #436: Add ALIGN directive - [z80asm] #524: Allow the target directory for object files to be given in the command line - [z88dk-dis] A new standalone diassembler is available - [z88dk-install] A new program to install 3rd party libraries is now available - [zcc] Spaces in filenames (and paths) are now supported. - [zcc] Custom optimisation rules can be supplied with -custom-copt-rules= - [zcc] A target must now be supplied to zcc - [zcc] The option --opt-code-speed=all will enable speed optimisations for sccz80 - [zpragma] Support for #pragma printf and #pragma scanf which take a format string argument and configure the appropriate printf converters. - [zpragma] has now been completely renamed, scanner is no more - [all] #105: main() always takes its parameters in r->l format regardless of compiler z88dk v1.99B - 10.01.2017 PACKAGE * The win32 and osx packages are complete and now include the zsdcc & zsdcpp binaries. zsdcc is z88dk's customization of the sdcc compiler. Other users can compile zsdcc from source. * A VS2015 solution file is now available in z88dk/win32 for building all z88dk binaries except zsdcc & zsdcpp. Instructions for building zsdcc & zsdcpp can be found in the install instructions link above. ZCC - Compiler Front End * M4 has been added as an optional macro pre-processor. Any filename ending with extension ".m4" will automatically be passed through M4 and its output written to the original source directory with the ".m4" extension stripped prior to further processing. The intention is to allow source files like "foo.c.m4", "foo.asm.m4", "foo.h.m4" and so on to be processed by M4 and then that result to be processed further according to the remaining file extension. * In conjunction with the above, a collection of useful M4 macros has been started in "z88dk.m4" that can be included in any ".m4" file processed by zcc. Currently macros implementing for-loops and foreach-loops are defined. * List files ending with extension ".lst" can be used to specify a list of source files for the current compile, one filename per line. The list file is specified on the compile line with prefix @ as in "@foo.lst". List files can contain any source files of any type understood by zcc and individual lines can be commented out with a leading semicolon. Paths of files listed in list files can be made relative to the list file itself (default) or relative to the directory where zcc was invoked (--lstcwd). List files can list other list files, identified with leading '@'. * zcc now processes all files it is given to the final output file type specified. For example, with "-E" specified, all listed .c files will be run through the C pre-processor individually and all output copied to the output directory. Previous to this, only the first file listed was processed unless a binary was being built. * -v gives more information on what steps zcc takes to process each source file. * -x now builds a library out of the source files listed. * -c by itself will generate individual object files for each input source file. However, if -c is coupled with an output filename as in "-o name", a single consolidated object file will now be built instead of individual ones. The intention is to provide a means to generate identical code in separate compiles by allowing this single object file to be specified on different compile lines. * Better error reporting for source files with unrecognized types. * Better parsing for compile line pragmas; pragma integer parameters can now be in decimal, hexadecimal or octal. * -pragma-include added to allow a list of compile time pragmas to be read from a file as in "-pragma-include:zpragma.inc". This way projects can consolidate pragmas in one location; this is especially important for the new c library which uses pragmas extensively to customize the crt. * -pragma-export added, is similar to -pragma-define but the assembly label defined as a constant on the compile line is made public so that its value is visible across all source files. * --list will generate ".lis" files for each source file in a compile to a binary. The ".lis" file is an assembly listing of source prior to input to the linker. * --c-code-in-asm causes C code to be interspersed as comments in any generated assembly listing associated with C source files. * ".s" files are now understood by zcc to be asz80-syntax assembly language source files. This allows sdcc project files written in assembly language to be assembled by z88dk. asz80 mnemonics are non-standard so zcc attempts to translate to standard zilog mnemonics before assembling. You can see the translation to standard zilog form by using "-a" on a compile line. This is still a work-in-progress feature. * --no-crt allows compiles to proceed without using the library's supplied crt for a target. The first file listed on a compile line will stand in as the crt and will be responsible for initialization and setting up the memory map. * Temporary files are always created in the temp directory. The option "-notemp" has been removed. * Library and include search paths have been fixed to honour the order specified on the compile line. This allows the user to override library functions when desired. * Source files are now processed from their original location so that includes can be properly resolved. Previously this was only done for .c files but this now applies to other file types. * clang/llvm compilation is in an experimental state. Known issues: * Spaces in paths or filenames can be a problem. * When --c-code-in-asm is active, unicode characters from .c source files appearing as comments in translated asm may cause the tools to crash. SCCZ80 - Native C Compiler * Correct floating point constant handling. * New `__SAVEFRAME__` function decorator to allow saving of ix during a function call. * -standard-escape-chars to make \n and \r output standard character codes ZSDCC - Customization of SDCC C Compiler * Updated to SDCC 3.6.5 #9824. * SDCC's native C pre-processor is now used so that line numbers corresponding to reported errors are accurate. * Peephole-z80 fixed to accurately report registers affected by instructions, allowing accurate application of peephole rules. * inSequence('stride' %1 %2 %3 ...) added as peephole rule qualifier to allow testing whether consecutive bytes in memory are being accessed. * Peephole-z80 made aware of z88dk special functions which represent code inlined by the library. * Approximately 300 new peephole rules added to the aggressive peephole set (-SO3). * Peephole rules added to fix some known code generation bugs and to fix SDCC's critical sections for nmos processors. * --opt-code-size now significantly reduces code size for programs using 32-bit longs, 64-bit longlongs and floats. * chars have been made unsigned by default. Use --fsigned-char to change to signed. * For loops can now declare variables in the initializer statement. * An rodata section has been properly implemented so that all constant data generated by sdcc is assigned there. Z80ASM - Assembler, Linker, Librarian * Handle input files more predictably: link .o files; assemble any other extension; append a .asm or .o option to the file name to allow just the basename. * Make a consolidated object file with -o and not -b: all the object modules are merged, the module local symbols are renamed _ * Link the library modules in the command line sequence (it was depth-first). * Add directory of assembled file to the end the include path to allow includes relative to source location. * Remove all generated files at start of assembly to remove files from previous runs. * Remove deprecated directives: XREF and LIB (replaced by EXTERN), XDEF and XLIB (replaced by PUBLIC), OZ keep CALL_OZ). * Rename DEFL to DEFQ to reserve DEFL for macro variables; rename DS.L by DS.Q * Constants for section sizes: prune empty sections, rename ASMHEAD, ASMTAIL and ASMSIZE to `__head`, `__tail` and `__size` respectively, rename `ASM_` to `___` * Environment variables no longer used: Z80_OZFILES, Z80_STDLIB * Command line option -r, --origin: accept origin in decimal or hexadecimal with '0x' or '$' prefix * Command line options: -i, -x: require a library name * Command line options: remove -RCMX000, keep only --RCMX000 * Command line options: remove -plus, keep only --ti83plus * Command line options: remove -IXIY and --swap-ix-iy, keep --IXIY * Command line options: remove --sdcc, -nm, --no-map, -ng, --no-globaldef, -ns, --no-symtable, -nv, --no-verbose, -nl, --no-list, -nb, --no-make-bin, -nd, --no-date-stamp, -a, --make-updated-bin, -e, --asm-ext, -M, --obj-ext, -t * Make symbol files, map files and reloc files optional; do not merge symbols in the list file; do not paginate and cross-reference symbols in list file; rename list file to file.lis (@file.lst is used as project list) * Unify format used in map files, symbol files and global define files, output list of symbols only once. * Include symbols computed at link time in the global define file. * Simplify output of --verbose APPMAKE - Processes Output Binaries to Target Suitable Form * +rom can now generate binaries for ROM chips mapped into a specific address range. * +sms now generates bankswitched .sms files as output. * +zx now has option to generate headerless .tap files. * Appmake now understands three compile models -- ram (destined for ram, no stored data section), rom (destined for rom, stored data section is a copy) and compressed rom (destined from rom, stored data section is compressed) -- and will form output files accordingly. CLASSIC C LIBRARY * SDCC can now be used to compile using the classic library. * Rewritten and modular printf core, added (v)snprintf. * Rewritten and modular scanf core. * Ports are now section aware. * Support for compressed data section model. * Support for copied data section model. * User overridable fputc_cons. * New target: Microbee. Support for various GFX modes and 1 bit sound. * New target: Robotron kc. Support for various GFX modes and 1 bit sound. * New target: z1013. Support for various GFX modes and 1 bit sound. * New target: z9001. Support for various GFX modes and 1 bit sound. * CP/M Plus on Spectrum. * CP/M extenstions forced to upper case. * CP/M extensions improved on Aussie Byte, trs-80 and Epson PX. * GFX Library: improved the vector rendering functions, now bigger pictures can be drawn and higher resolutions are supported. Various fixes. * Custom text configuration (font, resolution) can be done at compile time for targets with ansi VT support on graphics display. NEW C LIBRARY * 64-bit integers are now fully supported in the library. * The fprintf/fscanf cores can now have conversion specifiers individually enabled or disabled at compile time. This allows the printf/scanf cores to be tailored to the minimum size required. * fprintf %aefg precision formatting corrected. * Intrinsics have been introduced as a method to inline assembly code without disturbing optimization. This provides a means to insert assembly labels (whose addresses will appear in map files), simple assembly instructions such as "di" and "ei", and atomic loads/stores into C code without affecting the compiler's optimizer. See [intrinsic.h]( https://www.z88dk.org/wiki/doku.php?id=libnew:intrinsic) * The library has had a preserves_registers attribute attached to every function that informs sdcc which registers will not be affected by a library call and allows sdcc to generate better code around library calls. * aplib added as another data decompression utility. * setjmp/longjmp state increased to include the value of IY for sdcc compiles. This was necessary as sdcc sometimes requires the value of IY to be preserved at points in the program. * New target: rc2014 (preliminary). This target is still being developed by rc2014 users. * New target: Sega Master System. The target is able to automatically create bankswitched rom cartridges with signatures. * ZX Spectrum target: interfaces to the bifrost and nirvana multicolour sprite engines added. * The CRT startup code has been made more flexible, allowing a wide range of features to be selected via pragmas at compile time. See [embedded crt configuration](https://www.z88dk.org/wiki/doku.php?id=libnew:target_embedded#crt_configuration). - [package] The win32 and osx packages are complete and now include the zsdcc & zsdcpp binaries. - [package] VS2015 solution file is now available in z88dk/win32 for building all z88dk binaries except zsdcc & zsdcpp under Windows. - [zcc] M4 has been added as an optional macro pre-processor. - [zcc] In conjunction with the above, a collection of useful M4 macros has been started in "z88dk.m4" that can be included in any ".m4" file processed by zcc. - [zcc] List files ending with extension ".lst" can be used to specify a list of source files for the current compile, one filename per line. - [zcc] zcc now processes all files it is given to the final output file type specified. - [zcc] -v gives more information on what steps zcc takes to process each source file. - [zcc] -x now builds a library out of the source files listed. - [zcc] -c coupled with an output filename "-o name" will cause a single consolidated object file to be generated out of all source input. - [zcc] Better error reporting for source files with unrecognized types. - [zcc] Pragma integer parameters can now be in decimal, hexadecimal or octal. - [zcc] -pragma-include added to allow a list of compile time pragmas to be read from a file as in "-pragma-include:zpragma.inc". - [zcc] -pragma-export added, similar to -pragma-define but the assembly label is made public. - [zcc] --list generates .lis files for each source file. .lis files are assembly listings generated just prior to input to the linker. - [zcc] --c-code-in-asm causes C code to be interspersed as comments in any generated assembly listing associated with C source files. - [zcc] .s files are understood to be asz80-syntax assembly language source files for better compatibility with sdcc. This is still a work-in-progress feature. - [zcc] --no-crt allows compiles to proceed without using the library's supplied crt for a target. - [zcc] Temporary files are always created in the temp directory. The option "-notemp" has been removed. - [zcc] Library and include search paths fixed to honour the order specified on the compile line. - [zcc] All source files are processed from their original location so that includes can be properly resolved. - [zcc] clang/llvm compilation is in an experimental state. - [sccz80] Correct floating point constant handling. - [sccz80] New __SAVEFRAME__ function decorator to allow saving of ix during a function call. - [sccz80] -standard-escape-chars to make \n and \r output standard character codes - [zsdcc] Updated to SDCC 3.6.5 #9824. - [zsdcc] SDCC's native C pre-processor is now used so that line numbers corresponding to reported errors are accurate. - [zsdcc] Peephole-z80 fixed to accurately report registers affected by instructions. - [zsdcc] inSequence('stride' %1 %2 %3 ...) added as peephole rule qualifier. - [zsdcc] Peephole-z80 made aware of z88dk special functions. - [zsdcc] ~300 new peephole rules added to the aggressive peephole set (-SO3). - [zsdcc] Peephole rules added to fix some known code generation bugs and to fix SDCC's critical sections for nmos processors. - [zsdcc] --opt-code-size significantly reduces code size for programs using 32-bit longs, 64-bit longlongs and floats. - [zsdcc] chars have been made unsigned by default. - [zsdcc] For loops can declare variables in the initializer statement. - [zsdcc] rodata section has been properly implemented so that all constant data generated by sdcc is assigned there. - [z80asm] Handle input files more predictably: link .o files; assemble any other extension; append a .asm or .o option to the file name to allow just the basename. - [z80asm] Make a consolidated object file with -o and not -b: all the object modules are merged, the module local symbols are renamed _ - [z80asm] Link the library modules in the command line sequence (it was depth-first). - [z80asm] Add directory of assembled file to the end the include path to allow includes relative to source location. - [z80asm] Remove all generated files at start of assembly to remove files from previous runs. - [z80asm] Remove deprecated directives: XREF and LIB (replaced by EXTERN), XDEF and XLIB (replaced by PUBLIC), OZ (keep CALL_OZ). - [z80asm] Rename DEFL to DEFQ to reserve DEFL for macro variables; rename DS.L by DS.Q - [z80asm] Constants for section sizes: prune empty sections, rename ASMHEAD, ASMTAIL and ASMSIZE to __head, __tail and __size respectively, rename ASM_ to ___ - [z80asm] Environment variables no longer used: Z80_OZFILES, Z80_STDLIB - [z80asm] Command line option -r, --origin: accept origin in decimal or hexadecimal with '0x' or '$' prefix - [z80asm] Command line options: -i, -x: require a library name - [z80asm] Command line options: remove -RCMX000, keep only --RCMX000 - [z80asm] Command line options: remove -plus, keep only --ti83plus - [z80asm] Command line options: remove -IXIY and --swap-ix-iy, keep --IXIY - [z80asm] Command line options: remove --sdcc, -nm, --no-map, -ng, --no-globaldef, -ns, --no-symtable, -nv, --no-verbose, -nl, --no-list, -nb, --no-make-bin, -nd, --no-date-stamp, -a, --make-updated-bin, -e, --asm-ext, -M, --obj-ext, -t - [z80asm] Make symbol files, map files and reloc files optional; do not merge symbols in the list file; do not paginate and cross-reference symbols in list file; rename list file to file.lis (@file.lst is used as project list) - [z80asm] Unify format used in map files, symbol files and global define files, output list of symbols only once. - [z80asm] Include symbols computed at link time in the global define file. - [z80asm] Simplify output of --verbose - [appmake] +rom can now generate binaries for ROM chips mapped into a specific address range. - [appmake] +sms now generates bankswitched .sms files as output. - [appmake] +zx now has option to generate headerless .tap files. - [appmake] Appmake now understands three compile models -- ram, rom and compressed rom. - [classiclib] SDCC can now be used to compile using the classic library. - [classiclib] Rewritten and modular printf core, added (v)snprintf. - [classiclib] Rewritten and modular scanf core. - [classiclib] Ports are now section aware. - [classiclib] Support for compressed data section model. - [classiclib] Support for copied data section model. - [classiclib] User overridable fputc_cons. - [classiclib] New target: Microbee. Support for various GFX modes and 1 bit sound. - [classiclib] New target: Robotron kc. Support for various GFX modes and 1 bit sound. - [classiclib] New target: z1013. Support for various GFX modes and 1 bit sound. - [classiclib] New target: z9001. Support for various GFX modes and 1 bit sound. - [classiclib] CP/M Plus on Spectrum. - [classiclib] CP/M extenstions forced to upper case. - [classiclib] CP/M extensions improved on Aussie Byte, trs-80 and Epson PX. - [classiclib] GFX Library: improved the vector rendering functions, now bigger pictures can be drawn and higher resolutions are supported. Various fixes. - [classiclib] Custom text configuration (font, resolution) can be done at compile time for targets with ansi VT support on graphics display. - [newclib] 64-bit integers are now fully supported in the library. - [newclib] The fprintf/fscanf cores can now have conversion specifiers individually enabled or disabled at compile time. - [newclib] fprintf %aefg precision formatting corrected. - [newclib] Intrinsics introduced as a method to inline assembly code without disturbing optimization. - [newclib] preserves_registers attribute attached to every function in the library. - [newclib] aplib added as another data decompression utility. - [newclib] setjmp/longjmp state increased to include the value of IY for sdcc compiles. - [newclib] New target: rc2014 (preliminary). - [newclib] New target: Sega Master System. The target is able to automatically create bankswitched rom cartridges with signatures. - [newclib] ZX Spectrum target: interfaces to the bifrost and nirvana multicolour sprite engines added. - [newclib] The CRT startup code has been made more flexible allowing a wide range of features to be selected via pragmas at compile time. Known issues: * Spaces in paths or filenames can be a problem. * When --c-code-in-asm is active, unicode characters from .c source files appearing as comments in translated asm may cause the tools to crash. z88dk v1.99A - 24.12.2015 - [z80asm] Sections have been introduced for generating memory maps and compiling to bankswitched memory. - [z80asm] Modern logical operators have been adopted. - [z80asm] New scoping keywords PUBLIC, EXTERN and GLOBAL introduced. - [z80asm] Relocate files are generated for output binaries for patching assembled code to a new address at load time. - [sccz80] Numerous bugfixes. - [sdcc] SDCC is now fully supported as alternate C compiler for the new C library. - [sdcc] SDCC's generated code is improved by a large set of aggressive peephole rules (use -SO3 to enable). - [sdcc] SDCC's calls to its primitive functions are modified to use callee linkage. - [new c lib] New C library written in assembly language from scratch aiming for a subset of C11 compliance. Contains more than 700 functions currently. - [new c lib] Stdio made object-oriented so that drivers can inherit library code to implement features with a minimal amount of additional code. - [new c lib] Stdio base classes currently include serial character i/o and terminal i/o implementing windows and proportional fonts. Disk i/o is missing in this release. - [new c lib] Unique stdio implementation allows removal of high level buffers without affecting performance. - [new c lib] Many functions from GNU and POSIX are present beyond the C11 standard. - [new c lib] Many unique libraries including some C++ STL containers, data compression, obstacks, game libraries, sound, fzx proportional fonts, etc. The new C lib contains libraries not present in the classic C lib and vice versa. Over time the two libraries will homogenize. - [new c lib] CRTs are supplied for three initial targets: embedded (generic z80), cpm, zx (zx spectrum). Specialized crts allow immediate compilation without customization by t he user. - [new c lib] The library and crts are highly configurable at library build time and at compile time. Options allow easy generation of binaries for ROM or RAM targets. - [tools] New tool ticks is a command line z80 emulator able to exactly measure execution time of a code block. - [tools] New tool dzx7 is a decompressor counterpart to zx7. - [tools] New tool zx7 is an optimal lz77/lzss data compressor with companion decompression subroutines in the z80 library. - [appmake] +rom added to manipulate raw binaries; options include code injection, extraction and conversion to intel hex format. z88dkv1.9 12.7.2009 - [z80asm] Supports -I and -L directives to specify library and include paths - [z80asm] the # include identify is no longer required - [z80asm] Bug fixes for rabbit support - [sccz80] Support for alternate assemblers - [zcc] Support for alternate assembler/linkers - [z80nm] Improvements and bug fixes - [lib] MSX: Many improvements - [lib] TRS80: Graphics support - [lib] CPC: Better handling of firmware calls - [lib] Galaksija: New target - [lib] C128: Improvements - [lib] Many other improvements and bug fixes z88dkv1.8 9.3.2008 - [sccz80] Bug fixes - [cpp] DATE directive now outputs the date in a sensible format - [lib] crt0: Different versions of the library are built to avoid index registers or alternate registers depending on the target - [lib] A simple Xlib emulation has been imported and is available to ports with graphics capabilities - [lib] CPC: Stability improvements - [lib] ZX: Direct access to Opus Discovery is available - [lib] ZX81: Stability improvements - [lib] ZX81: High Res graphics are available - [lib] ZX81: SP1 sprite ackage support - [lib] TS2068: SP1 sprite package support - [lib] Newbrain: fcntl support - [lib] MSX: Improved support - [lib] MSX: 1 bit sound - [lib] ABC80: graphics - [lib] TEST: New test target for supporting a testing infrastructure z88dkv1.7 15.7.2007 - [sccz80] Bug fixes, tweaks to single parameter function pointer calls - [z80asm] Z80asm supporting Rabbit - [zcpp] End of file fix for win32 - [zcc] -Cz flag to pass through to appmake - [appmake] Support for most z88dk targets - [lib/crt0] Support for Newbrain, Rabbit, Sega Master System SMS, TS2068 - [lib] Much of the library rewritten to use FASTCALL and CALLEE linkage for faster and small library function calls - [lib] malloc library can now allocate from a scattered map of available RAM and supports multiple heaps - [lib] balloc library introduced as a block memory allocator - [lib] interrupt mode 2 library added - [lib] stdlib and strings now completely implemented in assembler and expanded - [lib] abstract data types library introduced initially containing linked list, heap, stack and queue algorithms library begun initially containing an implementation of the A* search algorithm - [lib] ZX Spectrum : SZX basic fcntl driver - [lib] ZX Spectrum : SP1 software sprite engine added - [lib] ZX Spectrum : Improved Spectrum library includes new display functions - [lib] ZX Spectrum : Input library added for direct access to keyboard, joystick and mouse devices z88dkv1.5 16.12.2002 - [sccz80] Optimizations for if/while statements - [sccz80] Many, many bugfixes - [support] ar clone to view the contents of library files - [libs] Many new machines added - [libs] 3 ports now support command line arguments Basically about 18 months of changes! z88dkv1.33 (sccz80v1.10b72) 11.5.2001 - [sccz80] Many changes to #pragma directive - [sccz80] FP division now works! (Helps if I call fdiv instead of fmul!) - [zcpp] Should now understand various LF/CR conventions - [z80asm] Labels can now end in ':' and don't have to start with '.' - [z80asm] The options page is too long, so by default we just print version number, z80asm -h now displays the options - [include] Fixed the annoying csleep prototype problem - [libs] Added support for new machines from Stefano (MSX, SVI etc) - [libs] z88 now has ANSI terminal support - [libs] Untested Spectrum +3 file support - [libs] Xircom Rex support (untested) - mail me (dom) for the includes etc - [doc] Platforms.txt details what is suppported on which machine z88dkv1.32 (sccz80v1.10b71pre4) 6.2.2001 - [sccz80] Fixed long pointer arithmetic - [sccz80] Added int blah @ nnnn type as alternative (and better implemented) version of int blah (nnnn) - [sccz80] Added ability for FP constants to be evaluated at run time - [sccz80] Got rid of *annoying* int<->ptr warning when calling func with difference between two pointers - [zcc] Add -Cp flag to pass through to frontend (for GNU cpp purposes) - [zcc] Added -Ca flag to pass through to assembler - [z80asm] INVOKE opcode for ti calcs - [libs] Added z80s183_crt0.lib (minor change in l_long_case) - [libs] Added Stefano's TI calc support routines - [libs] Fixed things so that compilation is possible - [opt] More rules in level 3 and fixed some as well z88dkv1.31 (sccz80v1.10b71) 3.7.2000 - [sccz80] __SHARED__ no longer implies __LIB__ - [sccz80] long arithmetics sorted out (const on LHS etc) - [sccz80] *argv[{n}] now gets correct offset for near (but not far) types - [libs] strtol fixed - [libs] Fixed open_z88 (ooops!) - [libs/crt0] new support for CP/M, ZX81, Sharp MZ, TI86, ABC80 z88dkv1.3 (sccz80v1.10b70) 20.4.2000 - [sccz80] Long subtraction bug (finally!) fixed - [sccz80] Sane initialisation of auto variables - [sccz80] Little bit of framepointer support (-frameix/-frameiy) - [sccz80] far xx ** type correctly passed to function - [sccz80] unions can now be initialised (first member taken +pad) - [sccz80] stack cleaning on goto fixed - [sccz80/crt0] Improved printf handling [2] - [zcc] Improved config file handling - [lib] new stdio library (see doc/stdio.txt for details) - [lib] new z88 far functions (by Garry Lancaster) - [lib] strncmp finally fixed - [lib] strncpy finally usable - [lib] strchr/strrchr rewritten in asm - [lib] ZX print routine now scrolls - [lib] Start of +3 file routines (not usable at present) - [lib] z88 time routines (untested) - [lib] z88 DOR routines - [lib] z88 stat() routine (check for sanity someone please!) - [lib] fopen_z88/open_z88 to return explicit filename being opened - [lib] z88 wildcard handler routines - [lib] z88 exec_cli routine - [lib] Spectrum ANSI display routine (by Stefano Bodrato) - [lib] Most gfx routines now work on Spectrum - [lib/crt0] VZ200/300 libs and crt0 (by Stefano Bodrato) - [lib/crt0] NC100/200 libs and crt0 - untested (send me one!!) - [inc] getchar() macro added for getkey() - [egs] Artic Adventure A added for ZX (and z88) [1] Handling for ** types is quite flakey in prototypes - I just store the fact that it's a pointer and not a pointer to pointer. Fixing this would require extra storage so it's being left [2] Printf handling has improved greatly with this release - previously it was possible to end up with both sets of printf() functions within the executable, now only one is possible, this is done by having the crt0 file jp to the chosen vfprintf function. These escalate upwards so here's what they can do (in order of complexity): vfprintf_mini - supports %d,u,s,c,%,ld,lu fields vfprintf_comp - supports width specifiers and %d,x,c,s,u,% fields vfprintf_float - As above but with floating point (%e etc), only generic, untested Once a complexity escalation has been made within a project then it's not possible to undo - i.e. if you want to printf longs then don't specify a width anywhere within the project. Sorry, but until I/someone upgrades vfprintf_(comp|float) this limitation will remain. z88dkv1.2p5 (sccz80v1.10b69) xx.3.2000 - z80asm patched so it now accepts '_' as first letter of symbol - Hence the smc_ prefix is now consigned to history - Archaic and obsolete HDRPRTYPE kludge removed - Long standing bug removed in function prototypes - Miniprintf now understands %u, %ld, %lu types - ZSock API & doc distributed - Package support (both utilisation and creation) - More library routines are in C (more efficient than mildly optimised!) - Arrays of pointers to functions now supported - ANSI compliance! Well, in literal escapes at least! - assert.h, setjmp.h features now available - stdarg.h - variadic arguments supported - see note in stdarg.h for caveats - Improved Spectrum library - 32/64 column font routine now usable sccz80v1.10b67 - iferror { } else { } now evaluates first clause(!) - Output in asxx compatible format (Flag=-asxx) - if (always true) bug fixed - Unreachable code warning following above - __CALLEE__ function flag (ask me!) - Internal flag rearrangement - Casts patched up a bit more - Stupid mistake in appmake sorted.. sccz80v1.10b66 - Sorted out coping with initialising xx *[]={ ,, } types - Warnings if these are left empty - Sorted out L,U,S specifiers after constants - Default to int type for wild auto/register defns - Support for #line (supplied by some pre-processors) instead of # - Initialising of auto variables is now supported (not arrays or structs!!!) sccz80v1.10b65 - Added octal parsing for constants (prefix with 0) - Sorted out goto problems (tags now stored on global stack) - Typdef-ing stucts which contain pointers no longer gives out (incorrect) warning z88dkv1.2p3 (sccz80v1.10b64) - Fixed broken compiler (postincrement of structure pointers) - Improved compiler (l_mult no longer pushs/pop de) - More opt rules + fixes - Some mem* routines (see string.h) - Improved spectrum library (miniprintf etc) - Fixed memset, some str* routines - Increased size of structure table (so more structures can be defined) - Addition of return_c return_nc iferror -stackoffset for dealing with packages/shared libs (also __SHAREDC__ ) - zcc.cfg has a default of /lib/cpp for the preprocessor which is usually something with more intelligence than zcpp - Start up file changed to include near malloc variables so apps using them can be ROMmed correctly.. z88dkv1.2p2 (p1 was not widely circulated) Changes (in no particular order): - Removed SEGV when defining external pointers - extern int blah (addr); type - Easy rebuilding of libraries - now makefile'd - Major changes in handling of conditionals - we now use c/nc to detect true or false (logical true or false is also return in hl), this removes two bytes for each expression (except for double expressions, sorted next releasse) - Fixed z88 atan2() by Keith Rickard - Loads of new optimization rules (We now have over 200 in total!) which results in vastly better (smaller & quicker) code - please let me know of any problems. - Fixed a few of the rules as well (stupid(!) mistakes) - Removed annoying error which fails compilation if argument types to a function differ only a sign - a warning is now emitted - New appmake by Dennis Groning that doesn't allocate entire 64k but only allocates what is needed (ideal for MSDOS) - zcc now uses local files instead of temporary files if issued the -notemp flag (ideal for MSDOS) - Always been there but..feature: Use -cc to get the C code interspersed with the assembler, warning: this will clobber some of the opt rules so what you see ain't what you get if you don't use it (still thinking of a way around this) - float is now accepted as a synonym for double - More compile time options - they be breeding! See doc/options.txt for a short guide - Switch stmt for chars is now done by a cp,jp z method - faster than previously (for large switch statements cast to int and old method used (less space but slower)) z88dkv1.2 Improvements & fixes: - Fixed strcmp() - it was the worlds most useless one before - Added goto functionality to the compiler, but just cos its there don't mean you have to use it!!! - Fixed many incorrect warnings that the compiler was giving out - Unfixed the "if symbol not found declare as local routine", it reverts to being an unmet function to not break some programs - Major internal reorganisation - lets say I was ill and wanted to distract myself with something almost completely pointless! - Much improved frontend - we now use tmpnam() files to save garbage in the working directory and copy back when complete, gets round the "writing to {zcc}/lib problem" as well - now you can compile several projects at the same time - Hopefully SEGV bug squashed frontend - Removed -show-errs flag, pointless since it really needs to be on all the time! All errors are shown now, including those that occur during assembly - Z80asm v1.0.7 - this is the only version supported! Source code included with very nice makefile. NB. I will support any new features of z80asm as and when they are ready - so always use the latest version! - Slightly better installation instructions (comments please!) - Added missing l_long_case symbol to z88_crt0.hdr - Another truly pointless demo app - wc.c - It's just better (and bigger :( ) okay? z88dkv1.1p4 I've got tired of endlessly updating html files, so, here's a quick text file detailing whats new for p4 - Fixed exit() routine - this now returns the exit code correctly - More Z88 application features - mail checking, safe data - Fixed bug with long comparisons with 0 - Added a __FASTCALL__ function modifier (see below) - Added a __LIB__ function modifier __FASTCALL__ This is quite a dangerous thing to use, it calls functions without passing parameters on the stack, it instead leaves them in registers or in the case of fp values in the floating point accumulator. Hence this can only be used if the function only has one parameter. This type of call is ideal if you want to make your code smaller (say you call one function a lot of times), or if you're combining machine code and c in a single file - say swapping data between big and little endian formats, it makes the code smaller and can also speed it up. exit() is defined as being __FASTCALL__ (out of necessity really, some of my optimization rules were a bit too clever and did a jp exit instead of a call exit, the saving is worth it though I think). NB. In order for __FASTCALL__ to be effective you have to fully prototype your function, the __FASTCALL__ goes between the type specifer (int, long etc) and the function name. __LIB__ This is a new solution to the "Is the function to be LIB'd or XREF'd problem", the old method #pragma proto is still supported, but for future header files I'll be using the new method, arguable it's a little less kludgey, and also makes it easier to see whats going on.