├── .classpath ├── .gitignore ├── LICENSE ├── README.md ├── build ├── build.xml └── manifest.mf ├── doc ├── Design.md ├── README.md ├── RTF Specification 1.5.html ├── Screenshot01.png ├── fix-git-receive-pack-not-permitted.txt └── xfmn.png └── src ├── org └── transformenator │ ├── Transform.java │ ├── TransformUtility.java │ ├── UtilityDirectory.java │ ├── detanglers │ ├── ADetangler.java │ ├── Brother120k.java │ ├── CPT.java │ ├── CTOS.java │ ├── CTOSArchive.java │ ├── DECmate.java │ ├── Datapoint.java │ ├── DisplayWrite.java │ ├── Displaywriter.java │ ├── Dmk2Raw.java │ ├── EasyWriterA2.java │ ├── EasyWriterII.java │ ├── EightInch8x512.java │ ├── Ensoniq.java │ ├── GeoWritePC.java │ ├── HP64000.java │ ├── HPInstrument.java │ ├── IBM5520.java │ ├── IBM8.java │ ├── IBMOfficeSystem6.java │ ├── Imd2Raw.java │ ├── Interdata.java │ ├── JPGScrape.java │ ├── JustWrite.java │ ├── Kermit.java │ ├── LeadingEdge.java │ ├── Linolex.java │ ├── Magi.java │ ├── Microdata.java │ ├── MotorolaMdos.java │ ├── NBI.java │ ├── Null.java │ ├── PFS.java │ ├── PanasonicKX.java │ ├── ProWrite.java │ ├── Reorder.java │ ├── Rockwell.java │ ├── SWTPCDOS68.java │ ├── Seawell.java │ ├── SmithCorona.java │ ├── Split.java │ ├── Suffixer.java │ ├── SuperSCRIPSIT.java │ ├── TandyCoCo.java │ ├── TandyPDD.java │ ├── Valdocs.java │ ├── VideoWRITER.java │ ├── WPS80.java │ ├── Wang.java │ ├── Xerox860.java │ └── XeroxMemoryWriter.java │ ├── help-csv.txt │ ├── help.txt │ ├── internal │ ├── CSVInterpreter.java │ ├── EbcdicUtil.java │ ├── FieldSpec.java │ ├── FileInterpreter.java │ ├── ImageDisk.java │ ├── OfficeSys6Util.java │ ├── RegSpec.java │ ├── SelectSpec.java │ ├── TrackReorger.java │ ├── UnsignedByte.java │ └── Version.java │ ├── transforms │ ├── .gitignore │ ├── aol │ ├── apple2_unk_1 │ ├── apple2_unk_2 │ ├── applewriter1 │ ├── applewriter_iie_rtf │ ├── atari_st │ ├── attwp │ ├── bank_street_writer_a2 │ ├── bank_street_writer_c64 │ ├── brother_120k_rtf │ ├── brother_240k_rtf │ ├── brother_pwp_rtf │ ├── brother_wpt2_rtf │ ├── brother_wpt_rtf │ ├── brown_bag_rtf │ ├── c64_rtf │ ├── c64_seq │ ├── c64_spinnaker_seq │ ├── canon_starwriter_rtf │ ├── cpt_rtf │ ├── ctos_archive │ ├── ctos_img │ ├── data20_c64 │ ├── datapoint │ ├── dec_rtf │ ├── dec_wps_rtf │ ├── decmate_wps_img │ ├── displaywrite4_rtf │ ├── displaywrite_rtf │ ├── displaywriter │ ├── dmk2raw_img │ ├── eaglewriter_rtf │ ├── easyscript-alt_c64_rtf │ ├── easyscript-dir_c64_rtf │ ├── easyscript_c64_rtf │ ├── easywriter-alt_pc_rtf │ ├── easywriter_a2_rtf │ ├── easywriter_ii_rtf │ ├── easywriter_pc_rtf │ ├── ebcdic │ ├── eightinch8x512_rtf │ ├── ensoniq_eft │ ├── epson_rtf │ ├── final_draft │ ├── first_word_rtf │ ├── fleet_atr │ ├── geowrite_pc │ ├── greatworks_rtf │ ├── hard1 │ ├── hp_64000_img │ ├── hp_instrument_img │ ├── ibm8_img │ ├── ibm_5520_rtf │ ├── ibm_office_system_6 │ ├── ibm_writing_assistant │ ├── ibm_writing_assistant_rtf │ ├── imd2raw_img │ ├── interdata │ ├── jpg_scrape │ ├── justwrite │ ├── justwrite2 │ ├── kermit │ ├── leading_edge_rtf │ ├── linolex_img │ ├── magi_img │ ├── manuscript │ ├── memowriter_mmo │ ├── memowriter_mss │ ├── microdata │ ├── motorola_mdos_img │ ├── mousewrite_a2 │ ├── multimate_rtf │ ├── multiscribe │ ├── nbi_rtf │ ├── null │ ├── null_rtf │ ├── officewriter │ ├── omniwriter_c64 │ ├── panasonic │ ├── paperclip_c64_rtf │ ├── peachtree1 │ ├── peachtree2_rtf │ ├── perfect_writer_rtf │ ├── personal_typing_system │ ├── petscii │ ├── pfswrite_a2 │ ├── pfswrite_gerbildoc3 │ ├── pfswrite_gerbildoc4 │ ├── professional_write │ ├── prowrite_rtf │ ├── prowriter_atr │ ├── qa_write │ ├── rockwell_img │ ├── scripsit_rtf │ ├── seawell_img │ ├── select_rtf │ ├── smith-corona │ ├── smith-corona_spin │ ├── speedscript_a2_rtf │ ├── speedscript_c64 │ ├── spellbinder_rtf │ ├── suffixer │ ├── super_text_ii │ ├── superscripsit_rtf │ ├── swtpc_dos68 │ ├── tandy100_rtf │ ├── tandy_coco │ ├── tandy_pdd │ ├── valdocs │ ├── valdocs_plain │ ├── videowriter │ ├── visiword │ ├── volkswriter │ ├── wang_dos_rtf │ ├── wang_ois │ ├── wang_wps_rtf │ ├── winworks_rtf │ ├── word_writer-alt │ ├── word_writer_4_c64 │ ├── word_writer_c64 │ ├── word_writer_pc_rtf │ ├── wordperfect_amiga_rtf │ ├── wordperfect_mac_rtf │ ├── wordperfect_pc_rtf │ ├── wordstar2000_rtf │ ├── wordstar_rtf │ ├── wordvision_rtf │ ├── works_1.0_mac_rtf │ ├── works_mac │ ├── wps80_rtf │ ├── writers_choice │ ├── xerox860 │ ├── xerox_6085 │ ├── xerox_memory_writer │ └── xywrite_rtf │ └── util │ ├── ConvertCatweaselDatastream.java │ ├── CreateLwpMacro.java │ ├── DOSImage.java │ ├── DeSkew.java │ ├── ExtractHardSectors.java │ ├── ExtractLinearFiles.java │ ├── ExtractZilogHardSectors.java │ ├── FixCPMFilenames.java │ └── RevealValdocsEntries.java ├── transform.bat ├── transform.sh ├── transformutil.bat └── transformutil.sh /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | .settings/ 3 | .classpath 4 | bin/ 5 | out/ 6 | **/.DS_Store 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Transformenator 2 | 3 | Transformenator is a tool (a set of tools, really) that makes it possible to do some very in-depth conversion of files from one "format" to another. It turns out that this is really, really useful when faced with files from ancient word processors, for example. They used all kinds of crazy binary annotations within a file (this is before the days of text markup, remember). With Transformenator, it's easy to swap out those binary annotations for HTML or RTF tags that all of a sudden make those ancient files readable again, maybe even with their original formatting and highlighting intact. Many samples come built into Transformenator that can make such file conversions easy. 4 | 5 | There are some other things Transformenator can do that are along these same lines - extracting individual files from a disk image of some very ancient computers, converting structured records in a file into Comma Separated Values (CSV) for use in a modern spreadsheet, and some other miscellaneous utilities to aid repetitive conversion of lots of related files. 6 | 7 | Learn more: https://github.com/RetroFloppy/transformenator/wiki 8 | -------------------------------------------------------------------------------- /build/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 79 | 80 | 81 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /build/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: org.transformenator.Transform -------------------------------------------------------------------------------- /doc/Design.md: -------------------------------------------------------------------------------- 1 | # Transformenator Architecture 2 | 3 | The transformenation of files needs to be able to support the following scenarios: 4 | 5 | 1. Computational reorganization of a file (i.e. de-indexing or file extraction from a disk image) 6 | 2. Simple text substitution (i.e. 0x0d -> 0x0d0a) of a file; resulting file name can be processed one of two ways: 7 | - Automatic file suffix addition based on transform file suffix (i.e. `transform_rtf` of `file.name` produces `file.name.rtf`) 8 | - No filename change, requiring a different destination directory (i.e. `transform_rtf` of `dir1/file.name` produces `dir2/file.name`) 9 | 10 | Invocation of a program to make these file transformenations should be this: 11 | ``` 12 | Transform transform_spec input output_directory [suffix] 13 | ``` 14 | The specified `output_directory` is created if it doesn't exist. 15 | If `input` is a file, then the `transform_spec` is applied to that file. If `input` is a directory, then `transform_spec` is applied to every file in that directory, and directories are scanned recursively for additional files to transform. This has the side-effect of creating a filesystem directory tree `output_directory` that mirrors `input`. 16 | The file `input` will be converted to `output_directory/input_file.txt` by default. Other special cases include: 17 | - If the transform has an `_rtf` suffix such as `tansform_spec_rtf`, then the new file name would be `output_directory/input_file.rtf`. 18 | - If the transform has an `_img` suffix such as `filesystem_img`, then all resulting files would not have any suffix applied by default. 19 | 20 | Alternatively, a suffix can be supplied as an optional parameter to specify a new suffix independent of what might otherwise have been applied. 21 | It can be specified to add no suffix at all by supplying two double quotes (i.e. `""`) as the optional suffix parameter. 22 | 23 | In the case where there is computational reorganization of the file done prior to output file creation, the name of the 24 | generated file may be completely changed. 25 | In the case where a file is a disk image or other compound file, computational reorganization would typically result in 26 | multiple output files of names unrelated to the original file. 27 | A file representing a disk image enveloping additional files will push the output one level deeper 28 | under `output_directory` into a new directory named similarly to the disk image file. -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # Transformenator introduction 2 | 3 | Transformenation is something that should be possible to do with some rudimentary shell scripting. You should be able to run a binary file through sed or awk and have byte sequences change to different byte sequences. 4 | 5 | But you can't. Maybe that's why you're here. Transformenator can help. 6 | 7 | It turns out that this is really, really useful when faced with files from ancient word processors, for example. They used all kinds of crazy binary annotations within a file (this is before the days of text markup, remember). With Transformenator, it's easy to swap out those binary annotations for HTML or RTF tags that all of a sudden make those ancient files readable again, maybe even with their original formatting and highlighting intact. Many samples come built into the Transformenator package that can make such file conversions easy. 8 | 9 | # Usage 10 | 11 | Invoke the transformenator Java jar file from any command line, ant script, or what have you. A set of rules (comprising a transform) are applied to the input file and written to the output file. You can use one of the included sample transforms, and you can write your own as simply as creating a text file. 12 | 13 | For example: 14 | ```java -jar transformenator.jar transform infile out_directory``` 15 | 16 | Where: 17 | - `transform` is the name of a file containing the set of transformations you want to make 18 | - `infile` is the original file or directory to act on 19 | - `out_directory` is the the directory location of the resulting file(s) after making all transforminations 20 | 21 | See https://github.com/RetroFloppy/transformenator/wiki for details. -------------------------------------------------------------------------------- /doc/Screenshot01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RetroFloppy/transformenator/edefcfdd3b6b959010e7d19ff497fd87b412f741/doc/Screenshot01.png -------------------------------------------------------------------------------- /doc/fix-git-receive-pack-not-permitted.txt: -------------------------------------------------------------------------------- 1 | context-menu > team > remote > configure push to upstream > change > User authentication. -------------------------------------------------------------------------------- /doc/xfmn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RetroFloppy/transformenator/edefcfdd3b6b959010e7d19ff497fd87b412f741/doc/xfmn.png -------------------------------------------------------------------------------- /src/org/transformenator/TransformUtility.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on binary files 3 | * Copyright (C) 2015 - 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator; 22 | 23 | import java.lang.reflect.InvocationTargetException; 24 | import java.lang.reflect.Method; 25 | 26 | import org.transformenator.internal.FileInterpreter; 27 | import org.transformenator.internal.Version; 28 | 29 | public class TransformUtility 30 | { 31 | 32 | public static void main(String[] args) 33 | { 34 | if (args.length > 0) 35 | { 36 | if (args[0].trim().toLowerCase().equals("describe")) 37 | help(true); 38 | else 39 | { 40 | try 41 | { 42 | Class utility = Class.forName("org.transformenator.util." + args[0]); 43 | Method main = utility.getMethod("main", String[].class); 44 | String[] newArgs = new String[args.length -1]; 45 | for (int i = 1; i < args.length; i++) 46 | newArgs[i-1] = args[i]; 47 | main.invoke(null, (Object) newArgs); // static method doesn't have an instance 48 | } 49 | catch (ClassNotFoundException e1) 50 | { 51 | e1.printStackTrace(); 52 | } 53 | catch (NoSuchMethodException e2) 54 | { 55 | e2.printStackTrace(); 56 | } 57 | catch (SecurityException e3) 58 | { 59 | e3.printStackTrace(); 60 | } 61 | catch (IllegalAccessException e4) 62 | { 63 | e4.printStackTrace(); 64 | } 65 | catch (IllegalArgumentException e5) 66 | { 67 | e5.printStackTrace(); 68 | } 69 | catch (InvocationTargetException e6) 70 | { 71 | e6.printStackTrace(); 72 | } 73 | } 74 | } 75 | else 76 | { 77 | help(false); 78 | } 79 | } 80 | 81 | public static void help(boolean describe) 82 | { 83 | System.err.println(); 84 | System.err.println("TransformUtility " + Version.VersionString + " - perform transformation utility functions."); 85 | System.err.println(); 86 | System.err.println("Usage: TransformUtility function parameter [parameter...]"); 87 | System.err.println(" TransformUtility describe"); 88 | System.err.println(); 89 | System.err.println(" For more details, see:"); 90 | System.err.println(" https://github.com/RetroFloppy/transformenator/wiki/Utility-Functions"); 91 | System.err.println(); 92 | FileInterpreter.listUtilities(describe); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/ADetangler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | /* 22 | * Abstract class for detangler types. Descendants of this class need to 23 | * take in a byte[] and call back to emitFile() with a byte[] after having 24 | * done whatever detangling work is necessary on it. They can optionally 25 | * return a new file name, potentially derived from the contents of the 26 | * incoming data. 27 | */ 28 | package org.transformenator.detanglers; 29 | 30 | import org.transformenator.internal.FileInterpreter; 31 | 32 | public abstract class ADetangler 33 | { 34 | /* 35 | * Given a byte stream, do whatever work is necessary to "flatten" or 36 | * detangle the file. This may include creating multiple files (in 37 | * the case of a disk image containing zero or more) or discovering 38 | * a new file name that should be used instead of the original name. 39 | * 40 | * A detangler will call parent.emitFile() once for each file to be created, 41 | * supplying the file data, passing through the base output directory, 42 | * optionally a new directory one level deeper to house it, and the final 43 | * file name. 44 | */ 45 | public abstract void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean debugMode); 46 | } 47 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Brother120k.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2015 - 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import org.transformenator.internal.FileInterpreter; 24 | import org.transformenator.internal.UnsignedByte; 25 | 26 | public class Brother120k extends ADetangler 27 | { 28 | 29 | public void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 30 | { 31 | // Brother disks came in 120k and 240k sizes. Inspect the image size; we only 32 | // want to work on the 120k ones. 33 | // System.out.println("inData.length: "+inData.length); 34 | if (inData.length == 119808) 35 | { 36 | // First 0x800 bytes is the directory 37 | for (int i = 0; i < 0x800; i += 0x10) 38 | { 39 | byte[] fileNameBytes = {inData[i],inData[i+1],inData[i+2],inData[i+3],inData[i+4],inData[i+5],inData[i+6],inData[i+7]}; 40 | String fileName = new String(fileNameBytes).trim(); 41 | if ((inData[i]) != (byte)0xf0) 42 | { 43 | if (inData[i+8] != 0x01) 44 | { 45 | // System.out.print("Found file: "+fileName); 46 | int startSector = UnsignedByte.intValue(inData[i+0x0a], inData[i+0x09]); 47 | // System.out.print(" Start sector: 0x"+Integer.toHexString(startSector)); 48 | int lengthSector = UnsignedByte.intValue(inData[i+0x0b]); 49 | // System.out.println(" Length in sectors: 0x"+Integer.toHexString(lengthSector)); 50 | byte[] tempFile = new byte[lengthSector * 256]; 51 | System.arraycopy(inData, startSector*256, tempFile, 0, lengthSector * 256); 52 | // Remove the (last) file suffix, if one exists, from the image file name before sending to emitFile() 53 | parent.emitFile(tempFile, outDirectory, inFile.substring(0,(inFile.lastIndexOf('.')>0?inFile.lastIndexOf('.'):inFile.length())), fileName + fileSuffix); 54 | } 55 | // else 56 | // System.out.println("Found deleted file: "+fileName); 57 | } 58 | // First byte of 0xf0 = empty directory entry 59 | } 60 | } 61 | else 62 | parent.emitFile(inData, outDirectory, "", inFile + fileSuffix); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/EasyWriterII.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files Copyright (C) 3 | * 2019 by David Schmidt 32302105+RetroFloppySupport@users.noreply.github.com 4 | * 5 | * This program is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU General Public License as published by the Free Software 7 | * Foundation; either version 2 of the License, or (at your option) any later 8 | * version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 | * details. 14 | * 15 | * You should have received a copy of the GNU General Public License along with 16 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 17 | * Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | package org.transformenator.detanglers; 21 | 22 | import org.transformenator.internal.FileInterpreter; 23 | import org.transformenator.internal.UnsignedByte; 24 | 25 | import java.io.ByteArrayOutputStream; 26 | import java.io.IOException; 27 | 28 | public class EasyWriterII extends ADetangler 29 | { 30 | /* 31 | * EasyWriter II word processor by Information Unlimited Software (IUS) 32 | * 33 | * A single file is really a "folder" of child files - there's a "directory" 34 | * of file names, and the content is in 0x200 byte "sectors" within that file, 35 | * all indexed with a file identifier in the sector header. The file identifier 36 | * is actually that file's position in the directory. It's very much 37 | * like a disk image in and of itself: it's a little filesystem buried within 38 | * the file. 39 | */ 40 | public void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 41 | { 42 | /* Pull the files out of the image. */ 43 | int fileNum = 0; 44 | String fileName = ""; 45 | fileName = ""; 46 | for (int k = 6; k < 36; k++) 47 | fileName += (char) inData[k]; 48 | if (fileName.trim().length() > 0) 49 | System.out.println("Folder description: "+fileName.trim()); 50 | for (int i = 0x400; i < 0x1800; i += 0x200) 51 | { 52 | // 50 bytes per entry; only room for 1/2 entry in the last position of a sector 53 | for (int j = 0; j < 0x1c3; j += 50) 54 | { 55 | fileName = ""; 56 | for (int k = 0; k < 30; k++) 57 | fileName += (char) inData[i + j + k]; 58 | if (fileName.trim().length() > 0) 59 | { 60 | ByteArrayOutputStream out = new ByteArrayOutputStream(); 61 | // System.err.print("Found file name: [" + fileName + "] 0x" + Integer.toHexString(i) + " "); 62 | // for (int k = 30; k < 50; k++) System.err.print(UnsignedByte.toString(inData[i + j + k])); 63 | // System.err.println(); 64 | // System.err.println("Adding file num: " + fileNum); 65 | for (int b = 0; b < inData.length; b += 0x200) 66 | { 67 | /* 0x01 in the zeroeth byte of a "sector" signifies a data sector; the file identifier is the 4th byte */ 68 | if ((inData[b] == 0x01) && (inData[b + 9] == 0x00) && (UnsignedByte.intValue(inData[b + 4]) == fileNum)) 69 | { 70 | try 71 | { 72 | out.write(inData, (b + 10), (512 - 10)); 73 | } 74 | catch (Throwable t) 75 | { 76 | System.err.println(t); 77 | } 78 | } 79 | } 80 | try 81 | { 82 | out.flush(); 83 | } 84 | catch (IOException e) 85 | { 86 | // TODO Auto-generated catch block 87 | e.printStackTrace(); 88 | } 89 | parent.emitFile(out.toByteArray(), outDirectory, inFile, fileName.trim()+fileSuffix); 90 | } 91 | fileNum++; 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Imd2Raw.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on binary files 3 | * Copyright (C) 2022 - 2023 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import org.transformenator.internal.FileInterpreter; 24 | import org.transformenator.internal.ImageDisk; 25 | 26 | /* 27 | * Convert Dave Dunfield's IMD format to raw binary data; the majority of the work 28 | * happens in the org.transformenator.internal.ImageDisk class. Output matches the 29 | * original IMDU /b command output. 30 | * 31 | */ 32 | public class Imd2Raw extends ADetangler 33 | { 34 | public void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean debugMode) 35 | { 36 | String fileName = inFile.substring(0,(inFile.lastIndexOf('.')>0?inFile.lastIndexOf('.'):inFile.length())); 37 | if (fileSuffix.equals("")) 38 | fileName += ".img"; 39 | else 40 | fileName += fileSuffix; 41 | if (inData != null) 42 | { 43 | // Ready to go. Time to face the music. 44 | byte[] outData = null; 45 | outData = ImageDisk.imd2raw(inData); 46 | if (outData != null) 47 | { 48 | parent.emitFile(outData, outDirectory, "", fileName); 49 | } 50 | else 51 | { 52 | System.err.println("File does not appear to be in ImageDisk format."); 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/JPGScrape.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import java.util.Arrays; 24 | 25 | import org.transformenator.internal.FileInterpreter; 26 | 27 | public class JPGScrape extends ADetangler 28 | { 29 | 30 | @Override 31 | public void detangle(FileInterpreter parent, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 32 | { 33 | String suffix = ".jpg"; 34 | if (fileSuffix.equals("")) 35 | suffix = "."+fileSuffix; 36 | System.out.println("Scanning for image file headers..."); 37 | // FF D8 FF E0 00 10 4A 46 49 46 38 | byte jfifheader[] = 39 | { 0x4a, 0x46, 0x49, 0x46 }; // JFIF header 40 | // FF D8 FF E1 12 6D 45 78 69 66 41 | byte exifheader[] = 42 | { 0x45, 0x78, 0x69, 0x66 }; // Exif header 43 | 44 | int begin = 0, end = 0; 45 | int filenum = 1; 46 | for (int i = 0; i < inData.length - jfifheader.length; i++) 47 | { 48 | byte range1[] = Arrays.copyOfRange(inData, i, i + jfifheader.length); 49 | byte range2[] = Arrays.copyOfRange(inData, i, i + exifheader.length); 50 | if (Arrays.equals(range1, jfifheader) || Arrays.equals(range2, exifheader)) // Is the JPG eyecatcher in the disk image? 51 | { 52 | System.out.println("DEBUG: Found JFIF header at offset 0x" + Integer.toHexString(i-6)); 53 | if (begin == 0) 54 | begin = i-6; 55 | else 56 | end = i-6; 57 | if (begin > 0 && end > 0) 58 | { 59 | byte[] out = new byte[end - begin]; 60 | System.arraycopy(inData, begin, out, 0, end - begin); 61 | parent.emitFile(out, outDirectory, 62 | inFile.substring(0, (inFile.lastIndexOf('.') > 0 ? inFile.lastIndexOf('.') : inFile.length())), 63 | "" + filenum++ + suffix); 64 | System.out.println( 65 | "DEBUG: Write JFIF file from 0x" + Integer.toHexString(begin) + " to 0x" + Integer.toHexString(end)); 66 | } 67 | end = 0; 68 | begin = i-6; 69 | } 70 | } 71 | if (begin > 0) 72 | { 73 | byte[] out = new byte[inData.length - begin]; 74 | System.arraycopy(inData, begin, out, 0, inData.length - begin); 75 | System.out.println("DEBUG: Write JFIF file from 0x" + Integer.toHexString(begin) + " to 0x" 76 | + Integer.toHexString(inData.length)); 77 | parent.emitFile(out, outDirectory, 78 | inFile.substring(0, (inFile.lastIndexOf('.') > 0 ? inFile.lastIndexOf('.') : inFile.length())), 79 | "" + filenum++ + suffix); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Kermit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files Copyright (C) 3 | * 2019 by David Schmidt 32302105+RetroFloppySupport@users.noreply.github.com 4 | * 5 | * This program is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU General Public License as published by the Free Software 7 | * Foundation; either version 2 of the License, or (at your option) any later 8 | * version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 | * details. 14 | * 15 | * You should have received a copy of the GNU General Public License along with 16 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 17 | * Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | package org.transformenator.detanglers; 21 | 22 | import java.io.ByteArrayOutputStream; 23 | import java.io.IOException; 24 | import java.util.Arrays; 25 | import org.transformenator.internal.FileInterpreter; 26 | import org.transformenator.internal.UnsignedByte; 27 | 28 | public class Kermit 29 | { 30 | public void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 31 | { 32 | /* 33 | * Ostensibly a "Kermit" filesystem - maybe it's a tar-like archive. 34 | * Disk is 2-sided, 10x256 for the first track, then 18x256 for the rest. 35 | */ 36 | ByteArrayOutputStream out = null; 37 | 38 | for (int n = 0; n < 6; n++) 39 | { 40 | for (int i = 0x0400 + (0x100 * n); i < 0x4e1 + (0x100 * n); i += 0x1f) 41 | { 42 | String filename = ""; 43 | int j; 44 | for (j = 0x04; j <= 0x18; j++) 45 | { 46 | filename += (char) inData[j + i]; 47 | } 48 | filename = filename.trim(); 49 | if (filename.length() > 0) 50 | { 51 | byte fnb[]; 52 | int msb = UnsignedByte.intValue(inData[i + 0x1a]); 53 | int lsb = UnsignedByte.intValue(inData[i + 0x1b]); 54 | int startAddress = ((msb * 0x24 + lsb) * 256) - 4352; 55 | msb = UnsignedByte.intValue(inData[i + 0x1c]); 56 | lsb = UnsignedByte.intValue(inData[i + 0x1d]); 57 | int endAddress = ((msb * 0x24 + lsb) * 256) - 4352; 58 | try 59 | { 60 | out = new ByteArrayOutputStream(); 61 | fnb = Arrays.copyOfRange(inData, startAddress + 8, endAddress); 62 | out.write(fnb); 63 | out.flush(); 64 | // Remove the (last) file suffix, if one exists, from 65 | // the 66 | // image file name before sending to emitFile() 67 | parent.emitFile(out.toByteArray(), outDirectory, inFile.substring(0, (inFile.lastIndexOf('.') > 0 ? inFile.lastIndexOf('.') : inFile.length())), filename); 68 | } 69 | catch (IOException io) 70 | { 71 | io.printStackTrace(); 72 | } 73 | } 74 | } 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/LeadingEdge.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import org.transformenator.internal.FileInterpreter; 24 | import org.transformenator.internal.UnsignedByte; 25 | 26 | public class LeadingEdge extends ADetangler 27 | { 28 | 29 | @Override 30 | public void detangle(FileInterpreter interpreter, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 31 | { 32 | /* 33 | * Pick apart the file hunk indices. Hunk indices start at 0x1200. 34 | * 35 | * Each index is a pointer to a hunk at 512 bytes * the index number in the 36 | * file. 37 | */ 38 | byte[] newBuf = new byte[inData.length]; 39 | int newBufCursor = 0; 40 | boolean found9Yet = false; 41 | for (int indexIndex = 0x400; indexIndex < 0x500; indexIndex += 2) 42 | { 43 | int indexStart = UnsignedByte.intValue(inData[indexIndex], inData[indexIndex + 1]); 44 | // System.err.println("DEBUG: Index start value: 0x"+Integer.toHexString(indexStart)+" at indexIndex: 0x"+Integer.toHexString(indexIndex)); 45 | if ((indexStart >= 65520) || (indexStart < 9)) 46 | continue; 47 | if (indexStart == 9) 48 | found9Yet = true; 49 | if (!found9Yet) 50 | continue; 51 | indexStart *= 512; 52 | // System.err.println("DEBUG: Found index table 0x"+UnsignedByte.toString(inData[indexIndex+1])+UnsignedByte.toString(inData[indexIndex])+", pointing to table at 0x"+Integer.toHexString(indexStart)); 53 | for (int i = indexStart; i < indexStart + 256; i += 2) 54 | { 55 | int block = UnsignedByte.intValue(inData[i], inData[i + 1]); 56 | int index = block * 512; 57 | // System.err.println("DEBUG: block: 0x"+UnsignedByte.toString(inData[i+1])+UnsignedByte.toString(inData[i]) +" at file offset: 0x"+UnsignedByte.toString(UnsignedByte.hiByte(index))+UnsignedByte.toString(UnsignedByte.loByte(index))); 58 | if (block == 0) 59 | break; 60 | if (block < 32768) 61 | { 62 | if (index + 1 < inData.length) 63 | { 64 | int j; 65 | // Find out where the block really ends - remove trailing zeroes 66 | for (j = index + 511; j >= index; j--) 67 | if (inData[j] != 0x00) 68 | break; 69 | // System.err.println("DEBUG: Found end of chunk at "+j+", or length 70 | // "+(j-index)+"."); 71 | // Pull out the data in the chunk 72 | for (int k = 0; k < (j - index + 1); k++) 73 | { 74 | newBuf[newBufCursor++] = inData[index + k]; 75 | } 76 | } 77 | else 78 | System.err.println("Found an index out of bounds: " + block); 79 | } 80 | } 81 | } 82 | inData = new byte[newBufCursor]; 83 | for (int i = 0; i < newBufCursor; i++) 84 | inData[i] = newBuf[i]; 85 | // System.err.println("DEBUG: Data length after de-indexing: "+inData.length); 86 | interpreter.emitFile(inData, outDirectory, "", inFile + fileSuffix); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Linolex.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2023 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | /* 22 | * Pull the files off of the virtual file system of a Seawell 8" disk image. 23 | * 24 | * Disk geometry: 2 sides, 256 bytes per sector, 26 sectors per track, 76 tracks. 25 | * 26 | */ 27 | package org.transformenator.detanglers; 28 | 29 | import java.io.ByteArrayOutputStream; 30 | import java.io.IOException; 31 | 32 | import org.transformenator.internal.FileInterpreter; 33 | import org.transformenator.internal.UnsignedByte; 34 | 35 | public class Linolex extends ADetangler 36 | { 37 | public void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 38 | { 39 | /* 40 | * Catalog starts on the 0th track and runs for 20 entries 41 | * 42 | * Catalog entries are 64 (0x40) bytes long: 43 | * bytes 0x00-0x01: Numeric ("01", "02", etc.) 44 | * bytes 0x02-0x03: Starting sector 45 | * bytes 0x04-0x05: Ending sector 46 | * bytes 0x06: 0x00 47 | * bytes 0x07-0x3f: Filename 48 | * 49 | */ 50 | for (int i = 0x80; i < 0x800; i += 0x40) 51 | { 52 | String filename = ""; 53 | if (((UnsignedByte.intValue(inData[i + 0x02])) + UnsignedByte.intValue(inData[i + 0x03])) > 0) 54 | { 55 | filename = filename + (char)inData[i + 0] + (char)inData[i + 1] + " "; 56 | for (int j = 0x00; j < 0x39; j++) 57 | { 58 | char proposedChar = (char)inData[j + i + 0x07]; 59 | // Correct for special characters in filenames 60 | switch (proposedChar) 61 | { 62 | case '\\': 63 | proposedChar = '-'; 64 | break; 65 | case '/': 66 | proposedChar = '_'; 67 | break; 68 | case '*': 69 | proposedChar = '_'; 70 | break; 71 | case '"': 72 | proposedChar = '_'; 73 | break; 74 | default: 75 | break; 76 | } 77 | filename += proposedChar; 78 | } 79 | filename = filename.trim() + fileSuffix; 80 | int startSector = UnsignedByte.intValue(inData[i + 0x02]) * 256 + UnsignedByte.intValue(inData[i + 0x03]); 81 | int endSector = UnsignedByte.intValue(inData[i + 0x04]) * 256 + UnsignedByte.intValue(inData[i + 0x05]); 82 | System.out.println("Found file: "+filename + " Start offset: 0x"+Integer.toHexString(startSector * 0x80)+ " End offset: 0x"+Integer.toHexString(endSector * 0x80)); 83 | ByteArrayOutputStream out; 84 | out = new ByteArrayOutputStream(); 85 | out.write(inData, startSector * 0x80, (endSector - startSector + 1)*0x80); 86 | try 87 | { 88 | out.flush(); 89 | } 90 | catch (IOException e) 91 | { 92 | // TODO Auto-generated catch block 93 | e.printStackTrace(); 94 | } 95 | parent.emitFile(out.toByteArray(), outDirectory, inFile.substring(0,(inFile.lastIndexOf('.')>0?inFile.lastIndexOf('.'):inFile.length())), filename); 96 | } 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Magi.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files Copyright (C) 2018 by David Schmidt 3 | * 32302105+RetroFloppySupport@users.noreply.github.com 4 | * 5 | * This program is free software; you can redistribute it and/or modify it under the terms of the 6 | * GNU General Public License as published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 10 | * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with this program; if 14 | * not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 15 | * 02111-1307 USA 16 | */ 17 | 18 | package org.transformenator.detanglers; 19 | 20 | import java.io.ByteArrayOutputStream; 21 | import java.io.IOException; 22 | import java.util.Arrays; 23 | import org.transformenator.internal.FileInterpreter; 24 | import org.transformenator.internal.UnsignedByte; 25 | 26 | public class Magi extends ADetangler 27 | { 28 | public void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 29 | { 30 | /* 31 | * Catalog resides on the first track only. 32 | * 33 | * Catalog entries are 16 (0x10) bytes long: bytes 0x00-0x01: File length (in 34 | * 128 byte sectors) bytes 0x02-0x03: Starting sector (MSB * track + LSB * 35 | * sector) byte 0x04: 0x81 - system file; 0x01 - regular file bytes 0x05-0x0c: 36 | * Filename bytes 0x0d-0x0f: File suffix File suffix of "KIL" likely means 37 | * deleted file 38 | * 39 | */ 40 | ByteArrayOutputStream out = null; 41 | 42 | for (int i = 0x20; i < 0xd00; i += 0x10) 43 | { 44 | String filename = ""; 45 | String suffix = ""; 46 | if (inData[i + 04] == 0x01) 47 | { 48 | int j; 49 | for (j = 0x05; j <= 0x0c; j++) 50 | { 51 | filename += (char) inData[j + i]; 52 | } 53 | filename = filename.trim(); 54 | for (j = 0x0d; j <= 0x0f; j++) 55 | { 56 | suffix += (char) inData[j + i]; 57 | } 58 | if (!suffix.equals("KIL")) 59 | { 60 | byte fnb[]; 61 | filename = filename + "." + suffix; 62 | int startAddress = (UnsignedByte.intValue(inData[i + 2]) - 1) * 128 63 | + (UnsignedByte.intValue(inData[i + 3]) * 128 * 26); 64 | int length = UnsignedByte.intValue(inData[i], inData[i + 1]); 65 | try 66 | { 67 | out = new ByteArrayOutputStream(); 68 | fnb = Arrays.copyOfRange(inData, startAddress, startAddress + length * 128); 69 | out.write(fnb); 70 | out.flush(); 71 | // Remove the (last) file suffix, if one exists, from the image file name before sending to emitFile() 72 | parent.emitFile(out.toByteArray(), outDirectory, inFile.substring(0,(inFile.lastIndexOf('.')>0?inFile.lastIndexOf('.'):inFile.length())), filename); 73 | } 74 | catch (IOException io) 75 | { 76 | io.printStackTrace(); 77 | } 78 | } 79 | } 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Microdata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2021 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | /* 22 | * Pull the files off of the virtual file system of a Microdata 8" disk image. 23 | * 24 | * Disk geometry: FM, 1 side, 256 bytes per sector, 16 sectors per track, 77 tracks. 25 | * 26 | */ 27 | package org.transformenator.detanglers; 28 | 29 | import java.io.ByteArrayOutputStream; 30 | 31 | import org.transformenator.internal.FileInterpreter; 32 | import org.transformenator.internal.UnsignedByte; 33 | 34 | public class Microdata extends ADetangler 35 | { 36 | public void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 37 | { 38 | /* 39 | * Catalog starts 2 tracks in; first sector is informational, actual 40 | * entries start at sector 33 41 | * 42 | * Catalog entries are 24 (0x18) bytes long. 43 | * bytes 0x00-0x0c: Filename (space padded, generally) 44 | * bytes 0x0d-0x0e: track, sector of first sector 45 | * byte 0x0f: file length in sectors 46 | */ 47 | for (int i = 0x2108; i < inData.length; i += 0x18) 48 | { 49 | int startAddr = 0; 50 | String filename = ""; 51 | if (UnsignedByte.intValue(inData[i]) != 0xe5) 52 | { 53 | int j; 54 | for (j = 0; j < 13; j++) 55 | { 56 | filename += (char) inData[j + i]; 57 | } 58 | filename = filename.trim(); 59 | startAddr = UnsignedByte.intValue(inData[i+13])*0x1000 + UnsignedByte.intValue(inData[i+14]) * 0x100; 60 | // System.out.println("Found file: "+filename+" at 0x"+Integer.toHexString(startAddr)+" for 0x"+Integer.toHexString(UnsignedByte.intValue(inData[i+15]))+" sectors"); 61 | ByteArrayOutputStream out; 62 | out = new ByteArrayOutputStream(); 63 | followFile(out, startAddr, inData); 64 | parent.emitFile(out.toByteArray(), outDirectory, inFile.substring(0,(inFile.lastIndexOf('.')>0?inFile.lastIndexOf('.'):inFile.length())), filename+fileSuffix); 65 | } 66 | else 67 | break; 68 | } 69 | } 70 | 71 | void followFile(ByteArrayOutputStream out, int startAddr, byte[] inData) 72 | { 73 | // System.out.println(" Writing sector from 0x"+Integer.toHexString(startAddr)); 74 | out.write(inData, startAddr+2, 254); 75 | startAddr = UnsignedByte.intValue(inData[startAddr])*0x1000 + UnsignedByte.intValue(inData[startAddr+1]) * 0x100; 76 | if ((startAddr > 0) && (startAddr < inData.length)) 77 | followFile(out, startAddr, inData); 78 | //else 79 | //System.out.println(" End of file marker: 0x"+Integer.toHexString(startAddr)); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Null.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import org.transformenator.internal.FileInterpreter; 24 | 25 | /* 26 | * Null detangler - i.e. do nothing to the input; just send it back out as-is. 27 | */ 28 | public class Null extends ADetangler 29 | { 30 | @Override 31 | public void detangle(FileInterpreter interpreter, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 32 | { 33 | interpreter.emitFile(inData, outDirectory, "", inFile + fileSuffix); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/PFS.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2016 - 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import java.io.ByteArrayOutputStream; 24 | import java.io.IOException; 25 | 26 | import org.transformenator.internal.FileInterpreter; 27 | import org.transformenator.internal.UnsignedByte; 28 | 29 | public class PFS extends ADetangler 30 | { 31 | public void detangle(FileInterpreter parent, byte skewed[], String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 32 | { 33 | byte[] inData = new byte[skewed.length]; 34 | int skew[] = {0,14,13,12,11,10,9,8,7,6,5,4,3,2,1,15}; 35 | // De-skew the disk image in memory 36 | for (int i = 0; i < skewed.length / 4096; i++) 37 | { 38 | for (int j = 0; j < 16; j++) 39 | { 40 | System.arraycopy( skewed, (j*256)+i*4096, inData, (skew[j]*256)+i*4096, 256 ); 41 | } 42 | } 43 | /* Now pull the files out of the image. */ 44 | for (int i = 0x2e; i < 0x1ff; i += 18) 45 | { 46 | /* 47 | * Directory sector 48 | */ 49 | if ((inData[i] != 0x00) && (UnsignedByte.intValue(inData[i]) < 16)) 50 | { 51 | // System.err.println("DEBUG: found file name length: " + inData[i]); 52 | String filename = ""; 53 | // Build the filename 54 | for (int j = 1; j < UnsignedByte.intValue(inData[i]) + 1; j++) 55 | { 56 | filename += (char) inData[i + j]; 57 | } 58 | // Find file's starting "block" 59 | int fileStart = ((UnsignedByte.intValue(inData[i + 17]) * 256) + UnsignedByte.intValue(inData[i + 16])) * 512; 60 | // System.err.println("DEBUG: found file: " + filename + " Starting at offset: 0x"+Integer.toHexString(fileStart)); 61 | ByteArrayOutputStream out; 62 | try 63 | { 64 | out = new ByteArrayOutputStream(); 65 | int j, block; 66 | // Run through the sector map, skipping the first couple of blocks 67 | for (j = fileStart+4; j < fileStart+512; j += 2 ) 68 | { 69 | block = (UnsignedByte.intValue(inData[j+1])*256)+UnsignedByte.intValue(inData[j]); 70 | if (block <= 0) 71 | break; 72 | // System.err.println("Exporting block: 0x"+Integer.toHexString(block)); 73 | out.write(inData, block*512, 512); 74 | } 75 | out.flush(); 76 | parent.emitFile(out.toByteArray(), outDirectory, inFile.substring(0,(inFile.lastIndexOf('.')>0?inFile.lastIndexOf('.'):inFile.length())), filename); 77 | } 78 | catch (IOException e) 79 | { 80 | e.printStackTrace(); 81 | } 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/ProWrite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import java.util.Arrays; 24 | 25 | import org.transformenator.internal.FileInterpreter; 26 | import org.transformenator.internal.UnsignedByte; 27 | 28 | public class ProWrite extends ADetangler 29 | { 30 | @Override 31 | public void detangle(FileInterpreter interpreter, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 32 | { 33 | byte[] newBuf = new byte[inData.length]; 34 | byte textEyecatcher[] = { 0x54, 0x45, 0x58, 0x54 }; // "TEXT" 35 | byte paraEyecatcher[] = { 0x50, 0x41, 0x52, 0x41 }; // "PARA" 36 | byte formEyecatcher[] = { 0x46, 0x4f, 0x52, 0x4d }; // "FORM" 37 | int length, newBufCursor = 0; 38 | if (Arrays.equals(Arrays.copyOfRange(inData, 0, 4), formEyecatcher)) 39 | { 40 | for (int i = 0; i < inData.length; i ++) 41 | { 42 | if (inData.length - i > 8) 43 | { 44 | byte range[] = Arrays.copyOfRange(inData, i, i+0x04); 45 | length = UnsignedByte.intValue(inData[i+7]) + 256*(UnsignedByte.intValue(inData[i+6])); 46 | if (Arrays.equals(range, textEyecatcher)) 47 | { 48 | // System.err.println("Found text segment @ $"+Integer.toHexString(i)+" for length "+length); 49 | if (length > 0) 50 | { 51 | for (int k = 0; k < length; k++) 52 | { 53 | newBuf[newBufCursor++] = inData[i + 8 + k]; 54 | } 55 | i += length; // Move past this text segment 56 | // System.err.println("cursor after text: "+newBufCursor); 57 | } 58 | newBuf[newBufCursor++] = 0x0d; 59 | newBuf[newBufCursor++] = 0x0a; 60 | // System.err.println("cursor after newl: "+newBufCursor); 61 | } 62 | else if (Arrays.equals(range, paraEyecatcher)) 63 | { 64 | // System.err.println("Found para segment @ $"+Integer.toHexString(i)+" for length "+length); 65 | } 66 | } 67 | } 68 | inData = new byte[newBufCursor]; 69 | for (int i = 0; i < newBufCursor; i++) 70 | inData[i] = newBuf[i]; 71 | interpreter.emitFile(inData, outDirectory, "", inFile + fileSuffix); 72 | } 73 | else 74 | System.err.println("Not a ProWrite file."); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Reorder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import org.transformenator.internal.FileInterpreter; 24 | import org.transformenator.internal.TrackReorger; 25 | 26 | /* 27 | * Reorder detangler - Swap sectors around (i.e. de-skew). 28 | */ 29 | public class Reorder extends ADetangler 30 | { 31 | @Override 32 | public void detangle(FileInterpreter interpreter, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 33 | { 34 | int skewedSectorMap[] = { 0,2,4,6,8,10,12,14,16,18,20,22,24,1,3,5,7,9,11,13,15,17,19,21,23,25 }; 35 | //int skewedSectorMap[] = { 3,5,7,9,11,13,15,17,19,21,23,25,0,2,4,6,8,10,12,14,16,18,20,22,24,1 }; 36 | byte[] outData = TrackReorger.reorg(inData, skewedSectorMap, 128); 37 | interpreter.emitFile(outData, outDirectory, "", inFile + fileSuffix); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Rockwell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2024 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | /* 22 | * Pull the files off of the virtual file system of a Rockwell AIM-65 disk image. 23 | * 24 | * Disk geometry: 1 side, 128 bytes per sector, 18 sectors per track, 35 tracks. 25 | * FM encoded, approx. 80k per disk. Multiple variants may exist. 26 | * 27 | */ 28 | package org.transformenator.detanglers; 29 | 30 | import java.io.ByteArrayOutputStream; 31 | 32 | import org.transformenator.internal.FileInterpreter; 33 | import org.transformenator.internal.UnsignedByte; 34 | 35 | public class Rockwell extends ADetangler 36 | { 37 | public void detangle(FileInterpreter parent, byte inData[], String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 38 | { 39 | /* 40 | * Catalog starts on the 0th track - no idea how far it can stretch, so be 41 | * conservative about what we identify as a valid file entry 42 | * 43 | * Catalog entries are 10 (0x0a) bytes long: 44 | * byte 0x00 is some sort of indicator (typically 0x01) 45 | * bytes 0x01-0x06: Filename (0x20 padded) 46 | * byte 0x07: offset to the next file's start sector (two decimal digits represented as hex) 47 | * bytes 0x08-0x09: unknown 48 | * 49 | */ 50 | int startSector = 0x05; 51 | for (int i = 0x00; i < 0x280; i += 0x0a) 52 | { 53 | String filename = ""; 54 | // Binary coded decimal, I guess... offset to next file in sectors 55 | int lengthSectors = UnsignedByte.hiNibble(inData[i+7]) * 10 + UnsignedByte.loNibble(inData[i+7]); 56 | if ((inData[i] == 0x01) || (inData[i] == 0x02)) 57 | { 58 | int j; 59 | for (j = 0; j < 6; j++) 60 | { 61 | filename += (char) inData[j + i + 1]; 62 | } 63 | filename = filename.trim(); 64 | // Initial byte of 0x02 may indicate duplicate filename (may also indicate deleted, we don't know yet) 65 | if (inData[i] == 0x02) 66 | { 67 | filename += "(1)"; 68 | } 69 | // System.out.println("Found file: "+filename+ " for length "+lengthSectors); 70 | ByteArrayOutputStream out; 71 | // Copy data from first sector chain 72 | out = new ByteArrayOutputStream(); 73 | // Dump out the file 74 | out.write(inData,startSector * 0x80, lengthSectors * 0x80); 75 | parent.emitFile(out.toByteArray(), outDirectory, inFile.substring(0,(inFile.lastIndexOf('.')>0?inFile.lastIndexOf('.'):inFile.length())), filename); 76 | } 77 | startSector += lengthSectors; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Split.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2024 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import java.io.ByteArrayOutputStream; 24 | import java.io.IOException; 25 | 26 | import org.transformenator.internal.FileInterpreter; 27 | 28 | /* 29 | * Split - separate a file into bite-sized chunks 30 | */ 31 | 32 | public class Split extends ADetangler 33 | { 34 | int CHUNK_SIZE = 512; // Really need to somehow parameterize this 35 | @Override 36 | public void detangle(FileInterpreter interpreter, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 37 | { 38 | ByteArrayOutputStream out = null; 39 | out = new ByteArrayOutputStream(); 40 | int remaining; 41 | int i; 42 | for (i = 0; i <= inData.length; i+=CHUNK_SIZE) 43 | { 44 | remaining = inData.length - i; 45 | if (remaining >= CHUNK_SIZE) 46 | remaining = CHUNK_SIZE; 47 | // System.out.println("total="+inData.length+" i "+i+" remaining="+remaining); 48 | try 49 | { 50 | out.write(("\n[]\n[Sector boundary]\n[]\n").getBytes()); 51 | out.write(inData, i, remaining); 52 | } 53 | catch (IOException e) 54 | { 55 | // TODO Auto-generated catch block 56 | e.printStackTrace(); 57 | } 58 | } 59 | interpreter.emitFile(out.toByteArray(), outDirectory, "", inFile + fileSuffix); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/SuperSCRIPSIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2019 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import java.io.ByteArrayOutputStream; 24 | 25 | import org.transformenator.internal.FileInterpreter; 26 | import org.transformenator.internal.UnsignedByte; 27 | 28 | /* 29 | * SuperSCRIPTSIT file interpreter 30 | * 31 | * Info from http://www.trs-80.com/wordpress/zaps-patches-pokes-tips/superscripsit-document-files/ 32 | * 33 | */ 34 | 35 | public class SuperSCRIPSIT extends ADetangler 36 | { 37 | public void detangle(FileInterpreter parent, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 38 | { 39 | if (UnsignedByte.intValue(inData[0]) == 0xe0) 40 | { 41 | // System.err.println("DEBUG: Found a SuperSCRIPSIT file."); 42 | ByteArrayOutputStream out = null; 43 | out = new ByteArrayOutputStream(); 44 | int numHeaders = UnsignedByte.intValue(inData[256]); 45 | for (int i = 0; i < numHeaders; i++) 46 | { 47 | int index = i * 5 + 1; 48 | int blockNum = UnsignedByte.intValue(inData[256+index]); 49 | int numBytes = UnsignedByte.intValue(inData[256+index+1],inData[256+index+2]); 50 | int filePos = blockNum * 0x400 + 0x600; 51 | // System.out.println("Block: 0x"+Integer.toHexString(blockNum)+" Bytes: 0x"+Integer.toHexString(numBytes)+" File position: 0x"+Integer.toHexString(filePos)); 52 | if (filePos + 12 + numBytes < inData.length) 53 | { 54 | // System.out.println("filepos + 12: 0x"+Integer.toHexString(filePos + 12)+" numBytes: 0x"+Integer.toHexString(numBytes)); 55 | out.write(inData, filePos + 12, numBytes); 56 | } 57 | } 58 | parent.emitFile(out.toByteArray(), outDirectory, "", inFile + fileSuffix); 59 | } 60 | else 61 | { 62 | System.err.println("Probably not a SuperSCRIPSIT file."); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/Valdocs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import org.transformenator.internal.FileInterpreter; 24 | import org.transformenator.internal.UnsignedByte; 25 | 26 | public class Valdocs extends ADetangler 27 | { 28 | @Override 29 | public void detangle(FileInterpreter interpreter, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 30 | { 31 | // Figure out the original file name 32 | char[] name = new char[110]; 33 | byte[] newBuf = new byte[inData.length]; 34 | int newBufCursor = 0; 35 | for (int i = 0; i < 110; i++) 36 | { 37 | char newChar = (char) inData[i + 4]; 38 | if (newChar == ':') 39 | newChar = '-'; 40 | else if (newChar == '/') 41 | newChar = '-'; 42 | else if (newChar == '?') 43 | newChar = 'x'; 44 | name[i] = newChar; 45 | } 46 | newName = new String(name).trim(); 47 | // System.err.println("Found Valdocs file: \"" + newName + "\""); 48 | if (newName.length() > 0) 49 | { 50 | /* 51 | * Pick apart the file hunk indices. The first few indices seem to be non-useful... so start in at 0x80a. It's unclear how deep the indices can go. It's possible it should look deeper than it does, but the field of 0xFFs has some noise near the end. 52 | * 53 | * Each index is a pointer to the next 512 bytes (a sector) of data in the file. 54 | */ 55 | for (int i = 0x80a; i < 0xa00; i += 2) 56 | { 57 | int idx = UnsignedByte.intValue(inData[i], inData[i + 1]); 58 | if (idx < 32768) 59 | { 60 | // System.err.println("DEBUG: idx: "+idx); 61 | if (((idx * 512) + 1) < inData.length) 62 | { 63 | // Chunks may start with a pointer to skip over blank space 64 | int offset = UnsignedByte.intValue(inData[(idx * 512)], inData[(idx * 512) + 1]); 65 | // Pull out the data in the chunk 66 | for (int j = offset + 4; j < 0x200; j++) 67 | { 68 | newBuf[newBufCursor++] = inData[(idx * 512) + j]; 69 | } 70 | } 71 | // else 72 | // System.err.println("DEBUG: Found an index out of bounds: "+idx); 73 | } 74 | } 75 | inData = new byte[newBufCursor]; 76 | for (int i = 0; i < newBufCursor; i++) 77 | { 78 | inData[i] = newBuf[i]; 79 | } 80 | } 81 | // System.err.println("DEBUG: Data length after de-indexing: "+inData.length); 82 | interpreter.emitFile(inData, outDirectory, "", newName + fileSuffix); 83 | } 84 | String newName = null; 85 | } 86 | -------------------------------------------------------------------------------- /src/org/transformenator/detanglers/WPS80.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on files 3 | * Copyright (C) 2018 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.detanglers; 22 | 23 | import java.io.ByteArrayOutputStream; 24 | import java.io.IOException; 25 | 26 | import org.transformenator.internal.FileInterpreter; 27 | import org.transformenator.internal.UnsignedByte; 28 | 29 | /* 30 | * ConvertWps80File 31 | * 32 | * Convert the block structure of DEC Rainbow WPS-80 files. 33 | * (WPS-80 was marketed by Exceptional Business Solutions (EBS) running on CP/M on the Rainbow.) 34 | * They have a forward-and-backward linked list structure to 256-byte blocks with inner used-length, 35 | * very much like WANG did. 36 | */ 37 | public class WPS80 extends ADetangler 38 | { 39 | @Override 40 | public void detangle(FileInterpreter interpreter, byte[] inData, String outDirectory, String inFile, String fileSuffix, boolean isDebugMode) 41 | { 42 | if ((inData.length % 256) > 0) 43 | { 44 | System.err.println("Warning: file size is not an integral of 256, this may not be a WPS-80 file."); 45 | } 46 | /* 47 | * The WPS-80 word processor leaves a set of 256-byte chunks, each of which has 48 | * a preamble: 49 | * next-pointer (2 bytes) 50 | * prev-pointer (2 bytes) 51 | * unknown (1 byte) 52 | * bytes-used (1 byte) 53 | */ 54 | ByteArrayOutputStream out = new ByteArrayOutputStream(); 55 | int nextPage = nextWpsPage(inData, 1); 56 | while (nextPage > 0) 57 | { 58 | try { 59 | nextPage = dumpWpsPage(inData, out, nextPage); 60 | } catch (IOException e) { 61 | e.printStackTrace(); 62 | } 63 | } 64 | // Remove the (last) file suffix, if one exists, from the image file name before sending to emitFile() 65 | interpreter.emitFile(out.toByteArray(), outDirectory, null, inFile + fileSuffix); 66 | } 67 | 68 | static int nextWpsPage(byte[] inData, int thisPage) 69 | { 70 | int thisOffset = (thisPage - 1) * 256; 71 | return UnsignedByte.intValue(inData[thisOffset + 1]) + UnsignedByte.intValue(inData[thisOffset]); 72 | } 73 | 74 | static int dumpWpsPage(byte[] inData, ByteArrayOutputStream out, int thisPage) throws IOException 75 | { 76 | int nextPage = 0; 77 | int thisOffset = (thisPage - 1) * 256; 78 | if (thisOffset < inData.length) 79 | { 80 | nextPage = nextWpsPage(inData,thisPage); 81 | int numBytes = UnsignedByte.intValue(inData[thisOffset + 5]); 82 | if (numBytes > 0) 83 | { 84 | out.write(inData, thisOffset + 6, numBytes); 85 | out.flush(); 86 | } 87 | } 88 | return nextPage; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/org/transformenator/help-csv.txt: -------------------------------------------------------------------------------- 1 | 2 | CSV transform specification examples - all numbers are in hexadecimal: 3 | ====================================================================== 4 | 5 | ; Comments start with a semicolon (;) 6 | 7 | ; NEXTREC: required - defines record length within file 8 | NEXTREC=100 9 | 10 | ; FIRSTREC: offset (in hex bytes) to the first record to be considered 11 | FIRSTREC=0E00 12 | 13 | ; SELECTIF: criteria for record inclusion 14 | SELECTIF=00,40 ; First byte must be 0x40 to be valid 15 | 16 | ; LAYOUT: define field layout by example 17 | LAYOUT="mmddyy..nnnnnnxxxxxxxpppppp" 18 | 19 | 20 | Individual field definition keywords follow: 21 | -------------------------------------------- 22 | 23 | ; NAME: field name 24 | NAME="Field 1" 25 | 26 | ; ORIGIN: offset within the record to this field's data 27 | ORIGIN=01 28 | 29 | ; LENGTH: length of this field's data 30 | LENGTH=0a 31 | 32 | ; INTERP|INTERPLITERAL: Interpretation type of field data to export 33 | INTERP=ASCII 34 | INTERP=HEX 35 | INTERP=EBCDIC 36 | 37 | Also see: 38 | https://github.com/RetroFloppy/transformenator/wiki/CSV-Transform-Specification -------------------------------------------------------------------------------- /src/org/transformenator/help.txt: -------------------------------------------------------------------------------- 1 | 2 | Transform specification examples - all numbers are in hexadecimal: 3 | ================================================================= 4 | 5 | ; Comments start with a semicolon (;) 6 | 7 | ; Simple replacement: replace all occurrences of 0x00 with 0x20 8 | 00=20 9 | 10 | ; Toggle replacement on every other occurrence (%) 11 | 7f047f % "\i1 ","\i0 " 12 | 13 | ; Shift a range of values to a different starting value 14 | [41..5a] = 61 15 | 16 | ; Using a range, remove all occurrences of values 17 | [f0..ff] = 18 | 19 | ; Using replace with reconsider (#) and a range, strip high bits 20 | [80..ff] # 00 21 | 22 | ; Calculate the EOF based on file contents 23 | eof_hi = 00 24 | eof_mid = 7d 25 | eof_lo = 7c 26 | eof_offset = 100 27 | 28 | ; Emit a header 29 | head = "" 30 | 31 | ; Emit a trailer 32 | tail = "" 33 | 34 | ; Trim leading bytes 35 | trim_leading = 0400 36 | 37 | ; Trim trailing bytes 38 | trim_trailing = df 39 | 40 | ; Remove everything between two hex delimiters 41 | remove_between = 414141,4242 42 | 43 | ; Regular expression replacement - first character is taken as delimiter 44 | regex = @regspec@replacement@ 45 | 46 | ; SOF indicator 47 | 0d0a53 = "{@@@@}" 48 | 49 | ; SOF greedy - when there may be more than one 50 | 1f = "{@@@@}" 51 | 52 | ; EOF indicator 53 | 1a = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/internal/FieldSpec.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on binary files 3 | * Copyright (C) 2016 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.internal; 22 | 23 | public class FieldSpec 24 | { 25 | // Struct-ifying field specifications 26 | public String fieldName = ""; 27 | public int fieldOrigin = 0; 28 | public int fieldLength = 0; 29 | /* 30 | * Interpretation of field: 31 | * 0 = error 32 | * 1 = ASCII text 33 | * 2 = EBCDIC text 34 | * 3 = Hex dump 35 | */ 36 | public int interp = 0; 37 | public boolean csvLiteral = false; 38 | 39 | public static String interpString(int interp) 40 | { 41 | switch (interp) 42 | { 43 | case 1: return "ASCII"; 44 | case 2: return "EBCDIC"; 45 | case 3: return "HEX"; 46 | } 47 | return ""; 48 | } 49 | } -------------------------------------------------------------------------------- /src/org/transformenator/internal/OfficeSys6Util.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on binary files 3 | * Copyright (C) 2014 - 2015 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.internal; 22 | 23 | public class OfficeSys6Util 24 | { 25 | public static String toAscii(byte inData[], int offset, int length) 26 | { 27 | String resultString = ""; 28 | for (int i = offset; i < offset+length; i++) 29 | { 30 | resultString += asciiChar(inData[i]); 31 | } 32 | return resultString; 33 | }; 34 | 35 | public static char asciiChar(byte inByte) 36 | { 37 | // Really basic transform for readabilty of filenames only 38 | int myByte = UnsignedByte.intValue(inByte); 39 | switch (myByte) 40 | { 41 | case 0x02: return '-'; 42 | case 0x0c: return ','; 43 | case 0x15: return '\''; 44 | case 0x38: return ' '; 45 | 46 | case 0x30: return '9'; 47 | case 0x31: return '0'; 48 | case 0x34: return '6'; 49 | case 0x35: return '5'; 50 | case 0x36: return '2'; 51 | case 0x39: return '4'; 52 | case 0x3c: return '8'; 53 | case 0x3d: return '7'; 54 | case 0x3e: return '3'; 55 | case 0x3f: return '1'; 56 | 57 | case 0x41: return 'Y'; 58 | case 0x44: return 'Q'; 59 | case 0x45: return 'P'; 60 | case 0x47: return 'J'; 61 | case 0x4e: return 'F'; 62 | case 0x4f: return 'G'; 63 | case 0x50: return 'W'; 64 | case 0x51: return 'S'; 65 | case 0x54: return 'I'; 66 | case 0x59: return 'O'; 67 | case 0x5c: return 'A'; 68 | case 0x5d: return 'R'; 69 | case 0x5e: return 'V'; 70 | case 0x5f: return 'M'; 71 | case 0x60: return 'B'; 72 | case 0x61: return 'H'; 73 | case 0x64: return 'K'; 74 | case 0x65: return 'E'; 75 | case 0x66: return 'N'; 76 | case 0x67: return 'T'; 77 | case 0x69: return 'L'; 78 | case 0x6c: return 'C'; 79 | case 0x6d: return 'D'; 80 | case 0x6e: return 'U'; 81 | case 0x6f: return 'X'; 82 | case 0x77: return 'Z'; 83 | 84 | case 0x01: return 'y'; 85 | case 0x04: return 'q'; 86 | case 0x05: return 'p'; 87 | case 0x07: return 'j'; 88 | case 0x0e: return 'f'; 89 | case 0x0f: return 'g'; 90 | case 0x10: return 'w'; 91 | case 0x11: return 's'; 92 | case 0x14: return 'i'; 93 | case 0x19: return 'o'; 94 | case 0x1c: return 'a'; 95 | case 0x1d: return 'r'; 96 | case 0x1e: return 'v'; 97 | case 0x1f: return 'm'; 98 | case 0x20: return 'b'; 99 | case 0x21: return 'h'; 100 | case 0x24: return 'k'; 101 | case 0x25: return 'e'; 102 | case 0x26: return 'n'; 103 | case 0x27: return 't'; 104 | case 0x29: return 'l'; 105 | case 0x2c: return 'c'; 106 | case 0x2d: return 'd'; 107 | case 0x2e: return 'u'; 108 | case 0x2f: return 'x'; 109 | case 0x37: return 'z'; 110 | } 111 | return '_'; 112 | } 113 | } -------------------------------------------------------------------------------- /src/org/transformenator/internal/RegSpec.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on binary files 3 | * Copyright (C) 2013-2019 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.internal; 22 | 23 | public class RegSpec 24 | { 25 | // Just struct-ifying this data type 26 | public byte[] leftCompare; 27 | public byte[] leftMask; 28 | 29 | // For remove_between 30 | public byte[] removeEndCompare; 31 | public byte[] removeEndMask; 32 | /* 33 | * Commands: 34 | * 0 = Normal search 35 | * 1 = EOF 36 | * 2 = SOF 37 | * 3 = SOF (greedy) 38 | * 4 = remove_between 39 | */ 40 | public int command = 0; 41 | public boolean backtrack = true; 42 | public boolean toggle = false; 43 | /* 44 | * Start out in "false" state for toggling specifications - 45 | * the first action will be to emit the first element, or "on" state 46 | */ 47 | public boolean toggleState = false; 48 | } 49 | -------------------------------------------------------------------------------- /src/org/transformenator/internal/SelectSpec.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on binary files 3 | * Copyright (C) 2016 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.internal; 22 | 23 | public class SelectSpec 24 | { 25 | // Struct-ifying record selection criteria 26 | public int offset; 27 | public byte[] rightCompare; 28 | } -------------------------------------------------------------------------------- /src/org/transformenator/internal/TrackReorger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on binary files 3 | * Copyright (C) 2020 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.internal; 22 | 23 | public class TrackReorger 24 | { 25 | public static byte[] reorg(byte[] inData, int skewedSectorMap[], int bytesPerSector) 26 | { 27 | byte[] outData = new byte[inData.length]; 28 | int bytesPerTrack = skewedSectorMap.length * bytesPerSector; 29 | if (inData.length % (bytesPerTrack) == 0) 30 | { 31 | // For each track 32 | for (int i = 0; i < inData.length / bytesPerTrack; i++) 33 | { 34 | System.err.println("DEBUG: working on track "+i); 35 | // For each sector in the track 36 | for (int j = 0; j < skewedSectorMap.length; j++) 37 | { 38 | System.err.print("sector "+j+": "); 39 | // System.arraycopy(Object src, int srcPos, Object dest, int destPos, int length) 40 | System.arraycopy(inData, (bytesPerTrack * i) + (skewedSectorMap[j] * bytesPerSector), outData, (bytesPerTrack * i) + (j * bytesPerSector), bytesPerSector); 41 | System.err.print("moving "+skewedSectorMap[j]+" to "+j+"; "); 42 | } 43 | System.err.println(); 44 | } 45 | return outData; 46 | } 47 | else 48 | { 49 | System.err.println("DEBUG: sector geometry doesn't fit incoming data."); 50 | return inData; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /src/org/transformenator/internal/Version.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Transformenator - perform transformation operations on binary files 3 | * Copyright (C) 2014 - 2022 by David Schmidt 4 | * 32302105+RetroFloppySupport@users.noreply.github.com 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2 of the License, or (at your 9 | * option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | package org.transformenator.internal; 22 | 23 | public class Version 24 | { 25 | public static String VersionString = "v2.0.4beta"; 26 | } 27 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/.gitignore: -------------------------------------------------------------------------------- 1 | test 2 | displaywrite_test 3 | displaywrite_null 4 | test_rtf 5 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/aol: -------------------------------------------------------------------------------- 1 | ; 2 | description = "AOL Macintosh messages." 3 | commentary = "Simply clips off the beginning and end cruft." 4 | ; 5 | 6 | ; SOF 7 | 0330303032303030.................................... = "{@@@@}" 8 | 9 | ; EOF 10 | 0330303034303030 = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/apple2_unk_1: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Unknown Apple II word processor." 3 | commentary = "Newlines are 02 and 0d." 4 | ; 5 | 6 | ; Start of text 7 | 40030802 = 8 | 9 | 0040..08 = 10 | 00400302 = 0d0a 11 | 00400106 = 12 | 004003 = 13 | 400102 = 14 | 400302 = 15 | 16 | ; Newline 17 | 02 = 0d0a 18 | 0d = 0d0a 19 | 20 | ; Spaces 21 | a0 = 20 22 | 9a = 20 23 | 9b = 20 24 | 9c = 20 25 | 9d = 20 26 | 9e = 20 27 | 9f = 20 28 | 29 | ; Punctuation 30 | [a1..af] = 21 31 | [ba..bf] = 3a 32 | 33 | ; Numbers 34 | [b0..b9] = 30 35 | 36 | ; Strip high bits from capitals 37 | [c1..da] = 41 38 | 39 | ; Strip high bits from lower case 40 | [e1..fa] = 61 41 | 42 | ; Strip off nulls 43 | 00 = 44 | ff = 45 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/apple2_unk_2: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Unknown Apple II word processor." 3 | commentary = "Newlines are 000d." 4 | ; 5 | 6 | trim_leading = 0200 7 | 8 | ; Emphasis on/off 9 | 07 = 10 | 08 = 11 | 12 | ; Newlines 13 | 00d0 = 0d0a 14 | 15 | ; Control break of some sort 16 | ..0000.. = 17 | 18 | ; Unknown 19 | f4 = 20 | 21 | ; End of file 22 | ffff = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/applewriter1: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Applewriter 1.0 word processor." 3 | commentary = "Mostly just strips high bits off. When extracting files with CiderPress, ensure you pay attention to these attributes: "Convert to non-Apple II formats" is unchecked, "Don't convert text files" is checked."" 4 | ; 5 | 6 | ; Extended ASCII characters 7 | 8 | ; Capital A umlaut 9 | 1b = c4 10 | ; Capital U umlaut 11 | 1d = dc 12 | ; Lower a umlaut 13 | db = e4 14 | ; Lower u umlaut 15 | dd = fc 16 | 17 | ; Transform A-Z in the control character range up to capitals in ASCII 18 | [01..1a] = 41 19 | 20 | ; Strip high bit from lower case letters 21 | [c1..da] = 61 22 | 23 | ; Shifted spaces 24 | a0 = 20 25 | e0 = 20 26 | 27 | ; Punctuation 28 | [e1..ef] = 21 29 | 30 | ; Numbers 31 | [f0..f9] = 30 32 | 33 | ; More punctuation 34 | [fa..ff] = 3a 35 | 36 | ; EOF, SOT, Hard newline 37 | 60 = "{@@@@}" 38 | 83 = 39 | 8d = "\\r\\n" 40 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/applewriter_iie_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "AppleWriter IIe word processor." 3 | commentary = "Output in RTF format." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Unknown controls 12 | 1b21 = 13 | 137f = 14 | 15 | ; Indented 16 | regex = @\.[L|l][I|i]0@\\par\\li721\\par @ 17 | 18 | ; Outdent 19 | regex = @\.[L|l][I|i]1@\\par\\li0\\par @ 20 | 21 | ; Italic toggle 22 | 5c % " \i1 "," \i0 " 23 | ; Italics on 24 | 1b57="\i1 " 25 | ; Italics off 26 | 1b26="\i0 " 27 | 28 | ; Sometimes follows an italic closure 29 | 08 = 30 | 31 | ; Superscript 32 | 1b3b = "\super " 33 | 1b44 = "\super " 34 | 1b3a = "\nosupersub " 35 | 1b55 = "\nosupersub " 36 | 37 | ; Bold on 38 | 1b34="\b1 " 39 | ; Bold off 40 | 1b35="\b0 " 41 | 42 | ; Paragraph centered 43 | regex = @\\par \.[C|c][J|j].*@\\par\\qc @ 44 | 45 | ; Paragraph left justified 46 | regex = @\\par \.[L|l][J|j]@\\gl @ 47 | 48 | ; Paragragh right justified 49 | regex = @\\par \.[R|r][J|j]@\\gr @ 50 | 51 | 0d0a = "\\r\\n\par " 52 | 53 | ; Consume other productions 54 | regex = @\\par \.[B|b][L|l]@@ 55 | regex = @\\par \.[B|b][M|m].*@@ 56 | regex = @\\par \.[E|e][P|p].*@@ 57 | regex = @\\par \.[F|f][F|f].*@@ 58 | regex = @\\par \.[F|f][J|j].*@@ 59 | regex = @\\par \.[L|l][I|i].*@@ 60 | regex = @\\par \.[L|l][M|m].*@@ 61 | regex = @\\par \.[P|p][I|i].*@@ 62 | regex = @\\par \.[P|p][L|l].*@@ 63 | regex = @\\par \.[P|p][M|m].*@@ 64 | regex = @\\par \.[P|p][N|n].*@@ 65 | regex = @\\par \.[R|r][M|m].*@@ 66 | regex = @\\par \.[T|t][L|l].*@@ 67 | regex = @\\par \.[T|t][M|m].*@@ 68 | 69 | regex = @^\.[C|c][J|j].*@@ 70 | regex = @^\.[E|e][P|p].*@@ 71 | regex = @^\.[L|l][I|i].*@@ 72 | regex = @^\.[L|l][J|j]@\\gl @ 73 | regex = @^\.[L|l][M|m].*@@ 74 | regex = @^\.[P|p][L|l].*@@ 75 | regex = @^\.[P|p][M|m].*@@ 76 | regex = @^\.[P|p][N|n].*@@ 77 | regex = @^\.[R|r][J|j]@\\gl @ 78 | regex = @^\.[R|r][M|m].*@@ 79 | regex = @^\.[T|t][L|l].*@@ 80 | regex = @^\.[T|t][M|m].*@@ 81 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/atari_st: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Unknown Atari ST word processor." 3 | commentary = "Spaces are 0x1f. From Atari 3-1/2" disks." 4 | ; 5 | 6 | ; SOF indicator 7 | 5d = "{@@@@}" 8 | 9 | ; Space 10 | 1f=20 11 | 12 | ; Unknown productions 13 | 1b..= 14 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/attwp: -------------------------------------------------------------------------------- 1 | ; 2 | description = "AT&T 5700/7700 / Olivetti ETV240/250 word processors." 3 | commentary = "" 4 | ; 5 | 6 | ; SOF is $d4 bytes in 7 | trim_leading = d4 8 | 9 | ; End of text 10 | ff = "{@@@@}" 11 | 12 | 00 = 13 | 0b = 14 | 7f = 15 | c0 = 16 | c5 = 17 | c6 = 18 | c7 = 19 | cb = 20 | cc = 21 | cd = 22 | d2 = 23 | 24 | ; Some kind of bulleted list, maybe 25 | ..7f = 26 | 27 | 0d = 0d0a 28 | 29 | ; Spaces 30 | 3f = 20 31 | 80 = 20 32 | 81 = 20 33 | 82 = 20 34 | 83 = 20 35 | 84 = 20 36 | 85 = 20 37 | 86 = 20 38 | 87 = 20 39 | 88 = 20 40 | 89 = 20 41 | 8a = 20 42 | 8b = 20 43 | 8c = 20 44 | 8d = 20 45 | 8e = 20 46 | 47 | ; Dollar sign 48 | a4 = "$" 49 | 50 | ; Emphasis of some sort placed before EVERY character 51 | 01 = 52 | 02 = 53 | 03 = 54 | 18 = 55 | 19 = 56 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/bank_street_writer_a2: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Bank Street Writer word processor." 3 | commentary = "Apple II to plain text." 4 | ; 5 | 6 | 02= 7 | 03= 8 | 04= 9 | 05= 10 | 08= 11 | 09= 12 | 0a= 13 | 10= 14 | ; 11/12 - bold on/off 15 | 11= 16 | 12= 17 | 13= 18 | 14= 19 | 15= 20 | 16= -------------------------------------------------------------------------------- /src/org/transformenator/transforms/bank_street_writer_c64: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Bank Street Writer word processor." 3 | commentary = "C64 to plain text." 4 | ; 5 | 6 | ; SOF 7 | 0080 = "{@@@@}" 8 | 9 | ; Two nulls is really EOF, but play it safe 10 | 00 = 11 | 12 | ; Hard space 13 | 8e = 20 14 | 15 | ; Emphasis of some kind 16 | 03 = 17 | 18 | ; Emphasis 19 | f4 = 20 | f7 = 21 | f9 = 22 | 23 | ; Transform capitals to lowercase 24 | [41..5a] = 61 25 | 26 | ; Strip high bit from capitals 27 | [c1..da] = 41 -------------------------------------------------------------------------------- /src/org/transformenator/transforms/brother_120k_rtf: -------------------------------------------------------------------------------- 1 | description = "Brother 120k word processor disk files." 2 | commentary = "120k, proprietary filesystem." 3 | ; 4 | detangler = Brother120k 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fnil\fcharset0 Courier New;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; New paragraph 12 | 0b.. = "\par\pard\ul0\ql \\r\\n" 13 | 02 = "\par\pard\ul0\ql \\r\\n" 14 | 15 | ; Inherit old paragraph characteristics 16 | 0f = 17 | 18 | ; Eject page 19 | 0e = 20 | 21 | ; New paragraph characteristics 22 | remove_between = f1,f2 23 | 24 | ; Next tab position 25 | 01 = "\tab " 26 | 27 | ; Save - 28 | f6 = "-" 29 | 30 | ; Letter set (KB I, II, III) 31 | 06 = 32 | 07 = 33 | 08 = 34 | 35 | ; Center 36 | 09 = "\qc " 37 | 38 | ; Right justified 39 | 0a = "\qr " 40 | 41 | ; Trim leading in case we don't have an SOF 42 | trim_leading = c1 43 | 44 | ; SOF is 0xf0f1 45 | f0 = "{@@@@}" 46 | 47 | ; Nothing 48 | 0d = 20 49 | f0 = 50 | 51 | ; Bold on/off 52 | f7 = "\b1 " 53 | f8 = "\b0 " 54 | 55 | ; Underline on/off 56 | f9 = "\ul " 57 | fa = "\ul0 " 58 | 59 | ; Super/Subscript 60 | fb = 61 | fd = 62 | 63 | ; Empty but not blank 64 | f4 = 65 | 66 | ; EOF is 0xff 67 | ff = "{@@@@}" 68 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/brother_240k_rtf: -------------------------------------------------------------------------------- 1 | description = "Brother 240k word processor disk files." 2 | commentary = "240k, DOS-like filesystem." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | trim_leading = 02 11 | 12 | ; Metadata productions 13 | remove_between = 1e11,111e 14 | remove_between = 980d,0d98 15 | remove_between = 980f,0f98 16 | remove_between = 9811,1198 17 | remove_between = 9813,1398 18 | remove_between = 9815,1598 19 | 20 | ; Space 21 | 00 = 20 22 | 23 | ; Line break 24 | 1b = 25 | 95 = 20 26 | db = 20 27 | 28 | ; Newline 29 | 01 = "\par\pard\ul0 \\r\\n" 30 | 0292 = "\par\pard\ul0\qr \\r\\n" 31 | 02 = "\par\pard\ul0 \\r\\n" 32 | 9d = "\par\pard\ul0 \\r\\n" 33 | da = "\par\pard\ul0 \\r\\n" 34 | de = "\par\pard\ul0 \\r\\n" 35 | 36 | ; Bold on/off 37 | bd = "\b1 " 38 | bc = "\b0 " 39 | 8c = "\b1 " 40 | 8d = "\b0 " 41 | 42 | ; Underline on/off 43 | 8a = "\ul " 44 | 8b = "\ul0 " 45 | 46 | ; "Degree" symbol 47 | 60 = "\'b0" 48 | 49 | 7b = "1" 50 | 7c = "1" 51 | 52 | ; Unknown 53 | bc = 54 | be = 55 | dc = 56 | 57 | ; Might be merge record locations 58 | a0= 59 | a1= 60 | a2= 61 | a3= 62 | a4= 63 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/brother_pwp_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Brother DOS-based word processor." 3 | commentary = "Typically has a PWP file suffix." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | trim_leading = 0x40 12 | 13 | ; Unknown 14 | 08 = 15 | 0f = 16 | 17 | ; One-half symbol 18 | ab = "\'bd " 19 | ; One-quarter symbol 20 | ac = "\'bc " 21 | 22 | ; Line break 23 | 1b = "\\r\\n\par " 24 | 1f = 20 25 | 26 | ; Newline 27 | 10 = "\\r\\n\par " 28 | 0e = "\\r\\n\par \par " 29 | 30 | ; Underlining 31 | ; Change 0x02 and 0x04 to a nonsensical token 32 | 02 = "~_~" 33 | 04 = "~_~" 34 | ; When we find a token, remove it and surround the character that follows it with underline directives 35 | ; (this will be super-inefficient in the case of huge chunks of underlined text) 36 | regex = @~_~(.)@\\ul1 $1\\ul0 @ -------------------------------------------------------------------------------- /src/org/transformenator/transforms/brother_wpt2_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Brother DOS-based word processor." 3 | commentary = "Typically has a WPT file suffix. Files of this type start with 928301." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | 4df9051600000007160005061600000007160006 = "{@@@@}" 12 | 13 | ; Commands 14 | fb01000001180118190219051600000007160005061600000007160006 = 15 | 01....01 = 16 | 05..............05 = 17 | 06..............06 = 18 | 0d..........0d = "\\r\\n\par " 19 | 0f..........................................0f = 20 | 0f..................................0f = 21 | 0f........................0f0f = 22 | 18..18 = 23 | 1a..1a = 24 | 1a....1a = 25 | 1b......................................1b = 26 | 1d............1d = 27 | fc....fc = 28 | 29 | ; 30 | 02 = 31 | 1a = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/brother_wpt_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Brother DOS-based word processor." 3 | commentary = "Typically has a WPT file suffix. Files of this type start with 8f8101." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Common chunks 12 | ;980d780084030000......0d98 = 13 | ;980f78008403000006....b4000f98 = 14 | ;980d2237220218001d98 = 15 | ;980d7800840300000002010d 16 | 17 | ; Leading/intro 18 | 8f810101000042521e........000000..003000..05..111e = 19 | 20 | ; Space 21 | 00 = 20 22 | 23 | ; Line break 24 | 1b = 25 | 95 = 20 26 | db = 20 27 | 28 | ; Newline 29 | ;02 = "\\r\\n\par " 30 | ;da = "\\r\\n\par " 31 | 02 = "\par " 32 | da = "\par " 33 | 34 | ; Bold on/off 35 | bd = "\b1 " 36 | bc = "\b0 " 37 | 38 | ; Unknown 39 | 8a = 40 | 8c = 41 | 8d = 42 | bc = 43 | be = 44 | de = 45 | 46 | ; Command structures 47 | 980d = "" 48 | 0d98 = "" 49 | 980f = "" 50 | 0f98 = "" 51 | 52 | ; Remove all instances of ... 53 | regex = @.+?@@ 54 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/brown_bag_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Brown Bag PC word processor." 3 | commentary = "PC-based." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fhelvetica\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Italics (or other emphasis) 12 | 15 % "\i1 ","\i0 " 13 | 17 % "\i1 ","\i0 " 14 | 1b2d01 = "\i1 " 15 | 1b2d00 = "\i0 " 16 | 1b34 = "\i1 " 17 | 1b35 = "\i0 " 18 | 19 | ; Superscript 20 | 18 % "\super ","\nosupersub " 21 | 22 | ; Newline 23 | 0d0a = "\par " 24 | 25 | ; New page 26 | 0c0f = "\par\par " 27 | 28 | 1b50 = 29 | 1b3324 = 30 | ; Some kind of page number specification? 31 | 0b2e463a2e2e2e28242424292e2e2e = 32 | 33 | ;N:1 34 | 0b2e4e3a31 = 35 | ;N:32 36 | 0b2e4e3a3332 = 37 | ;N:35 38 | 0b2e4e3a3335 = 39 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/c64_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Unknown C64 word processor." 3 | commentary = "Files begin with 00278193." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; The preamble to files seems to be one of these two productions: 12 | 0027819331 = 13 | 0027819332 = 14 | 15 | ; Lop off nulls 16 | 00 = 17 | 18 | ; Translate a-z down in the control character range up to ASCII (is this PETSCII?) 19 | [01..1a] = 61 20 | 21 | ; End of line/paragraph becomes \r\n (plus) \par \par \li0 \b0 \fs24 22 | ; Need to turn off some things that don't have an explicit off switch (i.e. headings) 23 | 1f = "\par\par\li0\b0\fs24 " 24 | 25 | ; Start of heading 26 | 83 = "\par\par\pard\s2\b\fs36 " 27 | 28 | ; 0x86 appeared at the beginning of files sometimes, after the preamble. Whack it. 29 | 86 = 30 | 31 | ; Italics on 32 | b12d31 = "\i " 33 | ; Italics off 34 | b12d30 = "\i0 " -------------------------------------------------------------------------------- /src/org/transformenator/transforms/c64_seq: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Unknown C64 word processor." 3 | commentary = "Simple PETSCII transform for SEQ files." 4 | ; 5 | 6 | ; Transform capitals to lowercase 7 | [41..5a] = 61 8 | 9 | ; Strip high bit from capitals 10 | [c1..da] = 41 11 | 12 | 8d = "{@@@@}" 13 | 5c = "{@@@@}" 14 | 5f = 0d 15 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/c64_spinnaker_seq: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Unknown C64 (Spinnaker?) word processor." 3 | commentary = "Simple PETSCII transform for SEQ files." 4 | ; 5 | 6 | ; Transform capitals to lowercase 7 | [41..5a] = 61 8 | 9 | ; Transform lowercase to capitals 10 | [61..7a] = 41 11 | 12 | ff = "{@@@@}" 13 | 00 = "{@@@@}" 14 | 10 = 0d0a 15 | 16 | ; We're not dealing with line spacing 17 | regex = @!1ls@@ 18 | regex = @!2ls@@ -------------------------------------------------------------------------------- /src/org/transformenator/transforms/canon_starwriter_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Canon StarWriter word processor." 3 | commentary = "Files start with ETW1." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; SOF indicator 12 | 41420000434400004546000047480000494a00004b.... = "{@@@@}" 13 | 14 | ; Near SOF 15 | 300c09311011841113 = 16 | 17 | 1311811113 = "\par " 18 | 131181811113 = "\par\par " 19 | 20 | ; Control sequences 21 | 1030....3110 = 22 | 1042....4310 = 23 | 1011..1110 = 24 | 1011....1110 = 25 | 1310........1013 = 26 | 131181841113 = "\par " 27 | 131181..1113 = "\par\par " 28 | 1311..811113 = "\par\par " 29 | 1311....1113 = 30 | 131180....1113 = "\par\par " 31 | 131181....1113 = "\par\par " 32 | 1311..81..1113 = "\par\par " 33 | 1311....811113 = "\par\par " 34 | 1311......1113 = 35 | 131181......1113 = "\par\par " 36 | 1311..81....1113 = "\par\par " 37 | 1311....81..1113 = "\par\par " 38 | 1311......811113 = "\par\par " 39 | 1311........1113 = 40 | 1311..........1113 = "\par\par " 41 | 1011............1113 = 42 | 13................13 = 43 | 44 | ; Near EOF 45 | 1311....03 = 46 | 1311..03 = 47 | 03 = 48 | 49 | 1310 = "[CB]" 50 | 1311 = "[CB]" 51 | 1312 = "[CB]" 52 | 1011 = "[CB]" 53 | 1013 = "[CE]" 54 | 1113 = "[CE]" 55 | 1213 = "[CE]" 56 | 57 | ; Newline in data makes our regex not work 58 | 0a = 59 | 13 = 60 | 61 | ; Character translations 62 | ; Inverted question mark 63 | a4 = bf 64 | a6 = "$" 65 | ; Small a acute 66 | 80 = e1 67 | ; Small i acute 68 | 84 = ed 69 | ; Small e acute 70 | 8c = e9 71 | ; Small e grave 72 | 8d = e8 73 | ; Small u acute 74 | 88 = fa 75 | ; Capital U acute 76 | 89 = da 77 | ; Small o acute 78 | 90 = f3 79 | ; Capital E acute 80 | 98 = c9 81 | ; Small n tilde 82 | 9a = f1 83 | 84 | ; Characters near EOF 85 | ;80 = 86 | 81 = 87 | 88 | ; Remove everything between control sequence signals 89 | regex = @\[CB\].*?\[CE\]@\\par\\par @ 90 | 91 | ; Address problematic SOF location issue 92 | regex = @^.*\[CE\]@@ 93 | ; Remove any remaining control sequences 94 | regex = @\[CB\]@@ 95 | regex = @\[CE\]@@ 96 | 97 | ; Calculate the EOF based on file contents 98 | eof_hi = 00 99 | eof_mid = 7d 100 | eof_lo = 7c 101 | eof_offset = 80 -------------------------------------------------------------------------------- /src/org/transformenator/transforms/cpt_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "CPT word processor." 3 | commentary = "Files typically come from 8 inch disks." 4 | ; 5 | detangler = CPT 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | 8d0d = "\par " 13 | 0d = "\par " 14 | 15 | ; Remove control char before dash 16 | bd = 17 | bf = 18 | 19 | ; Not sure what this is - seems to separate doc descriptions from doc body 20 | [80..84]= 21 | b3= 22 | 23 | ; Seems to be SOF or so 24 | c0 = 25 | 26 | ; Underline 27 | a0 = "_" 28 | 89 = "_" 29 | 30 | ; Emphasis - underline the next character 31 | c4 = "!UL1!" 32 | 33 | regex=@!UL1!(.)@\\ul1 $1\\ul0 @ 34 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/ctos_archive: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract files from a CTOS/BTOS archive." 3 | ; 4 | detangler = CTOSArchive -------------------------------------------------------------------------------- /src/org/transformenator/transforms/ctos_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract CTOS/BTOS files from disk image." 3 | ; 4 | detangler = CTOS 5 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/data20_c64: -------------------------------------------------------------------------------- 1 | ; 2 | description = "C64 Data-20 word processor." 3 | ; 4 | 5 | ; Transform capitals to lowercase 6 | [41..5a] = 61 7 | 8 | ; Transform lowercase to capitals 9 | [61..7a] = 41 10 | 11 | ; Emphasis capitals? 12 | [e1..fa] = 41 13 | 14 | 8d = 15 | 16 | ; Page eject 17 | 1f = 18 | 1e = 19 | 20 | 04 = "{@@@@}" 21 | ff = "{@@@@}" 22 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/datapoint: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract Datapoint DOS.C v2.3 files from disk image." 3 | commentary = "" 4 | ; 5 | detangler = Datapoint 6 | debug = false 7 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/dec_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "DEC (possibly Rainbow) word processor." 3 | commentary = "Disks are RX50K-based." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | 0d = "\par\par " 12 | 8d = "\\r\\n\par " 13 | 14 | ; Toggle underlining (trigger character: '_') 15 | 5f % "\ul ","\ul0 " 16 | 17 | ; Toggle bold (trigger character: '^') 18 | 5e % "\b1 ", "\b0 " 19 | 20 | ; EOF 21 | 1a = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/dec_wps_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "DEC RT11-based word processor." 3 | commentary = "Files use a WPS extension." 4 | ; 5 | 0d = "\\r\\n\par \ql " 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1\fcharset128 Courier New;}}{\*\generator David Schmidt - Transformenator;}\f0 \fs18 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | ; Naked curly braces 13 | 7d = 14 | 7b = 15 | 16 | ; Underlining on and off 17 | 5e % "\ul1 ","\ul0 " 18 | 19 | ; Center 20 | regex = @^\.[c|C]\;@\\qc @ 21 | 22 | ; Rule? i.e. ".ru 57,1" 23 | regex = @^\.[r|R][u|U].*@@ 24 | 25 | ; Line rules (they follow a .ru production on the following line) 26 | regex = @^--.*j@@ 27 | regex = @^--.*R@@ 28 | 29 | ; Paginate 30 | regex = @^\.pg.*@@ 31 | 32 | ; Unknown 33 | regex = @^\.s.*@@ 34 | regex = @^\.ht.*@@ 35 | regex = @^\.tp.*@@ 36 | regex = @^\.lm.*@@ 37 | regex = @^\.nm.*@@ 38 | regex = @^\.ph.*@@ 39 | regex = @^\.ft.*@@ 40 | regex = @^\.nhy@@ 41 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/decmate_wps_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "DECmate (II) word processor." 3 | commentary = "Disks are 12-bit encoded, RX50K-based." 4 | ; 5 | 6 | detangler = DECmate -------------------------------------------------------------------------------- /src/org/transformenator/transforms/displaywrite4_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "IBM DisplayWrite 4 word processor." 3 | commentary = "EBCDIC input, output in RTF." 4 | detangler = DisplayWrite 5 | ; 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\*\generator David Schmidt - Transformenator;}\f0 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | ; Toggle Underline mode 13 | ; Space 14 | 40 = 20 15 | 41 = "-" 16 | 17 | ; Punctuation 18 | ; 4a = "Cent sign" 19 | 4b = "." 20 | 4c = "<" 21 | 4d = "(" 22 | 4e = "+" 23 | 4f = "!" 24 | 50 = "&" 25 | ;5a = "|" (repurposed as bold) 26 | 5b = "$" 27 | 5c = "*" 28 | 5d = ")" 29 | 5e = ";" 30 | 5f = "^" 31 | 60 = "-" 32 | 61 = "/" 33 | ;6a = "|" (repurposed as bold) 34 | 6b = "," 35 | 6c = "%" 36 | 6d = "_" 37 | 6e = ">" 38 | 6f = "?" 39 | 79 = "`" 40 | 7a = ":" 41 | 7b = "#" 42 | 7c = "@" 43 | 7d = "'" 44 | 7e = "=" 45 | 7f = """ 46 | 47 | ; Lower case letters 48 | 81 = "a" 49 | 82 = "b" 50 | 83 = "c" 51 | 84 = "d" 52 | 85 = "e" 53 | 86 = "f" 54 | 87 = "g" 55 | 88 = "h" 56 | 89 = "i" 57 | 58 | 91 = "j" 59 | 92 = "k" 60 | 93 = "l" 61 | 94 = "m" 62 | 95 = "n" 63 | 96 = "o" 64 | 97 = "p" 65 | 98 = "q" 66 | 99 = "r" 67 | 68 | a2 = "s" 69 | a3 = "t" 70 | a4 = "u" 71 | a5 = "v" 72 | a6 = "w" 73 | a7 = "x" 74 | a8 = "y" 75 | a9 = "z" 76 | 77 | ; Capital letters 78 | c1 = "A" 79 | c2 = "B" 80 | c3 = "C" 81 | c4 = "D" 82 | c5 = "E" 83 | c6 = "F" 84 | c7 = "G" 85 | c8 = "H" 86 | c9 = "I" 87 | 88 | d1 = "J" 89 | d2 = "K" 90 | d3 = "L" 91 | d4 = "M" 92 | d5 = "N" 93 | d6 = "O" 94 | d7 = "P" 95 | d8 = "Q" 96 | d9 = "R" 97 | 98 | e2 = "S" 99 | e3 = "T" 100 | e4 = "U" 101 | e5 = "V" 102 | e6 = "W" 103 | e7 = "X" 104 | e8 = "Y" 105 | e9 = "Z" 106 | 107 | ; Numbers 108 | f0 = "0" 109 | f1 = "1" 110 | f2 = "2" 111 | f3 = "3" 112 | f4 = "4" 113 | f5 = "5" 114 | f6 = "6" 115 | f7 = "7" 116 | f8 = "8" 117 | f9 = "9" 118 | 119 | ; Unknown 120 | ;00.. = 121 | 0010 = 122 | 0012 = 123 | 124 | ; Line breaks 125 | 05 = "\tab " 126 | 06 = "\\r\\n\par\pard " 127 | 15 = "\\r\\n\par\pard " 128 | 129 | ; Center on 130 | 2bd4030b03 = "\pard\qc " 131 | 132 | ; Bold on 133 | 4a = "\b1 " 134 | ; Bold off 135 | 5a = "\b0 " 136 | 6a = "\b0 " -------------------------------------------------------------------------------- /src/org/transformenator/transforms/displaywrite_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "IBM DisplayWrite (3?) word processor." 3 | commentary = "EBCDIC input, output in RTF." 4 | detangler = DisplayWrite 5 | ; 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\*\generator David Schmidt - Transformenator;}\f0 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | ; Toggle Underline mode 13 | 2bd4040a0100 % "\ul ","\ul0 " 14 | 15 | ; Bold on/off 16 | 2bd1028a = "\b1 " 17 | 2bd1028e = "\b0 " 18 | 2bd4020e = "\ul0 " 19 | 2bd4027a = "\b1 " 20 | 2bd4027e = "\b0 " 21 | 22 | ; More emphasis 23 | 2ae80700 = 24 | 2ae807d1028a = 25 | 2bd106010067010000 = 26 | 2bd40204 = 27 | 28 | ; Set of unknowns 29 | 2bd41805001a00900100..0100........00f0....00..64..04 = 30 | 2bd4040a0100c59583a893969781850009848981 = 31 | 2bd81062..000000000000001c000001001f06 = 32 | 2bd41805001a009001006701000870 = 33 | 2bd41805001a00..01....0100.... = 34 | 2bd8156203000000000000000e = 35 | 2bd2090100..00....00.. = 36 | 2a3000f0....00..64..04 = 37 | 2bd209010000000800001f = 38 | 2bd20600dc0100000006 = 39 | 2bd2060100000006 = 40 | 2bd4020606060505 = 41 | 2bd402020068 = 42 | 2bd4040a0100 = 43 | 2bd8026640 = 44 | 2bd40206 = 45 | 46 | ; Unknown emphasis pair 47 | 2bd1060100670100 = 48 | 2bd10601015401038d = 49 | 50 | ; Had to do with an indented quotation 51 | 2bd40202 = 52 | 2bd41805 = 53 | 00500078010067010007802a3000f0040100066401042bd20901000000080300282bd402 = 54 | 55 | ; Suberscript 56 | 09 = "\super " 57 | 38 = "\nosupersub " 58 | 59 | ; Bullet point 60 | 39 = "* " 61 | 62 | ; Space 63 | 40 = 20 64 | 41 = "-" 65 | 66 | ; Punctuation 67 | ; 4a = "Cent sign" 68 | 4b = "." 69 | 4c = "<" 70 | 4d = "(" 71 | 4e = "+" 72 | 4f = "!" 73 | 50 = "&" 74 | ;5a = "|" (repurposed as bold) 75 | 5b = "$" 76 | 5c = "*" 77 | 5d = ")" 78 | 5e = ";" 79 | 5f = "^" 80 | 60 = "-" 81 | 61 = "/" 82 | ;6a = "|" (repurposed as bold) 83 | 6b = "," 84 | 6c = "%" 85 | 6d = "_" 86 | 6e = ">" 87 | 6f = "?" 88 | 79 = "`" 89 | 7a = ":" 90 | 7b = "#" 91 | 7c = "@" 92 | 7d = "'" 93 | 7e = "=" 94 | 7f = """ 95 | 96 | ; Lower case letters 97 | 81 = "a" 98 | 82 = "b" 99 | 83 = "c" 100 | 84 = "d" 101 | 85 = "e" 102 | 86 = "f" 103 | 87 = "g" 104 | 88 = "h" 105 | 89 = "i" 106 | 107 | 91 = "j" 108 | 92 = "k" 109 | 93 = "l" 110 | 94 = "m" 111 | 95 = "n" 112 | 96 = "o" 113 | 97 = "p" 114 | 98 = "q" 115 | 99 = "r" 116 | 117 | a2 = "s" 118 | a3 = "t" 119 | a4 = "u" 120 | a5 = "v" 121 | a6 = "w" 122 | a7 = "x" 123 | a8 = "y" 124 | a9 = "z" 125 | 126 | ; Capital letters 127 | c1 = "A" 128 | c2 = "B" 129 | c3 = "C" 130 | c4 = "D" 131 | c5 = "E" 132 | c6 = "F" 133 | c7 = "G" 134 | c8 = "H" 135 | c9 = "I" 136 | 137 | d1 = "J" 138 | d2 = "K" 139 | d3 = "L" 140 | d4 = "M" 141 | d5 = "N" 142 | d6 = "O" 143 | d7 = "P" 144 | d8 = "Q" 145 | d9 = "R" 146 | 147 | e2 = "S" 148 | e3 = "T" 149 | e4 = "U" 150 | e5 = "V" 151 | e6 = "W" 152 | e7 = "X" 153 | e8 = "Y" 154 | e9 = "Z" 155 | 156 | ; Numbers 157 | f0 = "0" 158 | f1 = "1" 159 | f2 = "2" 160 | f3 = "3" 161 | f4 = "4" 162 | f5 = "5" 163 | f6 = "6" 164 | f7 = "7" 165 | f8 = "8" 166 | f9 = "9" 167 | 168 | ; Crazy crap 169 | 00.. = 170 | 171 | ; Line breaks 172 | 05 = "\tab " 173 | 06 = "\\r\\n\par\pard " 174 | 15 = "\\r\\n\par\pard " 175 | 176 | ; Center on 177 | 2bd4030b03 = "\pard\qc " 178 | 179 | ; Standalone bytes 180 | 01 = 181 | 0c = 182 | 16 = 183 | 23 = 184 | ca = 185 | 186 | ; Bold on 187 | 4a = "\b1 " 188 | ; Bold off 189 | 5a = "\b0 " 190 | 6a = "\b0 " -------------------------------------------------------------------------------- /src/org/transformenator/transforms/displaywriter: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract IBM 6580 8 inch Displaywriter files from disk image." 3 | commentary = "EBCDIC encoding, contains many printer-specific codes; non-understood data represented by a tilde character (~)." 4 | ; 5 | 6 | detangler = "Displaywriter" 7 | 8 | ; Horizontal tab 9 | 05 = 09 10 | 39 = 09 11 | 12 | ; Newline 13 | 06 = "\\r\\n" 14 | 15 = "\\r\\n" 15 | 16 | ; Form feed 17 | 0c = 18 | 3a = 19 | 20 | ; Superscript (These are probably a cumulative platen half-shift-up and down) 21 | 09 = 22 | 38 = 23 | 24 | ; Word underscore 25 | 23 = 26 | 27 | ; Backspace 28 | 16 = 29 | 30 | 2d = "-" 31 | ca = "-" 32 | b7 = "-1/4" 33 | b8 = "-1/2" 34 | 35 | ; Space 36 | 40 = 20 37 | 41 = 20 38 | 39 | ; Cent sign 40 | 4a = 41 | 4b = "." 42 | 4c = "<" 43 | 4d = "(" 44 | 4e = "+" 45 | 4f = "!" 46 | 47 | 50 = "&" 48 | 49 | 5a = "!" 50 | 5b = "$" 51 | 5c = "*" 52 | 5d = ")" 53 | 5e = ";" 54 | 5f = "^" 55 | 56 | 60 = "-" 57 | 61 = "/" 58 | 59 | 6b = "," 60 | 6c = "%" 61 | 6d = "_" 62 | 6e = ">" 63 | 6f = "?" 64 | 70 = ";" 65 | 66 | 7a = ":" 67 | 7b = "#" 68 | 7c = "@" 69 | 7d = "\'" 70 | 7e = "=" 71 | 7f = """ 72 | 73 | 81 = "a" 74 | 82 = "b" 75 | 83 = "c" 76 | 84 = "d" 77 | 85 = "e" 78 | 86 = "f" 79 | 87 = "g" 80 | 88 = "h" 81 | 89 = "i" 82 | 83 | 91 = "j" 84 | 92 = "k" 85 | 93 = "l" 86 | 94 = "m" 87 | 95 = "n" 88 | 96 = "o" 89 | 97 = "p" 90 | 98 = "q" 91 | 99 = "r" 92 | 93 | a1 = "~" 94 | a2 = "s" 95 | a3 = "t" 96 | a4 = "u" 97 | a5 = "v" 98 | a6 = "w" 99 | a7 = "x" 100 | a8 = "y" 101 | a9 = "z" 102 | 103 | c0 = "{" 104 | c1 = "A" 105 | c2 = "B" 106 | c3 = "C" 107 | c4 = "D" 108 | c5 = "E" 109 | c6 = "F" 110 | c7 = "G" 111 | c8 = "H" 112 | c9 = "I" 113 | 114 | d0 = "}" 115 | d1 = "J" 116 | d2 = "K" 117 | d3 = "L" 118 | d4 = "M" 119 | d5 = "N" 120 | d6 = "O" 121 | d7 = "P" 122 | d8 = "Q" 123 | d9 = "R" 124 | 125 | e0 = "\\" 126 | e2 = "S" 127 | e3 = "T" 128 | e4 = "U" 129 | e5 = "V" 130 | e6 = "W" 131 | e7 = "X" 132 | e8 = "Y" 133 | e9 = "Z" 134 | 135 | f0 = "0" 136 | f1 = "1" 137 | f2 = "2" 138 | f3 = "3" 139 | f4 = "4" 140 | f5 = "5" 141 | f6 = "6" 142 | f7 = "7" 143 | f8 = "8" 144 | f9 = "9" 145 | 146 | .. = "~" 147 | 148 | ; Apostrophes seem to be prefixed with backslashes 149 | regex=@\\'@'@ 150 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/dmk2raw_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Convert DMK disk image file to raw data." 3 | commentary = "Autodetects DEC RX01 format and halves the data." 4 | ; 5 | detangler = Dmk2Raw 6 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/eaglewriter_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Eaglewriter PC word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fnil\fcharset0 Courier New;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = " }" 9 | 10 | ; Carriage return 11 | 0e = 20 12 | 13 | ; CR/LF gets \par \pard \li0 added 14 | 0d = 0D0A5C7061725C706172645C6C693020 15 | 16 | ; EOF indicator 17 | 1a = "{@@@@}" 18 | 19 | ; Tab 20 | 1f = " " 21 | 22 | ; Bullet (\bullet ) 23 | 05 = 5C62756C6C657420 24 | 25 | ; Indented paragraph (\li1 )(\li360 ) 26 | 08 = 5C6C6933363020 27 | 28 | ; Can't have curly braces in RTF; backslash them 29 | 7b=5c7b 30 | 7d=5c7d 31 | 32 | ; Soft-space? looks like a vertical bar. 33 | 7c= 34 | 35 | ; Emphasis - strip high bits and surround in \i1 and \i0 tags 36 | a0=5C693120205C693020 37 | a1=5C693120215C693020 38 | a2=5C693120225C693020 39 | a3=5C693120235C693020 40 | a4=5C693120245C693020 41 | a5=5C693120255C693020 42 | a6=5C693120265C693020 43 | a7=5C693120275C693020 44 | a8=5C693120285C693020 45 | a9=5C693120295C693020 46 | aa=5C6931202a5C693020 47 | ab=5C6931202b5C693020 48 | ac=5C6931202c5C693020 49 | ad=5C6931202d5C693020 50 | ae=5C6931202e5C693020 51 | af=5C6931202f5C693020 52 | b0=5C693120305C693020 53 | b1=5C693120315C693020 54 | b2=5C693120325C693020 55 | b3=5C693120335C693020 56 | b4=5C693120345C693020 57 | b5=5C693120355C693020 58 | b6=5C693120365C693020 59 | b7=5C693120375C693020 60 | b8=5C693120385C693020 61 | b9=5C693120395C693020 62 | ba=5C6931203a5C693020 63 | bb=5C6931203b5C693020 64 | bc=5C6931203c5C693020 65 | bd=5C6931203d5C693020 66 | be=5C6931203e5C693020 67 | bf=5C6931203f5C693020 68 | c0=5C693120405C693020 69 | c1=5C693120415C693020 70 | c2=5C693120425C693020 71 | c3=5C693120435C693020 72 | c4=5C693120445C693020 73 | c5=5C693120455C693020 74 | c6=5C693120465C693020 75 | c7=5C693120475C693020 76 | c8=5C693120485C693020 77 | c9=5C693120495C693020 78 | ca=5C6931204a5C693020 79 | cb=5C6931204b5C693020 80 | cc=5C6931204c5C693020 81 | cd=5C6931204d5C693020 82 | ce=5C6931204e5C693020 83 | cf=5C6931204f5C693020 84 | d0=5C693120505C693020 85 | d1=5C693120515C693020 86 | d2=5C693120525C693020 87 | d3=5C693120535C693020 88 | d4=5C693120545C693020 89 | d5=5C693120555C693020 90 | d6=5C693120565C693020 91 | d7=5C693120575C693020 92 | d8=5C693120585C693020 93 | d9=5C693120595C693020 94 | da=5C6931205a5C693020 95 | db=5C6931205b5C693020 96 | dc=5C6931205c5C693020 97 | dd=5C6931205d5C693020 98 | de=5C6931205e5C693020 99 | df=5C6931205f5C693020 100 | e0=5C693120605C693020 101 | e1=5C693120615C693020 102 | e2=5C693120625C693020 103 | e3=5C693120635C693020 104 | e4=5C693120645C693020 105 | e5=5C693120655C693020 106 | e6=5C693120665C693020 107 | e7=5C693120675C693020 108 | e8=5C693120685C693020 109 | e9=5C693120695C693020 110 | ea=5C6931206a5C693020 111 | eb=5C6931206b5C693020 112 | ec=5C6931206c5C693020 113 | ed=5C6931206d5C693020 114 | ee=5C6931206e5C693020 115 | ef=5C6931206f5C693020 116 | f0=5C693120705C693020 117 | f1=5C693120715C693020 118 | f2=5C693120725C693020 119 | f3=5C693120735C693020 120 | f4=5C693120745C693020 121 | f5=5C693120755C693020 122 | f6=5C693120765C693020 123 | f7=5C693120775C693020 124 | f8=5C693120785C693020 125 | f9=5C693120795C693020 126 | fa=5C6931207a5C693020 127 | fb=5C6931207b5C693020 128 | fc=5C6931207c5C693020 129 | fd=5C6931207d5C693020 130 | fe=5C6931207e5C693020 131 | ff=5C6931207f5C693020 132 | 133 | ; Center line 134 | regex = @\.C@\\qc @ 135 | regex = @\.c@\\qc @ 136 | 137 | ; Unknown Eaglewriter-specific directives 138 | regex = @\.E.*@@ 139 | regex = @\.e.*@@ 140 | regex = @\.H@@ 141 | regex = @\.h@@ 142 | regex = @\.S.*@@ 143 | regex = @\.s.*@@ 144 | regex = @\.Y.*@@ 145 | regex = @\.y.*@@ 146 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/easyscript-alt_c64_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Easyscript word processor." 3 | commentary = "This is an alternate approach to an Easyscript transform: assumes ASCII export from tools like DirMaster." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator;}\f0 " 8 | 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | ; End of line/paragraph becomes \r\n (plus) \par \par \li0 \b0 \fs24 13 | ; Need to turn off some things that don't have an explicit off switch (i.e. headings) 14 | ; Don't consider the replacement for further replacements 15 | 0d = "\par " 16 | 17 | ; Remove nulls 18 | 00 = 19 | 20 | ; Centering on and off 21 | regex = @\*cn1@\\qc @ 22 | regex = @\*cn0@\\pard\\slmulti @ 23 | 24 | ; Right alignment on and off 25 | regex = @\*ra1@\\qr @ 26 | regex = @\*ra0@\\pard\\slmulti @ 27 | 28 | ; Remove margin controls 29 | regex = @\*[l|r]m[0-9][0-9]@@ 30 | regex = @\*[l|r]m[0-9]@@ 31 | 32 | ; Remove random control characters 33 | regex = @\*vp[0-9]@@ 34 | regex = @\*sp[0-9]@@ 35 | regex = @\*ft.*@@ 36 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/easyscript-dir_c64_rtf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RetroFloppy/transformenator/edefcfdd3b6b959010e7d19ff497fd87b412f741/src/org/transformenator/transforms/easyscript-dir_c64_rtf -------------------------------------------------------------------------------- /src/org/transformenator/transforms/easyscript_c64_rtf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RetroFloppy/transformenator/edefcfdd3b6b959010e7d19ff497fd87b412f741/src/org/transformenator/transforms/easyscript_c64_rtf -------------------------------------------------------------------------------- /src/org/transformenator/transforms/easywriter-alt_pc_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Very early PC (possibly EasyWriter) word processor." 3 | commentary = "File suffix is EWF." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Newlines 12 | 0d00 = "\\r\\n\par " 13 | 00 = "\\r\\n\par " 14 | 15 | ; Command characters 16 | 01 = 20 17 | 1b45 = 18 | 1b47 = 19 | 20 | ; Trim off leading 0x80 bytes 21 | trim_leading = 80 22 | 23 | ; End of file 24 | 1a = "{@@@@}" 25 | 26 | ; Directives 27 | regex = @\.[S|s][P|p][A|a][C|c][E|e][0-2]@@ 28 | regex = @\.[E|e][O|o][L|l]@@ 29 | regex = @\.[P|p][A|a][G|g][E|e].*$@@ 30 | regex = @\.TOP.*$@@ 31 | regex = @\.top.*$@@ 32 | regex = @\.TITLEA.*$@@ 33 | regex = @\.titlea.*$@@ 34 | regex = @\.MARGIN.*$@@ 35 | regex = @\.margin.*$@@ 36 | regex = @\.LINES.*$@@ 37 | regex = @\.lines.*$@@ 38 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/easywriter_a2_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract and convert Apple II EasyWriter word processor files from disk image." 3 | commentary = "Expects EasyWriter by John Draper (Cap'n Software) word processor .D13 disk images. Based on extant files with no particular technical reference - may be breathtakingly incomplete." 4 | ; 5 | detangler = EasyWriterA2 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator;}\f0 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | ; Space? 13 | 25 = 20 14 | 15 | ; Italics on 16 | 3c = "\i1 " 17 | bc = " \i1 " 18 | 19 | ; Italics off 20 | 3e = "\i0 " 21 | be = " \i0 " 22 | 23 | ; Center on: #E 24 | 2345 = "\qc " 25 | a345 = "\qc " 26 | 27 | ; Center off: #F 28 | 2346 = "\ql " 29 | a346 = "\ql " 30 | 31 | ; Commands 32 | ; .c 33 | 00ae63 = 34 | ; .u*160 35 | 00ae75..313630 = 36 | ; .u#27 37 | 00ae75233237 = 38 | ; .u <<< This may be too greedy >>> 39 | 00ae75 40 | ; .t*67 41 | 00ae742a3637 = 42 | ; .j1 43 | 00ae6a31 = 44 | 45 | ; indent on: .l66 46 | 00ae6c3636 = "\li725 " 47 | ; indent off: .l70 48 | 00ae6c3730 = "\li0 " 49 | 50 | ; Quote range 51 | a2 = 2022 52 | a3 = 2023 53 | a4 = 2024 54 | a5 = 2025 55 | a6 = 2026 56 | a7 = 2027 57 | a8 = 2028 58 | a9 = 2029 59 | aa = 202a 60 | ab = 202b 61 | ac = 202c 62 | ad = 202d 63 | ae = 202e 64 | 65 | b0 = 2030 66 | b1 = 2031 67 | b2 = 2032 68 | b3 = 2033 69 | b4 = 2034 70 | b5 = 2035 71 | b6 = 2036 72 | b7 = 2037 73 | b8 = 2038 74 | b9 = 2039 75 | 76 | ; Uppercase letters 77 | c1 = 2041 78 | c2 = 2042 79 | c3 = 2043 80 | c4 = 2044 81 | c5 = 2045 82 | c6 = 2046 83 | c7 = 2047 84 | c8 = 2048 85 | c9 = 2049 86 | ca = 204a 87 | cb = 204b 88 | cc = 204c 89 | cd = 204d 90 | ce = 204e 91 | cf = 204f 92 | d0 = 2050 93 | d1 = 2051 94 | d2 = 2052 95 | d3 = 2053 96 | d4 = 2054 97 | d5 = 2055 98 | d6 = 2056 99 | d7 = 2057 100 | d8 = 2058 101 | d9 = 2059 102 | da = 205a 103 | 104 | ; Lowercase letters 105 | e1 = 2061 106 | e2 = 2062 107 | e3 = 2063 108 | e4 = 2064 109 | e5 = 2065 110 | e6 = 2066 111 | e7 = 2067 112 | e8 = 2068 113 | e9 = 2069 114 | ea = 206a 115 | eb = 206b 116 | ec = 206c 117 | ed = 206d 118 | ee = 206e 119 | ef = 206f 120 | f0 = 2070 121 | f1 = 2071 122 | f2 = 2072 123 | f3 = 2073 124 | f4 = 2074 125 | f5 = 2075 126 | f6 = 2076 127 | f7 = 2077 128 | f8 = 2078 129 | f9 = 2079 130 | fa = 207a 131 | 132 | ; Remaining nulls - turn them into spaces 133 | 00 = 20 134 | 135 | ; Newlines 136 | 0d = "\\r\\n\par " 137 | 5d = "\\r\\n\par " 138 | dd = "\\r\\n\par\par " 139 | 140 | ; Remove leading space 141 | regex = @\\par @\\par @ 142 | 143 | ; Remove .i followed by digits 144 | regex = @\.i[\d]*@@ 145 | 146 | ; Remove .l followed by digits 147 | regex = @\.lines[\d]*@@ 148 | regex = @\.l[\d]*@@ 149 | 150 | ; Remove .m followed by digits 151 | regex = @\.margin[\d]*@@ 152 | regex = @\.m[\d]*@@ 153 | 154 | ; Remove .formstop directive 155 | regex = @\.formstop@@ 156 | 157 | ; Remove .page followed by d,d 158 | regex = @\.page[\d]*[,][\d]*@@ 159 | 160 | ; Remove .pagelines followed by digits 161 | regex = @\.pagelines[\d]*@@ 162 | 163 | ; Remove .space followed by digits 164 | regex = @\.space[\d]*@@ 165 | 166 | ; Remove .top followed by digits 167 | regex = @\.top[\d]*@@ 168 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/easywriter_ii_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PC EasyWriter II word processor." 3 | commentary = "A file is in fact a collection of files. First four bytes are 0x64000A00." 4 | detangler=EasyWriterII 5 | ; 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator;}\f0 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | ; Emphasis on/off 13 | 89="\ul1 " 14 | 80="\ul0 " 15 | 16 | ; Not the real space 17 | 20= 18 | 19 | ; The real newline 20 | 1d="\\r\\n\par " 21 | 22 | ; Some whitespace or space control 23 | 1e= 24 | 25 | ; The real space 26 | 1f=20 27 | 28 | ; Ends of "sectors" have nulls - remove them 29 | 00= 30 | 31 | ; Unknown productions, may include footnoting 32 | 01= 33 | 02= 34 | 06= 35 | 08= 36 | 0a= 37 | 0e= 38 | 1c= 39 | ef= 40 | bf= 41 | bd= 42 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/easywriter_pc_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PC EasyWriter word processor." 3 | commentary = "Based on extant PC files with no particular technical reference - may be breathtakingly incomplete." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Newlines 12 | 0a = "\\r\\n\par\pard " 13 | 86 = "\\r\\n\par\pard " 14 | 8c = "\\r\\n\par " 15 | 16 | ; Page breaks 17 | dc..............dc = "\\r\\n\par\pard " 18 | 19 | ; Some leading crap 20 | d1 % "{\comment","}" 21 | 22 | ; Line breaks 23 | 0d = 20 24 | 0b = 20 25 | 0c = 26 | 19 = 27 | ; Tabs 28 | 14 = 09 29 | 0f = 09 30 | 31 | ; Commands 32 | c0........c0 = 33 | c1....c1 = 34 | c2..c2 = 35 | c3......c3 = 36 | c4......c4 = "\\r\\n\par " 37 | c6....c6 = 38 | c7........c7 = 39 | c9................................................................................c9 = 40 | cc = 41 | ce....ce = 42 | cf..cf = 43 | d0........d0 = 44 | d5....d5 = 45 | d8....d8 = 46 | de....de = 47 | e0....e0 = 48 | 84 = 49 | 89 = 50 | ac = 51 | f2 = 52 | 53 | ; Center on 54 | c300....c3 = "\\r\\n\qc " 55 | 56 | ; Probably centering or some other emphasis 57 | 82 = 58 | ; Stop centering "\ql " 59 | 83 = 60 | 61 | ; Seemed to precede a page number 62 | 2d = 63 | 64 | ; Bold on 65 | 9d = "\b1 " 66 | ; Bold off 67 | 9c = "\b0 " 68 | 69 | ; Emphasis on 70 | 94 = "\i1 " 71 | ; Emphasis off 72 | 95 = "\i0 " 73 | 74 | ; Italics on 75 | df1b34df = "\i1 " 76 | ; Italics off 77 | df1b35df = "\i0 " 78 | 79 | ; Center on (W1) 80 | df1b5731df = "\qc " 81 | df1b573120df = "\qc " 82 | df1b57312020df = "\qc " 83 | ; Center off (W0) 84 | df1b5730df = 85 | 86 | ; Indented paragraph 87 | e00005e0 = 88 | 89 | ; Dashes 90 | a9 = "-" 91 | aa = "-" 92 | 93 | ; Trademark symbol 94 | bc54bc4d = "\'99" 95 | 96 | ; Superscript one character 97 | bc = 98 | 99 | ; Unsure 100 | e1..e1 -------------------------------------------------------------------------------- /src/org/transformenator/transforms/ebcdic: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Basic EBCDIC to ASCII transform." 3 | ; 4 | 5 | 2d = "-" 6 | 7 | 40 = " " 8 | 9 | 4b = "." 10 | 4c = "<" 11 | 4d = "(" 12 | 4e = "+" 13 | 4f = "|" 14 | 15 | 50 = "&" 16 | 17 | 5a = "!" 18 | 5b = "$" 19 | 5c = "*" 20 | 5d = ")" 21 | 5e = ";" 22 | 5f = "^" 23 | 24 | 60 = "-" 25 | 61 = "/" 26 | 27 | 6b = "," 28 | 6c = "%" 29 | 6d = "_" 30 | 6e = ">" 31 | 6f = "?" 32 | 70 = ";" 33 | 34 | 7a = ":" 35 | 7b = "#" 36 | 7c = "@" 37 | 7d = "'" 38 | 7e = "=" 39 | 7f = """ 40 | 41 | 81 = "a" 42 | 82 = "b" 43 | 83 = "c" 44 | 84 = "d" 45 | 85 = "e" 46 | 86 = "f" 47 | 87 = "g" 48 | 88 = "h" 49 | 89 = "i" 50 | 51 | 91 = "j" 52 | 92 = "k" 53 | 93 = "l" 54 | 94 = "m" 55 | 95 = "n" 56 | 96 = "o" 57 | 97 = "p" 58 | 98 = "q" 59 | 99 = "r" 60 | 61 | a1 = "~" 62 | a2 = "s" 63 | a3 = "t" 64 | a4 = "u" 65 | a5 = "v" 66 | a6 = "w" 67 | a7 = "x" 68 | a8 = "y" 69 | a9 = "z" 70 | 71 | c0 = "{" 72 | c1 = "A" 73 | c2 = "B" 74 | c3 = "C" 75 | c4 = "D" 76 | c5 = "E" 77 | c6 = "F" 78 | c7 = "G" 79 | c8 = "H" 80 | c9 = "I" 81 | 82 | d0 = "}" 83 | d1 = "J" 84 | d2 = "K" 85 | d3 = "L" 86 | d4 = "M" 87 | d5 = "N" 88 | d6 = "O" 89 | d7 = "P" 90 | d8 = "Q" 91 | d9 = "R" 92 | 93 | e0 = "\\" 94 | e2 = "S" 95 | e3 = "T" 96 | e4 = "U" 97 | e5 = "V" 98 | e6 = "W" 99 | e7 = "X" 100 | e8 = "Y" 101 | e9 = "Z" 102 | 103 | f0 = "0" 104 | f1 = "1" 105 | f2 = "2" 106 | f3 = "3" 107 | f4 = "4" 108 | f5 = "5" 109 | f6 = "6" 110 | f7 = "7" 111 | f8 = "8" 112 | f9 = "9" 113 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/eightinch8x512_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Unknown 8-inch word processor" 3 | commentary = "Preliminary input, output in RTF." 4 | detangler = EightInch8x512 5 | ; 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\*\generator David Schmidt - Transformenator;}\f0 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | 00= 13 | 14 | ; 82=bold begin 15 | 82="\b1 " 16 | ; 83=bold end 17 | 83="\b0 " 18 | 19 | ; 84=italic begin 20 | 84="\i1 " 21 | ; 85=italic end 22 | 85="\i0 " 23 | 24 | ; 91..91=start of a heading 25 | 91..91= 26 | 27 | ; 94=part of a footnote reference 28 | 94= 29 | 30 | ; 96=line return 31 | 96=20 32 | ; 97=newline 33 | 97="\\r\\n\par " 34 | 35 | ; 9a=tab 36 | 9a="\tab " 37 | 38 | ; 99=unknown emphasis (seen at the beginning of a line) 39 | 99= 40 | 41 | 9a=2020202020 42 | 43 | ; Super/subscript 44 | ; 9d9d=super 45 | 9d9d= 46 | 9d= 47 | ; 9c9c=done with super 48 | 9c9c= 49 | 9c= 50 | 51 | 52 | 9030=3c3c 53 | FD90=3e3e 54 | 55 | regex = @<<.*>>@@ 56 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/ensoniq_eft: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract Ensoniq files from DD or HD disk images." 3 | commentary = "Files are emitted with a header compatible with MIDI translation software." 4 | detangler = Ensoniq 5 | ; 6 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/epson_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Transform for files with embedded Epson printer codes." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | ; Return/newline 11 | 0D0D0A = "\\r\\n\par " 12 | 0D0A = "\\r\\n\par " 13 | 14 | ; Control characters 15 | 0c = 16 | 0e = 17 | 14 = 18 | 19 | ; ESC-E: Emphasis on 20 | 1b45 = 21 | 9b45 = 22 | ; Esc-F: Emphasis off 23 | 1b46 = 24 | 9b46 = 25 | 26 | ; ESC-G: Bold on 27 | 1b47 = "\b1 " 28 | 9b47 = "\b1 " 29 | ; Esc-H: Bold off 30 | 1b48 = "\b0 " 31 | 9b48 = "\b0 " 32 | 33 | ; Esc-4: Italics on 34 | 1b34 = "\i1 " 35 | 9b34 = "\i1 " 36 | ; Esc-5: Italics off 37 | 1b35 = "\i0 " 38 | 9b35 = "\i0 " 39 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/final_draft: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Final Draft script processor." 3 | commentary = "Text Extraction Only." 4 | ; 5 | 6 | ; First one of these is the SOF 7 | 03........................................00......2c = "{@@@@}" 8 | 9 | 0d = 0d0a0d0a 10 | 11 | ; Apostrophe 12 | 92 = "'" 13 | d5 = "'" 14 | 15 | 0006000d0000001e = "{@@@@}" 16 | 17 | ; Inter-paragraph (maybe inter-page) cruft 18 | ....000d0000 = 19 | ....0009.... = 20 | 21 | ; EOF 22 | 033030303430303030........3030303030 = "{@@@@}" 23 | 24 | ; Link tag 25 | 03........................................00......2c = 26 | 27 | ; Special begin-end characters... maybe chevrons, etc. 28 | 93 = "<" 29 | 94 = ">" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/first_word_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description="First Word word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = " }" 9 | 10 | ; SOF indicator 11 | 1f = "{@@@@}" 12 | 13 | ; Paragraph begin (like a tab) 14 | 1b84= 15 | 16 | ; Space 17 | 1e = 20 18 | 19 | ; Newline 20 | 1d1c0d0a= 21 | 22 | ; Newline really is newline 23 | 0d0a = "\\r\\n\par " 24 | 25 | ;d0a1d1c0d0a= 26 | 27 | ; Italics on/off 28 | 1b88 = "\i1 " 29 | 1b81 = "\i1 " 30 | 1b80 = "\i0 " 31 | 32 | ; Footnotes - the problem is there can be multiple footnotes. There's a begin for each, 33 | ; But if there's multiples - there's a single end marker (0x1f45). So annotating 34 | ; them as real footnotes in RTF is difficult. 35 | 1f4e................................ = "\\r\\n\par \\r\\n\par " 36 | 1f45 = "\\r\\n\par \\r\\n\par " 37 | 38 | ; Ruler (7f/2e productions bounded by numbers and brackets) 39 | ; i.e. 9[...................................................]001 40 | 395b................................................................................................................................5d = 41 | 395b..............................................................................................................................5d...... = 42 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/fleet_atr: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Atari Fleet Systems word processor." 3 | commentary = "From Atari 5-1/4" disks." 4 | ; 5 | 6 | 7 | 00= 8 | [01..1e]=61 9 | 1f=0d0a 10 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/geowrite_pc: -------------------------------------------------------------------------------- 1 | ; 2 | description = "GeoWrite and Canon StarWriter 5000/7000 word processor." 3 | commentary = "Part of the GeoWorks suite." 4 | ; 5 | detangler=GeoWritePC 6 | 7 | ; Emdash 8 | be="--" 9 | 10 | 00= 11 | 12 | 0d=0d0a -------------------------------------------------------------------------------- /src/org/transformenator/transforms/greatworks_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Symantec Greatworks word processor." 3 | commentary = "Only the text portions are converted to RTF." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fhelvetica\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Find the beginning of the file very simplistically - by searching for the last null. 12 | ; The file format actually has a complex system of pointers at the beginning. 13 | 00 = "{@@@@}" 14 | ; The last 0xf6 bytes is always a trailer. This gets us the "meat" of the file. 15 | trim_trailing = f6 16 | 17 | ; Newlines 18 | 0d = "\\n\par\pard " 19 | 20 | ; "Smart" quotes 21 | d2 = """ 22 | d3 = """ 23 | d4 = "'" 24 | d5 = "'" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/hard1: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Unknown word processor." 3 | commentary = "Found on a hard-sectored 8 inch disk." 4 | ; 5 | 6 | ; Special substitutions 7 | 02 = 20 8 | 08 = "-" 9 | 14 = "|" 10 | 15 = 11 | 82 = "." 12 | 94 = "+" 13 | 14 | ; Italics on and off 15 | 03 = 16 | 04 = 17 | 18 | 0bff = "{@@@@}" 19 | 20 | ; Newlines 21 | 0a = 0d0a 22 | 0b = 0d0a 23 | 24 | ; Space out remaining ff 25 | ff = 20 26 | 27 | ; Slice off high bits 28 | [a0..ff] = 20 -------------------------------------------------------------------------------- /src/org/transformenator/transforms/hp_64000_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract HP 64000 files from disk image." 3 | commentary = "EOF within the final block not detected." 4 | ; 5 | detangler = HP64000 6 | ; -------------------------------------------------------------------------------- /src/org/transformenator/transforms/hp_instrument_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract HP instrument (not LIF) files from disk image." 3 | commentary = "Text files may need to be further processed to be readable." 4 | ; 5 | detangler = HPInstrument 6 | ; -------------------------------------------------------------------------------- /src/org/transformenator/transforms/ibm8_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract IBM (typically 8") files from disk image." 3 | commentary = "These typically come from an IBM System/32/34/36 or AS/400." 4 | ; 5 | detangler = IBM8 6 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/ibm_5520_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract IBM 5520 Administrative System files from disk image." 3 | commentary = "EBCDIC encoding, uses many printer-specific codes; non-understood data is represented by a tilde character (~)." 4 | ; 5 | detangler = AdministrativeSystem 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\*\generator David Schmidt - Transformenator ;}\f0 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | ; Horizontal tab 13 | 05 = 09 14 | 39 = 09 15 | 16 | ; Newline 17 | 06 = "\par\par " 18 | ;15 = "\par " 19 | ; Form feed 20 | 0c = 21 | ca15 = 22 | ca = 23 | 24 | ; Suberscript 25 | 09 = "\super " 26 | 38 = "\nosupersub " 27 | 28 | ; Italics 29 | 1a = "\i1 " 30 | 23 = "\i0 " 31 | 32 | ; Productions that seem to have no use 33 | 00..e80700 = 34 | 01..e80700 = 35 | 02..e80700 = 36 | 03..e80700 = 37 | 04..e80700 = 38 | 2bd105150103b5 = 39 | 40 | 15 = " " 41 | 42 | ; Backspace 43 | 16 = 44 | 45 | 2d = "-" 46 | 2f = 47 | 48 | 40 = " " 49 | 41 = " " 50 | 51 | 4b = "." 52 | 4c = "<" 53 | 4d = "(" 54 | 4e = "+" 55 | 4f = "|" 56 | 57 | 50 = "&" 58 | 59 | 5a = "!" 60 | 5b = "$" 61 | 5c = "*" 62 | 5d = ")" 63 | 5e = ";" 64 | 5f = "^" 65 | 66 | 60 = "-" 67 | 61 = "/" 68 | 69 | 6b = "," 70 | 6c = "%" 71 | 6d = "_" 72 | 6e = ">" 73 | 6f = "?" 74 | 70 = ";" 75 | 76 | 7a = ":" 77 | 7b = "#" 78 | 7c = "@" 79 | 7d = "\'" 80 | 7e = "=" 81 | 7f = """ 82 | 83 | 81 = "a" 84 | 82 = "b" 85 | 83 = "c" 86 | 84 = "d" 87 | 85 = "e" 88 | 86 = "f" 89 | 87 = "g" 90 | 88 = "h" 91 | 89 = "i" 92 | 93 | 91 = "j" 94 | 92 = "k" 95 | 93 = "l" 96 | 94 = "m" 97 | 95 = "n" 98 | 96 = "o" 99 | 97 = "p" 100 | 98 = "q" 101 | 99 = "r" 102 | 103 | a1 = "~" 104 | a2 = "s" 105 | a3 = "t" 106 | a4 = "u" 107 | a5 = "v" 108 | a6 = "w" 109 | a7 = "x" 110 | a8 = "y" 111 | a9 = "z" 112 | 113 | c0 = "{" 114 | c1 = "A" 115 | c2 = "B" 116 | c3 = "C" 117 | c4 = "D" 118 | c5 = "E" 119 | c6 = "F" 120 | c7 = "G" 121 | c8 = "H" 122 | c9 = "I" 123 | 124 | d0 = "}" 125 | d1 = "J" 126 | d2 = "K" 127 | d3 = "L" 128 | d4 = "M" 129 | d5 = "N" 130 | d6 = "O" 131 | d7 = "P" 132 | d8 = "Q" 133 | d9 = "R" 134 | 135 | e0 = "\\" 136 | e2 = "S" 137 | e3 = "T" 138 | e4 = "U" 139 | e5 = "V" 140 | e6 = "W" 141 | e7 = "X" 142 | e8 = "Y" 143 | e9 = "Z" 144 | 145 | f0 = "0" 146 | f1 = "1" 147 | f2 = "2" 148 | f3 = "3" 149 | f4 = "4" 150 | f5 = "5" 151 | f6 = "6" 152 | f7 = "7" 153 | f8 = "8" 154 | f9 = "9" 155 | 156 | .. = "~" 157 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/ibm_office_system_6: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract IBM Office System 6 word processor files from disk image." 3 | commentary = "Spin-code based." 4 | ; 5 | detangler = IBMOfficeSystem6 6 | 7 | 00= 8 | 02="-" 9 | 0c="," 10 | 12= 11 | 15="'" 12 | 16="." 13 | 2a=09 14 | ; 2b is more of a carriage return 15 | 2b=0d 16 | 6b=0d 17 | 38=" " 18 | ; 3a is an underlined space 19 | 3a=" " 20 | 49="?" 21 | ; Control of some kind 22 | 4a= 23 | 4d=":" 24 | 55=22 25 | ; 56 is some kind of "enhanced" period 26 | 56="." 27 | ; Emphasis on 28 | 70= 29 | 42= 30 | d9= 31 | 32 | ; Emphasis off 33 | 71= 34 | d8= 35 | 36 | 75="%" 37 | 79="$" 38 | 7d="-" 39 | 7f="!" 40 | 41 | c1= 42 | 43 | ; Null 44 | e2= 45 | ; Blank space on disk 46 | e5= 47 | 48 | ; 19/59 ("o") coupled with 4a, likely did umlauts 49 | 194a09="o" 50 | 594a09="O" 51 | 52 | ; Numbers 53 | 30="9" 54 | 31="0" 55 | 34="6" 56 | ;35="5" (correct as-is) 57 | 36="2" 58 | 39="4" 59 | 3c="8" 60 | 3d="7" 61 | 3e="3" 62 | 3f="1" 63 | 64 | ; Capital letters 65 | 41="Y" 66 | 44="Q" 67 | 45="P" 68 | 47="J" 69 | 4e="F" 70 | 4f="G" 71 | 50="W" 72 | 51="S" 73 | 54="I" 74 | 59="O" 75 | 5c="A" 76 | 5d="R" 77 | 5e="V" 78 | 5f="M" 79 | 60="B" 80 | 61="H" 81 | 64="K" 82 | 65="E" 83 | 66="N" 84 | 67="T" 85 | 69="L" 86 | 6c="C" 87 | 6d="D" 88 | 6e="U" 89 | 6f="X" 90 | 77="Z" 91 | 92 | ; Lowercase letters 93 | 01="y" 94 | 04="q" 95 | 05="p" 96 | 07="j" 97 | 0e="f" 98 | 0f="g" 99 | 10="w" 100 | 11="s" 101 | 14="i" 102 | 19="o" 103 | 1c="a" 104 | 1d="r" 105 | 1e="v" 106 | 1f="m" 107 | 20="b" 108 | 21="h" 109 | 24="k" 110 | 25="e" 111 | 26="n" 112 | 27="t" 113 | 29="l" 114 | 2c="c" 115 | 2d="d" 116 | 2e="u" 117 | 2f="x" 118 | 37="z" 119 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/imd2raw_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Convert ImageDisk .IMD disk image file to raw, linear data." 3 | commentary = "" 4 | ; 5 | detangler = Imd2Raw 6 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/interdata: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract Interdata 8 inch disk files from disk image." 3 | commentary = "Disks are FM encoded, single sided, 128 bytes x 26 sectors x 77 tracks - but the OS deals in 256 byte chunks." 4 | ; 5 | detangler=Interdata 6 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/jpg_scrape: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Scrape off jpg files from a disk image." 3 | commentary = "Works in a totally brain-dead fashion. Useful for some really crappy Mavica camera disks." 4 | ; 5 | detangler = JPGScrape -------------------------------------------------------------------------------- /src/org/transformenator/transforms/justwrite: -------------------------------------------------------------------------------- 1 | ; 2 | description = "JustWrite word processor." 3 | commentary = "Preabmble text contains the string WRD PCPCPC" 4 | ; 5 | 6 | ; Trim the leading 0x0400 bytes 7 | trim_leading = 400 8 | 9 | ; Newlines 10 | 0d = 0d0a 11 | 03 = 0d0a 12 | 13 | ; Start of a new section/page 14 | ff9b = 0d0a 15 | 16 | ; Other control sequences 17 | ff.. = 18 | 19 | ; Mid-sentence breaks: byte, zero, non-zero, zero 20 | ..00!!00 = 21 | 22 | ; Space, maybe a tab 23 | 83 = 20 24 | 25 | ; Lop off nulls 26 | 00 = 27 | 28 | ; Page break of some kind 29 | 86..................................................................................................................................................83 = 0d0a 30 | 31 | ; Not sure what these are... seem to be page breaks of some sort 32 | 2e2e2e092e2e2e2e092e2e2e2e092e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e = 33 | 34 | ; Lop off high bytes for italics 35 | d1= 36 | [e1..ff]=61 37 | [c1..db]=41 38 | 39 | 0e="{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/justwrite2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RetroFloppy/transformenator/edefcfdd3b6b959010e7d19ff497fd87b412f741/src/org/transformenator/transforms/justwrite2 -------------------------------------------------------------------------------- /src/org/transformenator/transforms/kermit: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Kermit operating system" 3 | commentary = "Tar-like archive; disk is 2-sided, 10x256 for the first track, then 18x256 for the rest." 4 | ; 5 | detangler = Kermit -------------------------------------------------------------------------------- /src/org/transformenator/transforms/leading_edge_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Leading Edge Word Processor." 3 | commentary = "Telltale files are ')LEPWP.DDR' and 'STANDARD.DOC'" 4 | detangler = LeadingEdge 5 | ; 6 | 7 | ; Header for RTF format - Note 1.5 line spacing \sl360 8 | head = "{\rtf1{\fonttbl{\f0\fnil\fcharset0 Courier New;}}{\*\generator David Schmidt - Transformenator;}\f0\fs20\sl360 " 9 | 10 | ; Closing brace for RTF format 11 | tail = "}" 12 | 13 | ; New Page 14 | 5c710193000000657901715c = "\page " 15 | 5c71....0002..715c = "\page " 16 | ; Manual pagination from word processor... ignore 17 | 5c71........03715c = 18 | 19 | ; Not sure... ignore 20 | 5c71....00..00........05715c = 21 | 5c71....00..00..715c = 22 | 23 | ; Newline: \gn\ (also turn centering, bold, and underlining off) 24 | 5c676e5c = "\\r\\n\par\ul0\b0\ql " 25 | 26 | ; Tab: \gt\ 27 | 5c67745c = 09 28 | 29 | ; Center: \g:\ 30 | 5c673a5c = "\qc " 31 | 32 | ; Italics on 33 | 5c71....000100....01715c = "\i1 " 34 | 5c71....010100....01715c = "\i1 " 35 | 36 | ; Bold on 37 | 5c71....000400....01715c = "\b1 " 38 | 5c71....000c00....01715c = "\b1 " 39 | 40 | ; Bold/Underline/super/subscript off 41 | 5c71....000000....01715c = "\b0\i0\ul0\nosupersub " 42 | 5c71....010000....01715c = "\i0 " 43 | 44 | ; Underline on 45 | 5c71....000500....01715c = "\ul " 46 | 47 | ; Superscript on 48 | 5c71....002000....01715c = "\super " 49 | 50 | ; Start of text (bracketed by two "\s\" productions) 51 | 5c735c = "{@@@@}" 52 | 53 | ; End of file: 0x1a 54 | 1a = "{@@@@}" 55 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/linolex_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract 3M/Linolex 8" files from disk image." 3 | ; 4 | detangler=Linolex 5 | 6 | ; Toggle emphasis 7 | 01= 8 | 9 | ; Variable substitution? 10 | 03= 11 | 12 | ; Unknown emphasis production 13 | 07..= 14 | 15 | ; Unknown 16 | 11= 17 | 18 | ; Indent 19 | 1e=20 20 | 21 | ; Return 22 | e0=20 23 | ; CRLF 24 | e1=0d0a 25 | ; Linefeed 26 | e2=0d0a 27 | ; Page eject? 28 | e3=0d0a0d0a 29 | 30 | ; Unknown production 31 | E61A911A911A911AE6= 32 | 33 | ; Document control 34 | 04..............................................................................04 35 | 36 | ; EOF indicator 37 | ff = "{@@@@}" 38 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/magi_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract Magi Major Leaguer files from disk image." 3 | ; 4 | detangler = Magi 5 | ; -------------------------------------------------------------------------------- /src/org/transformenator/transforms/manuscript: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Lotus Manuscript word processor." 3 | ; 4 | 5 | ;2 1 ( 1 1 b 2 8 7 3 3 . 3 . 5 6 = 6 | 3231283131623238373333..33..353600 = 7 | 8 | ; Start of text - convert '*B.' to '*B' 9 | 0d0a2a42..0d0a = 0d0a2a420d0a0d0a 10 | 11 | ; Start of text - '*B' 12 | 0d0a2a420d0a = "{@@@@}" 13 | 14 | ; End of text - '*E' 15 | 0d0a2a450d0a = "{@@@@}" 16 | 17 | ; Newline 18 | 1d = 0a 19 | 20 | ; New page? "=1" 21 | 0d0a3d31 = 22 | 23 | ; May be beginning of line, or centering 24 | 133233281329 = 25 | 13372831 = 26 | 1329 = 27 | 28 | ; Unknown... 18(26000 29 | 3138283236303030 = 30 | 31 | ; 3... 32 | 0d0a33......0d0a = 0d0a 33 | 34 | ; B..... 35 | 0d0a42..........0d0a = 0d0a 36 | 37 | ; B.... 38 | 0d0a42........0d0a = 0d0a 39 | 40 | ; B... 41 | 0d0a42......0d0a = 0d0a 42 | 43 | ; B.. 44 | 0d0a42....0d0a = 0d0a 45 | 46 | ; B 47 | 0d0a420d0a = 0d0a 48 | 49 | ; C... 50 | 0d0a43......0d0a = 0d0a 51 | 52 | ; C.. 53 | 0d0a43....0d0a = 0d0a 54 | 55 | ; E. 56 | 0d0a45..0d0a = 0d0a 57 | 58 | ; S... 59 | 0d0a53......0d0a = 0d0a 60 | 61 | ; S.. 62 | 0d0a53....0d0a = 0d0a 63 | 64 | ; S. 65 | 0d0a53..0d0a = 0d0a 66 | 67 | ; S 68 | 0d0a53 = 69 | 70 | ; New text line 71 | 0d0a54 = 72 | 73 | 0d0a = 74 | 75 | ; Stray control characters 76 | 01 = 77 | 04 = 78 | 05 = 79 | 10 = 80 | 12 = 81 | 13 = 82 | 80 = 83 | 84 | ; Lop off nulls 85 | 00 = 86 | 87 | ; Ctrl-/ 88 | 1c = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/memowriter_mmo: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PC Memowriter word processor." 3 | commentary = "Files have .MMO suffix." 4 | ; 5 | 6 | trim_leading=5a 7 | 05= 8 | 0d=0d0a 9 | 18= -------------------------------------------------------------------------------- /src/org/transformenator/transforms/memowriter_mss: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PC Memowriter word processor." 3 | commentary = "Files have .MSS suffix." 4 | ; 5 | 6 | ; Header for RTF format 7 | ;head = "{\rtf1{\fonttbl{\f0\fnil\fcharset0 Courier New;}}{\*\generator David Schmidt - Transformenator;}\f0\fs20 " 8 | ; Closing brace for RTF format 9 | ;tail = "}" 10 | 11 | 0f = 12 | ; Bold toggle 13 | 02 = 14 | c1= 15 | d3= 16 | ; Underline toggle 17 | 13 = 18 | ; Superscript toggle 19 | 14 = 20 | 21 | ; Strip high bits 22 | ;[80..ff] # 00 23 | 24 | ; .CWx 25 | regex = @\.[c|C][w|W].*@@ 26 | ; .FO 27 | regex = @\.[f|F][o|O].*@@ 28 | ; .MBx 29 | regex = @\.[m|M][b|B].*@@ 30 | ; .MTx 31 | regex = @\.[m|M][t|T].*@@ 32 | ; .OP 33 | regex = @\.[o|O][p|P].*@@ 34 | ; .PA 35 | regex = @\.[p|P][a|A].*@@ 36 | ; .PN 37 | regex = @\.[p|P][n|N].*@@ 38 | ; .RR 39 | regex = @\.[r|R][r|R].*@@ 40 | 41 | ; End of file is EOF 42 | 1a = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/microdata: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract and convert Microdata 8 inch disk files from disk image." 3 | commentary = "Disks are FM encoded, single sided, 256 bytes x 16 sectors x 77 tracks." 4 | ; 5 | detangler=Microdata 6 | 7 | ; The first category marker would also signify the start of a database (but don't consume the token) 8 | 1e # "{@@@@}" 9 | 10 | ; Category marker (2 byte length follows) 11 | 1e.... = 0d0a0d0a 12 | ; Record marker 13 | 1f = 0d0a 14 | ; Field marker 15 | 1d = "," 16 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/motorola_mdos_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract Motorola EXOR MDOS files from disk image." 3 | ; 4 | detangler = MotorolaMdos 5 | ; -------------------------------------------------------------------------------- /src/org/transformenator/transforms/mousewrite_a2: -------------------------------------------------------------------------------- 1 | ; 2 | description = "MouseWrite for the Apple II" 3 | ; 4 | 5 | trim_leading = 0200 6 | 7 | ; Header 8 | 0A= 9 | 0B= 10 | 0F= 11 | 12 | ; Emphasis toggle 13 | 04= 14 | 15 | 0d=0d0a -------------------------------------------------------------------------------- /src/org/transformenator/transforms/multimate_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Multimate word processor." 3 | commentary = "Early Multimate - very skeletal so far." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; First 400 bytes is control, etc. 12 | trim_leading = 400 13 | 14 | ; Header 15 | ;..00ff.................................................................................................................................. 16 | 17 | ; ae = newline 18 | ae = "\par " 19 | 20 | ; af = tab 21 | af = 09 22 | ; 1a = tab 23 | 1a = 09 24 | 25 | ; Emphasis on 26 | ff01 = "\b1 " 27 | ; Emphasis off 28 | ff03 = "\b0 " 29 | 30 | ; Emphasis on 31 | ef = "\b1 " 32 | ; Emphasis off 33 | eb = "\b0 " 34 | 35 | ; Emphasis toggle 36 | c7 % "\b1 ","\b0 " 37 | 38 | ; Space 39 | ed = 20 40 | 41 | ; Unknown cruft 42 | ff83 = 43 | 44 | ; Header gorp - may be leading with 2e's rather than trailing behind the af. 45 | af2e2e2e2e2e2e2e2e2e = 46 | af2e2e2e2e2e2e2e2e = 47 | af2e2e2e2e2e2e2e = 48 | af2e2e2e2e2e2e = 49 | af2e2e2e2e2e = 50 | af2e2e2e2e = 51 | af2e2e2e = 52 | af2e2e = 53 | af2e = 54 | 2e2e2e2eaf = 55 | af = 56 | 57 | ; Split word 58 | 01.. = 59 | 04.. = 60 | 05.. = 61 | 06.. = 62 | 07.. = 63 | 08.. = 64 | 09.. = 65 | 0c.. = 66 | 0d.. = 67 | 0e.. = 68 | 0f.. = 69 | 11.. = 70 | 12.. = 71 | 13.. = 72 | 15.. = 73 | 74 | b3...... = 75 | 00 = 76 | 03 = 77 | 18 = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/multiscribe: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Apple II Multiscribe 3.0.2 word processor." 3 | ; 4 | 5 | ;0100004c004c....000002....0a00110018001f0026002d0034003b00420046004a05......02 = "{@@@@}" 6 | ;0100004c004c010100000205030a0311001800 = "{@@@@}" 7 | 8 | 0100004c004c = "{@@@@}" 9 | 10 | 0102000001 = ;"" 11 | 0102000101 = ;"" 12 | 0104000001 = ;"<0104>" 13 | 0104000101 = ;"" 14 | 0100000001 = ;"<0101>" 15 | 0100000101 = ;"" 16 | 0104100101 = ;"<0104100101>" 17 | 18 | 1f0026002d0034003b00420046004a05 = ;"<1f004a05>" 19 | 1f0026002d0034003b0042004600 = ;"<1f00>" 20 | 05038202 = ;"<05038202>" 21 | 05031202 = ;"<05031202>" 22 | 03001202 = ;"<03001202>" 23 | 03008202 = ;"<03008202>" 24 | 25 | 420508014202 = 26 | 420508014802 = 27 | 42050a054802 = 28 | 4a0508018202 = 29 | 30 | ;020a050a000e021800 31 | ;42050a0512 = 32 | 33 | 01000000 = 34 | 020c010e0311001800 = 35 | 0a0011001800 = 36 | 02030000001f004a050000000300120200 = 37 | 02030000001f004a050000000300120200 = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/nbi_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "NBI word processor." 3 | ; 4 | detangler = NBI 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | 82 = 2e 12 | 8e = 2d 13 | 14 | ; There's a 9c009c production in there somewhere 15 | 9c..9c = "\par " 16 | 9d = 17 | 9e = 18 | 92 = 19 | b0..b1 = 20 | b0..b3 = 21 | b0..b5 = 22 | b1..b0 = 23 | ;b0....b0 = 24 | c0........c0 = 25 | c1........c1 = 26 | c2........c2 = 27 | c3........c3 = 28 | c4........c4 = 29 | c5........c5 = 30 | c6........c6 = 31 | c7........c7 = 32 | c8........c8 = 33 | c9........c9 = 34 | ca........ca = 35 | cd........cd = 36 | d2........d2 = 37 | d4........d4 = 38 | d6........d6 = 39 | 40 | 0b = 41 | 0f = 42 | b1 = 43 | b0 = 44 | 45 | ; Bold toggle 46 | 95 % "\b1 ","\b0 " 47 | 48 | ; Space 49 | 7f = 20 50 | 80 = 20 51 | 52 | ; Return 53 | a0 = "\par " 54 | 55 | ; Tab 56 | a1 = " \tab " 57 | 58 | ; Newline 59 | a3 = "\par " 60 | 61 | ; Page eject 62 | a4 = "\par " 63 | 64 | ; Not sure what a9 was for 65 | a9 = "\par " 66 | 67 | ; Dash 68 | 8f = 2d 69 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/null: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Do-nothing 'transform'." 3 | ; -------------------------------------------------------------------------------- /src/org/transformenator/transforms/null_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Do-nothing 'transform' to RTF." 3 | commentary = "Wraps the input in beginning and ending RTF tags." 4 | ; 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/officewriter: -------------------------------------------------------------------------------- 1 | ; 2 | description = "OfficeWriter for PC word processor." 3 | commentary = "Just a few example files were available." 4 | ; 5 | 6 | trim_leading = 600 7 | 8 | ; Gorp at the start of a file 9 | b3..fa..fa10fafafafa10fafafafa10 = 10 | b3..fa..fafa10fafafafa10fafafafa10 = 11 | b3..fa............................ = 12 | 13 | fa = 14 | de = 15 | 16 | ; Probably emphasis on 17 | fe = 18 | 19 | 04 = 0d0a 20 | 21 | ; Tab 22 | 10 = 2020202020 23 | ; Newline 24 | 11 = 0d0a 25 | ; Control character follows 12 26 | 12.. = 27 | ; Emphasis of some sort 28 | 13 = 29 | 7f = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/omniwriter_c64: -------------------------------------------------------------------------------- 1 | ; 2 | description = "C64 OmniWriter word processor." 3 | ; 4 | 5 | trim_leading = c7 6 | 7 | dc = 0d0a 8 | 9 | ; Main body text transform to ASCII 10 | [01..1a] = 61 11 | 12 | ; Header text transforms to ASCII 13 | ;[41..5a] = 61 14 | ;[c1..da] = 41 15 | 16 | ; Underline toggle 17 | ee = 18 | 19 | ; Bold toggle 20 | ed = 21 | 22 | b0b1 = 23 | b0b2 = 24 | b0b3 = 25 | b0b4 = 26 | 27 | ; Unknown controls 28 | b1 = 29 | b2 = 30 | b3 = 31 | b4 = 32 | db = 33 | df = 34 | e6 = 35 | f1 = 36 | ff = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/panasonic: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Panasonic KX-* word processor." 3 | commentary = "Very minor file cleanup." 4 | ; 5 | detangler = PanasonicKX 6 | 7 | ; Likely double-space 8 | D6 = 0d0a0d0a 9 | 10 | ; Possibly SOF 11 | AC = 12 | 13 | ; Emphasis on 14 | F8 = 15 | FA = 16 | FD = """ 17 | ; Emphasis off 18 | F9 = 19 | FB = 20 | FE = """ 21 | 22 | ; New page 23 | da = 24 | 25 | ; Newline 26 | 0d = 0d0a 27 | 28 | ; Might be an emdash 29 | bc = "-" 30 | 31 | ; Might be a newline 32 | e8 = " " 33 | 34 | 83="%" 35 | 01 = 36 | 03 = 37 | a4= 38 | 39 | ; 0xC5 is definitely an EOF 40 | c5 = "{@@@@}" 41 | 42 | ; Ensure that if we accidentally span files, cut it off there 43 | 00 = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/paperclip_c64_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PaperClip C64 word processor." 3 | ; 4 | 5 | ; Commands: 6 | ; zcm - filename? 7 | ; zhd - header? 8 | ; zft - footer? 9 | ; zcn0 - Center off? 10 | ; zcn1 - Center on? 11 | ; zju0 - Justify off? 12 | ; zju1 - Justify on? 13 | ; zfp - Force page? 14 | ; zhdx - ? 15 | ; znx: - next file to chain 16 | 17 | ; Start of file: 16 nulls 18 | 00000000000000000000000000000000 = "{@@@@}" 19 | 20 | ; Centering off/on 21 | regex = @zcn off@\\leveljc0 @ 22 | regex = @zcn on@\\leveljc1 @ 23 | 24 | ; Header for RTF format 25 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator;}\f0 " 26 | ; Closing brace for RTF format 27 | tail = "}" 28 | 29 | ; Remember, regular expressions run _after_ all binary replacements. 30 | ; Remove unknown spec: :hlxx :hrxx 31 | regex = @[z|:]h[l|r][0-9]*@@ 32 | ; Remove unknown spec: :ofxx 33 | regex = @[z|:]of[0-9]*@@ 34 | ; Remove filename spec: zcm:nnn 35 | regex = @Q[z|:]cm:@@ 36 | ; Remove left/right margin specs: zlmxx, zlnxx, :rmxx 37 | regex = @[z|:][l|r]a[0-9]*@@ 38 | regex = @[z|:][l|r]m[0-9]*@@ 39 | regex = @[z|:][l|r]n[0-9]*@@ 40 | regex = @[z|:]ls[0-9]*@@ 41 | ; Remove Justify spec: :ju0, :ju1 42 | regex = @[z|:]ju[0-9]*@@ 43 | ; Remove page spec: :ppxx :pgxx :p#xx 44 | regex = @[z|:]p[p|g|\#][0-9]*@@ 45 | ; Remove page spec: :ppxx :pgxx :p#xx 46 | regex = @[z|:]p[p|g|\#][0-9]*@@ 47 | ; Remove unknown spec: :pfxx 48 | regex = @[z|:]pf[0-9]*@@ 49 | ; Remove unknown spec: :phxx 50 | regex = @[z|:]ph[0-9]*@@ 51 | ; Remove point spec: :ptxx 52 | regex = @[z|:]pt[0-9]*@@ 53 | ; Remove spacing spec: :spxx 54 | regex = @[z|:]sp[0-9]*@@ 55 | ; Remove unknown spec: :vpxx 56 | regex = @[z|:]vp[0-9]*@@ 57 | ; Remove next file specification 58 | regex = @znx:.*@@ 59 | ; Remove unknown specification 60 | regex = @zhd[0-9]*@@ 61 | 62 | ; Whack the header 63 | 7a08042c2c = 64 | 65 | ; Whack the footer 66 | 7a06142c50010705203c3e1f = 67 | 68 | ; Bold on 69 | 6d = "\b1" 70 | ; Bold off 71 | 7d = "\b0" 72 | 73 | ; Italics on 74 | 7c = "\i1" 75 | ; Italics off 76 | 7e = "\i0" 77 | 78 | ; Center off 79 | 7a030e30 = "\leveljc0" 80 | 3a030e30 = "\leveljc0" 81 | 82 | ; Center on 83 | 7a030e31 = "\leveljc1" 84 | 3a030e31 = "\leveljc1" 85 | 86 | ; Force Page 87 | 7a0610 = 88 | 89 | ; Justify off 90 | 7a0a1530 = "\fmodern" 91 | ; Justify on 92 | 7a0a1531 = "\fnil" 93 | 3a0a1531 = "\fnil" 94 | 95 | ; "H" left 96 | 3a080c3235 = 97 | 98 | ; "H" right 99 | 3a0812313236 = 100 | 101 | ; Superscript on 102 | 67 = "\super" 103 | ; Superscript off 104 | 65 = "\nosupersub" 105 | 106 | ; Subscript on 107 | 6a = "\sub" 108 | 109 | ; Subcript off 110 | 74 = "\nosupersub" 111 | 112 | ; Some unknown command... 113 | 6e = 114 | 115 | ; Quote mark 116 | 70 = 22 117 | 1b = 22 118 | 119 | ; Force Page 120 | 7a0610 = 121 | 122 | ; Quote mark 123 | 70 = 22 124 | 1b = 22 125 | 126 | ; Transform a-z down in the control character range up to ASCII (is this PETSCII?) 127 | [01..1a] = 61 128 | 129 | ; End of line/paragraph becomes \r\n (plus) \par \par \li0 \b0 \fs24 130 | ; Need to turn off some things that don't have an explicit off switch (i.e. headings) 131 | 1f = "\par\li0\b0\fs24 " 132 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/peachtree1: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Peachtree word processor - step 1 of 2." 3 | commentary = "First, remove controls that conflict with RTF specification - leaving plain text with some decoration. Call trans with a null suffix (i.e. trans peachtree1 Originals Step1 ""). Next, use the peachtree2_rtf transform to pretty the files up (i.e. trans peachtree2_rtf Step1 Converted)." 4 | ; 5 | 6 | ; Remove controls - lines beginning with a backslash 7 | regex = @\\.*\r\n@@ 8 | 9 | ; EOF is ctrl-Z 10 | 1a = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/peachtree2_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Peachtree word processor - step 2 of 2." 3 | commentary = "Use this to pretty files up that had been conditioned with peachtree1." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fnil\fcharset0 Courier;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Toggle underline on and off 12 | 5f % "\ul ","\ul0 " 13 | 14 | ; Toggle bold on and off 15 | 40 % "\b1 ","\b0 " 16 | 17 | ; Preserve newlines 18 | 0d0a = "\\r\\n\par " 19 | 20 | ; EOF is ctrl-Z 21 | 1a = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/personal_typing_system: -------------------------------------------------------------------------------- 1 | ; 2 | description = "IBM Personal Typing System word processor." 3 | commentary = "DOS-based files to text. The IBM PTS was a modified ISA-based PS/2 Model 30 with a low-density 3-1/2" disk drive that ran DOS and a word processor of some sort." 4 | ; 5 | 6 | trim_leading = 0a 7 | 8 | 0b = 9 | 0c = 10 | 200d = 20 11 | 0d = 20 12 | 0f = 13 | 14 = 20 14 | 16 = 15 | 18 = 16 | 19 = 17 | c4 = "_" 18 | 19 | 1b % "%control%","%/control%" 20 | 1d = 0d0a 21 | 22 | regex = @%control%(.|\r)*%/control%@@ 23 | regex = @%control%(.|\n)*%/control%@@ -------------------------------------------------------------------------------- /src/org/transformenator/transforms/petscii: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Transform PETSCII to ASCII." 3 | ; 4 | 5 | ; Transform capitals to lowercase 6 | [41..5a] = 61 7 | 8 | ; Strip high bit from capitals 9 | [c1..da] = 41 10 | 11 | ; Shifted spaces 12 | a0 = 20 13 | e0 = 20 14 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/pfswrite_a2: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract and convert Apple II PFS:Write word processor files from disk image." 3 | commentary = "Files are in Apple II Pascal format." 4 | ; 5 | detangler = PFS 6 | 7 | ; Trim the leading 0x400 bytes - this is a Pascal format file 8 | trim_leading = 400 9 | 10 | ; Start of text 11 | 0c = 12 | 13 | ; End of text 14 | 0e = "{@@@@}" 15 | 16 | ; Here and below are primarily PC DOS-based changes 17 | 032002 = "\\r\\n" 18 | 032003 = "\\r\\n" 19 | 00 = "\\r" 20 | 02 = "" 21 | 01 = "\\r" 22 | 03 = "\\r" 23 | 0d = "\\r\\n" 24 | 25 | ; 0xae is some sort of emphasis; couldn't find the mating pair 26 | ae = 27 | af = "/" 28 | ba = "-" 29 | 90c0 = "* " 30 | c0 = 31 | 32 | ; Underline on/off 33 | a8 = 34 | a9 = 35 | 36 | ; Backspace/bold 37 | 81 = 38 | 82 = 39 | 83 = 40 | ad = 20 41 | 42 | ; Relocate ASCII 43 | [e1..fa] = 61 44 | [c1..da] = 41 45 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/pfswrite_gerbildoc3: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PC PFS:Write word processor." 3 | commentary = "Start of file contains 'GERBILDOC3'" 4 | ; 5 | ; Start of file contains "GERBILDOC3" 6 | ; 7 | 8 | ; Trim the leading 0x200 bytes 9 | trim_leading = 200 10 | 11 | ; End of text 12 | 0e = "{@@@@}" 13 | 14 | ; Here and below are primarily PC DOS-based changes 15 | 032002 = "\\r\\n" 16 | 032003 = "\\r\\n" 17 | 00 = "\\r" 18 | 01 = "\\r" 19 | 03 = "\\r" 20 | 0d = "\\r\\n" 21 | 0c = "\\r\\n" 22 | 23 | ; 0xae is some sort of emphasis; couldn't find the mating pair 24 | ba = "-" 25 | 90c0 = "* " 26 | c0 = 27 | 28 | ; Underline on/off 29 | a8 = 30 | a9 = 31 | 32 | ; Line beginnings 33 | 80 = 34 | e0 = 35 | 36 | ; Backspace/bold 37 | 81 = 38 | 82 = 39 | 83 = 40 | ad = 20 41 | [e1..fa] = 61 42 | [a0..da] = 20 -------------------------------------------------------------------------------- /src/org/transformenator/transforms/pfswrite_gerbildoc4: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PC PFS:Write word processor." 3 | commentary = "Start of file contains 'GERBILDOC4'" 4 | ; 5 | 6 | ; Trim the leading 0x400 bytes 7 | trim_leading = 400 8 | 9 | ; End of text 10 | 0e = "{@@@@}" 11 | 12 | ; Here and below are primarily PC DOS-based changes 13 | 032002 = "\\r\\n" 14 | 032003 = "\\r\\n" 15 | 00 = "\\r" 16 | 01 = "\\r" 17 | 02 = "\\r" 18 | 03 = "\\r" 19 | 0d = "\\r\\n" 20 | 0c = "\\r\\n" 21 | 22 | ; 0xae is some sort of emphasis; couldn't find the mating pair 23 | ba = "-" 24 | 90c0 = "* " 25 | c0 = 26 | 27 | ; Underline on/off 28 | a8 = 29 | a9 = 30 | 31 | ; Line beginnings 32 | 80 = 33 | e0 = 34 | 35 | ; Backspace/bold 36 | 81 = 37 | 82 = 38 | 83 = 39 | ad = 20 40 | [e1..fa] = 61 41 | [a0..da] = 20 -------------------------------------------------------------------------------- /src/org/transformenator/transforms/professional_write: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PFS Professional Write word processor." 3 | commentary = "Files start with "TYPE 4 2.00"" 4 | ; 5 | 6 | trim_leading=413 7 | 00=0d0a 8 | 01=0d0a 9 | 07 = "{@@@@}" 10 | 81= 11 | 82= 12 | 83= 13 | 14 | ; Strip high bits 15 | [80..ff]=00 16 | 01= 17 | 02= 18 | 03= 19 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/prowrite_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Amiga ProWrite word processor." 3 | detangler = ProWrite 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fhelvetica\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | 0d0a = "\\r\\n\par " 12 | 0a = "\\r\\n\par " -------------------------------------------------------------------------------- /src/org/transformenator/transforms/prowriter_atr: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Atari Prowriter word processor." 3 | commentary = "From Atari 5-1/4" disks." 4 | ; 5 | 6 | ; Preamble crap 7 | 02......04....07....09....0a....0c......12......13....14......19...... = 8 | 9 | ; Carriage return 10 | 9b=0d0a 11 | 12 | ; Tab 13 | 10=" " 14 | 15 | ; Worry about high bits 16 | [c1..ff] = 41 17 | 18 | 03 = 19 | 16 = 20 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/qa_write: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Q&A Write word processor." 3 | commentary = "Very preliminary." 4 | ; 5 | 6 | 202d2d20422e20456d6572616c64 = "{@@@@}" 7 | 8 | 0200 = 9 | 0400 = 10 | ff01 = 0d0a 11 | ff21 = 12 | ff24 = 13 | ff26 = 14 | ff41 = 15 | ff80 = 16 | ff81 = 17 | ff85 = 18 | ff90 = 19 | ff91 = 20 | 21 | ; Page number 22 | ff95 = 23 | 24 | 0100000078 = "{@@@@}" 25 | 0102000078 = "{@@@@}" 26 | 0103000078 = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/rockwell_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract Rockwell AIM-65 files from disk image." 3 | ; 4 | detangler=Rockwell 5 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/scripsit_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "TRS-80 Scripsit word processor." 3 | commentary = "Found on Model 4 LDOS 6.x disks." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Page footer/page number 12 | 8c = "%%Footer%%" 13 | 14 | ; Unknown cruft 15 | 97d0be = 16 | 97....be = 17 | 9b = 18 | 19 | ; Line break 20 | 8d = "\\n\par " 21 | 22 | ; Indented paragraph 23 | 8e % "\par\li1\par ","\par\li0\par " 24 | 25 | ; Command beginnings 26 | regex = @>@@ 27 | 28 | ; Justification 29 | regex = @J=Y@@ 30 | regex = @J=N@@ 31 | 32 | ; Line spacing 33 | regex = @LS=[0-9]*@@ 34 | 35 | ; Unknown; must come before C, though 36 | regex = @VC=[Y|N]@\\qc @ 37 | 38 | ; Center on 39 | regex = @C=Y@\\qc @ 40 | 41 | ; Center off 42 | regex = @C=N@\\ql @ 43 | 44 | ; Left margin 45 | regex = @LM=[0-9]*@@ 46 | 47 | ; Right margin 48 | regex = @RM=[0-9]*@@ 49 | 50 | ; Unknown commands 51 | regex = @H=[0-9]*@@ 52 | regex = @BM=[0-9]*@@ 53 | regex = @PF=[0-9]*@@ 54 | regex = @PN=[0-9]*@@ 55 | regex = @TM=[0-9]*@@ 56 | regex = @WS=[Y|N]@@ 57 | regex = @FR=[Y|N]@@ 58 | 59 | ; Remove footers/page numbers 60 | regex = @%%Footer%%.*[0-9]*\n\\par\\par @@ 61 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/seawell_img: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract Seawell 8" files from disk image." 3 | ; 4 | detangler=Seawell 5 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/select_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Select (CP/M) word proessor to RTF" 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fnil\fcharset0 Courier New;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | 8d # 0d 11 | 12 | ; Toggle bold 13 | 5e % "\b1 ","\b0 " 14 | 15 | ; Toggle underscore 16 | 5f % "\ul ","\ul0 " 17 | 18 | ; EOF indicator 19 | 1a = "{@@@@}" 20 | 21 | 0d0a = "\\r\\n\par " 22 | 23 | regex = @\\E@@ 24 | regex = @\\F@@ 25 | regex = @\\I.*@@ 26 | regex = @\\L.*@@ 27 | regex = @\\N.*@@ 28 | regex = @\\S.*@@ 29 | regex = @\\T.*@@ 30 | ; Right margin? 31 | regex = @\\R.*@@ 32 | ; Justify Left 33 | regex = @\\JL@\\ql @ 34 | ; Justify Center 35 | regex = @\\JC@@ 36 | ; Justify Right 37 | regex = @\\JR@@ 38 | ; Comment 39 | regex = @\\\*.*@@ 40 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/smith-corona: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Smith-Corona word processor." 3 | ; 4 | detangler = SmithCorona 5 | 6 | trim_leading = 40 7 | 8 | ; Unknown emphasis 9 | 01 = 10 | 11 | ; Underline 12 | 02 = 13 | 14 | ; Bold 15 | 04 = 16 | 17 | ; Various whitespace 18 | 03 = 19 | 06 = 20 | 08 = 21 | 0d = 0d0a 22 | 0e = 0d0a0d0a 23 | 10 = 0d0a 24 | 1b = 20 25 | 1e = 20 26 | 1f = 20 27 | 28 | ; Various controls 29 | 07 = 30 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/smith-corona_spin: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Smith-Corona word processor." 3 | commentary = "Very preliminary, spin-code based. Any unknown codes resolve to "~"; any unknown but extant control codes are removed." 4 | ; 5 | detangler = SmithCorona 6 | 7 | 00=" " 8 | 01= 9 | 02="e" 10 | 03="i" 11 | 04="t" 12 | 05="V" 13 | 06="a" 14 | 07="v" 15 | 08="F" 16 | 09="J" 17 | 0a="o" 18 | 0b="U" 19 | 0c="G" 20 | 0d="f" 21 | 0e="I" 22 | 0f="O" 23 | 24 | 10="P" 25 | 11="L" 26 | 12="Y" 27 | 13="u" 28 | 14="W" 29 | 15="6" 30 | 16="T" 31 | 17="4" 32 | 18="w" 33 | 19="B" 34 | 1a="5" 35 | 1b="j" 36 | 1c="Z" 37 | 1d=":" 38 | 1e="g" 39 | 1f="-" 40 | 41 | 20="~" 42 | 21="7" 43 | 22="A" 44 | 23="9" 45 | 24="N" 46 | 25="d" 47 | 26="p" 48 | 27="b" 49 | 28="y" 50 | 29="&" 51 | 2a="," 52 | 2b="C" 53 | 2c="*" 54 | 2d="K" 55 | 2e="+" 56 | 2f="X" 57 | 58 | 30="@" 59 | 31="H" 60 | 32="?" 61 | 33="R" 62 | 34="Q" 63 | 35="(" 64 | 36="n" 65 | 37=")" 66 | 38="S" 67 | 39="l" 68 | 3a="3" 69 | 3b="s" 70 | 3c="z" 71 | 3d="2" 72 | 3e="q" 73 | 3f="8" 74 | 75 | 40="E" 76 | 41="." 77 | 42="k" 78 | 43="c" 79 | 44="r" 80 | 45=22 81 | 46="h" 82 | 47="0" 83 | 48="D" 84 | 49="_" 85 | 4a="M" 86 | 4b="'" 87 | 4c="x" 88 | 4d= 89 | 4e="m" 90 | 4f="1" 91 | 92 | 50="~" 93 | 51=";" 94 | 52="$" 95 | 53="!" 96 | 54="#" 97 | 55="/" 98 | 56="~" 99 | 57="~" 100 | 58= 101 | 59="~" 102 | 5a="~" 103 | 5b="~" 104 | 5c="~" 105 | 5d="~" 106 | 5e="~" 107 | 5f="~" 108 | 109 | 60="~" 110 | 61= 111 | 62= 112 | 63=" " 113 | 65=" " 114 | 66=0d0a 115 | 67="~" 116 | 68=" " 117 | 69="~" 118 | 6a="~" 119 | 6b="~" 120 | 6c="~" 121 | 6d="~" 122 | 6e="~" 123 | 6f="~" 124 | 125 | 70="~" 126 | 71="~" 127 | 72="~" 128 | 73="~" 129 | 74="~" 130 | 75="~" 131 | 76="~" 132 | 77="~" 133 | 78="~" 134 | 79="~" 135 | 7a="~" 136 | 7b="~" 137 | 7c="~" 138 | 7d="~" 139 | 7e="~" 140 | 7f="~" 141 | 142 | 80="~" 143 | 81="~" 144 | 82= 145 | 83="~" 146 | 84= 147 | 85="~" 148 | 86="~" 149 | 87="~" 150 | 88="~" 151 | 89="~" 152 | 8a= 153 | 8B= 154 | 8c="~" 155 | 8d= 156 | 8e="~" 157 | 8f="~" 158 | 159 | bb= 160 | 161 | c4= 162 | c6= 163 | ce= 164 | 165 | e1= 166 | e6=0d0a 167 | e8= 168 | 169 | ff= 170 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/speedscript_a2_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Apple II Speedscript word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | ; Return/newline 11 | 3c = "\\r\\n\par\ql " 12 | 13 | ; Center on 14 | 43 = "\qc " 15 | 16 | ; Underline toggle 17 | 55 % "\ul ","\ul0 " 18 | 19 | ; Bold on/off 20 | db = "\b1 " 21 | dd = "\b0 " 22 | 23 | ; Strip high bits 24 | [e1..fa] = 61 25 | [a0..da] = 20 26 | 27 | ; Additional Speedscript commands that may not be handled yet: 28 | ; 29 | ;Stage 1 Commands 30 | ; 31 | ;L Left Margin (default 5) 32 | ; 33 | ;R Right Margin (default 75) 34 | ; 35 | ;T Top Margin (default 5) 36 | ; 37 | ;B Bottom Margin (default 58) 38 | ; 39 | ;P Page Length (default 66) 40 | ; 41 | ;S Spacing (default single spacing) 42 | ; 43 | ;@ Starts numbering at page given. 44 | ; 45 | ;? Disables printing until selected page number is reached. 46 | ; 47 | ;X Sets page width (default 80) 48 | ; 49 | ;N Forced Paging (no numbers required) 50 | ; 51 | ;M Margin Release (used for outdenting) 52 | ; 53 | ;W Page Wait (used with individual sheet printing) 54 | ; 55 | ;J Selects auto line feed after carriage return 56 | ; 57 | ;I Information (line ignored during printing) 58 | ; 59 | ;H Header define and enabled 60 | ; 61 | ;F Footer define and enabled 62 | ; 63 | ;G Go to (link) next file 64 | ; 65 | ; 66 | ;Stage 2 Commands 67 | ; 68 | ; These commands either precede a line of text or are embeded within a line. 69 | ; 70 | ;C Centering 71 | ; 72 | ;# Prints current page number 73 | ; 74 | ;U Underlining 75 | ; 76 | ;E Edge right -------------------------------------------------------------------------------- /src/org/transformenator/transforms/speedscript_c64: -------------------------------------------------------------------------------- 1 | ; 2 | description = "C64 Speedscript word processor." 3 | ; 4 | 5 | ; Start of text 6 | 0025 = 7 | 0028 = 8 | 9 | ; Random directives 10 | 9c = 11 | 8803 = 12 | 8883 = 13 | 14 | ; Move lowercase letters up 15 | [01..1a] = 61 16 | 17 | ; Return/newline 18 | 1b = "[" 19 | 1d = "]" 20 | 1f = 0a 21 | 22 | ; Center (c) 23 | 83 = 24 | 25 | ; Right edge (e) 26 | 85 = 27 | 28 | ; Page eject 29 | 8e = 30 | 31 | ; Line spacing (s) 32 | 93.. = 33 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/spellbinder_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Spellbinder word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 \\r\\n\par \par \pard " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | 08="\tab " 11 | 0e=" " 12 | 0d="\\r\\n\par \pard " 13 | ac="-" 14 | af="/" 15 | 16 | ; Move emphasized characters down 17 | [c1..ff]=41 18 | 19 | ; Move numbers around 20 | [b1..b9]=31 21 | 22 | ; Header: .H Put the header out, including page numbering 23 | regex = @\\pard \.H(.*)(##)(.*)@\\pard {\\header $1\\chpgn $3}@ 24 | 25 | ; Center: .C 26 | regex = @\\pard \.[C|c]@\\pard \\qc @ 27 | 28 | ; .E 29 | regex = @\\pard \.[E|e].*@\\pard @ 30 | 31 | ; .R 32 | regex = @^\.[R|r].*@@ 33 | regex = @\\pard \.[R|r].*@@ 34 | 35 | ; .Y[T?] 36 | regex = @\\pard \.[Y|y].*@@ 37 | 38 | ; EOF is ctrl-Z 39 | 1a = "{@@@@}" 40 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/suffixer: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Give well-known file formats a suffix." 3 | commentary = "Helps out things like PDF files without suffixes." 4 | ; 5 | detangler = Suffixer -------------------------------------------------------------------------------- /src/org/transformenator/transforms/super_text_ii: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Muse Super-Text II word processor." 3 | commentary = "When extracting files with CiderPress, ensure you pay attention to these attributes: "Convert to non-Apple II formats" is unchecked, "Don't convert text files" is checked." 4 | ; 5 | 6 | ; Newline 7 | dd=0d0a 8 | 9 | ; Paragraph begin 10 | 10=0d0a 11 | 13= 12 | 13 | ; Formatting start 14 | 06="[formatting]" 15 | 16 | ; Capital letters 17 | 01c1="A" 18 | 01c2="B" 19 | 01c3="C" 20 | 01c4="D" 21 | 01c5="E" 22 | 01c6="F" 23 | 01c7="G" 24 | 01c8="H" 25 | 01c9="I" 26 | 01ca="J" 27 | 01cb="K" 28 | 01cc="L" 29 | 01cd="M" 30 | 01ce="N" 31 | 01cf="O" 32 | 01d0="P" 33 | 01d1="Q" 34 | 01d2="R" 35 | 01d3="S" 36 | 01d4="T" 37 | 01d5="U" 38 | 01d6="V" 39 | 01d7="W" 40 | 01d8="X" 41 | 01d9="Y" 42 | 01da="Z" 43 | 03c1="A" 44 | 03c2="B" 45 | 03c3="C" 46 | 03c4="D" 47 | 03c5="E" 48 | 03c6="F" 49 | 03c7="G" 50 | 03c8="H" 51 | 03c9="I" 52 | 03ca="J" 53 | 03cb="K" 54 | 03cc="L" 55 | 03cd="M" 56 | 03ce="N" 57 | 03cf="O" 58 | 03d0="P" 59 | 03d1="Q" 60 | 03d2="R" 61 | 03d3="S" 62 | 03d4="T" 63 | 03d5="U" 64 | 03d6="V" 65 | 03d7="W" 66 | 03d8="X" 67 | 03d9="Y" 68 | 03da="Z" 69 | 70 | ; Punctuation, numbers, etc. 71 | [a0..c0] = 20 72 | 73 | ; Strip high bits from lower case letters 74 | [c1..da] = 61 75 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/superscripsit_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "TRS-80 SuperSCRIPSIT word processor." 3 | commentary = "Info from https://www.trs-80.com/wordpress/tips/formats/#scripsit" 4 | ; 5 | detangler = SuperSCRIPSIT 6 | 7 | ; Byte Description 8 | ; E5 Null – deleted text 9 | ; EC Soft page marker 10 | ; ED Hard page marker 11 | ; EF End of paragraph control info 12 | ; F0 Start block marker (shows as “[” on screen) 13 | ; F1 End block marker (shows as “]” on screen) 14 | ; F2 Normal tab 15 | ; F3 Align tab 16 | ; F5 ‘Code’ for printer control (underline, bold, etc) 17 | ; F6 Filler bytes for insert mode 18 | ; F7 Space compression for two succeeding spaces (delta) 19 | ; F8 Soft carriage return replacing a space 20 | ; F9 Soft carriage return replacing a double space 21 | ; FA Hard hyphen 22 | ; FB Hard space (for hyhenation) 23 | ; FC Hard carriage return during inserting 24 | ; FD Hard carriage return 25 | ; FF End of file/text 26 | 27 | ; Header for RTF format 28 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 29 | ; Closing brace for RTF format 30 | tail = "}" 31 | 32 | e5= 33 | ec= 34 | ed= 35 | ef= 36 | f0= 37 | f1= 38 | f2="\tab " 39 | f6= 40 | f7=2020 41 | f8=20 42 | f9=2020 43 | ; Mix paragraph control (indentation) with line endings 44 | fc14........EF="\\r\\n\\r\\n\par\par\li0 " 45 | fc1b........EF="\\r\\n\\r\\n\par\par\li1440 " 46 | fd14........EF="\\r\\n\\r\\n\par\par\li0 " 47 | fd1b........EF="\\r\\n\\r\\n\par\par\li1440 " 48 | fd..........EF="\\r\\n\\r\\n\par\par\li0 " 49 | 50 | ; Printer control codes: f5.. 51 | ; Underline 52 | f52d % "\ul1 ","\ul0 " 53 | f5..= 54 | 55 | ; EOF indicator 56 | ff = "{@@@@}" 57 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/swtpc_dos68: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract SWTPC 6800 DOS68 files from disk image." 3 | commentary = "Autodetects linear binary images or ImageDisk .IMD images." 4 | ; 5 | detangler = SWTPCDOS68 6 | ; 7 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/tandy100_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Tandy 100/102/200/WP-2 word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | ; Did we accidentally pull in a sector header? Lop it off. 11 | 000073656b696e65................................................................................................................................................................................................................................................ = 12 | 13 | ; Start of text 14 | 04 = "{@@@@}" 15 | 16 | ; Line breaks 17 | 08 = 20 18 | 19 | ; Form feed 20 | 0c = "\par " 21 | 22 | ; Newline 23 | 0d = "\par " 24 | 25 | ; Toggle underline 26 | 01 % "\ul ","\ul0 " 27 | 28 | ; Indentation level 29 | 0531 = "\li1 " 30 | 0532 = "\li0 " 31 | 32 | ; End of text (ctrl-Z) 33 | 1a = "{@@@@}" 34 | 35 | ; Nulls 36 | 00 = 37 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/tandy_coco: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Tandy Color Computer BASIC detokenizer." 3 | detangler = TandyCoCo 4 | ; 5 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/tandy_pdd: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract Tandy PDD/PDD2 files from disk image." 3 | commentary = "Filesystem indicators can disagree on where a file ends." 4 | detangler = TandyPDD 5 | ; 6 | 7 | ; Maybe emphasis 8 | 8e = 9 | 8f = 10 | 92 = 11 | 12 | ; EOF indicator 13 | 8c = "{@@@@}" 14 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/valdocs: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Epson QX-10 Valdocs (CP/M) word processor." 3 | detangler = Valdocs 4 | ; 5 | 6 | ; All control structures 7 | 8c................8c = "\\r\\n" 8 | 8c................8d = "\\r\\n" 9 | 8d................8c = "\\r\\n" 10 | 8d................8d = "\\r\\n" 11 | 8f................8d = "\\r\\n" 12 | 13 | ; Italics 14 | 9b................9c = 15 | 16 | ; Space 17 | 88 = 20 18 | 19 | ; End of text 20 | 8484848484 = "{@@@@}" 21 | 22 | ; Header 23 | 8181818181 = 24 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/valdocs_plain: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Valdocs file without indexing." 3 | commentary = "Mostly text, with 9b..9c productions." 4 | ; 5 | 6 | 9b="1ON2" 7 | 9c="2OFF1" 8 | regex = @1ON2.+?2OFF1@@ 9 | 10 | a0= 11 | 8d= 12 | 0da0a 13 | 14 | ; EOF is ctrl-Z 15 | 1a = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/videowriter: -------------------------------------------------------------------------------- 1 | ; 2 | ; Philips/Magnavox VideoWRITER 3 | ; 4 | detangler = VideoWRITER 5 | 6 | description = "Philips/Magnavox VideoWRITER." 7 | 8 | ; May introduce a list 9 | a7= 10 | 11 | ; Emphasis open 12 | 93= 13 | 95= 14 | 97= 15 | 16 | ; Emphasis close (communal) 17 | 91= 18 | 19 | ; Newline 20 | 99=0d0a 21 | 0000....9B= 22 | 080806080000010202=0d0a 23 | 24 | ; Double-wide letters 25 | aa01="A" 26 | ab02="B" 27 | ac03="C" 28 | ad04="D" 29 | ab05="E" 30 | ae06="F" 31 | ac07="G" 32 | af08="H" 33 | ba09="I" 34 | bb0a="J" 35 | af0b="K" 36 | bc0c="L" 37 | bd0d="M" 38 | be0e="N" 39 | ac0f="O" 40 | ae10="P" 41 | ae11="Q" 42 | ae12="R" 43 | bf13="S" 44 | c014="T" 45 | db15="U" 46 | dc16="V" 47 | dd17="W" 48 | de18="X" 49 | df19="Y" 50 | e01a="Z" 51 | 52 | ; Some high-bits are set for emphasis sometimes 53 | [e1..ff]=61 54 | [b0..b9]=30 55 | 56 | 00= 57 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/visiword: -------------------------------------------------------------------------------- 1 | ; 2 | description = "VisiCorp VisiWord word processor." 3 | commentary = "Version 1.2 (2)" 4 | ; 5 | 6 | ; Thetas 7 | ee02................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................= 8 | 2184..................................................................................................................................................= 9 | 10 | ; sot 11 | ed= 12 | 0100..=0d0a 13 | 0200....= 14 | 0300......= 15 | 0400......= 16 | 0500......=0d0a 17 | 0600....= 18 | 0700......= 19 | 0800......= 20 | 0900......= 21 | 0A00......= 22 | 0B00......= 23 | 0C00......= 24 | 0D00......= 25 | 0E00......= 26 | 0F00......= 27 | 1000......= 28 | 1100......= 29 | 1200......= 30 | 1300......= 31 | 1400......= 32 | 1500......= 33 | 1600......= 34 | 1700......= 35 | 1800......= 36 | 1900......= 37 | 1A00......=0d0a 38 | 1B00......= 39 | 1C00......= 40 | 1D00......=0d0a 41 | 1E00......=0d0a 42 | 1F00......=0d0a 43 | 2000......= 44 | 2100......= 45 | 2200......=0d0a 46 | 2300......= 47 | 2400......= 48 | 2500......= 49 | 2600......= 50 | 2700......= 51 | 2800......= 52 | 2900......= 53 | 2A00......= 54 | 2B00......= 55 | 2C00......= 56 | 2D00......= 57 | 2E00......= 58 | 2F00......= 59 | 3000......= 60 | 3100......= 61 | 3200......= 62 | 3300......= 63 | 3400......=0d0a 64 | 3500......= 65 | 3600......= 66 | 3700......= 67 | 3900......= 68 | 3800......= 69 | 3A00......=0d0a 70 | 3B00......= 71 | 3C00......= 72 | 3D00......=0d0a 73 | 3E00......= 74 | 3F00......= 75 | 4000......=0d0a 76 | 4100......= 77 | 4200......=0d0a 78 | 4300......= 79 | 4400......=0d0a 80 | 4500......= 81 | 4600......= 82 | 4700......= 83 | 4800......= 84 | 4900......= 85 | 4a00......= 86 | 4b00..........= 87 | 4c00......= 88 | 4d00......= 89 | 4e00......= 90 | 5000......= 91 | 5300......= 92 | 5400......= 93 | 5500......= 94 | 5700......= 95 | 5800......= 96 | 5900......= 97 | 5D00......= 98 | 5E00......= 99 | 5F00......= 100 | 6000......= 101 | 6100......= 102 | 6200......= 103 | 6400......= 104 | 6600....= 105 | 6800....= 106 | 6A00......= 107 | 6B00......= 108 | 7000......= 109 | 7300......= 110 | 7D00......= 111 | 112 | ; Page break 113 | 3e0.= 114 | 803c= 115 | 116 | ; Underline next character 117 | 03= 118 | ; Emphasize next character 119 | 04= 120 | 121 | ; Tab 122 | 13=2020202020 123 | 124 | 00= 125 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/volkswriter: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Volkswriter word processor." 3 | commentary = "Minimal cleanup." 4 | ; 5 | 6 | 12 = 7 | 14 = 8 | 1f = 9 | 10 | ; soft(?) word break 11 | 16 = "-" 12 | 13 | ; 18 is a toggle for superscript 14 | 18 = 15 | 16 | ; Commands start a line with two periods 17 | regex = @^\.\..*@@ 18 | 19 | ; End of text 20 | 1a = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wang_dos_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "DOS-based Wang word processor." 3 | ; 4 | detangler = Wang 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\*\generator David Schmidt - Transformenator;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | 00 = 12 | e3 = 13 | ff = 14 | 15 | 81 = 16 | 17 | ; Tab 18 | 82 = "\tab " 19 | 20 | ; Newline 21 | 83 = "\\r\\n\line " 22 | 23 | ; not sure what this is 24 | 8631 = 25 | ; beginning of file in 5-1/4" Wang-format disks 26 | 8632 = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wang_ois: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Wang OIS word processor." 3 | ; 4 | detangler = Wang 5 | 6 | ; Page control commands - one is probably page eject 7 | ; ^B^QT, ^B^QV... 8 | 0211.. = 9 | 02185614122037 = 10 | 11 | 121b38 = 12 | 14121750 = 13 | 1c4d04 = 14 | 141137 = 15 | 1538 = 16 | 162037 = 17 | 182038 = 18 | 19 | ; Document control commands - clustered at the beginnings of documents 20 | 1c21262b2e3842 = 21 | 1c21262b2e38 = 22 | 1d22272c31 = 23 | ; #( 24 | 1e23282d32373c41 = 25 | 1e23282e3842 = 26 | 1e23282d32 = 27 | 1e23282d37 = 28 | 1e23282d4d = 29 | 1e23282d51 = 30 | 1e23282d52 = 31 | ; Yes, there was one all by itself 32 | 1e23282d = 33 | 1e232837 = 34 | 1e233707362e = 35 | 1e2328 = 36 | 1e2337 = 37 | 1e38 = 38 | ; Control sequence in ASCII range $).O 39 | 1f24292e4f = 40 | 1f24292e3842 = 41 | 1f3751 = 42 | 43 | 11 = 44 | 12 = 45 | 13 = 46 | 14 = 47 | 15 = 48 | 16 = 49 | 17 = 50 | 18 = 51 | 19 = 52 | 1a = 53 | 1b = 54 | 1e = 55 | 1f = 56 | 57 | ; Center line - no toggle, no closing 58 | 08 = 59 | 60 | ; Newlines 61 | 04 = 0d0a 62 | 05 = 0d0a 63 | 64 | ; Line break 65 | 07 = 66 | 67 | 01 = 68 | a0 = 69 | 02185618122037 = 70 | 0218561c122037 = 71 | 72 | ; Remove some high-bit stuff 73 | [a6..f9] = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wang_wps_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Extract and convert Wang WPS word processor files from disk image." 3 | commentary = "" 4 | ; 5 | detangler = Wang 6 | 7 | ; Header for RTF format 8 | head = "{\rtf1{\*\generator David Schmidt - Transformenator;}\f0 " 9 | ; Closing brace for RTF format 10 | tail = "}" 11 | 12 | ; Tab 13 | 02 = 09 14 | ; Newline 15 | 03 = "\\r\\n\par\pard " 16 | ; space for a numbered list 17 | 04 = 09 18 | 05 = 09 19 | 20 | ; Italics 21 | a0="\i1 \i0 " 22 | a1="\i1 !\i0 " 23 | a2="\i1 \"\i0 " 24 | a3="\i1 #\i0 " 25 | a4="\i1 $\i0 " 26 | a5="\i1 %\i0 " 27 | a6="\i1 &\i0 " 28 | a7="\i1 '\i0 " 29 | a8="\i1 (\i0 " 30 | a9="\i1 )\i0 " 31 | aa="\i1 *\i0 " 32 | ab="\i1 +\i0 " 33 | ac="\i1 ,\i0 " 34 | ad="\i1 -\i0 " 35 | ae="\i1 .\i0 " 36 | af="\i1 /\i0 " 37 | b0="\i1 0\i0 " 38 | b1="\i1 1\i0 " 39 | b2="\i1 2\i0 " 40 | b3="\i1 3\i0 " 41 | b4="\i1 4\i0 " 42 | b5="\i1 5\i0 " 43 | b6="\i1 6\i0 " 44 | b7="\i1 7\i0 " 45 | b8="\i1 8\i0 " 46 | b9="\i1 9\i0 " 47 | ba="\i1 :\i0 " 48 | bb="\i1 ;\i0 " 49 | bc="\i1 <\i0 " 50 | bd="\i1 =\i0 " 51 | be="\i1 >\i0 " 52 | bf="\i1 ?\i0 " 53 | c1="\i1 A\i0 " 54 | c2="\i1 B\i0 " 55 | c3="\i1 C\i0 " 56 | c4="\i1 D\i0 " 57 | c5="\i1 E\i0 " 58 | c6="\i1 F\i0 " 59 | c7="\i1 G\i0 " 60 | c8="\i1 H\i0 " 61 | c9="\i1 I\i0 " 62 | ca="\i1 J\i0 " 63 | cb="\i1 K\i0 " 64 | cc="\i1 L\i0 " 65 | cd="\i1 M\i0 " 66 | ce="\i1 N\i0 " 67 | cf="\i1 O\i0 " 68 | d0="\i1 P\i0 " 69 | d1="\i1 Q\i0 " 70 | d2="\i1 R\i0 " 71 | d3="\i1 S\i0 " 72 | d4="\i1 T\i0 " 73 | d5="\i1 U\i0 " 74 | d6="\i1 V\i0 " 75 | d7="\i1 W\i0 " 76 | d8="\i1 X\i0 " 77 | d9="\i1 Y\i0 " 78 | da="\i1 Z\i0 " 79 | db="\i1 [\i0 " 80 | dc="\i1 \\\i0 " 81 | dd="\i1 ]\i0 " 82 | de="\i1 ^\i0 " 83 | df="\i1 _\i0 " 84 | e0="\i1 `\i0 " 85 | e1="\i1 a\i0 " 86 | e2="\i1 b\i0 " 87 | e3="\i1 c\i0 " 88 | e4="\i1 d\i0 " 89 | e5="\i1 e\i0 " 90 | e6="\i1 f\i0 " 91 | e7="\i1 g\i0 " 92 | e8="\i1 h\i0 " 93 | e9="\i1 i\i0 " 94 | ea="\i1 j\i0 " 95 | eb="\i1 k\i0 " 96 | ec="\i1 l\i0 " 97 | ed="\i1 m\i0 " 98 | ee="\i1 n\i0 " 99 | ef="\i1 o\i0 " 100 | f0="\i1 p\i0 " 101 | f1="\i1 q\i0 " 102 | f2="\i1 r\i0 " 103 | f3="\i1 s\i0 " 104 | f4="\i1 t\i0 " 105 | f5="\i1 u\i0 " 106 | f6="\i1 v\i0 " 107 | f7="\i1 w\i0 " 108 | f8="\i1 x\i0 " 109 | f9="\i1 y\i0 " 110 | fa="\i1 z\i0 " 111 | [a0..ff] = 20 112 | 113 | ; Center a line 114 | 01 = "\qc " 115 | 116 | ; Bold Toggle 117 | 0b % "\b1 ", "\b0 " 118 | 119 | ; Emphasis toggle 120 | 8e % "\i1 ","\i0 " 121 | 122 | ; Superscripting on 123 | 0e = "\super " 124 | 125 | ; Superscripting off 126 | 0f = "\nosupersub " 127 | 128 | 7b = 129 | 7d = 130 | 131 | ; Page eject? Control char plus spaces and tabs 132 | 86.. 133 | 06.. 134 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/winworks_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Spinnaker/PFS:Window Works word processor." 3 | commentary = "Documents start with "WINWORKS DOCUMENT" in the header, typically have WPD file suffix." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Start of file 12 | 101602001616030016160400161605001616060016="{@@@@}" 13 | 14 | ; Underline on 15 | 16040116 = "\ul " 16 | ; Italics off 17 | 16040016 = "\ul0 " 18 | 19 | ; Centered on 20 | 16060016 = "\qc " 21 | 22 | ; Italic on 23 | 16030116 = "\i1 " 24 | ; Italic off 25 | 16030016 = "\i0 " 26 | 27 | ; Newline productions 28 | ;..000000000000 29 | 11......11 = "\\r\\n\ul0\qc0\pard\par " 30 | ..000000000000 = "\\r\\n\ul0\qc0\pard\par " 31 | ..010000000000 = "\\r\\n\ul0\qc0\pard " 32 | ..020000000000 = "\\r\\n\ul0\qc0\pard " 33 | ..030000000000 = "\\r\\n\ul0\qc0\pard " 34 | ....0000040000 = "\ul0\qc0\pard " 35 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/word_writer-alt: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Word Writer word processor for PC and Atari ST." 3 | commentary = "Files might include WWRITER.INF" 4 | ; 5 | 6 | ; SOF indicator - the end of the ruler is an "R" 7 | 52 = "{@@@@}" 8 | 9 | 0c= 10 | ; 0d0a="\\r\\n\par " 11 | 1b..= 12 | 1d= 13 | 1e=20 14 | 15 | 80= 16 | 82= 17 | 86= 18 | 8a= -------------------------------------------------------------------------------- /src/org/transformenator/transforms/word_writer_4_c64: -------------------------------------------------------------------------------- 1 | ; 2 | description = "C64 Word Writer 4 word processor." 3 | ; 4 | 5 | ; Remove first x101 bytes 6 | trim_leading = 0101 7 | 8 | ; Translate a-z down in the control character range up to ASCII 9 | [01..1a] = 61 10 | 11 | ; Newlines 12 | ff = 0d 13 | fe = 0d0a -------------------------------------------------------------------------------- /src/org/transformenator/transforms/word_writer_c64: -------------------------------------------------------------------------------- 1 | ; 2 | description = "C64 Timeworks Word Writer word processor." 3 | ; 4 | 5 | 7a = "" 6 | 7 | ; Translate a-z down in the control character range up to ASCII 8 | [01..1a] = 61 9 | 10 | ; Emphasis on 11 | d5= 12 | ; Emphasis off 13 | 95= 14 | 15 | ; Newlines 16 | ff = 0d 17 | fe = 0d0a 18 | 19 | 00 = "{@@@@}" 20 | fd = "{@@@@}" 21 | 22 | regex=@.*\ @@ -------------------------------------------------------------------------------- /src/org/transformenator/transforms/word_writer_pc_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Word Writer/Timeworks word processor." 3 | commentary = "Very little touchup of newlines and paragraph marks." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\*\generator David Schmidt - Transformenator;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | 00= 12 | 1b= 13 | 14 | ; Italics on/off 15 | 81="\i1 " 16 | 80="\i0 " 17 | 18 | 0d0a2020202020="\\r\\n\\r\\n\par\fi360 " 19 | 0d0a20202020="\\r\\n\\r\\n\par\fi360 " 20 | 0d0a202020="\\r\\n\\r\\n\par\fi360 " 21 | 0d0a2020="\\r\\n\\r\\n\par\fi360 " 22 | 0d0a20="\\r\\n\\r\\n\par\fi360 " 23 | 0d0a="{NEWLINE}" 24 | fb="{MarginsBegin}" 25 | 1a="{@@@@}" 26 | 27 | regex = @\{MarginsBegin\}(.)*@@ 28 | regex = @\{NEWLINE\}@ @ 29 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wordperfect_amiga_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Amiga WordPerfect word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | ; Preambles 11 | 8080 = 12 | c0........c0 = 13 | c1....c1 = 14 | c1..............c1 = 15 | c2..c2 = 16 | c3......c3 = 17 | c4......c4 = 18 | c6....c6 = 19 | c7........c7 = 20 | cb........cb = 21 | cc....cc = 22 | ce....ce = 23 | cf..cf = 24 | d0........d0 = 25 | da....da = 26 | dc..............dc = 27 | de....de = 28 | df....df = 29 | e1..e1 = 30 | e4........e4 = 31 | ec....ec = 32 | 33 | ; Line endings 34 | 0d = 20 35 | 0a = "\par " 36 | 82 = 37 | 83 = 38 | 84 = 39 | 89 = 40 | 8c = 41 | 9a = 42 | 9f = 43 | d1 = 44 | ad = 45 | ff = 46 | 47 | ; Conditional hyphenation 48 | ac = 49 | 50 | ; Underline on/off 51 | 94 = "\ul " 52 | 95 = "\ul0 " 53 | 54 | ; Bold on 55 | 9d = "\b1 " 56 | ; Bold off 57 | 9c = "\b0 " 58 | 59 | ; Italics on/off 60 | b2 = "\i1 " 61 | b3 = "\i0 " 62 | 63 | ; endash 64 | a9 = 2d 65 | 66 | ; Bold bullet 67 | e1b7e1 = "*" 68 | 69 | ; a with a hat 70 | e1e2e1 # e2 71 | 72 | ; Page breaks? 73 | dc..00000000..00dc.. = 74 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wordperfect_mac_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Mac WordPerfect 1.0 word processor." 3 | commentary = "This is closely related to wordperfect_pc_rtf, and so may actually be a superset." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; Not sure what these are... 12 | f9 % "","" 13 | fa % "","" 14 | 15 | 16 | ; Start of file 17 | c0........c0 = 18 | c0................c0 = 19 | c1....c1 = 20 | c1..............c1 = 21 | c2..c2 = 22 | c3......c3 = "\par " 23 | c4......c4 = "\par " 24 | c6....c6 = 25 | c7........c7 = 26 | cb........cb = 27 | cc....cc = 28 | cf..cf = 29 | c9................................................................................c9 = 30 | d0....................d0 = 31 | da....da = 32 | dc..............dc = 33 | de....de = 34 | e1..e1 = 35 | e4........e4 = 36 | e4..........e4 = 37 | 38 | ; Line endings 39 | 0d = " " 40 | 0a09 = "\par\par " 41 | 0a0a = "\par\par " 42 | 0a = "\par " 43 | 82 = 44 | 83 = 45 | 84 = 46 | 86 = 47 | 89 = 48 | 8c = 49 | 9a = 50 | 51 | ; Emdash 52 | a9 = "\emdash " 53 | 54 | ; Endash 55 | aa = "\endash " 56 | 57 | ; Underline on/off 58 | 94 = "\ul " 59 | 95 = "\ul0 " 60 | 61 | ; Bold on/off 62 | 9d = "\b1 " 63 | 9c = "\b0 " 64 | 65 | ; Page breaks? 66 | dc..00000000..00dc.. = 20 67 | 68 | ; Footnotes, probably 69 | e2 % "","" 70 | 71 | ; Remove footnotes 72 | regex = @.+?@@ 73 | regex = @.+?@@ 74 | regex = @.+?@@ 75 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wordperfect_pc_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "WordPerfect 4.2 word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | ; Start of file 11 | f2 = 12 | a9......a9 = 13 | c0........c0 = 14 | c0..........c0 = 15 | c1....c1 = 16 | c1..............c1 = 17 | c2..c2 = 18 | c3......c3 = "\par " 19 | c4........c4 = 20 | c5........c5 = 21 | c6....c6 = 22 | c7........c7 = 23 | ca..ca = 24 | cb........cb = 25 | cb..........cb = 26 | cb............cb = 27 | cc....cc = 28 | ce....ce = 29 | cf..cf = 30 | c9................................................................................c9 = 31 | d0........d0 = 32 | d2 = 33 | d4....d4 = 34 | d5....d5 = 35 | da....da = 36 | dd............................................dd = 37 | de....de = 38 | df....df = 39 | e0....e0 = 40 | e4........e4 = 41 | e5..........................................e5 = 42 | e6..................e6 = 43 | e7..e7 = 44 | e8 = 45 | e9............e9 = 46 | eb............................................................eb = 47 | ec....ec = 48 | ff = 49 | 50 | ; Line endings 51 | 0d = " " 52 | 0a09 = "\par\par " 53 | 0d09 = "\par\par " 54 | 0a0a = "\par\par " 55 | 0a = "\par " 56 | 81 = 57 | 82 = 58 | 83 = 59 | 84 = 60 | 86 = 61 | 87 = 62 | 89 = 63 | 8a = 64 | 8c = 65 | 99 = 66 | 9a = 67 | 9e = 68 | 9f = 69 | 70 | a0 = 71 | a1 = 72 | a2 = 73 | a3 = 74 | a5 = 75 | a6 = 76 | a7 = 77 | a9 = "-" 78 | ac = 79 | af = 80 | 81 | ; Acutes 82 | ; e acute 83 | e182e1 = "\'e9" 84 | e1..e1 = 85 | 86 | 87 | ; Emdash 88 | a9 = "\emdash " 89 | af87 = "\emdash " 90 | 91 | ; Endash 92 | aa = "\endash " 93 | 94 | ; Underline on/off 95 | 94 = "\ul " 96 | 95 = "\ul0 " 97 | 98 | ; Overstrike 99 | 99 = 100 | 101 | ; Bold on/off 102 | 9d = "\b1 " 103 | 9c = "\b0 " 104 | 105 | ; Italics on/off 106 | b2 = "\i1 " 107 | b3 = "\i0 " 108 | 109 | ; Superscript 110 | bc = 111 | ; Subscript 112 | bd = 113 | 114 | ; Half line up 115 | be = 116 | ; Half line down 117 | bf = 118 | 119 | ; Page breaks? 120 | dc..00000000..00dc.. = 20 121 | 122 | ; Variable toggles 123 | c0 % "","" 124 | c4 % "","" 125 | d1 % "","" 126 | d7 % "","" 127 | dc % "","" 128 | df % "","" 129 | e2 % "","" 130 | ea % "~ea~","~/ea~" 131 | ee % "~ee~","~/ee~" 132 | ef % "~ef~","~/ef~" 133 | f1 % "~f1~","~/f1~" 134 | f3 % "~f3~","~/f3~" 135 | ; Remove variable toggles 136 | regex = @.+?@@ 137 | regex = @.+?@@ 138 | regex = @.+?@\\par @ 139 | regex = @.+?@@ 140 | regex = @.+?@@ 141 | regex = @.+?@@ 142 | regex = @.+?@@ 143 | regex = @~ea~.+?~/ea~@@ 144 | regex = @~ee~.+?~/ee~@@ 145 | regex = @~ef~.+?~/ef~@@ 146 | regex = @~f1~.+?~/f1~@@ 147 | regex = @~f3~.+?~/f3~@@ 148 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wordstar2000_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Wordstar 2000 word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | ; Line endings: 11 | ; \par - return 12 | ; \ql - reset to left-aligned paragraph 13 | 0a = "\par\ql " 14 | 15 | ; EOF 16 | 7f017f = "{@@@@}" 17 | 18 | ; Page numbering specification: "&%PAGE&" or "&%page&" 19 | 26255041474526 = 20 | 26257061676526 = 21 | 22 | ; Hard line breaks 23 | 7f037f = 24 | 25 | ; Page break? 26 | 7f48..............................487f = "\par " 27 | 28 | ; Paragraph beginnings 29 | 7f02........027f = 30 | 7f49..497f = 31 | 32 | ; Conditional word break 33 | 7f037f = 34 | 35 | ; Toggle italics 36 | 7f047f % "\i1 ","\i0 " 37 | 38 | ; Toggle bold 39 | 7f057f % "\b1 ","\b0 " 40 | 41 | ; Toggle underline 42 | 7f067f % "\ul ","\ul0 " 43 | 44 | ; Paragraph centered 45 | 7f137f = "\qc " 46 | 47 | ; Appeared as part of conditional line break? 48 | 7f1e7f = 49 | 7f1f7f = 50 | 51 | ; Toggle remaining (heretofore unknown) command structures 52 | 7f % "","" 53 | 54 | ; Remove all instances of ... 55 | regex = @.+?@@ -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wordstar_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "WordStar word processor." 3 | commentary = "Helpful URL: http://justsolve.archiveteam.org/wiki/WordStar" 4 | ; 5 | ; Helpful URL: http://justsolve.archiveteam.org/wiki/WordStar 6 | ; 7 | 8 | ; Header for RTF format 9 | head = "{\rtf1{\fonttbl{\f0\fnil\fcharset0 Courier New;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 10 | ; Closing brace for RTF format 11 | tail = " }" 12 | 13 | ; production of 35 bytes bracketed by 0x1d 14 | 1d..................................................................1d= 15 | 16 | ; Any time a curly braces appear... we need to escape them 17 | 7d = "\}" 18 | 7b = "\{" 19 | 20 | ; Newlines 21 | 0d0a = "\\r\\n\par " 22 | 0d8a = "" 23 | 8d0a = "\\r\\n\par " 24 | 8d8a = "" 25 | 26 | ; Ruler line removal 27 | 2e72720d = 28 | 2e2e0d = "{ruler}" 29 | 0b = "{ruler}" 30 | 31 | ; Doublestrike 32 | 04 % "\b1 ","\b0 " 33 | 34 | ; Strikeout 35 | 18 % "\strike1 ","\strike0 " 36 | 37 | ; Bold (Note - not always a toggle) 02 is 82 38 | 02 # 82 39 | 82 % "\b1 ","\b0 " 40 | 41 | ; Strip high bits 42 | [80..ff] # 00 43 | 44 | ; Remove overstrike/backspace 45 | 08 = 46 | 47 | 48 | ; Unknown emphasis 49 | 03 = 50 | 0c = 51 | 0e = 52 | 0f = 53 | 17 = 54 | 19 = 55 | 56 | ; Toggle Underline mode 57 | 13 % "\ul ","\ul0 " 58 | 59 | ; Toggle superscripting - ^T 60 | 14 % "\super ","\nosupersub " 61 | 62 | ; Toggle subcripting - ^V 63 | 16 % "\sub ","\nosupersub " 64 | 65 | ; Page break 66 | regex = @\\par \.[p|P][a|A]@\\page @ 67 | 68 | ; Page offset removal 69 | regex = @\\par \.[p|P][o|O].*@@ 70 | 71 | ; Omit Page numbers directive removal 72 | regex = @\\par \.[o|O][p|P].*@@ 73 | regex = @^.[o|O][p|P].*@@ 74 | 75 | ; Footer removal 76 | regex = @\.[f|F][o|O].*@@ 77 | regex = @\\par \.f2.*@@ 78 | regex = @\\par \.f3.*@@ 79 | regex = @\\par \.f4.*@@ 80 | regex = @\\par \.f5.*@@ 81 | 82 | ; Various directive removals 83 | regex = @\\par \.[p|P][l|L].*@@ 84 | regex = @\\par \.[p|P][n|N].*@@ 85 | regex = @\.[r|R][m|M].*@@ 86 | regex = @\.[h|H][m|M].*@@ 87 | regex = @\.[p|P][c|C].*@@ 88 | regex = @\.[p|P][l|L].*@@ 89 | regex = @\.[p|P][o|O].*@@ 90 | regex = @\.[p|P][n|N].*@@ 91 | regex = @\.[c|C][w|W].*@@ 92 | regex = @\\par \.[c|C][w|W].*@@ 93 | regex = @\\par \.[p|P][a|A]@@ 94 | regex = @\\par \.[i|I][a|A]@@ 95 | regex = @\\par \.[i|I][b|B]@@ 96 | regex = @\\par \.[i|I][e|E]@@ 97 | regex = @\\par \.[i|I][t|T]@@ 98 | regex = @\.[l|L][h|H].*@@ 99 | regex = @\.[m|M][t|T].*@@ 100 | regex = @\.[m|M][b|B].*@@ 101 | regex = @\\par \.[m|M][b|B].*@@ 102 | regex = @\.[p|P][s|S].*@@ 103 | regex = @\.[a|A][w|W].*@@ 104 | regex = @\.[u|U][j|J].*@@ 105 | regex = @\.[s|S][r|R].*@@ 106 | regex = @\.[x|X][t|T].*@@ 107 | regex = @\.[x|X][b|B].*@@ 108 | regex = @\.[o|O][j|J].*@@ 109 | regex = @\.[l|L][s|S].*@@ 110 | regex = @\.[f|F].*@@ 111 | 112 | ; Header directive removal 113 | regex = @\.[h|H][e|E]@@ 114 | 115 | ; Embedded ruler removal: .rr n 116 | regex = @\.[r|R][r|R].*@@ 117 | regex = @\{ruler\}.*@@ 118 | 119 | ; Continuous underlining 120 | regex = @\\par \.[ulon|ULON].*@@ 121 | regex = @\\par \.[uloff|ULOFF].*@@ 122 | 123 | ; Header lines: .he, .h1-.h5 124 | regex = @\.[h|H][e|E](\.*)@\\r\\n\\par @ 125 | regex = @\.[h|H][1-5](\.*)@\\r\\n\\par @ 126 | 127 | ; Character width 128 | regex = @\\par \.[c|C][w|W].*@@ 129 | 130 | ; EOF is ^Z 131 | 1a = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/works_1.0_mac_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "MS Works 1.0 for Mac." 3 | commentary = "App creator/types PSIP/AWWP." 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\*\generator David Schmidt - Transformenator;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | trim_leading=41 12 | 13 | 80= 14 | b0= 15 | 16 | 0100040904="\b1 " 17 | 0100040900="\b0 " 18 | 00000000!!="\\r\\n\par\pard " 19 | 4C0100000000= 20 | 430100000000= 21 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/works_mac: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Early MS Works for Mac." 3 | commentary = "Later than version 2.0, but prior to version 3.0. App creator/type MSWK/AWWP." 4 | ; 5 | 6 | ;trim_leading=012c 7 | 000004= 8 | 0004= 9 | 000005=0d0a 10 | 0005= 11 | 1000..=0d0a 12 | 020003= 13 | 0c..ff= 14 | 60= 15 | 00= -------------------------------------------------------------------------------- /src/org/transformenator/transforms/wps80_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "DEC Rainbow WPS-80 word processor." 3 | detangler = WPS80 4 | ; 5 | 6 | ; Header for RTF format 7 | head = "{\rtf1{\fonttbl{\f0\fmodern\fprq1;}}{\*\generator David Schmidt - Transformenator ;}\f0 " 8 | ; Closing brace for RTF format 9 | tail = "}" 10 | 11 | ; SOF may appear several times; use the last one 12 | 10 = "{@@@@}" 13 | 01 = "{@@@@}" 14 | 15 | 08 = "\\r\\n\par " 16 | 0b = "\\r\\n\par " 17 | 0d = "\\r\\n\par " 18 | 0e = "\\r\\n\par " 19 | 20 | ; Bold toggle 21 | 12 % "\b1 ","\b0 " 22 | 23 | ; Italics toggle 24 | 13 % "\i1 ","\i0 " 25 | 26 | 1f = " " -------------------------------------------------------------------------------- /src/org/transformenator/transforms/writers_choice: -------------------------------------------------------------------------------- 1 | ; 2 | description = "PC Writer's Choice word processor." 3 | ; 4 | 5 | ; Leading gorp until 0x400 6 | skip_leading = 400 7 | 8 | 01 = 0d0a 9 | 10 | 0e = "{@@@@}" -------------------------------------------------------------------------------- /src/org/transformenator/transforms/xerox860: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Xerox 860 word processor." 3 | commentary = "Quite rudimentary, based on extant files." 4 | ; 5 | detangler = Xerox860 6 | 7 | ; Let's see what happens when 00 is EOF 8 | 00000000 = "{@@@@}" 9 | 00 = 10 | 11 | 90 % "
","
" 12 | 13 | ; Emphasis on 14 | 82 = 15 | ; Emphasis off 16 | 83 = 17 | 18 | ; Emphasis on (probably underline) 19 | 84 = 20 | ; Emphasis off 21 | 85 = 22 | 23 | ; ? 24 | 91........91 = 25 | 26 | ; Word break 27 | a196 = 28 | 29 | ; Whitespace 30 | 91..91 = 31 | 94 = 32 | 95 = 33 | 96 = 0d0a 34 | ;96 = 20 35 | 97 = 0d0a 36 | aa = 20 37 | 38 | ; tab 39 | 99 = 09 40 | 41 | 9a = 42 | 9c = 43 | ; Superscript 44 | 9d = 45 | 46 | ac = "," 47 | 48 | regex = @
.*
@@ -------------------------------------------------------------------------------- /src/org/transformenator/transforms/xerox_6085: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Split up a file into bite-sized chunks with eyecatchers." 3 | commentary = "File index/layout is unknown." 4 | detangler = Split 5 | ; 6 | 7 | ; Unknown productions 8 | 2E1D1D= 9 | 10 | 00........04= 11 | 01........04= 12 | 0D........07= 13 | 11........11= 14 | 1C........09= 15 | 1C........0D= 16 | 1D........05= 17 | 1D........11= 18 | 80........04= 19 | 81........04= 20 | 21 | 00f6= 22 | 00fc= 23 | 00ea= 24 | 25 | FF00=0d0a 26 | FF0A= 27 | FFEF66= 28 | 29 | ; Single quote 30 | B9="'" 31 | ; Double quote 32 | aa=""" 33 | 34 | ; Newline 35 | 1d=0a0d 36 | -------------------------------------------------------------------------------- /src/org/transformenator/transforms/xerox_memory_writer: -------------------------------------------------------------------------------- 1 | ; 2 | description = "Possibly the Xerox Memorywriter." 3 | commentary = "It might be something else altogether. Disk geometry is 256 bytes per sector, 16 sectors per track, 40 tracks per side, one sided." 4 | ; 5 | detangler = XeroxMemoryWriter 6 | ; 7 | 8 | 88 = "{@@@@}" 9 | 89 = 10 | 11 | 2d9d2d = "--" 12 | a396 = 13 | 96= 14 | 97978c = 0d0a 15 | 979799 = 0d0a0d0a 16 | 99 = 0d0a0d0a 17 | 9797 = 0d0a0d0a 18 | 95 = 19 | 97 = -------------------------------------------------------------------------------- /src/org/transformenator/transforms/xywrite_rtf: -------------------------------------------------------------------------------- 1 | ; 2 | description = "XyWrite word processor." 3 | ; 4 | 5 | ; Header for RTF format 6 | head = "{\rtf1{\*\generator David Schmidt - Transformenator ;}\f0 " 7 | ; Closing brace for RTF format 8 | tail = "}" 9 | 10 | ; Underline 11 | ae4d444252af = "\ul " 12 | ae4d44554caf = "\ul " 13 | ae4d444e4daf = "\ul0 " 14 | 15 | ; Bold 16 | ae555342af = "\b1 " 17 | ae555341af = "\b0 " 18 | 19 | ; Metadata follows 20 | ae4d445256af = "\\r\\n\par " 21 | 22 | ; Newlines 23 | 0d0a = "\\r\\n\par " 24 | 25 | ; All remaining command structures 26 | ae = "" 27 | af = "" 28 | 29 | ; Remove all instances of ... 30 | regex = @.+?@@ 31 | 32 | ; If any offs are still hanging around... lop 'em off 33 | regex = @@@ 34 | 35 | ; End of text 36 | 1a = "{@@@@}" 37 | -------------------------------------------------------------------------------- /src/transform.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Invoker for Transform - call with no parameters for usage instructions 3 | @rem 4 | @rem Set TRANSFORM_HOME to the absolute location of the transformenator.jar file. The default 5 | @rem location is the current working directory. 6 | @rem 7 | 8 | @if "%TRANSFORM_HOME%" == "" goto local 9 | @goto next 10 | :local 11 | @set TRANSFORM_HOME="." 12 | 13 | :next 14 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.Transform %* 15 | 16 | :end 17 | -------------------------------------------------------------------------------- /src/transform.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Shell script Invoker for Transform - call with no parameters for usage instructions 4 | # 5 | # Set TRANSFORM_HOME to the absolute location of the transformenator.jar file. The default 6 | # location is the current working directory otherwise. 7 | # 8 | if [ "$TRANSFORM_HOME" == "" ] 9 | then 10 | export TRANSFORM_HOME="." 11 | fi 12 | 13 | if [ "$4" != "" ] 14 | then 15 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.Transform "$1" "$2" "$3" "$4" 16 | else 17 | if [ "$3" != "" ] 18 | then 19 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.Transform "$1" "$2" "$3" 20 | else 21 | if [ "$2" != "" ] 22 | then 23 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.Transform "$1" "$2" 24 | else 25 | if [ "$1" != "" ] 26 | then 27 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.Transform "$1" 28 | else 29 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.Transform 30 | fi 31 | fi 32 | fi 33 | fi 34 | -------------------------------------------------------------------------------- /src/transformutil.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Batch file Invoker for Transformenator utilities - call with no parameters for usage instructions 3 | @rem 4 | @rem Set TRANSFORM_HOME to the absolute location of the transformenator.jar file. 5 | @rem The default location is the current working directory. 6 | @rem 7 | 8 | @if "%TRANSFORM_HOME%" == "" goto local 9 | @goto next 10 | :local 11 | @set TRANSFORM_HOME="." 12 | 13 | :next 14 | @if "%1" == "" goto usage 15 | @if "%9" == "" goto eight 16 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9" 17 | @goto end 18 | :eight 19 | @if "%8" == "" goto seven 20 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" 21 | @goto end 22 | :seven 23 | @if "%7" == "" goto six 24 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" "%2" "%3" "%4" "%5" "%6" "%7" 25 | @goto end 26 | :six 27 | @if "%6" == "" goto five 28 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" "%2" "%3" "%4" "%5" "%6" 29 | @goto end 30 | :five 31 | @if "%5" == "" goto four 32 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" "%2" "%3" "%4" "%5" 33 | @goto end 34 | :four 35 | @if "%4" == "" goto three 36 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" "%2" "%3" "%4" 37 | @goto end 38 | :three 39 | @if "%3" == "" goto two 40 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" "%2" "%3" 41 | @goto end 42 | :two 43 | @if "%2" == "" goto one 44 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" "%2" 45 | @goto end 46 | :one 47 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility "%1" 48 | @goto end 49 | 50 | :usage 51 | @java -cp %TRANSFORM_HOME%\transformenator.jar org.transformenator.TransformUtility 52 | 53 | :end -------------------------------------------------------------------------------- /src/transformutil.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Shell script invoker for Transformenator utilities - call with no parameters for usage instructions 4 | # 5 | # Set TRANSFORM_HOME to the absolute location of the transformenator.jar file. The default 6 | # location is the current working directory otherwise. 7 | # 8 | if [ "$TRANSFORM_HOME" == "" ] 9 | then 10 | export TRANSFORM_HOME="." 11 | fi 12 | 13 | if [ "$4" != "" ] 14 | then 15 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.TransformUtility "$1" "$2" "$3" "$4" 16 | else 17 | if [ "$3" != "" ] 18 | then 19 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.TransformUtility "$1" "$2" "$3" 20 | else 21 | if [ "$2" != "" ] 22 | then 23 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.TransformUtility "$1" "$2" 24 | else 25 | if [ "$1" != "" ] 26 | then 27 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.TransformUtility "$1" 28 | else 29 | java -cp $TRANSFORM_HOME/transformenator.jar org.transformenator.TransformUtility 30 | fi 31 | fi 32 | fi 33 | fi 34 | --------------------------------------------------------------------------------