Transfer files from CBM to CP/M

Started by mattc5000, February 21, 2010, 03:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mattc5000

Hey guys,


I have looked all over for the answer to this and have tried many solutions, all of which have failed.  Here is the basic question...


How can I transfer a file from a CBM disk to a CP/M disk.  I have downloaded some CP/M software off of the internet and got it onto a 1581, but in CBM format.  I have tried Little Red Reader to move it over, as suggested in a FAQ I found, but no joy.  I have heard that crosslink would work, but it needs a 80col screen and I am currently stuck in 40col land. 


So anyone know of a good way to transfer a file from a CBM 1581 disk to a CP/M 1571 disk?  Or if no way to do it on the C128, anyone know of an Amiga, PC or Mac solution?  I have a 5.25 amiga drive but I don't know of any software that would write CP/M from Amiga.


Thanks,


Matt




commodorejohn

This kind of thing is a pain, and no mistake. There's a CBM-mode utility called CrossLink on Bo Zimmerman's FTP archive that claims to be able to copy between different disk formats; assuming that works, there's also a couple utilities in the CP/M section that can do this from within CP/M, for convenience's sake.

Diddl

you simply could write a copy program to copy from 1581 to 1571.


normally CP/M itself can do this with CP command.

Hershey

Years ago I had modified the cpm 3.0 boot disk to handle a 1581 drive. It worked great. It also booted cpm. The only problem was you had to format the disks in 128 mode with a utility (1581 utility disk, I think). For cpm format program did not support 1581 format. Over time I have misplaced the information (I think it was in a magazine) I may still have the disk. If I Did not use it for another purpose.

Hershey
Hershey

mattc5000

Some great ideas.  Thanks!  Unfortunately, just moving the files to a 1571 won't work as in CP/M mode, the 128 cannot read a CBM formatted disk.  I need a translation program that can write a MFM disk from 128 mode.


Hershey, I would love to know where you found that article for altering CP/M 3.0 to work with the 1581.  That's my next task after I get this CP/M software over the hump.


Matt

Hershey

#5
I Will look around for the disk or the information.
Here is what I found on the net

http://commodorefiles.zapto.org/Commodore%20Software/Zimmers/cbm/demodisks/c128/

cpm.622-5002336.d81.gz

It is commodore's version (I think)
attached is the cpm .d81 format
Hershey


Hershey

Hydrophilic

Here's a trick I used to get started programming in CP/M.  Because I lost my registration to get the supplemental CP/M disk that has the cool assembly stuff, and there were no good CP/M sources where I was, I found a sneaky way to port a ML monitor I wrote into CP/M land.  (I first had to write a Z80 Monitor using a 6502 assembler, but that's another story).

Note this method is not very difficult, but only practical if you have a few files you want to transfer.  Anway, what you need:

1. Commodore 128 computer
2. 1541, 1571 or compatible disk drive (for #3)
3. CP/M system/utilities disk (aslo a freshly formatted CP/M disk for your file(s) would be a good idea)
(I assume you have all 3 of the above)
4. In C128 mode, enter MONITOR (or key F8)
5. Enter L"filename",8,11000 (change "8" if drive not unit 8)
6. After loading enter M AE AF
7. Write down or memorize the first two bytes displayed.  These are the end address + 1 in low byte, high byte format.  So if you see >000AE 80 12 x x x x then the end address is $127F
8. Enter X to return to BASIC
9. Insert CP/M system disk (front side) in disk 8
10. Enter BOOT
11. After you get A> prompt, insert utilities disk (back side) in disk 8
12. Enter SAVE
13. When you get A> prompt again, Enter SAVE (yes, again)
14. When it prompts for FILENAME, put destination disk in disk 8, enter your filename
15. When it prompts for START ADDRESS, enter 1000
16. When it prompts for END ADDRESS, enter the number you wrote down from step 7

In a few seconds, your file will be ready!  Please note this assumes the file was originaly saved in CBM format with 2-byte load address, otherwise you will loose the first two bytes of your file.  No problem for text, but will crash a binary file.

Of course you can use 1581 if you have a CP/M boot disk in 1581 format and also have SAVE.COM as well.  I hope it works for you!  It worked for me back in the day, and I tested it again tonight to make sure my memory wasn't defective.  With the Z80 ML monitor I wrote and SAVEd and executed, I was able to start hacking CP/M.  Oh the good old days...

Finally, if you have a way to transfer D64s from a DOS/Windows machine to your Commie, there is a nice command line program, "CTOOLS.EXE" that will let you view, add, and erase files of CP/M D64 disk images.  This is highly recommended if you have a lot of files to transfer.
I'm kupo for kupo nuts!

airship

Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

Hydrophilic

After a sixteen step process there is only one question?  Wow I must have done a pretty good job!  To answer your question, a unit 8) is your disk drive assigned as device #8... it shows up as a smiley on the forums due to bad parsing by forum software; it seems to ignore levels of parentheses and makes a smiley whenever the number 8 is followed by right parentheses... if it had relized there was a prior opening parentheses without a matched closing parentheses, it could have determined the right-parentheses I typed should be used literally instead of combined with the previous character to form a smiley.  Obviously those programmers haven't consulted me!

Yep, human language is still beyond current computer software.  I believe this is one of the main reasons computers haven't taken over the world... so it's a good thing!
I'm kupo for kupo nuts!

Blacklord

Quote from: Hydrophilic on February 23, 2010, 06:42 PM
After a sixteen step process there is only one question?  Wow I must have done a pretty good job!  To answer your question, a unit 8) is your disk drive assigned as device #8... it shows up as a smiley on the forums due to bad parsing by forum software; it seems to ignore levels of parentheses and makes a smiley whenever the number 8 is followed by right parentheses... if it had relized there was a prior opening parentheses without a matched closing parentheses, it could have determined the right-parentheses I typed should be used literally instead of combined with the previous character to form a smiley.  Obviously those programmers haven't consulted me!

Yep, human language is still beyond current computer software.  I believe this is one of the main reasons computers haven't taken over the world... so it's a good thing!

Try and extra space - it's being interpreted as BBCode - eg 8 ) not 8) (second one is eight followed br bracket with no space - so it's interpreted).

Hydrophilic

Thanks for your helpful solution, Lance.  "Add a space" will solve the problem.

I know I could modify my text (add a space) to make the software display what I intended, but I believe the better solution (no fault to you Lance, but whoever wrote the software) would be for the software to display what I intended.  Time and energy are valuable assets, and unfortunately I don't always have both to be able to "outhink" the "dumb" software.

I realize this is "high-level" thinking which computers don't do very well (unless programmed very well).  Which is why humans still rule the world!  And for that, I'm grateful.

On topic... CTOOLS.EXE is the way to go if you can transfer disk images from a PC to your Commie.  If not, you can try my 16 step process... slow but it works!

If I may ask, what is the problem with Little Red Reader (or Big Blue Leader)?  I'm guessing the problem is speed... in which case, I would think they are far better than my solution.
I'm kupo for kupo nuts!

Blacklord

BBR is hard to come by - I'd kill for a copy.

RobertB


RobertB

Quote from: mattc5000 on February 22, 2010, 03:31 AM
I need a translation program that can write a MFM disk from 128 mode.
Super 81 Utilities can do that.  Unfortunately, it works in 80-columns on a C128.

Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
The Other Group of Amigoids
http://www.calweb.com/~rabel1/
Southern California Commodore & Amiga Network
http://www.sccaners.org

Blacklord


pearsoe

BBR128, doesn't seem to work in VICE, will work on a real 128.
My rig: C-128 w/JD SCPU, uIEC/SD, CMD-HD (500 MB), CMD-HD ZIP drive, CMD RAMLink, 1750XL 2 MB REU, FD-2000, 1581, Turbo232

Blacklord

Quote from: pearsoe on February 27, 2010, 03:17 PM
BBR128, doesn't seem to work in VICE, will work on a real 128.

Thankyou

Hydrophilic

The last time I checked, the problem with VICE is, although a lot of the WD1770 functionality is implemented, there is no way for the emulated drive (1571/81) to actually load/save MFM data: the data is either simple ("cooked") sector data (256 bytes / sector) in case of .D64/D81 disk image, or is GCR data (approximately 325 bytes / data block part of sector) in case of .G64/GCR disk image.

I wrote a patch for VICE a long time ago (for v1.16 as I recall) that implemented a new disk format .X71 that would allow either GCR or MFM data, and I tested it with the MFM specific burst-mode commands of 1571.  As I understand, this is how LRR / BBR works.

I also tested in CP/M mode with JUGLER which supports dozens of MFM-based CP/M disk formats.  In fact with JUGLER, I was able to "import" lots of CP/M software that was available on the internet for TRS-80 and Atari.  I then saved them in Commoodore CP/M disk format so they could be used with standard version of VICE.

Unfortunately, when working with write support to my .X71 format, I messed something up really bad.  Hence in it's current state, the patch is useless.  I gave up on the project having accomplished "proof of concept" (to my own satisfaction).  I can dig it out if anyone would be interested in the educational / salvage value it may provide.
I'm kupo for kupo nuts!

mattc5000

I finally got this to work with Crosslink2.1, once I got my 80-col problem solved.  It worked well and I now have successfully moved Nevada FORTRAN to the CP/M side of my 128!  Crosslink can't autodetect a 1581, but it worked fine as long as I told it the 1581 was a 1571...  So that is another path that we're pretty sure works. I'm going to try Juggler and BBR128 next to see what they can do as well. 


Of course that leads me to the problem of... Anybody know of a good way to make a D64 back to a real files on a 128?  The version of ImageCre that I downloaded won't function, nor a couple of others.  Anyone got a good PRG file that will do this?


Matt

RobertB

Quote from: mattc5000 on March 10, 2010, 09:02 AMAnybody know of a good way to make a D64 back to a real files on a 128?
d128it and its sister program, d64it

Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
The Other Group of Amigoids
http://www.calweb.com/~rabel1/
Southern California Commodore & Amiga Network
http://www.sccaners.org

mattc5000

And just to keep this post rolling...


Has anyone had any luck turning the various D64 CP/M disks found on the web back to readable disks?  I've tried CP, as well as D128it, going from D64 image to unformatted disk on 1571, CBM-DOS formatted disk on 1571, and CP/M SS 1541 formatted disk in the 1571.  Date is being written, but the disks won't boot and neither CBM-DOS or CP/M can read the disks.


All of this to get copies of the May 1987 version of the CP/M disks...


Anyone know of a good way to recreate these disks from the D64 images?


Thanks,


Matt

Blacklord

Quote from: mattc5000 on March 14, 2010, 08:45 AM
And just to keep this post rolling...


Has anyone had any luck turning the various D64 CP/M disks found on the web back to readable disks?  I've tried CP, as well as D128it, going from D64 image to unformatted disk on 1571, CBM-DOS formatted disk on 1571, and CP/M SS 1541 formatted disk in the 1571.  Date is being written, but the disks won't boot and neither CBM-DOS or CP/M can read the disks.


All of this to get copies of the May 1987 version of the CP/M disks...


Anyone know of a good way to recreate these disks from the D64 images?


Thanks,


Matt

PM me your address and I'll copy them for you.

Lance

bacon

Quote from: mattc5000 on March 14, 2010, 08:45 AM
Has anyone had any luck turning the various D64 CP/M disks found on the web back to readable disks?  I've tried CP, as well as D128it, going from D64 image to unformatted disk on 1571, CBM-DOS formatted disk on 1571, and CP/M SS 1541 formatted disk in the 1571.  Date is being written, but the disks won't boot and neither CBM-DOS or CP/M can read the disks.


All of this to get copies of the May 1987 version of the CP/M disks...


Anyone know of a good way to recreate these disks from the D64 images?
In the past I've used StarCommander and an XE1541 cable to copy D64 CP/M disk images to real disks and it has worked very well. I don't have that equipment anymore but I guess It'd work just as well with WarpCopy and my RetroReplay/RR-net combo, or using any C64 disk copy utility with the D64 on the SD card in my 1541 Ultimate.
Bacon
-------------------------------------------------------
Das rubbernecken Sichtseeren keepen das cotton-pickenen Hands in die Pockets muss; relaxen und watschen die Blinkenlichten.

marquisor

Quote from: pearsoe on February 27, 2010, 03:17 PM
BBR128, doesn't seem to work in VICE, will work on a real 128.

I just have to post here, because I'm very happy now playing Zork I on C128 in CP/M mode.

And I wanted to thank you for that link!

My intention was to copy the files from this archive Zork I, II, III for CP/M-80 to a CP/M formatted disk and try if it would work on the C128... With BBR128 it finally worked! GREAT!

Are there any other CP/M games that would work? I don't know how much RAM could be assumed? 64kB? 128kB? (but not all free of the complete 128kB?)
I'm diggin'...

Thx and
Regards

Patrick
preserve what you deserve

RobertB

Quote from: marquisor on May 07, 2010, 11:23 AMI just have to post here, because I'm very happy now playing Zork I on C128 in CP/M mode.

And I wanted to thank you for that link!

My intention was to copy the files from this archive Zork I, II, III for CP/M-80 to a CP/M formatted disk and try if it would work on the C128...
Oh, nice!  Games for CP/M...

          I didn't know,
          Robert Bernardo
          Fresno Commodore User Group
          http://videocam.net.au/fcug
          July 24-25 Commodore Vegas Expo 2010 - http://www.commodore.ca/forum
          and click on ComVEX