CP/M-68k Harddisk image unter Linux mounten

    • Offizieller Beitrag

    Hallo!


    Hier gibts einen CP/M Simulator:
    http://home.earthlink.net/~schultdw/cpm68/simulator.html


    und auch ein fertiges Disk image. Ich hab die Dateien mal hochgeschoben, weil die in ein paar Jahren sicher verschwunden sein werden.
    CPMSIM.ZIP enthält die Datei diskc.cpm.fs.


    Ich hatte gehofft, diese mounten zu können unter linux mit


    sudo mount -o loop diskc.cpm.fs /mnt/tempdisk


    aber er beklagt sich, daß er das filesystem nicht kennt. Weiss jemand Rat, wie ich an die Datein im Image herankommen kann?


    Ziel ist das unvollständige CP/M-68k V1.2 für meine Sage zu komplettieren.


    Andere interessante Sachen, wie cc, c libraries und header, make, whereis, uemacs sind auch dabei....


    Gruß
    Stephan

  • Ich hab nicht wirklich Ahnung, was ich da tue ... aber füg mal diese Zeilen in die "diskdefs" vom cpmemu ein:


    Code
    diskdef cpmemu
      seclen 128
      tracks 4096
      sectrk 32
      blocksize 4096
      maxdir 1024
      skew 0
      boottrk 1
      os 3
    end


    Wenn Du im Quellcode von cpmsim nachschaust, dann ist das ganze kein richtiges Diskimage, sondern einfach eine Ansammlung von 128-Byte-Sektoren in einer Datei von genau 16.777.216 Byte Größe ... das sind also 131072 solcher Sektoren. cpmtools will sie jetzt Trackweise sortiert haben ... eine gängige Sektorenanzahl ist 32, das ergibt dann 4096 tracks, davon ist laut Quellcode einer ein Bootsektor.


    Wenn ich das ganze über das Diskimage rattern lasse (cpmls -f cpmemu diskc.cpm) ... dann ist zumindest lesbares dabei, auch wenn ich mir nicht sicher bin, ob es alles ist, da zwischen der 0: und dem Beginn der Dateien eine ganze Menge Leerzeilen sind - kannst ja selber mal noch mit den Parametern spielen.


    NCR DMV/Olivetti M20/ITT 3030/DEC Rainbow 100/Siemens PC-D/OlyPeople/MFA 8085/TA Alphatronic

  • Also ... ich denke (wie du schon sagtest), dass die diskc.cpm.fs ein Filesystem ist, das unter Linux gemounted werden muss.


    Vielleicht muss ein Parameter anders gesetzt werden ... oder vorher noch etwas per Befehl konfiguriert werden.


    Da müssten mal die Linuxprofis ran ... :grübel:

  • Da müssten mal die Linuxprofis ran ... :grübel:

    Da fuehle ich mich doch mal angesprochen...


    Also mir ist keine Moeglichkeit bekannt, CP/M Images direkt unter Linux zu mounten. Wobei es natürlich nicht ausgeschlossen ist, dass es durchaus mal das eine oder andere Projekt gegeben hat, so etwas zu realisieren (es gibt einfach zuviele derartige Projekte, wobei viele im Sand verlaufen, sobald die Leute merken, wie komplex und arbeitsaufwendig so etwas wird).


    Das Kommando cpmcp von den cpmtools wäre auch das Mittel meiner Wahl, Dateien aus solchen Images zu extrahieren.


    -- Klaus

    [ ... to boldly code where no byte has gone before ... ]

  • So steht's im Quellcode von cpmsim.c, dem Emulator, den Du an den ersten Post drangehängt hast:


    " Simulated disk system:


    I was going to just read a file system image into memory and map it into
    the unusable (in a MC68000) address space above the 16MB physical limit.
    Alas, the simulator is simulating that physical limit and a quick check of
    the code hasn't revealed a simple way to defeat that. So plan B.


    Since the intent is to support CP/M-68K and it does disk I/O in 128 byte
    chunks, so will this. Control is via several registers mapped into memory:


    Offset function
    0 DMA address to read/write data to
    4 drive select disk drive
    8 read sector sector (128 byte) offset on disk
    12 write sector sector (128 byte) offset on disk
    16 status read status of operation


    Operation is simple: set the drive and DMA address and then write the
    sector number to the sector register. This write triggers the requested
    operation. The status of the operation can be determined by reading the
    status register.
    A zero indicates that no error occured.


    Note that these operations invoke read() and write() system calls directly
    so that they will alter the image on the hard disk. KEEP BACKUPS!


    In addition Linux will buffer the writes so they may note be really complete
    for a while. The BIOS flush function invokes a fsync on all open files."


    Es ist also m.E. weder ein Linux-Dateisystem noch ein echtes CP/M-Disk-Image, sondern was handgeklöppeltes für genau diesen Emulator.

    NCR DMV/Olivetti M20/ITT 3030/DEC Rainbow 100/Siemens PC-D/OlyPeople/MFA 8085/TA Alphatronic

    • Offizieller Beitrag

    Antwort vom Entwickler bekommen auf meine Frage:


    You aren't going to be able to mount a CP/M file system on any modern OS.


    I am away from home chasing the eclipse so don't have my references at hand. The way that I move files around is via a vanilla IBM 8" file image using cpmtools. I then mount that as drive A in the sim. If you worked up something to describe the format of my file system to cpmtools you could do it directly.


    It may be the case that someone has already done that but I can't be recall for sure.



    *************


    Das werde ich auch mal probieren. Aber erst mal den Simulator zum laufen bringen (das wird leider nichts mehr heute weil ich noch arbeiten muss)

  • wenn man die Parameter in /usr/local/share/diskdefs folgendermaßen setzt,

    kann man diskc.cpm.fs von linux aus mit cpmtools zumindest lesen.

    Der Filesystem check ist ok, und man kann Dateien von diskc.cpm.fs nach Linux kopieren.

    Schreiben auf diskc.cpm.fs funktioniert allerdings noch nicht. (siehe Anlage).


    Allerdings kann man Files von linux aus mit cpmtools nach disca.cpm kopieren,

    dann den Emuator starten und mit pip von A nach C kopieren.


    Dieses Filesystem verwende ich übrigens auf einer CF Card in meinem CP/M-68k Rechner

    (siehe Thread CP/M-68K auf MC68302).

    Ich kopiere das image einfach mit dd auf eine CF Card:


    # dd if=diskc.cpm.fs of=/dev/sdc


    Unter CP/M-68k funktioniert sowohl lesen als auch schreiben einwandfrei.


    /usr/local/share/diskdefs


    diskdef 16mb-hd

    seclen 128

    tracks 512

    sectrk 256

    blocksize 2048

    maxdir 4096

    skew 0

    boottrk 1

    os 2.2

    end


    Gruß,


    Josef

    • Offizieller Beitrag

    Super Sache!


    Da sind ja ein paar interessante Sachen dabei, u.a. Fortran 83 ?


    Da Dein Setup schon steht, könntest Du die Sachen mal in ein ZIP File archivieren und hier hoch laden?


    Vielen Dank
    Stephan