|
orictoppm - convert an Oric video RAM dump into a portable pixmap |
|
orictoppm --help |
|
orictoppm reads one or more files supposed to contain dumps of an Oric video RAM and, for each input file, writes a file containing the corresponding 240×200 or 240×224 image, in packed ppm format. If the size of an input file is exactly 48 or 64 kB or 65600 bytes and -s is not present, orictoppm treats it as a dump of the whole Oric memory. In that case, the video RAM is assumed to start at offset BB80h (text) or A000h (hires, top). Furthermore, characters are rendered according to the chargen memory at B400h-BBFFh (text mode) or 9800h-9FFFh (hires mode), allowing for user-defined characters. All attributes are handled except flashing and frames per second, which are silently ignored. If orictoppm encounters an attribute that can't be honoured (switching to hires (text) mode when hires (text) frame buffer is not present in the input file), the attribute is ignored and its position is filled with an "impossible" rainbow pattern. See testpat2 and testpat3 for an example. For each input file, the name of the output file is determined as follows: if -o is present, that's what is used. Otherwise, if the input comes from stdin, the output is written to stdout. Otherwise, if the input file has no extension, the name of the output file is the same as the input file with .ppm tacked on the end. If the input file has an extension, the name of the output file is the same as the input file with the extension replaced by .ppm. A file name of "-" means stdin. You can't use -o if you have more than one input file. If the only argument is "--help", orictoppm prints a usage message on stdout and exits successfully. If the only argument is "--version", orictoppm prints its version number on stdout and exits successfully. |
|
The command line is parsed with getopt(3). Therefore, if the gepopt() function on your system supports the "--" convention, so does orictoppm. |
-c |
Ignore colour attributes (ink and paper). This is useful for extracting certain otherwise invisible pictures such as the title screen of L'Aigle D'Or. |
||
|
-g |
Superimpose a visual grid by making the top left corner pixel of every 6×8 cell stand out. The maxval of the output PPM is 5 instead of 1. Ordinary pixels use 0 if the component is off, maxval if it's on. Grid pixels use 1 and maxval - 1. |
|
-m text|hires|top |
|
Specify how to interpret the data. |
|
text |
Text mode, 40×28 cells. Input file must be at least 1120 byte long. Output file is 240×224. |
||
|
hires |
Hires mode, 240×200 pixels plus 40×3 character cells at the bottom. Input file must be at least 8120 byte long. Output file is 240×224. |
||
|
top |
Hires mode without the three lines of text at the bottom. Input file must be at least 8000 byte long. Output file is 240×200. |
|
-o file |
|
Write output to file. "-" means stdout. |
|
-r |
Use the character graphics from the ROM even if the input file includes the chargen memory. |
||
|
-s num |
Skip the first num bytes of each input file. num must be an unsigned integer greater than or equal to 0 and lesser than ULONG_MAX. num may begin with "0x" or "0X", in which case the remainder should consist of a string of hexadecimal digits and underscores (which are ignored). Otherwise, num should begin with a digit, followed by a string of decimal digits and underscores (which are ignored). White space at the beginning and end of num is ignored. By default, files are read from the beginning. |
|
0 |
OK |
||
|
>0 |
Errors occurred |
|
To convert wimpyscr.tap to wimpysrc.ppm: orictoppm -m top -s 26 wimpyscr.tap Other convoluted ways of doing the same thing: orictoppm -m top -s 26 <wimpyscr.tap >wimpyscr.ppm orictoppm -m top -s 26 - <wimpyscr.tap >wimpyscr.ppm orictoppm -m top -s 26 -o wimpyscr.ppm wimpyscr.tap orictoppm -m top -s 26 -o - wimpyscr.tap >wimpyscr.ppm Convert a directory full of text dumps in one go: orictoppm -m text *.tap You will find more examples in the demo script. |
|
Reading from stdin and writing to stdout won't do what you want if you have a C compiler that opens stdin and/or stdout in text mode, which is generally the case under MS-DOS. The "flashing" attribute is not supported. :-) |
André Majorel <URL:http://www.teaser.fr/~amajorel/orictoppm/> |
|
orictoppm is copyright André Majorel 2001. orictoppm is available under the terms of the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
ppm(5) |