• CPMImage

    From nathanael@21:1/5 to All on Sat Mar 9 17:59:43 2024
    As a fan of WinImge for MS-DOS floppy disk images, I've wanted to see a
    similar GUI front-end for cpmtools for years. So I decided to create
    one. It's still in progress, and many of the features are still buggy,
    so I'm not announcing it yet.

    However, one feature WinImage has is the ability to make an image
    bootable by loading boot code into the boot sector of the floppy image.

    I'm wondering how feasible a similar feature would be with CP/M images
    -- being able to save off the system tracks to, or overlay them from a
    .bin file.

    What considerations might there be?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alan Laughton@21:1/5 to nathanael on Sun Mar 10 00:21:44 2024
    On 9/03/2024 8:59 pm, nathanael wrote:
    As a fan of WinImge for MS-DOS floppy disk images, I've wanted to see a similar GUI front-end for cpmtools for years. So I decided to create
    one. It's still in progress, and many of the features are still buggy,
    so I'm not announcing it yet.

    However, one feature WinImage has is the ability to make an image
    bootable by loading boot code into the boot sector of the floppy image.

    I'm wondering how feasible a similar feature would be with CP/M images
    -- being able to save off the system tracks to, or overlay them from a
    .bin file.

    What considerations might there be?
    The ability to make an image bootable by loading boot code into the boot
    sector of the floppy image would be a great feature, I look forward to
    its development.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nathanael@21:1/5 to All on Sun Mar 10 07:45:36 2024
    I'm wondering how feasible a similar feature would be with CP/M images
    -- being able to save off the system tracks to, or overlay them from a
    .bin file.

    What considerations might there be?

    As a first stab at this (I'll worry about coding for exceptions later):

    CP/M resides in tracks 0 and 1 of a floppy disk. Does this mean the CP/M
    system will always start at offset 0 of a floppy image?

    Then I have to figure out how many bytes in a track. I'm assuming that
    in the diskdef definitions seclen is the length in bytes of one sector
    and that sectrk is the number of sectors per track. So I just need to
    grab (seclen * sectrk * 2) bytes starting with offset 0 from the image.

    Am I totally off?

    I really don't have any images of bootable disks in various formats to
    play around with. Can anyone supply some?

    Nathanael

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Fritz@21:1/5 to All on Sun Mar 10 21:51:39 2024
    Am 09.03.2024 um 10:59 schrieb nathanael:
    As a fan of WinImge for MS-DOS floppy disk images, I've wanted to see a similar GUI front-end for cpmtools for years. So I decided to create
    one. It's still in progress, and many of the features are still buggy,
    so I'm not announcing it yet.

    However, one feature WinImage has is the ability to make an image
    bootable by loading boot code into the boot sector of the floppy image.

    I'm wondering how feasible a similar feature would be with CP/M images
    -- being able to save off the system tracks to, or overlay them from a
    .bin file.

    What considerations might there be?



    Please look there:


    https://github.com/ProgrammingHobby/CPM_Image-File_Explorer/releases/tag/0.0.9.4

    --
    -- Fritz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Fritz@21:1/5 to All on Sun Mar 10 21:53:35 2024
    Am 10.03.2024 um 21:51 schrieb Fritz:

    Please look there:


    https://github.com/ProgrammingHobby/CPM_Image-File_Explorer/releases/tag/0.0.9.4


    corrected link:


    https://github.com/ProgrammingHobby/CPM_Image-File_Explorer

    --
    -- Fritz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nick@21:1/5 to Alan Laughton on Sun Mar 10 21:33:42 2024
    On 09/03/2024 13:21, Alan Laughton wrote:
    On 9/03/2024 8:59 pm, nathanael wrote:
    As a fan of WinImge for MS-DOS floppy disk images, I've wanted to see
    a similar GUI front-end for cpmtools for years. So I decided to create
    one. It's still in progress, and many of the features are still buggy,
    so I'm not announcing it yet.

    However, one feature WinImage has is the ability to make an image
    bootable by loading boot code into the boot sector of the floppy image.

    I'm wondering how feasible a similar feature would be with CP/M images
    -- being able to save off the system tracks to, or overlay them from a
    .bin file.

    What considerations might there be?
    The ability to make an image bootable by loading boot code into the boot sector of the floppy image would be a great feature, I look forward to
    its development.


    I've used this Windows version - http://star.gmobb.jp/koji/cgi/wiki.cgi?page=CpmtoolsGUI

    If you are looking for features to add, how about the ability to create
    empty disk images? mkfs.cpm does this, but unlike mkfs.vfat you need to
    create an empty container file before you create the image (dd,
    fallocate...).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nathanael@21:1/5 to Nick on Mon Mar 11 08:44:29 2024
    On 3/11/24 05:33, Nick wrote:
    If you are looking for features to add, how about the ability to create
    empty disk images?

    Already done. Thanks for the suggestion.

    Features I've already implemented:

    Create new image

    File handling
    ....Import
    ....Export
    ....Delete
    ....Rename

    File viewer
    ....text and hex viewer
    ....search
    ....handles SQ and CR
    ....hex dump of currently open image

    Features on my To-Do
    ....Look inside LBRs
    ....Drag and drop
    ....translate problematic chars in filenames
    ....Overlay CP/M system

    Other functionality:
    Scans your diskdefs for all supported formats

    --Nathanael

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jack Strangio@21:1/5 to nathanael on Mon Mar 11 00:31:03 2024
    nathanael <leekaiwen@yahoo.com> writes:

    CP/M resides in tracks 0 and 1 of a floppy disk. Does this mean the CP/M system will always start at offset 0 of a floppy image?

    Yes. But .....

    The problem with CP/M is that there are so many floppy disk formats out
    there. Theoretically you're right.

    The overall format is that the first sector or two will be the bootstrap sectors followed by all the sectors of the CP/M systemin order. *

    Except ....

    You get hit by both the disk-format's foibles and the manufacturer's whims.
    So you have two basic questions:

    Where is the second track of the system tracks (track 1)?

    What format (desity, sector-sizes) is that second track written in?


    The first track (track 0) on side 0 will *usually* be single-density on an
    8" floppy, followed by:

    maybe a double-density, larger-size set of sectors on track 1, side 0.

    maybe a double-density, larger-size set of sectors on track 0, side 1

    maybe a single-density, statndard sector size on track 0, side 1.

    and so on. (And I have mentioned anything about skew, yet)

    And that's just the 8" disks. Which actually *do* happen to have an IBM
    format layout that many software manufacturers do use for distributing their software. Harware manuafctuers, not so much

    5" floppies have a completely different set of sector-sizes, formats, and
    skew factors. There never was any 'standard' 5" flopy format IIRC.


    The easiest way to look at it is to take *your* CP/M sysem disks and work
    out which particular format a particular system-boot floppy is using. And
    then make a backup image of that. You may need to write a specific software tool for that specific job.

    And then do the same thing with all of your system disks, making sure you label the image-types extremely well.

    * Don't even *think* about storing the sector-sequence of the 5" North Star
    CP/M system disks in your brain. Or even the layout in RAM.That way lies
    madness.

    Regards,

    Jack
    --
    They call me 007 at work:
    0 Motivation
    0 Skills
    7 Smoke Breaks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nathanael@21:1/5 to Jack Strangio on Mon Mar 11 08:57:02 2024
    On 3/11/24 08:31, Jack Strangio wrote:
    CP/M resides in tracks 0 and 1 of a floppy disk. Does this mean the CP/M
    system will always start at offset 0 of a floppy image?

    Yes. But .....

    The problem with CP/M is that there are so many floppy disk formats out there. Theoretically you're right.

    Thanks for the input. I'm aware this could be an exercise in futility
    and won't be an easy feature to get right. I'll start with the general
    case and then start coding for the exceptions (of which there is an
    endless number, I'm sure). I may in the end decide this feature isn't
    worth the work.

    --Nathanael *HUMONGOUS* CP/M

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nathanael@21:1/5 to All on Mon Mar 11 09:00:11 2024
    Guess I should have mentioned: I'm coding this in Python/tkinter because
    it's cross-platform and that's what I know. I'm aware that might be a
    turn-off to some.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nathanael@21:1/5 to Nick on Mon Mar 11 08:52:39 2024
    On 3/11/24 05:33, Nick wrote:
    I've used this Windows version - http://star.gmobb.jp/koji/cgi/wiki.cgi?page=CpmtoolsGUI

    Interesting. I wasn't aware of this. Looks like I'll find some great
    ideas there. Thanks.

    --Nathanael - *HUMONGOUS* CP/M

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nathanael@21:1/5 to All on Mon Mar 11 10:11:06 2024
    Illegal char translation.

    Scanning through the SIG/M collection, I see these special characters in filenames:

    - / & @ $ +

    Under Linux, - + @ aren't problematic (I don't know about Windows),
    while by long-standing tradition the slash (/) is translated to underscore.

    That leaves the ampersand and dollar sign.

    Any suggestions?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yeti@21:1/5 to All on Mon Mar 11 03:42:26 2024
    $ touch -- '-&@$+'
    $ ls -l
    total 0
    -rw-r--r-- 1 yeti yeti 0 Mar 11 02:41 '-&@$+'
    $ rm -v '-&@$+'
    rm: invalid option -- '&'
    Try 'rm ./'-&@$+'' to remove the file '-&@$+'.
    Try 'rm --help' for more information.
    $ rm -v -- '-&@$+'
    removed '-&@$+'

    The shell may have problems misreading '-' and expevting an option, '$' expansion may expand "$SOMETHHING" to unwanted things and misreading '&'
    for sending a command into the background may happen in some cased, but
    quoted properly I don't see a problem. All this can be handled by an experienced shell user.

    C(++)'s file operations will make far less problems with those chars,
    IIRC there really only '/' and '\0' should be forbidden.

    So it is not a Linux problem, it is a shell problem.

    ( Am I overlooking something? It's really late here. *sigh!* )

    --
    I do not bite, I just want to play.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yeti@21:1/5 to nathanael on Mon Mar 11 03:41:16 2024
    nathanael <leekaiwen@yahoo.com> writes:

    - / & @ $ +

    Why are these (except '/') problematic "in Linux"?

    $ touch -- '-&@$+'
    $ ls -l
    total 0
    -rw-r--r-- 1 yeti yeti 0 Mar 11 02:41 '-&@$+'
    $ rm -v '-&@$+'
    rm: invalid option -- '&'
    Try 'rm ./'-&@$+'' to remove the file '-&@$+'.
    Try 'rm --help' for more information.
    $ rm -v -- '-&@$+'
    removed '-&@$+'

    The shell may have problems misreading '-' and expevting an option, '$' expansion may expand "$SOMETHHING" to unwanted things and misreading '&'
    for sending a command into the background may happen in some cased, but
    quoted properly I don't see a problem. All this can be handled by an experienced shell user.

    C(++)'s file operations will make far less problems with those chars,
    IIRC there really only '/' and '\0' should be forbidden.

    So it is not a Linux problem, it is a shell problem.

    ( Am I overlooking something? It's really late here. *sigh!* )

    --
    I do not bite, I just want to play.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yeti@21:1/5 to All on Mon Mar 11 03:45:33 2024
    $ touch -- '-&@$+'
    $ ls -l
    total 0
    -rw-r--r-- 1 yeti yeti 0 Mar 11 02:41 '-&@$+'
    $ rm -v '-&@$+'
    rm: invalid option -- '&'
    Try 'rm ./'-&@$+'' to remove the file '-&@$+'.
    Try 'rm --help' for more information.
    $ rm -v -- '-&@$+'
    removed '-&@$+'

    The shell may have problems misreading '-' and expecting an option, '$' expansion may expand "$SOMETHHING" to unwanted things and misreading '&'
    for sending a command into the background may happen in some cases, but
    quoted properly I don't see a problem. All this can be handled by an experienced shell user.

    C(++)'s file operations will make far less problems with those chars,
    IIRC there really only '/' and '\0' should be forbidden.

    So it is not a Linux problem, it is a shell problem.

    ( Am I overlooking something? It's really late here. *sigh!* )

    --
    I do not bite, I just want to play.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yeti@21:1/5 to All on Mon Mar 11 03:43:08 2024
    $ touch -- '-&@$+'
    $ ls -l
    total 0
    -rw-r--r-- 1 yeti yeti 0 Mar 11 02:41 '-&@$+'
    $ rm -v '-&@$+'
    rm: invalid option -- '&'
    Try 'rm ./'-&@$+'' to remove the file '-&@$+'.
    Try 'rm --help' for more information.
    $ rm -v -- '-&@$+'
    removed '-&@$+'

    The shell may have problems misreading '-' and expecting an option, '$' expansion may expand "$SOMETHHING" to unwanted things and misreading '&'
    for sending a command into the background may happen in some cased, but
    quoted properly I don't see a problem. All this can be handled by an experienced shell user.

    C(++)'s file operations will make far less problems with those chars,
    IIRC there really only '/' and '\0' should be forbidden.

    So it is not a Linux problem, it is a shell problem.

    ( Am I overlooking something? It's really late here. *sigh!* )

    --
    I do not bite, I just want to play.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nathanael@21:1/5 to yeti on Mon Mar 11 11:38:00 2024
    On 3/11/24 11:03, yeti wrote:
    So it is not a Linux problem, it is a shell problem.

    True, but I do do a lot of work in BASH shells. But I also have to deal
    with DOS, Windows and MacOS, so I need to find a solution compatible
    with all of the above.

    Also the translation should be reversible so the original CP/M filename
    can be recovered. That restricts me to chars illegal under CP/M to avoid filename collisions and ambiguity.

    I've looked through the SIG/M collection, and the only (potentially) problematic chars I've seen are - / & @ $ +

    - @ and + are not, I think, problematic under other OSes, leaving / &
    and $ to deal with.

    / has traditionally been translated to _. I'm considering mapping & to %
    and $ to =. Depending on which source I believe % and = are illegal
    under CP/M but not problematic under DOS, Windows or Linux, so I think
    that'll work.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nathanael@21:1/5 to All on Tue Mar 12 00:26:01 2024
    It's definitely still alpha quality, with lots of bugs. But if anyone
    wants to kick the tires, I could use help debugging it.

    https://github.com/NCJECulver/cpmimage/tree/master

    It requires the following:

    python (developed with python3)
    tkinter
    cpmtools
    Mark Ogden's mlbr

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nick@21:1/5 to nathanael on Mon Mar 11 20:29:14 2024
    On 11/03/2024 00:52, nathanael wrote:
    On 3/11/24 05:33, Nick wrote:
    I've used this Windows version -
    http://star.gmobb.jp/koji/cgi/wiki.cgi?page=CpmtoolsGUI

    Interesting. I wasn't aware of this. Looks like I'll find some great
    ideas there. Thanks.

    --Nathanael - *HUMONGOUS* CP/M


    If you've every played with the Z80-MBC2, V20-MBC, 68k-MBC then it's
    referenced in J4F's docs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark@21:1/5 to nathanael on Tue Mar 12 22:04:34 2024
    On Mon, 11 Mar 2024 11:38:00 +0800, nathanael wrote:

    On 3/11/24 11:03, yeti wrote:
    So it is not a Linux problem, it is a shell problem.

    True, but I do do a lot of work in BASH shells. But I also have to deal
    with DOS, Windows and MacOS, so I need to find a solution compatible
    with all of the above.

    Also the translation should be reversible so the original CP/M filename
    can be recovered. That restricts me to chars illegal under CP/M to avoid filename collisions and ambiguity.

    I've looked through the SIG/M collection, and the only (potentially) problematic chars I've seen are - / & @ $ +

    - @ and + are not, I think, problematic under other OSes, leaving / &
    and $ to deal with.

    / has traditionally been translated to _. I'm considering mapping & to %
    and $ to =. Depending on which source I believe % and = are illegal
    under CP/M but not problematic under DOS, Windows or Linux, so I think that'll work.

    Under windows there is an extra dimension to consider. Certain filenames
    are illegal under Windows but valid under CP/M. If want to copy files with these names to/from CP/M you will have a problem. They are
    CON, PRN, AUX, NUL
    COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9
    LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9
    The problem appears whatever the extension. To handle these you will need
    some form of escaping mechanism to allow them to be generated.

    For Windows the list of of problematic characters is also larger
    / \ | " < > :

    CP/M 2 has a slightly different set of illegal chars from CP/M 3
    CP/M 2 space < > ; : = ? * _
    CP/M 3 space < > , ; : = ? * [ ] |

    Note . is only allowed once

    A solution I have used before is to use ; as an escaping character to
    allow character encoding e.g.
    CP/M Windows
    / ;[
    \ ;]
    | ;!
    etc.
    Illegal names are mapped in one of two ways dependent on whether there is
    an extension e.g.
    CON CON;
    CON.XX CON;.XX

    An alternative escape would be _ which is invalid in CP/M 2 but valid in
    CP/M 3

    An additional problem can occur in that CP/M assumes but doesn't force
    upper case filenames. With MBASIC it is relatively easy to create a lower
    case filename.

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)