diff options
-rw-r--r-- | converters/bbcim/Makefile | 26 | ||||
-rw-r--r-- | converters/bbcim/files/md5 | 3 | ||||
-rw-r--r-- | converters/bbcim/files/patch-sum | 9 | ||||
-rw-r--r-- | converters/bbcim/patches/patch-aa | 16 | ||||
-rw-r--r-- | converters/bbcim/patches/patch-ab | 69 | ||||
-rw-r--r-- | converters/bbcim/patches/patch-ac | 25 | ||||
-rw-r--r-- | converters/bbcim/patches/patch-ad | 21 | ||||
-rw-r--r-- | converters/bbcim/patches/patch-ae | 25 | ||||
-rw-r--r-- | converters/bbcim/patches/patch-af | 132 | ||||
-rw-r--r-- | converters/bbcim/patches/patch-ag | 16 | ||||
-rw-r--r-- | converters/bbcim/pkg/COMMENT | 1 | ||||
-rw-r--r-- | converters/bbcim/pkg/DESCR | 1 | ||||
-rw-r--r-- | converters/bbcim/pkg/PLIST | 3 | ||||
-rw-r--r-- | converters/bbcim/pkg/bbcim.1 | 253 |
14 files changed, 600 insertions, 0 deletions
diff --git a/converters/bbcim/Makefile b/converters/bbcim/Makefile new file mode 100644 index 00000000000..28927c0cddb --- /dev/null +++ b/converters/bbcim/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1.1.1 2000/06/07 19:05:20 skrll Exp $ +# + +DISTNAME= bbcim095-5 +PKGNAME= bbcim-0.95b5 +CATEGORIES= converters +MASTER_SITES= http://www.nvg.ntnu.no/bbc/util/ +EXTRACT_SUFX= .zip + +MAINTAINER= skrll@netbsd.org + +BUILD_DEPENDS+= unzip:../../archivers/unzip + +EXTRACT_CMD= unzip -Loq ${DOWNLOADED_DISTFILE} + +WRKSRC= ${WRKDIR}/bbcim +MAN_PAGE= ${PKGDIR}/bbcim.1 + +do-build: + (cd ${WRKSRC} && ${WRKSRC}/mkbbcim) + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/bbcim ${PREFIX}/bin/ + ${INSTALL_MAN} ${MAN_PAGE} ${PREFIX}/man/man1/ + +.include "../../mk/bsd.pkg.mk" diff --git a/converters/bbcim/files/md5 b/converters/bbcim/files/md5 new file mode 100644 index 00000000000..3cb70d57ab6 --- /dev/null +++ b/converters/bbcim/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2000/06/07 19:05:20 skrll Exp $ + +MD5 (bbcim095-5.zip) = 5fc16f632d20d69eb48475ab834ceef8 diff --git a/converters/bbcim/files/patch-sum b/converters/bbcim/files/patch-sum new file mode 100644 index 00000000000..c7601cb13e8 --- /dev/null +++ b/converters/bbcim/files/patch-sum @@ -0,0 +1,9 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/06/07 19:05:20 skrll Exp $ + +MD5 (patch-aa) = 2ba9d0668a9ee24597c168543cfae4cb +MD5 (patch-ab) = 585612d16d8a0b0984920eb7c6abbc42 +MD5 (patch-ac) = 393fa0b8c20509ce1919b0463a8ed2b6 +MD5 (patch-ad) = 6452a54bc932ccfbe510d91c7c3366d1 +MD5 (patch-ae) = df47a1e8610c6af78300737da206f76b +MD5 (patch-af) = 9681c9d7eac240427b8b946ebea75da3 +MD5 (patch-ag) = 844d19ef89416267cb911b4330af85ac diff --git a/converters/bbcim/patches/patch-aa b/converters/bbcim/patches/patch-aa new file mode 100644 index 00000000000..b4ba8f296d1 --- /dev/null +++ b/converters/bbcim/patches/patch-aa @@ -0,0 +1,16 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/06/07 19:05:21 skrll Exp $ + +--- bbc_crc.c.orig Fri Jul 4 08:33:20 1997 ++++ bbc_crc.c Sun Jun 4 16:57:24 2000 +@@ -68,9 +68,9 @@ + #ifdef NL + printf("Naam van het te controleren archief bestand?"); + #else +- printf("Name of the archive file to be checked?"); ++ printf("Name of the archive file to be checked?\n"); + #endif +- scanf("%50s", archivefile); ++ exit(1); + } else strcpy(archivefile, argv[2+options]); + */ + diff --git a/converters/bbcim/patches/patch-ab b/converters/bbcim/patches/patch-ab new file mode 100644 index 00000000000..abab8982aca --- /dev/null +++ b/converters/bbcim/patches/patch-ab @@ -0,0 +1,69 @@ +$NetBSD: patch-ab,v 1.1.1.1 2000/06/07 19:05:21 skrll Exp $ + +--- bbcim.c.orig Fri Jul 4 09:07:28 1997 ++++ bbcim.c Sun Jun 4 16:57:24 2000 +@@ -87,7 +87,6 @@ + + /*************** CONFIGURATION *********************/ + /* Comment out for english messages: */ +-#define NL + + #define UNIX_MKDIR + +@@ -280,9 +279,9 @@ + #ifdef NL + printf("Welke optie?"); + #else +- printf("Which option?"); ++ printf("Which option?\n"); + #endif +- scanf("%20s", optstring); options=0; ++ exit(1); + } + else strcpy(optstring, argv[1]); + +@@ -426,7 +425,7 @@ + #else + printf("Name of the bbc disk image?"); + #endif +- scanf("%50s", disk); ++ exit(1); + } else strcpy(disk, argv[1+options]); + + +@@ -475,7 +474,7 @@ + #ifdef NL + printf("Bestand %s is niet te openen\n\n",disk); + #else +- printf("File %s cannot be opened\n\n",disk); ++ printf("File %s cannot be opened\n",disk); + #endif + exit(1); + } +@@ -526,7 +525,7 @@ + #ifdef NL + printf("niets op het diskbeeld\n\n"); + #else +- printf("nothing on the diskimage\n\n"); ++ printf("nothing on the diskimage\n"); + #endif + + exit(1); +@@ -794,7 +793,7 @@ + " bij bestand %s\n\n", bbcfile_naam); + #else + printf("unexpected end of the diskimage" \ +- " at file %s\n\n", bbcfile_naam); ++ " at file %s\n", bbcfile_naam); + #endif + exit(1); + } +@@ -832,7 +831,7 @@ + " bij bestand %s\n\n", bbcfile_naam); + #else + printf("unexpected end of the diskimage" \ +- " at file %s\n\n", bbcfile_naam); ++ " at file %s\n", bbcfile_naam); + #endif + exit(1); + } diff --git a/converters/bbcim/patches/patch-ac b/converters/bbcim/patches/patch-ac new file mode 100644 index 00000000000..9ff20c425c3 --- /dev/null +++ b/converters/bbcim/patches/patch-ac @@ -0,0 +1,25 @@ +$NetBSD: patch-ac,v 1.1.1.1 2000/06/07 19:05:21 skrll Exp $ + +--- ddos2dfs.c.orig Mon Jun 30 11:32:25 1997 ++++ ddos2dfs.c Sun Jun 4 16:57:25 2000 +@@ -24,9 +24,9 @@ + #ifdef NL + printf("Naam van het DD bbc diskbeeld?"); + #else +- printf("Name of the DD bbc diskimage?"); ++ printf("Name of the DD bbc diskimage?\n"); + #endif +- scanf("%50s", disk); ++ exit(1); + } + else strcpy(disk, argv[2]); + +@@ -43,7 +43,7 @@ + #ifdef NL + printf("Bestand %s is niet te openen\n\n", disk); + #else +- printf("File %s cannot be opened\n\n", disk); ++ printf("File %s cannot be opened\n", disk); + #endif + exit(1); + } diff --git a/converters/bbcim/patches/patch-ad b/converters/bbcim/patches/patch-ad new file mode 100644 index 00000000000..490fda2f6d1 --- /dev/null +++ b/converters/bbcim/patches/patch-ad @@ -0,0 +1,21 @@ +$NetBSD: patch-ad,v 1.1.1.1 2000/06/07 19:05:21 skrll Exp $ + +--- diskb_add.c.orig Fri Jul 4 08:28:28 1997 ++++ diskb_add.c Sun Jun 4 16:57:25 2000 +@@ -27,7 +27,6 @@ + // #else + // printf("Name of the archive file to be added?"); + // #endif +-// scanf("%50s", addfile); + // } else {strcpy(addfile, argv[2+options]); options +=1;} + */ + +@@ -52,7 +51,7 @@ + #ifdef NL + printf("Er zijn al 31 bestanden op het diskbeeld\n\n"); + #else +- printf("There are already 31 files on the diskimage\n\n"); ++ printf("There are already 31 files on the diskimage\n"); + #endif + exit(1); + } diff --git a/converters/bbcim/patches/patch-ae b/converters/bbcim/patches/patch-ae new file mode 100644 index 00000000000..8dc9605baa3 --- /dev/null +++ b/converters/bbcim/patches/patch-ae @@ -0,0 +1,25 @@ +$NetBSD: patch-ae,v 1.1.1.1 2000/06/07 19:05:21 skrll Exp $ + +--- diskb_del.c.orig Mon Jun 30 11:34:34 1997 ++++ diskb_del.c Sun Jun 4 16:57:25 2000 +@@ -29,9 +29,9 @@ + /* #ifdef NL + printf("Naam van het bbc diskbeeld?"); + #else +- printf("Name of the bbc disk image?"); ++ printf("Name of the bbc disk image?\n"); + #endif +- scanf("%50s", disk); ++ exit(1); + } else {strcpy(disk, argv[1+options]); options++;} + */ + +@@ -55,7 +55,7 @@ + #ifdef NL + printf("niets op het diskbeeld\n\n"); + #else +- printf("Nothing on the diskimage\n\n"); ++ printf("Nothing on the diskimage\n"); + #endif + exit(1); + } diff --git a/converters/bbcim/patches/patch-af b/converters/bbcim/patches/patch-af new file mode 100644 index 00000000000..681d7c00da3 --- /dev/null +++ b/converters/bbcim/patches/patch-af @@ -0,0 +1,132 @@ +$NetBSD: patch-af,v 1.1.1.1 2000/06/07 19:05:21 skrll Exp $ + +--- intersplits.c.orig Mon Jun 30 11:36:21 1997 ++++ intersplits.c Sun Jun 4 16:57:25 2000 +@@ -9,7 +9,6 @@ + + void interss(int argc, char *argv[], int options) { + char side0[50], side1[50], interleaved[50]; +- char option2[5]; + unsigned char byte; + FILE *fp0, *fp1, *fp_inter; + int sec_per_track, track, i; +@@ -20,21 +19,26 @@ + #ifdef NL + printf("Single density (sd) of double density (dd)?"); + #else +- printf("Single density (sd) or double density (dd)?"); ++ printf("Single density (sd) or double density (dd)?\n"); + #endif +- scanf("%2s", option2); +- } else {strcpy(option2, argv[1+options]); options++;} +- +- if (!strcmp(option2, "dd")) dd=1; +- ++ exit(1); ++ } else { ++ if (!strcmp(argv[1+options], "dd")) { ++ dd=1; ++ options++; ++ } else if (!strcmp(argv[1+options], "sd")) { ++ dd=0; ++ options++; ++ } ++ } + + if ((argc-options)==1) { + #ifdef NL + printf("Naam van het diskbeeld voor zijde 0?"); + #else +- printf("Name of the disk image for side 0?"); ++ printf("Name of the disk image for side 0?\n"); + #endif +- scanf("%50s", side0); ++ exit(1); + } else strcpy(side0, argv[1+options]); + + +@@ -42,9 +46,9 @@ + #ifdef NL + printf("Naam van het diskbeeld voor zijde 1?"); + #else +- printf("Name of the disk image for side 1?"); ++ printf("Name of the disk image for side 1?\n"); + #endif +- scanf("%50s", side1); ++ exit(1); + } else strcpy(side1, argv[2+options]); + + +@@ -52,9 +56,9 @@ + #ifdef NL + printf("Naam van om-en-om beeld?"); + #else +- printf("Name of the interleaved diskimage?"); ++ printf("Name of the interleaved diskimage?\n"); + #endif +- scanf("%50s", interleaved); ++ exit(1); + } else strcpy(interleaved, argv[3+options]); + + +@@ -64,7 +68,7 @@ + #ifdef NL + printf("Bestand %s is niet te openen\n\n", side0); + #else +- printf("File %s cannot be opened\n\n", side0); ++ printf("File %s cannot be opened\n", side0); + #endif + exit(1); + } +@@ -76,7 +80,7 @@ + #ifdef NL + printf("Bestand %s is niet te openen\n\n", side1); + #else +- printf("File %s cannot be opened\n\n", side1); ++ printf("File %s cannot be opened\n", side1); + #endif + exit(1); + } +@@ -130,7 +134,6 @@ + + void splitds(int argc, char *argv[], int options) { + char side0[50], side1[50], interleaved[50]; +- char option2[5]; + unsigned char byte; + FILE *fp0, *fp1, *fp_inter; + int sec_per_track, track; +@@ -141,21 +144,26 @@ + #ifdef NL + printf("Single density (sd) of double density (dd)?"); + #else +- printf("Single density (sd) or double density (dd)?"); ++ printf("Single density (sd) or double density (dd)?\n"); + #endif +- scanf("%2s", option2); +- } else {strncpy(option2, argv[1+options],2); options++;} +- +- if (!strcmp(option2, "dd")) dd=1; +- ++ exit(1); ++ } else { ++ if (!strcmp(argv[1+options], "dd")) { ++ dd=1; ++ options++; ++ } else if (!strcmp(argv[1+options], "sd")) { ++ dd=0; ++ options++; ++ } ++ } + + if ((argc-options)==1) { + #ifdef NL + printf("Naam van de om-en-om diskdump?"); + #else +- printf("Name of the interleaved diskdump?"); ++ printf("Name of the interleaved diskdump?\n"); + #endif +- scanf("%50s", interleaved); ++ exit(1); + } else strcpy(interleaved, argv[1+options]); + + strcpy(side0, interleaved); diff --git a/converters/bbcim/patches/patch-ag b/converters/bbcim/patches/patch-ag new file mode 100644 index 00000000000..794012e47f5 --- /dev/null +++ b/converters/bbcim/patches/patch-ag @@ -0,0 +1,16 @@ +$NetBSD: patch-ag,v 1.1.1.1 2000/06/07 19:05:21 skrll Exp $ + +--- splits_cat.c.orig Fri Jul 4 08:05:18 1997 ++++ splits_cat.c Sun Jun 4 16:57:25 2000 +@@ -20,9 +20,9 @@ + #ifdef NL + printf("Naam van de te splitsen catalogus?"); + #else +- printf("Name of the catalogue to be split?"); ++ printf("Name of the catalogue to be split?\n"); + #endif +- scanf("%50s", cat_naam); ++ exit(1); + } else strcpy(cat_naam, argv[1+options]); + + diff --git a/converters/bbcim/pkg/COMMENT b/converters/bbcim/pkg/COMMENT new file mode 100644 index 00000000000..b6e08ad38e7 --- /dev/null +++ b/converters/bbcim/pkg/COMMENT @@ -0,0 +1 @@ +file and diskimage conversion utility for BBC Micro software diff --git a/converters/bbcim/pkg/DESCR b/converters/bbcim/pkg/DESCR new file mode 100644 index 00000000000..b6e08ad38e7 --- /dev/null +++ b/converters/bbcim/pkg/DESCR @@ -0,0 +1 @@ +file and diskimage conversion utility for BBC Micro software diff --git a/converters/bbcim/pkg/PLIST b/converters/bbcim/pkg/PLIST new file mode 100644 index 00000000000..e0a792dae13 --- /dev/null +++ b/converters/bbcim/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/06/07 19:05:21 skrll Exp $ +bin/bbcim +man/man1/bbcim.1 diff --git a/converters/bbcim/pkg/bbcim.1 b/converters/bbcim/pkg/bbcim.1 new file mode 100644 index 00000000000..d8c23a8a294 --- /dev/null +++ b/converters/bbcim/pkg/bbcim.1 @@ -0,0 +1,253 @@ +.\" -*- nroff -*- +.\" +.\" bbcim. +.\" Copyright (C) 1996 W.H.Scholten. +.\" +.\" This program is free; you may redistribute it and/or modified +.\" versions of it if you give me due credit. +.\" You may not use part or whole of the source code for any commercial product. +.\" +.\" This program is distributed in the hope that it will be useful, but +.\" WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.\" +.\" +.\" bbcim.1 - nroff -man source for bbcim man page. +.\" +.\" +.\" +.Dd June, 1997 +.Dt BBCIM 1 +.\" +.\"------------------------------------------------------------------ +.\" +.Sh NAME +.Nm bbcim +.Nd Acorn BBC Micro file conversion utility +.\" +.\"------------------------------------------------------------------ +.\" +.Sh SYNOPSIS +.Nm +.Op Fl H +.Op Fl V +.Oo +.Xo Fl a Ns Op Cm b Ns +.Op Cm r +.Ar image Ar file ... +.Xc +.Oc +.Op Fl c Ar image +.Op Fl d Ar image Ar file ... +.Oo +.Xo Fl e Ns Op Cm ds Ns +.Op Cm # Ns +.Op Cm b Ns +.Op Cm rq +.Ar image Op Ar file ... +.Xc +.Oc +.Op Fl crc +.Op Fl 40 | 80 | max | min +.Nm "" +.Fl s Ns Oo +.Cm # +.Oc +.Ar file +.Nm "" +.Fl x Ar file ... +.Nm "" +. Fl y Ar file ... +.Nm "" +.Fl icrc Ar file ... +.Nm "" +.Fl xcrc +.Nm "" +.Fl interss Op Cm sd|dd +.Ar image Ar image Ar image +.Nm "" +.Fl splitds Op Cm sd|dd +.Ar image +.Nm "" +.Fl ddos2dfs Ar image +.Nm "" +.Fl w62dfs Ar image +.\" +.\"------------------------------------------------------------------ .\" +.Sh DESCRIPTION +.Nm +is a file conversion utility to help in +transferring files and conversion of disk images for use +with BBC Micro emulators. +.Pp +The +.Nm +utilitiy can be invoked to perform a variety of different +conversions - each synopsis form provides a different +conversion. The first synopsis form has the +following options: +.Bl -tag -width Ds +.It Fl H +Display usage information. +.It Fl V +Display version information. +.It Xo Fl a Ns Op Cm b Ns +.Op Cm r +.Ar image Ar file ... +.Xc +Add files (in archive format) to the disk image. +.Pp +Information files are automatically skipped so +.Pp +.Dl bbcim -a diskimage * +.Pp +will work without problems. If the disk image +didn't exist a new one will be created. The modifier +.Cm r +removes the files after adding them to the +diskimage and the modifier +.Cm b +allows files to be added without an information file +existing - the load and execute addresses of the file +will be set to 0. +.It Fl c Ar image +List disk image catalogue. +.It Fl d Ar image Ar file ... +Delete files from disk image. +.Pp +Files without a BBC directory are assumed to have the +root directory, e.g. +.Pa file +is assumed to be +.Pa $. Ns Ar file +.It Xo Fl e Ns Op Cm ds Ns +.Op Cm # Ns +.Op Cm b Ns +.Op Cm r +.Ar image Op Ar file ... +.Xc +Extract files from the disk image specified in +.Ar image . +.Pp +When the extract option is specified without modifiers +files are extracted with the filename format +.Pa Ar image Ns .$. Ns Ar file +and an information file (containing load and execution +addresses) of filename format +.Pa Ar image Ns .$. Ns Ar file Ns .inf +is created. +.Pp +The +.Cm d +modifier places all files in a directory +named after the disk image, i.e. +.Pa Ar image Ns /$. Ns Ar file +.Pp +The +.Cm s +modifier will extract files with short filenames in that +they don't include the image name in any way. +.Pp +The +.Cm # +modifier removes the BBC root directory +.Qq $ +and glues other directories to the filename which may +result in name clashes. That is +.Pa E.E +and +.Pa EE +would clash. If this happens you will be asked whether +what you want to do +.Pp Adding the +.Cm b +modifier only extracts the bare files - no information +files are created. +.Pp +If the +.Cm r +modifier is specified the image is deleted after all files +have been extracted. +.Pp +In all cases a catalogue file +.Pa imagefile.cat +is made except when a list of file names is given, in +which case only the files in the list are extracted +from the disk image and +.Cm r +is ignored. +.It Fl crc +Calculate CRCs for all the files in the disk image. +.It Fl 40 +Expand the disk image to 40 tracks. +.It Fl 80 +Expand the disk image to 80 tracks. +.It Fl max +Expand the disk image to (almost) 256K. +.It Fl min +Truncate or minimise the disk image. This is equivalent to +a +.Ic *COMPACT +and cutting off after last used sector. +.El +.Pp +The remaining synopsis forms are as follows: +.Bl -tag -width Ds +.It Xo Fl s Ns Op Cm # +.Ar file +.Xc +Split a text file with file information into information +files. Lines not starting with a BBC (DFS) file name are +skipped. The modifier +.Cm # +removes the DFS directory $ +and glues others to the file name. This can be used to +make archive files from an xbeeb directory + CAN BE USED TO +MAKE ARCHIVE FILES FROM AN XBEEB DIRECTORY. +.It Fl x Ar file ... +.Qq xbeeb +conversion of archive files in the list. +.It Fl y Ar file ... +Rename archive and information files to standard format (as +produced with # in -e), adds CRC's if not found or check +crc's if found. +.It Fl icrc Ar file ... +Check CRCs of given archive files. +.It Fl xcrc +Check CRCs in a xbeeb catalogue file against the real +files. +.It Xo Fl interss Op Cm sd|dd +.Ar image1 Ar image2 Ar image3 +.Xc +Interleaves single sided disk images +.Ar image1 +and +.Ar image2 +to create a new image +.Ar image3 . +.It Xo Fl splitds Op Cm Sd|dd +.Ar file +.Xc +Split an interleaved disk image +.Ar image +into +.Pa Ar image Ns .0 and +.Pa Ar image Ns .1 . +.It Fl ddos2dfs Ar image +Split a single sided DDOS disk dump into several DFS +disk images. +.It Fl w62dfs Ar image +Split a single sided Watford 62 DFS disk image +.Ar image +into 2 +DFS disk images +.Ar image Ns .w1 and +.Ar image Ns .w2 . +.El +.Sh AUTHOR +.Nm +was written by Wouter Scholten last known email address +wouters@cistron.nl. This man page was put together by Nick +Hudson (nick@nthcliff.demon.co.uk) + |