diff --git a/Doc/RomWBW Applications.pdf b/Doc/RomWBW Applications.pdf index 280295d1..0ad661fa 100644 Binary files a/Doc/RomWBW Applications.pdf and b/Doc/RomWBW Applications.pdf differ diff --git a/Doc/RomWBW Disk Catalog.pdf b/Doc/RomWBW Disk Catalog.pdf index 4ef79c62..c98c34ea 100644 Binary files a/Doc/RomWBW Disk Catalog.pdf and b/Doc/RomWBW Disk Catalog.pdf differ diff --git a/Doc/RomWBW Hardware.pdf b/Doc/RomWBW Hardware.pdf index 7f4a41a2..a2f614bc 100644 Binary files a/Doc/RomWBW Hardware.pdf and b/Doc/RomWBW Hardware.pdf differ diff --git a/Doc/RomWBW Introduction.pdf b/Doc/RomWBW Introduction.pdf index f76cd015..e1191aa5 100644 Binary files a/Doc/RomWBW Introduction.pdf and b/Doc/RomWBW Introduction.pdf differ diff --git a/Doc/RomWBW System Guide.pdf b/Doc/RomWBW System Guide.pdf index c09a0406..cd71b6a7 100644 Binary files a/Doc/RomWBW System Guide.pdf and b/Doc/RomWBW System Guide.pdf differ diff --git a/Doc/RomWBW User Guide.pdf b/Doc/RomWBW User Guide.pdf index fbe9452d..8a1c7646 100644 Binary files a/Doc/RomWBW User Guide.pdf and b/Doc/RomWBW User Guide.pdf differ diff --git a/Source/Doc/Hardware.md b/Source/Doc/Hardware.md index bcdd5f6a..16459235 100644 --- a/Source/Doc/Hardware.md +++ b/Source/Doc/Hardware.md @@ -1252,26 +1252,42 @@ ROM image. #### Compressed ROM Image File: RCZ80_ez512_std_64k.rom -A 64K ROM image is supported. As there were many areas of $00 and $FF -bytes in RomWBW, it is possible to compress the 128K RomWBW *.upd file -to fit into 64K ROM. The compression routine looks for two or more -consecutive bytes of the same value (any values of $00 to $FF). If it -finds duplicates, it would leave two duplicate bytes followed by a byte -count, n-1, (with a max byte count of $FF) where n is the total number -of duplicates. - -A stand-alone program written in C creates a ready-to-flash binary file -for the 64K ROM. The 64K binary file is in the following format. Layout -of the 64K ROM: +The RomWBW utility program 'compress' is designed to squeeze the +compiled RomWBW 128K file 'RCZ80_ez512_std.upd' into a 64K ROM. As there +are many areas in RomWBW with repeating bytes of the same value, it is +possible to compress the 128K file to fit into a 64K ROM. + +##### How Compression Works + +The compression program looks for two or more consecutive bytes of the +same value (any values of $00 to $FF). If it finds duplicates, it leaves +two of the duplicate bytes followed by a byte count, n-1 (n <= $FF), +where n is the total number of duplicates. If the program succeeds in +compressing the input file to fit into the available space, the file +'RCZ80_ez512_std_64k.rom' is constructed, along with a short Z80 +decompression program that will be stored in the last 256 bytes of the +ROM. The constructed 64K file is saved and the unused storage space is +output in bytes. Should compression fail to fit the input file into +available space, only an error message and the overrun in bytes is +output. + +##### How the 64K ROM Code Works + +The decompression program, located at $FF00, is executed at startup via +the 3-byte jump at location $0000, decompressing the stored code in ROM +into the computer's RAM. When decompression finishes, control is passed +to RAM location $0000, which in turn starts execution of RomWBW. + +##### The 64K ROM Layout * The first 3 bytes are always $C3 $00 $FF, a jump to the Z80 decompression code located at $FF00 in the ROM. -* Locations $0003 up to, and including, $FEFF are then available to - store the compressed 128K *.upd file. +* Locations $0003 up to, and including, $FEFF are available to store + the compressed 128K input file. -* Locations $FF00 up to $FFFF, a seperate Z80 decompression routine that - executes at startup to decompress the the 64K ROM into RAM. +* Location $FF00 up to, and including, $FFFF, is where the Z80 + decompression program is stored. #### Supported Hardware