diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/pucrunch/README | 12 | ||||
-rw-r--r-- | system/pucrunch/cbmcombine.1 | 178 | ||||
-rw-r--r-- | system/pucrunch/cbmcombine.rst | 147 | ||||
-rw-r--r-- | system/pucrunch/pucrunch.1 | 223 | ||||
-rw-r--r-- | system/pucrunch/pucrunch.SlackBuild | 86 | ||||
-rw-r--r-- | system/pucrunch/pucrunch.info | 10 | ||||
-rw-r--r-- | system/pucrunch/pucrunch.rst | 205 | ||||
-rw-r--r-- | system/pucrunch/slack-desc | 19 |
8 files changed, 880 insertions, 0 deletions
diff --git a/system/pucrunch/README b/system/pucrunch/README new file mode 100644 index 0000000000..355830462f --- /dev/null +++ b/system/pucrunch/README @@ -0,0 +1,12 @@ +pucrunch (compressor optimized for low-resource decompression) + +Pucrunch is a Hybrid LZ77 and RLE compressor, uses an Elias Gamma Code +for lengths, mixture of Gamma Code and linear for LZ77 offset, and +ranked RLE bytes indexed by the same Gamma Code. Uses no extra memory +in decompression. + +The compressor can compress/decompress files for C64 (-c64), VIC20 +(-c20), C16/+4 (-c16), or for standalone decompressor (-c0). + +Assembly sources for example decompressors (for Commodore 64 and Nintendo +GameBoy) are included. diff --git a/system/pucrunch/cbmcombine.1 b/system/pucrunch/cbmcombine.1 new file mode 100644 index 0000000000..f7f749d1d7 --- /dev/null +++ b/system/pucrunch/cbmcombine.1 @@ -0,0 +1,178 @@ +.\" Man page generated from reStructuredText. +. +.TH CBMCOMBINE 1 "2017-09-06" "20081122" "SlackBuilds.org" +.SH NAME +cbmcombine \- combines Commodore 8-bit executables +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.\" RST source for cbmcombine(1) man page. Convert with: +. +.\" rst2man.py cbmcombine.rst > cbmcombine.1 +. +.\" rst2man.py comes from the SBo development/docutils package. +. +.\" converting from pod: +. +.\" s/B<\([^>]*\)>/**\1**/g +. +.\" s/I<\([^>]*\)>/*\1*/g +. +.SH SYNOPSIS +.sp +cbmcombine [\fIinput\-file[,load\-address]\fP] [[[\fIinput\-file[,load\-address]\fP]] ...] +.SH DESCRIPTION +.sp +cbmcombine combines several Commodore executables into one. All Commodore +8\-bit machines (64, 128, VIC\-20, Plus4, 16, PET, etc) are supported, +since they all use the same executable file format. +.sp +Files are read in the order listed on the command line. The combined +executable is written to standard output. Each file\(aqs load address can +be forced by adding a comma and the new address (in decimal, or in hex +with 0x prefix), in which case the load address in the file will be read +and ignored. +.sp +If any of the input files overlap the same area of memory, the overlap +area will contain only data from the file(s) listed later in the command +line. The output file\(aqs load address will be that of the input file with +the lowest address, and it will extend to the highest address contained +in any of the files. If there are gaps in the address space (areas where +no file was loaded), the output will contain 0x00 bytes to fill the gap. +.sp +Load address overrides do NOT relocate code. +.sp +There are no switches (options) for cbmcombine. +.SH EXAMPLES +.sp +The examples use 1024 byte input files, named after their load addresses +in hex: +.sp +x1000.prg Load address \fB$1000\fP, last address \fB$13FF\fP +.sp +x1400.prg Load address \fB$1400\fP, last address \fB$17FF\fP +.sp +x1600.prg Load address \fB$1600\fP, last address \fB$19FF\fP +.sp +cmbcombine x1000.prg x1400.prg > new.prg +.INDENT 0.0 +.INDENT 3.5 +new.prg will have a load address of 0x1000, and contain data from +0x1000 to 0x17ff. Since x1000.prg ends at address 0x13ff, there is +no overlap. If the order of arguments were swapped, the result would +be the same. +.UNINDENT +.UNINDENT +.sp +cmbcombine x1000.prg x1600.prg > new.prg +.INDENT 0.0 +.INDENT 3.5 +new.prg\(aqs load address will be \fB$1000\fP, and its end address will be \fB$19FF\fP\&. +From \fB$1400\fP to \fB$15FF\fP, it will contain 512 bytes of zeroes, since none +of the input files had any data at these addresses. If the order were +swapped, the result would be the same. +.UNINDENT +.UNINDENT +.sp +cmbcombine x1400.prg x1600.prg > new.prg +.INDENT 0.0 +.INDENT 3.5 +new.prg\(aqs load address will be \fB$1400\fP and it will end at \fB$19FF\fP\&. The +data from \fB$1400\fP to \fB$15FF\fP comes from x1400.prg, and the rest from x1600.prg. +.UNINDENT +.UNINDENT +.sp +cmbcombine x1600.prg x1400.prg > new.prg +.INDENT 0.0 +.INDENT 3.5 +As above, but data at \fB$1400\fP to \fB$15FF\fP comes from x1400.prg. +.UNINDENT +.UNINDENT +.sp +cmbcombine x1400.prg x1600.prg,0x1800 > new.prg +.INDENT 0.0 +.INDENT 3.5 +new.prg loads at \fB$1400\fP and extends to \fB$1BFF\fP\&. Data at \fB$1400\fP to +\fB$17FF\fP comes from x1400.prg, data at \fB$1800\fP to \fB$1BFF\fP comes from +x1600.prg. If x1600.prg contains non\-relocatable code org\(aqed at \fB$1600\fP, +it will fail to run when loaded at \fB$1800\fP\&. +.UNINDENT +.UNINDENT +.SH EXIT STATUS +.sp +0 for success, non\-zero for failure. If any of the input files can\(aqt be +read, the process exits with failure status, without writing anything +to standard output. +.SH BUGS +.sp +There is very little error\-checking. It may be possible to crash +cbmcombine by feeding it bogus input. +.sp +There\(aqs no way to give cbmcombine a filename containing a comma. +.sp +Not exactly bugs, per se, but missing features: +.INDENT 0.0 +.INDENT 3.5 +The user should be notified if files overlap and/or there are gaps in +the output. +.sp +There should be warnings if a file wraps around the top of the 64K address +space, or loads into dangerous or invalid areas such as ROM or page zero. +Odds are, the file isn\(aqt really a valid CBM executable. +.sp +There should be a cbmsplit utility that does the opposite of cbmcombine. +.UNINDENT +.UNINDENT +.SH COPYRIGHT +.sp +As of 21.12.2005 Pucrunch is under GNU LGPL. See: +.INDENT 0.0 +.INDENT 3.5 +\fI\%http://creativecommons.org/licenses/LGPL/2.1/\fP +\fI\%http://www.gnu.org/copyleft/lesser.html\fP +.UNINDENT +.UNINDENT +.SH AUTHORS +.sp +cbmcombine was written by Pasi Ojala <\fI\%a1bert@iki.fi\fP>. +.sp +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. +.SH SEE ALSO +.sp +pucrunch(1), exomizer(1), vice(1) +.sp +The pucrunch homepage: \fI\%http://a1bert.kapsi.fi/Dev/pucrunch/\fP +.sp +The full documentation and sample decompressor code: +.INDENT 0.0 +.INDENT 3.5 +/usr/doc/pucrunch\-20081122/ +.UNINDENT +.UNINDENT +.\" Generated by docutils manpage writer. +. diff --git a/system/pucrunch/cbmcombine.rst b/system/pucrunch/cbmcombine.rst new file mode 100644 index 0000000000..5f9193e279 --- /dev/null +++ b/system/pucrunch/cbmcombine.rst @@ -0,0 +1,147 @@ +.. RST source for cbmcombine(1) man page. Convert with: +.. rst2man.py cbmcombine.rst > cbmcombine.1 +.. rst2man.py comes from the SBo development/docutils package. + +.. |version| replace:: 20081122 +.. |date| date:: + +.. converting from pod: +.. s/B<\([^>]*\)>/**\1**/g +.. s/I<\([^>]*\)>/*\1*/g + +========== +cbmcombine +========== + +------------------------------------ +combines Commodore 8-bit executables +------------------------------------ + +:Manual section: 1 +:Manual group: SlackBuilds.org +:Date: |date| +:Version: |version| + +SYNOPSIS +======== + +cbmcombine [*input-file[,load-address]*] [[[*input-file[,load-address]*]] ...] + +DESCRIPTION +=========== + +cbmcombine combines several Commodore executables into one. All Commodore +8-bit machines (64, 128, VIC-20, Plus4, 16, PET, etc) are supported, +since they all use the same executable file format. + +Files are read in the order listed on the command line. The combined +executable is written to standard output. Each file's load address can +be forced by adding a comma and the new address (in decimal, or in hex +with 0x prefix), in which case the load address in the file will be read +and ignored. + +If any of the input files overlap the same area of memory, the overlap +area will contain only data from the file(s) listed later in the command +line. The output file's load address will be that of the input file with +the lowest address, and it will extend to the highest address contained +in any of the files. If there are gaps in the address space (areas where +no file was loaded), the output will contain 0x00 bytes to fill the gap. + +Load address overrides do NOT relocate code. + +There are no switches (options) for cbmcombine. + +EXAMPLES +======== + +The examples use 1024 byte input files, named after their load addresses +in hex: + +x1000.prg Load address **$1000**, last address **$13FF** + +x1400.prg Load address **$1400**, last address **$17FF** + +x1600.prg Load address **$1600**, last address **$19FF** + +cmbcombine x1000.prg x1400.prg > new.prg + + new.prg will have a load address of 0x1000, and contain data from + 0x1000 to 0x17ff. Since x1000.prg ends at address 0x13ff, there is + no overlap. If the order of arguments were swapped, the result would + be the same. + +cmbcombine x1000.prg x1600.prg > new.prg + + new.prg's load address will be **$1000**, and its end address will be **$19FF**. + From **$1400** to **$15FF**, it will contain 512 bytes of zeroes, since none + of the input files had any data at these addresses. If the order were + swapped, the result would be the same. + +cmbcombine x1400.prg x1600.prg > new.prg + + new.prg's load address will be **$1400** and it will end at **$19FF**. The + data from **$1400** to **$15FF** comes from x1400.prg, and the rest from x1600.prg. + +cmbcombine x1600.prg x1400.prg > new.prg + + As above, but data at **$1400** to **$15FF** comes from x1400.prg. + +cmbcombine x1400.prg x1600.prg,0x1800 > new.prg + + new.prg loads at **$1400** and extends to **$1BFF**. Data at **$1400** to + **$17FF** comes from x1400.prg, data at **$1800** to **$1BFF** comes from + x1600.prg. If x1600.prg contains non-relocatable code org'ed at **$1600**, + it will fail to run when loaded at **$1800**. + +EXIT STATUS +=========== + +0 for success, non-zero for failure. If any of the input files can't be +read, the process exits with failure status, without writing anything +to standard output. + +BUGS +==== + +There is very little error-checking. It may be possible to crash +cbmcombine by feeding it bogus input. + +There's no way to give cbmcombine a filename containing a comma. + +Not exactly bugs, per se, but missing features: + + The user should be notified if files overlap and/or there are gaps in + the output. + + There should be warnings if a file wraps around the top of the 64K address + space, or loads into dangerous or invalid areas such as ROM or page zero. + Odds are, the file isn't really a valid CBM executable. + + There should be a cbmsplit utility that does the opposite of cbmcombine. + +COPYRIGHT +========= + +As of 21.12.2005 Pucrunch is under GNU LGPL. See\: + + http://creativecommons.org/licenses/LGPL/2.1/ + http://www.gnu.org/copyleft/lesser.html + +AUTHORS +======= + +cbmcombine was written by Pasi Ojala <a1bert@iki.fi>. + +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. + +SEE ALSO +======== + +pucrunch(1), exomizer(1), vice(1) + +The pucrunch homepage: http://a1bert.kapsi.fi/Dev/pucrunch/ + +The full documentation and sample decompressor code\: + + /usr/doc/pucrunch-|version|/ diff --git a/system/pucrunch/pucrunch.1 b/system/pucrunch/pucrunch.1 new file mode 100644 index 0000000000..e74f0c3c76 --- /dev/null +++ b/system/pucrunch/pucrunch.1 @@ -0,0 +1,223 @@ +.\" Man page generated from reStructuredText. +. +.TH PUCRUNCH 1 "2017-09-06" "20081122" "SlackBuilds.org" +.SH NAME +pucrunch \- compressor optimized for low-resource decompression +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.\" RST source for pucrunch(1) man page. Convert with: +. +.\" rst2man.py pucrunch.rst > pucrunch.1 +. +.\" rst2man.py comes from the SBo development/docutils package. +. +.\" converting from pod: +. +.\" s/B<\([^>]*\)>/**\1**/g +. +.\" s/I<\([^>]*\)>/*\1*/g +. +.SH SYNOPSIS +.sp +pucrunch [\fI\-options\fP] [\fIinfile]\fP [\fIoutfile\fP]] +.SH DESCRIPTION +.sp +Pucrunch is a Hybrid LZ77 and RLE compressor, uses an Elias Gamma Code +for lengths, mixture of Gamma Code and linear for LZ77 offset, and +ranked RLE bytes indexed by the same Gamma Code. Uses no extra memory +in decompression. +.sp +Input files can be arbitrary data (with \fI\-d\fP option) or executables for +Commodore 64, VIC\-20, C16, or Plus/4. Output is either a self\-extracting +compressed Commodore executable, or a compressed data file suitable for +extracting via \fIpucrunch \-u\fP or the included decompressor routines. See +/usr/doc/pucrunch\-20081122/examples/*.asm for 6502, 6809, and Z80 +assembly code implementations of the decompressor. +.sp +Note: Because pucrunch contains both RLE and LZ77 and they are +specifically designed to work together, DO NOT RLE\-pack your files +first, because it will decrease the overall compression ratio. +.SH OPTIONS +.sp +Pucrunch expects any number of options and up to two filenames. If you +only give one filename, the compressed file is written to the stardard +output. If you leave out both filenames, the input is in addition +read from the standard input. Options needing no value can be grouped +together. All values can be given in decimal (no prefix), octal (prefix +0), or hexadecimal (prefix $ or 0x). [\fINote\fP: escape the \fI$\fP with quotes +or a backslash, to avoid your shell treating it as a metacharacter] +.sp +Example: pucrunch demo.prg demo.pck \-m6 \-fs \-p2 \-x0xc010 +.INDENT 0.0 +.TP +.B \fB\-c<machine>\fP +Selects the machine. Possible values are 128 (C128), 64 (C64), +20 (VIC20), 16 (C16/Plus4), 0 (standalone). The default is 64, i.e. +Commodore 64. +.sp +If you use \-c0, a file without the embedded decompression code +is produced. This can be decompressed with a standalone routine +and of course with pucrunch itself. Options marked with [\fISFX\fP] +have no effect if \-c0 is used. +.sp +The 128\-mode is not fully developed yet. Currently it overwrites +memory locations $f7\-$f9 (Text mode lockout, Scrolling, and Bell +settings) without restoring them later. +.TP +.B \fB\-a\fP +[\fISFX\fP] Avoids video matrix if possible. Only affects VIC20 mode. +.TP +.B \fB\-d\fP +[\fISFX\fP] Indicates that the file does not have a load address. A load +address can be specified with \-l option. The default load +address if none is specified is 0x258. +.TP +.B \fB\-l<addr>\fP +[\fISFX\fP] Overrides the file load address or sets it for data files. +.TP +.B \fB\-x<addr>\fP +[\fISFX\fP] Sets the execution address or overrides automatically detected +execution address. Pucrunch checks whether a SYS\-line is present +and tries to decode the address. Plain decimal addresses and +addresses in parenthesis are read correctly, otherwise you need +to override any incorrect value with this option. +.TP +.B \fB\-e<val>\fP +Fixes the number of escape bits used. You don\(aqt usually need or +want to use this option. +.TP +.B \fB\-r<val>\fP +Sets the LZ77 search range. By specifying 0 you get only RLE. +You don\(aqt usually need or want to use this option. +.TP +.B \fB+f\fP +Disables 2MHz mode for C128 and 2X mode in C16/+4. +.TP +.B \fB\-fbasic\fP +[\fISFX\fP] Selects the decompressor for basic programs. This version +performs the RUN function and enters the basic interpreter +automatically. Currently only C64 and VIC20 are supported. +.TP +.B \fB\-ffast\fP +[\fISFX\fP] Selects the faster, but longer decompressor version, if such +version is available for the selected machine and selected +options. Without this option the medium\-speed and medium\-size +decompressor is used. +.TP +.B \fB\-fshort\fP +[\fISFX\fP] Selects the shorter, but slower decompressor version, if such +version is available for the selected machine and selected +options. Without this option the medium\-speed and medium\-size +decompressor is used. +.TP +.B \fB\-flist\fP +List all available decompressors (the \fI\-f\fP options above), for all +supported machines. The list may contain more decompressors than are +shown above (the extras might be experimental, use at your own risk). +.TP +.B \fB\-fdelta\fP +Allows delta matching. In this mode only the waveforms in the +data matter, any offset is allowed and added in the +decompression. Note that the decompressor becomes 22 bytes +longer if delta matching is used and the short decompressor +can\(aqt be used (24 bytes more). This means that delta matching +must get more than 46 bytes of total gain to get any net +savings. So, always compare the result size to a version +compressed without \-fdelta. +.sp +Also, the compression time increases because delta matching is +more complicated. The increase is not 256\-fold though, somewhere +around 6\-7 times is more typical. So, use this option with care +and do not be surprised if it doesn\(aqt help on your files. +.TP +.B \fB\-n\fP +Disables RLE and LZ77 length optimization. You don\(aqt usually +need or want to use this option. +.TP +.B \fB\-s\fP +Display full statistics instead of a compression summary. +.TP +.B \fB\-p<bits>\fP +Fixes the number of extra LZ77 position bits used for the low +part. If pucrunch tells you to to use this option, see if the +new setting gives better compression. +.TP +.B \fB\-m<bits>\fP +Sets the maximum length value. The value should be 5, 6, or 7. +The lengths are 64, 128 and 256, respectively. If pucrunch tells +you to to use this option, see if the new setting gives better +compression. The default value is 7. +.TP +.B \fB\-i<0|1>\fP +Defines the interrupt enable state to be used after +decompression. Value 0 disables interrupts, other values enable +interrupts. The default is to enable interrupts after +decompression. +.TP +.B \fB\-g<byte>\fP +Defines the memory configuration to be used after decompression. +Only used for C64 mode (\-c64). The default value is $37. +.TP +.B \fB\-u\fP +Unpacks/decompresses a file instead of compressing it. The file +to decompress must have a decompression header compatible with +one of the decompression headers in the current version. +.TP +.B \fB\-h\fP +Print built\-in help and exit. +.UNINDENT +.SH COPYRIGHT +.sp +As of 21.12.2005 Pucrunch is under GNU LGPL. See: +.INDENT 0.0 +.INDENT 3.5 +\fI\%http://creativecommons.org/licenses/LGPL/2.1/\fP +\fI\%http://www.gnu.org/copyleft/lesser.html\fP +.UNINDENT +.UNINDENT +.SH AUTHORS +.sp +pucrunch was written by Pasi Ojala <\fI\%a1bert@iki.fi\fP>. +.sp +This man page consist of excerpts from the author\(aqs documentation. It +was written for the SlackBuilds.org project by B. Watson, and is licensed +under the same terms as the original docs. +.SH SEE ALSO +.sp +exomizer(1) +.sp +The pucrunch homepage: \fI\%http://a1bert.kapsi.fi/Dev/pucrunch/\fP +.sp +The full documentation and sample decompressor code: +.INDENT 0.0 +.INDENT 3.5 +/usr/doc/pucrunch\-20081122/ +.UNINDENT +.UNINDENT +.\" Generated by docutils manpage writer. +. diff --git a/system/pucrunch/pucrunch.SlackBuild b/system/pucrunch/pucrunch.SlackBuild new file mode 100644 index 0000000000..2c207fd79b --- /dev/null +++ b/system/pucrunch/pucrunch.SlackBuild @@ -0,0 +1,86 @@ +#!/bin/sh + +# Slackware build script for pucrunch + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Note about the source: upstream doesn't provide an archive, instead each +# file is linked to from the homepage. I created pucrunch-20081122.tar.xz +# by downloading all the individual files. The version number is the +# 'Last Updated' date on the homepage. + +PRGNAM=pucrunch +VERSION=${VERSION:-20081122} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +sed -i "s,-O,$SLKCFLAGS," Makefile +make + +# no Makefile for this, plus it needs special incantations... +gcc $SLKCFLAGS -funsigned-char \ + -include sys/param.h -Dfar= -Dmin=MIN -Dmax=MAX \ + -o cbmcombine cbmcombine.c + +mkdir -p $PKG/usr/bin +install -s -m0755 $PRGNAM cbmcombine $PKG/usr/bin + +# man page created by script author from the HTML docs: +mkdir -p $PKG/usr/man/man1 +gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz +gzip -9c < $CWD/cbmcombine.1 > $PKG/usr/man/man1/cbmcombine.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples +cp -a $PRGNAM.html $PKG/usr/doc/$PRGNAM-$VERSION +cp -a *.asm $PKG/usr/doc/$PRGNAM-$VERSION/examples +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/pucrunch/pucrunch.info b/system/pucrunch/pucrunch.info new file mode 100644 index 0000000000..a6f3e16bc0 --- /dev/null +++ b/system/pucrunch/pucrunch.info @@ -0,0 +1,10 @@ +PRGNAM="pucrunch" +VERSION="20081122" +HOMEPAGE="http://a1bert.kapsi.fi/Dev/pucrunch/" +DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/pucrunch-20081122.tar.xz" +MD5SUM="dbc3e129a9d963e96f34a3495307aeff" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/system/pucrunch/pucrunch.rst b/system/pucrunch/pucrunch.rst new file mode 100644 index 0000000000..92abd479bd --- /dev/null +++ b/system/pucrunch/pucrunch.rst @@ -0,0 +1,205 @@ +.. RST source for pucrunch(1) man page. Convert with: +.. rst2man.py pucrunch.rst > pucrunch.1 +.. rst2man.py comes from the SBo development/docutils package. + +.. |version| replace:: 20081122 +.. |date| date:: + +.. converting from pod: +.. s/B<\([^>]*\)>/**\1**/g +.. s/I<\([^>]*\)>/*\1*/g + +======== +pucrunch +======== + +--------------------------------------------------- +compressor optimized for low-resource decompression +--------------------------------------------------- + +:Manual section: 1 +:Manual group: SlackBuilds.org +:Date: |date| +:Version: |version| + +SYNOPSIS +======== + +pucrunch [*-options*] [*infile]* [*outfile*]] + +DESCRIPTION +=========== + +Pucrunch is a Hybrid LZ77 and RLE compressor, uses an Elias Gamma Code +for lengths, mixture of Gamma Code and linear for LZ77 offset, and +ranked RLE bytes indexed by the same Gamma Code. Uses no extra memory +in decompression. + +Input files can be arbitrary data (with *-d* option) or executables for +Commodore 64, VIC-20, C16, or Plus/4. Output is either a self-extracting +compressed Commodore executable, or a compressed data file suitable for +extracting via *pucrunch -u* or the included decompressor routines. See +/usr/doc/pucrunch-|version|/examples/\*.asm for 6502, 6809, and Z80 +assembly code implementations of the decompressor. + +Note: Because pucrunch contains both RLE and LZ77 and they are +specifically designed to work together, DO NOT RLE-pack your files +first, because it will decrease the overall compression ratio. + +OPTIONS +======= + +Pucrunch expects any number of options and up to two filenames. If you +only give one filename, the compressed file is written to the stardard +output. If you leave out both filenames, the input is in addition +read from the standard input. Options needing no value can be grouped +together. All values can be given in decimal (no prefix), octal (prefix +0), or hexadecimal (prefix $ or 0x). [*Note*: escape the *$* with quotes +or a backslash, to avoid your shell treating it as a metacharacter] + +Example: pucrunch demo.prg demo.pck -m6 -fs -p2 -x0xc010 + +**-c<machine>** + Selects the machine. Possible values are 128 (C128), 64 (C64), + 20 (VIC20), 16 (C16/Plus4), 0 (standalone). The default is 64, i.e. + Commodore 64. + + If you use -c0, a file without the embedded decompression code + is produced. This can be decompressed with a standalone routine + and of course with pucrunch itself. Options marked with [*SFX*] + have no effect if -c0 is used. + + The 128-mode is not fully developed yet. Currently it overwrites + memory locations $f7-$f9 (Text mode lockout, Scrolling, and Bell + settings) without restoring them later. + +**-a** + [*SFX*] Avoids video matrix if possible. Only affects VIC20 mode. + +**-d** + [*SFX*] Indicates that the file does not have a load address. A load + address can be specified with -l option. The default load + address if none is specified is 0x258. + +**-l<addr>** + [*SFX*] Overrides the file load address or sets it for data files. + +**-x<addr>** + [*SFX*] Sets the execution address or overrides automatically detected + execution address. Pucrunch checks whether a SYS-line is present + and tries to decode the address. Plain decimal addresses and + addresses in parenthesis are read correctly, otherwise you need + to override any incorrect value with this option. + +**-e<val>** + Fixes the number of escape bits used. You don't usually need or + want to use this option. + +**-r<val>** + Sets the LZ77 search range. By specifying 0 you get only RLE. + You don't usually need or want to use this option. + +**+f** + Disables 2MHz mode for C128 and 2X mode in C16/+4. + +**-fbasic** + [*SFX*] Selects the decompressor for basic programs. This version + performs the RUN function and enters the basic interpreter + automatically. Currently only C64 and VIC20 are supported. + +**-ffast** + [*SFX*] Selects the faster, but longer decompressor version, if such + version is available for the selected machine and selected + options. Without this option the medium-speed and medium-size + decompressor is used. + +**-fshort** + [*SFX*] Selects the shorter, but slower decompressor version, if such + version is available for the selected machine and selected + options. Without this option the medium-speed and medium-size + decompressor is used. + +**-flist** + List all available decompressors (the *-f* options above), for all + supported machines. The list may contain more decompressors than are + shown above (the extras might be experimental, use at your own risk). + +**-fdelta** + Allows delta matching. In this mode only the waveforms in the + data matter, any offset is allowed and added in the + decompression. Note that the decompressor becomes 22 bytes + longer if delta matching is used and the short decompressor + can't be used (24 bytes more). This means that delta matching + must get more than 46 bytes of total gain to get any net + savings. So, always compare the result size to a version + compressed without -fdelta. + + Also, the compression time increases because delta matching is + more complicated. The increase is not 256-fold though, somewhere + around 6-7 times is more typical. So, use this option with care + and do not be surprised if it doesn't help on your files. + +**-n** + Disables RLE and LZ77 length optimization. You don't usually + need or want to use this option. + +**-s** + Display full statistics instead of a compression summary. + +**-p<bits>** + Fixes the number of extra LZ77 position bits used for the low + part. If pucrunch tells you to to use this option, see if the + new setting gives better compression. + +**-m<bits>** + Sets the maximum length value. The value should be 5, 6, or 7. + The lengths are 64, 128 and 256, respectively. If pucrunch tells + you to to use this option, see if the new setting gives better + compression. The default value is 7. + +**-i<0|1>** + Defines the interrupt enable state to be used after + decompression. Value 0 disables interrupts, other values enable + interrupts. The default is to enable interrupts after + decompression. + +**-g<byte>** + Defines the memory configuration to be used after decompression. + Only used for C64 mode (-c64). The default value is $37. + +**-u** + Unpacks/decompresses a file instead of compressing it. The file + to decompress must have a decompression header compatible with + one of the decompression headers in the current version. + +**-h** + Print built-in help and exit. + + +COPYRIGHT +========= + +As of 21.12.2005 Pucrunch is under GNU LGPL. See\: + + http://creativecommons.org/licenses/LGPL/2.1/ + http://www.gnu.org/copyleft/lesser.html + +AUTHORS +======= + +pucrunch was written by Pasi Ojala <a1bert@iki.fi>. + +This man page consists of excerpts from the author's documentation. It +was written for the SlackBuilds.org project by B. Watson, and is licensed +under the same terms as the original docs. + +SEE ALSO +======== + +cbmcombine(1), exomizer(1), vice(1) + +The pucrunch homepage: http://a1bert.kapsi.fi/Dev/pucrunch/ + +The full documentation and sample decompressor code\: + + /usr/doc/pucrunch-|version|/ diff --git a/system/pucrunch/slack-desc b/system/pucrunch/slack-desc new file mode 100644 index 0000000000..2c48d0aa33 --- /dev/null +++ b/system/pucrunch/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +pucrunch: pucrunch (compressor optimized for low-resource decompression) +pucrunch: +pucrunch: Pucrunch is a Hybrid LZ77 and RLE compressor, uses an Elias Gamma +pucrunch: Code for lengths, mixture of Gamma Code and linear for LZ77 offset, +pucrunch: and ranked RLE bytes indexed by the same Gamma Code. Uses no extra +pucrunch: memory in decompression. +pucrunch: +pucrunch: Assembly sources for example decompressors (for Commodore 64 and +pucrunch: Nintendo GameBoy) are included. +pucrunch: +pucrunch: |