diff options
author | B. Watson <urchlay@slackware.uk> | 2024-04-24 09:32:49 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-04-24 09:32:49 -0400 |
commit | 53a0578bd0605cfa39e7d8d126aa78fb216527d3 (patch) | |
tree | e767725d157ea9401efe95c34b0ea82f4e3e1dcd | |
parent | 140ced429cba74084d65942840b1f97fc77d8d9b (diff) | |
download | bw-atari8-tools-53a0578bd0605cfa39e7d8d126aa78fb216527d3.tar.gz |
Stub and man page for new blob2xex utility.
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | blob2xex.1 | 107 | ||||
-rw-r--r-- | blob2xex.c | 16 | ||||
-rw-r--r-- | blob2xex.rst | 62 |
4 files changed, 187 insertions, 2 deletions
@@ -14,9 +14,9 @@ CC=gcc CFLAGS=-Wall $(COPT) -ansi -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" # BINS and SCRIPTS go in $BINDIR, DOCS go in $DOCDIR -BINS=a8eol xfd2atr atr2xfd blob2c cart2xex fenders xexsplit xexcat atrsize rom2cart unmac65 axe +BINS=a8eol xfd2atr atr2xfd blob2c cart2xex fenders xexsplit xexcat atrsize rom2cart unmac65 axe blob2xex SCRIPTS=dasm2atasm a8utf8 -MANS=a8eol.1 xfd2atr.1 atr2xfd.1 blob2c.1 cart2xex.1 fenders.1 xexsplit.1 xexcat.1 atrsize.1 rom2cart.1 unmac65.1 axe.1 dasm2atasm.1 a8utf8.1 +MANS=a8eol.1 xfd2atr.1 atr2xfd.1 blob2c.1 cart2xex.1 fenders.1 xexsplit.1 xexcat.1 atrsize.1 rom2cart.1 unmac65.1 axe.1 dasm2atasm.1 a8utf8.1 blob2xex.1 DOCS=README equates.inc *.dasm # All the programs share this version number... diff --git a/blob2xex.1 b/blob2xex.1 new file mode 100644 index 0000000..943a1e2 --- /dev/null +++ b/blob2xex.1 @@ -0,0 +1,107 @@ +.\" Man page generated from reStructuredText. +. +. +.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 +.. +.TH "BLOB2XEX" 1 "2024-04-24" "0.2.1" "Urchlay's Atari 8-bit Tools" +.SH NAME +blob2xex \- Create Atari 8-bit executables from arbitrary data +.\" RST source for blob2xex(1) man page. Convert with: +. +.\" rst2man.py blob2xex.rst > blob2xex.1 +. +.SH SYNOPSIS +.sp +blob2xex [\fB\-l\fP \fIloadaddr\fP [\fB\-r\fP \fIrunaddr\fP] [\fB\-i\fP \fIinitaddr\fP] [\fB\-o\fP \fIoffset\fP] [\fB\-s\fP \fIsize\fP] \fIinfile\fP] ... \fIoutfile\fP +.SH DESCRIPTION +.sp +\fBblob2xex\fP creates an Atari 8\-bit binary load (xex) file from one or +more files of arbitrary data. +.sp +Each input file \fIrequires\fP a \fB\-l\fP \fIloadaddr\fP option, to set the load +address. Optionally, run and init addresses can be included. Also, +using \fB\-o\fP and \fB\-s\fP, it\(aqs possible to include only part of the +input file. To read from standard input, use \fB\-\fP for the \fIinfile\fP\&. +.sp +Only one \fIoutfile\fP is supported. When multiple input files are used, +the resulting .xex file will have multiple segments. Use \fB\-\fP to +write to standard output. +.sp +Addresses, offsets, and sizes may be given in decimal or hex. Hex +addresses must be prefixed with either \fB$\fP or \fB0x\fP\&. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-l \fIloadaddr\fP +Set the load address of the next \fIinfile\fP\&. Each \fIinfile\fP must be preceded by +a \fB\-l\fP option. +.TP +.B \-r \fIrunaddr\fP +Optional; set the run address. Since a .xex file can only have one run address, +the last \fB\-r\fP option will be the one used when the file is loaded on the Atari. +.TP +.B \-i \fIinitaddr\fP +Optional; set an init address, to be executed after the next segment loads. +.TP +.B \-o \fIoffset\fP +Optional; skip this many bytes of the next input file. Default is \fB0\fP\&. +.TP +.B \-s \fIsize\fP +Optional; read this many bytes of the next input file. Default is the entire file. +.UNINDENT +.SH EXAMPLES +.sp +TODO: come up with a few examples. +.SH COPYRIGHT +.sp +WTFPL. See \fI\%http://www.wtfpl.net/txt/copying/\fP for details. +.SH AUTHOR +.INDENT 0.0 +.IP B. 3 +Watson <\fI\%urchlay@slackware.uk\fP>; Urchlay on irc.libera.chat \fI##atari\fP\&. +.UNINDENT +.SH SEE ALSO +.sp +\fBa8eol\fP(1), +\fBa8utf8\fP(1), +\fBatr2xfd\fP(1), +\fBatrsize\fP(1), +\fBaxe\fP(1), +\fBblob2c\fP(1), +\fBcart2xex\fP(1), +\fBdasm2atasm\fP(1), +\fBfenders\fP(1), +\fBrom2cart\fP(1), +\fBunmac65\fP(1), +\fBxexcat\fP(1), +\fBxexsplit\fP(1), +\fBxfd2atr\fP(1). +.sp +Any good Atari 8\-bit book: \fIDe Re Atari\fP, \fIThe Atari BASIC Reference +Manual\fP, the \fIOS Users\(aq Guide\fP, \fIMapping the Atari\fP, etc. +.\" Generated by docutils manpage writer. +. diff --git a/blob2xex.c b/blob2xex.c new file mode 100644 index 0000000..e3740f6 --- /dev/null +++ b/blob2xex.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <errno.h> +#include <string.h> + +#include "xex.h" + +#ifndef VERSION +#define VERSION "???" +#endif + +#define SELF "blob2xex" + +int main(int argc, char **argv) { +} diff --git a/blob2xex.rst b/blob2xex.rst new file mode 100644 index 0000000..bbf0e0f --- /dev/null +++ b/blob2xex.rst @@ -0,0 +1,62 @@ +.. RST source for blob2xex(1) man page. Convert with: +.. rst2man.py blob2xex.rst > blob2xex.1 + +======== +blob2xex +======== + +-------------------------------------------------- +Create Atari 8-bit executables from arbitrary data +-------------------------------------------------- + +.. include:: manhdr.rst + +SYNOPSIS +======== + +blob2xex [**-l** *loadaddr* [**-r** *runaddr*] [**-i** *initaddr*] [**-o** *offset*] [**-s** *size*] *infile*] ... *outfile* + +DESCRIPTION +=========== + +**blob2xex** creates an Atari 8-bit binary load (xex) file from one or +more files of arbitrary data. + +Each input file *requires* a **-l** *loadaddr* option, to set the load +address. Optionally, run and init addresses can be included. Also, +using **-o** and **-s**, it's possible to include only part of the +input file. To read from standard input, use **-** for the *infile*. + +Only one *outfile* is supported. When multiple input files are used, +the resulting .xex file will have multiple segments. Use **-** to +write to standard output. + +Addresses, offsets, and sizes may be given in decimal or hex. Hex +addresses must be prefixed with either **$** or **0x**. + +OPTIONS +======= + +-l *loadaddr* + Set the load address of the next *infile*. Each *infile* must be preceded by + a **-l** option. + +-r *runaddr* + Optional; set the run address. Since a .xex file can only have one run address, + the last **-r** option will be the one used when the file is loaded on the Atari. + +-i *initaddr* + Optional; set an init address, to be executed after the next segment loads. + +-o *offset* + Optional; skip this many bytes of the next input file. Default is **0**. + +-s *size* + Optional; read this many bytes of the next input file. Default is the entire file. + +EXAMPLES +======== + +TODO: come up with a few examples. + +.. include:: manftr.rst |