Building an Apple CP/M Disk - CP/M

This is a discussion on Building an Apple CP/M Disk - CP/M ; For your viewing pleasure (hopefully) the following links are provided: The Documentation: http://www.aztecmuseum.ca/applecpm/AztecCPMToApple.pdf Screen Shots and Resource Links are included in the document. The Disk Images (documentation included): http://www.aztecmuseum.ca/applecpm/AztecCPMToApple.zip Have Fun! Bill Buckels...

+ Reply to Thread
Results 1 to 14 of 14

Thread: Building an Apple CP/M Disk

  1. Building an Apple CP/M Disk

    For your viewing pleasure (hopefully) the following links are provided:

    The Documentation:

    http://www.aztecmuseum.ca/applecpm/AztecCPMToApple.pdf

    Screen Shots and Resource Links are included in the document.

    The Disk Images (documentation included):

    http://www.aztecmuseum.ca/applecpm/AztecCPMToApple.zip

    Have Fun!

    Bill Buckels



  2. Re: Building an Apple CP/M Disk

    On Nov 6, 10:17*am, "Bill Buckels" wrote:
    > For your viewing pleasure (hopefully) the following links are provided:
    >
    > The Documentation:
    >
    > http://www.aztecmuseum.ca/applecpm/AztecCPMToApple.pdf

    After reading the assumptions section, I was left wondering how you
    were going to proceed without some kind of image manipulation tool
    (CiderPress, AppleCommander, ADFS, FishWings, etc). But I see you
    didn't! :-) Might be worth mentioning there as well as in the
    Footnote/reference section.

  3. Re: Building an Apple CP/M Disk

    "schmidtd" wrote in message
    news:bcb9945a-6684-40f5-837a-d6b1e200565b@o40g2000prn.googlegroups.com...
    >After reading the assumptions section, I was left wondering how you were
    >going to proceed without some kind of image manipulation tool(CiderPress,
    >AppleCommander, ADFS, FishWings, etc). But I see you didn't! :-) Might be
    >worth mentioning there as well as in the Footnote/reference section.


    Uh-oh! I'm in "scmidt" again. I'd better "buckel-up" or "buckel-down"

    OTOH maybe this is a lot more than existed before I did it and it might just
    be prudent to tell me what a Wonderful Job I did and leave it there. Or
    maybe not.

    Unless you start extolling the virtues of Aztec C and showering me with
    praise, since the screen shots obviously show what I used for my exercise I
    will need to consider your comments mere frivolity and you a hopeless
    malcontent until the next revision

    Seriously though, thanks for taking a look. So I take it there wasn't much
    obviously wrong with this whole confusing mess... just a lack of obvious
    endorsements.

    Yikes! I'm on a roll here...

    Bill





  4. Re: Building an Apple CP/M Disk

    "schmidtd" wrote in message
    news:bcb9945a-6684-40f5-837a-d6b1e200565b@o40g2000prn.googlegroups.com...
    >I was left wondering how you were going to proceed without some kind of
    >image manipulation tool


    In my own defense I did include the following "As shown in the screen shots
    above, I have placed the Aztec C CP/M 80 program EXMPL.COM file on a DOS 3.3
    Disk Image as a binary file. I used the Apple II Oasis Disk Manager to do so
    and edited the properties to define the Aux (Subtype) which is theDOS 3.3
    Load Address as 0. This load address is unimportant for a CP/M .COM file
    andin fact will need to be removed. Read further."

    I also included several links that will result in anyone actually following
    them to find everything I used and more. I think you just wanted to give me
    "schmidt"...

    >(CiderPress, AppleCommander, ADFS, FishWings, etc). But I see you didn't!
    >:-)


    I didn't use any of the above except Ciderpress as a viewer. So no real
    point in mentioning those others... that would just be spam in my otherwise
    wonderful Aztec C resource document.

    >Might be worth mentioning there as well as in the Footnote/reference
    >section.


    Also I don't think any of them mention Aztec C in their documentation. I
    could be wrong. Sometimes I am.

    I am still pulling your leg I will update the document when I add the
    BHEAD.COM program and include many more great resource links. I can't
    guarantee full-page ads though.

    Bill






  5. Re: Building an Apple CP/M Disk

    On Nov 6, 11:12*am, "Bill Buckels" wrote:
    > [...]
    > Unless you start extolling the virtues of Aztec C and showering me with
    > praise, since the screen shots obviously show what I used for my exerciseI
    > will need to consider your comments mere frivolity and you a hopeless
    > malcontent until the next revision


    You might have me confused with other Schmidts. :-)

    > Seriously though, thanks for taking a look. So I take it there wasn't much
    > obviously wrong with this whole confusing mess... just a lack of obvious
    > endorsements.


    What's interesting to me is that you're exposing and overcoming the
    shortcoming that none of our image manipulation tools support writing
    to CP/M disk images. If they did, you could boil all of this down to
    "Ctrl-C and Ctrl-V." (Plus the header stripping, but that could be
    built into the CP/M support of the image manipulator, I suppose.)

  6. Re: Building an Apple CP/M Disk

    Bill Buckels wrote:
    > The Documentation:
    > http://www.aztecmuseum.ca/applecpm/AztecCPMToApple.pdf
    > [...]


    First, thank you for your effort documenting this.
    Second, unfortunately you covered how to use an AppleDOS-to-CPM program
    but not how to get a virtual AppleDOS or Apple-CPM disk image back to
    work in a real Apple II. Would be more interesting for me because I have
    a real Apple II not only an emulator.

    Peter

    --
    * More infos about vintage computers and CP/M - http://www.z80.eu

  7. Re: Building an Apple CP/M Disk


    "schmidtd" wrote in message
    news:64cff4fc-4556-4173-9a9e-97b963eebec3@k1g2000prb.googlegroups.com...
    >What's interesting to me is that you're exposing and overcoming the
    >shortcoming that none of our image manipulation tools support writing to
    >CP/M disk images. If they did, you could boil all of this down to "Ctrl-C
    >and Ctrl-V." (Plus the header stripping, but that could be built into the
    >CP/M support of the image manipulator, I suppose.)


    The whole CP/M retro-computing community (if such it can be called) indulges
    in a plethora of strange work-arounds and perhaps that is part of the
    attraction for me. The CP/M era in general was devoid of the mythical
    unifying standards that we profess today. So it seems fitting that a rugged
    workaround dovetailed by documentation spanning decades can be glued
    together and made to work without all the mouse-master cr*pola.

    Yep, it is an interesting noodle-scratcher, and probably somebody twice as
    smart as me (likely a schmidt or a european dude) will show us a better way
    to do what I wrote about. If not today then give it a day or so... although
    there isn't much romantic about CP/M so maybe my tough-love approach is as
    good as it gets.

    Elementary my dear fellow. What I am not saying is that I could write a
    utility that writes to an Apple CP/M diskimage, but for lazy reasons I don't
    plan to at the moment if ever.

    Bill






  8. Re: Building an Apple CP/M Disk

    On Nov 6, 3:24*pm, "Bill Buckels" wrote:
    > [...] I am at risk of being accused of oleaceous behaviour [...]

    Sorry, this one's lost on me... what does this discussion have to do
    with olive trees?

    ObTrivia for Peter: The null modem transfer method is more or less
    documented here:
    http://adtpro.sourceforge.net

  9. Re: Building an Apple CP/M Disk

    On Nov 7, 3:48*am, schmidtd wrote:
    > What's interesting to me is that you're exposing and overcoming the
    > shortcoming that none of our image manipulation tools support writing
    > to CP/M disk images. *If they did, you could boil all of this down to
    > "Ctrl-C and Ctrl-V." *(Plus the header stripping, but that could be
    > built into the CP/M support of the image manipulator, I suppose.)


    the last version of dsktool ( http://dsktool.jamtronix.com/ ) does
    support formatting of and writing to CP/M disk images. It's a command
    line though, so rather than copy and paste, it would be this (assuming
    you've already got a


    dsktool -I cpm cpm_image.dsk
    dsktool -a testfile.ext cpm_image.dsk

  10. Re: Building an Apple CP/M Disk

    "jonnosan" wrote in message
    news:15974ed8-7b02-4410-99f0-badc11f3a07a@v13g2000pro.googlegroups.com...
    >the last version of dsktool ( http://dsktool.jamtronix.com/ ) does support
    >formatting of and writing to CP/M disk images.


    Thanks for this info. This looks excellent. But beware of the troll who be
    asking you how to install Ruby in MS-DOS on weekly basis

    Bill



  11. Re: Building an Apple CP/M Disk

    I have updated the Disk Images at the following link to include a utility
    called BHEAD.COM and have also included a version of MORE.COM and my Aztec C
    Source for both . The documentation has not been updated but is still
    correct but does not include these files.

    I will be writing a more complete document when time permits and will
    include transferring disk images to real Apple CP/M disks using the
    Microdrive and CF and alternate CP/M disk building using dsktool.

    The Documentation:

    http://www.aztecmuseum.ca/applecpm/AztecCPMToApple.pdf

    Screen Shots and Resource Links are included in the document.

    The Disk Images (documentation included):

    http://www.aztecmuseum.ca/applecpm/AztecCPMToApple.zip

    Have Fun!

    Bill Buckels




  12. Re: Building an Apple CP/M Disk

    "Bill Buckels" wrote in message
    news:72fRk.1144$sl.547@newsfe23.iad...
    >I have updated the Disk Images at the following link to include a utility
    >called BHEAD.COM and have also included a version of MORE.COM and my Aztec
    >C Source for both .


    x--- snip ---x

    /* bhead.c (C) Copyright 2008 Bill Buckels */

    /* Written in Aztec C */

    /* CP/M 80 program to remove the first 4 bytes
    of a DOS 3.3 Binary File transferred to
    Apple CP/M using the APDOS utility */

    /* You have a royalty free right to use
    this program for any purpose whatsoever
    provided you agree that Bill Buckels
    has no liability whatsoever from its use. */

    #include

    #define BUFLEN 256

    char infile[80], outfile[80], buf[BUFLEN];
    int fi, fo, len, olen, cmdline;

    main(argc, argv)
    int argc;
    char **argv;
    {

    printf("BHEAD (C) Bill Buckels 2008\n");
    printf("Usage is: \"BHEAD infile outfile\"\n");
    printf("---------------------------\n");

    if (argc > 2) {
    cmdline = 1;
    strcpy(infile,argv[1]);
    strcpy(outfile,argv[2]);
    }
    else {
    cmdline = 0;
    printf("Infile ? ");

    /* let them bail if they enter a blank line */
    gets(infile);
    if (infile[0] == 0)exit(0);
    printf("Outfile ? ");
    gets(outfile);
    if (outfile[0] == 0)exit(0);
    }

    /* force them to bail if any problems
    opening the input or the output file */
    fi = open(infile, O_RDONLY, 0);
    if (fi == -1) {
    printf("Can't open %s...",infile);
    onexit(1);
    }
    fo = open(outfile, O_WRONLY|O_TRUNC|O_CREAT, 0);
    if (fo == -1) {
    printf("Can't open %s...",outfile);
    close(fi);
    onexit(2);
    }

    /* not bothering to see if the input file
    is shorter than 4 bytes... what does it
    matter anyway? */
    read(fi,buf,4);

    /* read the file in chunks to speed-up
    disk access */
    for (; {
    len = read(fi,buf,BUFLEN);
    if (len < 1)break;
    /* put a dot on the screen
    every write */
    putchar('.');
    olen = write(fo,buf,len);
    if (olen != len) {
    /* not bothering to clean-up */
    printf("\nDisk Full!");
    break;
    }
    if (len < BUFLEN) break;
    }
    close(fi);
    close(fo);
    printf("\nDone!");
    onexit(0);
    }

    onexit(xcode)
    int xcode;
    {
    if (cmdline == 0)getchar();
    putchar('\n');
    exit(xcode);
    }



  13. Re: Building an Apple CP/M Disk

    "Bill Buckels" wrote in message
    news:72fRk.1144$sl.547@newsfe23.iad...
    >I have updated the Disk Images at the following link to include a utility
    >called BHEAD.COM and have also included a version of MORE.COM and my Aztec
    >C Source for both .


    x--- snip ---x

    /* -------------------------------------------------------------------
    System : Apple II CP/M 80
    Environment : Aztec C
    Program : more.c
    Description : paged or line oriented text file viewer

    This program is a filter that displays a text file
    either page by page if the spacebar is pressed
    or line by line if enter is pressed.

    If the [ESCAPE] key or the letter 'Q' is pressed
    the program ends.

    It will optionally accept a filename to read input
    from. All output is to the standard output device
    unless redirected.

    It is oriented to the 80 column x 24 row display.

    Example:
    more abc.txt
    read input from abc.txt,
    output goes to screen.
    more same as previous example

    Written by : Bill Buckels
    Date Written : Nov 2008
    Revision : 1.0 First Release
    ------------------------------------------------------------------ */
    #include

    main(argc, argv)
    int argc;
    char **argv;
    {
    int c, d = 0, ctr = 0;
    FILE *fp = NULL;

    if (argc > 1)
    fp = fopen(argv[1], "r");

    for (; {
    if (NULL == fp)
    c = getchar();
    else
    c = fgetc(fp);

    if (c==EOF)break;


    putchar(c);
    if(c=='\n') {
    ctr++;
    if (ctr > 22) {
    d = getch();
    if (d == 27 || d=='q' || d == 'Q')break;
    else if (d == 32)ctr = 0;
    else if (d == 13)ctr = 22;
    }

    }

    }

    if (d != 27 && d !='q' && d != 'Q') {
    if (ctr > 0 && ctr < 22)getch();
    }

    if (NULL != fp) {
    fclose(fp);
    exit(0);
    }
    }

    getch()
    {
    /* return the last key press */
    int ch;

    while((ch=bdos(6,0xff))==0);

    return ch;
    }



  14. Re: Building an Apple CP/M Disk

    "Bill Buckels" wrote in message
    news:72fRk.1144$sl.547@newsfe23.iad...
    >I have updated the Disk Images at the following link to include a utility
    >called BHEAD.COM and have also included a version of MORE.COM and my Aztec
    >C Source for both .


    I should note that BHEAD.COM is quite quick and accepts commandline args so
    can be used non-intercatively with a file list in conjunction with
    SUBMIT.COM to do multiple files.

    The other thing that I should note is the text file format that CP/M uses is
    of course cr/lf pairs for eol. If the text file being transferred is already
    a CP/M text file it should be placed on the DOS 3.3 disk as a binary file
    and treated as a binary file.

    Last, do yourself a favour when you use APDOS to transfer .COM files as .BIN
    files and .C source files as .TXT files. That way it is a little neater for
    you to ERA the transferred file after using BHEAD to specify the output as
    ..COM or .C.

    eg. when using APDOS

    BHEAD.BIN=BHEAD.COM
    BHEAD.TXT=BHEAD.C

    eg. when using BHEAD.COM

    BHEAD BHEAD.BIN BHEAD.COM
    ERA BHEAD.BIN
    BHEAD BHEAD.TXT BHEAD.C
    ERA BHEAD.C

    Etc.

    Have Fun!

    Bill Buckels





+ Reply to Thread