Page 1 of 2

Dragon to CoCo

Posted: Tue May 11, 2021 2:49 pm
by raycomp
I have a DragonMMC SD card system which has a Dragon BASIC to CoCo conversion utility.
So you finish with a Coco BASIC file on a Dragon VDK disk.
How would you get it onto a CoCo DSK disc?
Thanks,
Ray

Re: Dragon to CoCo

Posted: Tue May 11, 2021 7:27 pm
by Azerpy
Not sure I understand exactly what you want to do.
When I want to use basic files from coco to Dragon or Dragon to coco, I use Xroar emulation and its (fine !) possibility of loading text files with the asc extension.
With Xroar, I load the basic program on a virtual machine and export it with ... (my error corrected) ... LLIST to a example.txt in Windows.
Then I rename this text file as example.asc.
I can load it directly with Xroar on the wanted virtual coco or Dragon and then save it to a cas file or a disk file.
And then continue with this new file on a real coco or Dragon with MMC.
There are surely more simple or other possibilities ...

Re: Dragon to CoCo

Posted: Wed May 12, 2021 4:09 pm
by raycomp
What you have described is what I want to do.
I'll give it a go.
Thanks,
Ray

Re: Dragon to CoCo

Posted: Wed May 12, 2021 4:18 pm
by Azerpy
The file.asc must be ended by a "Enter" (RC)

Re: Dragon to CoCo

Posted: Thu May 13, 2021 12:16 pm
by raycomp
Sorry, I can't follow this.
I have used DragonMMC's RETOKC command to generate a CoCo BAS file on the Dragon VDK disc, copied that to Windows PC, Load it into XRoar emulating Dragon32 + Dragon DOS.
That can load the CoCo BASIC file which will LIST but is 'rubbish' due to the retokening.
What next?
Neither Dragon BASIC, Dragon DOS or XRoar have a LPRINT command.
XRoar has -lp-file filename but I can't see how to implement that.
Looking at the XRoar manual .asc is a cassette image nothing to do with disc images, VDK <> DSK
More help would be welcome.
Ray
Note: the purpose is to avoid spending days retyping a BASIC file on a CoCo (real or emulated) that after retokening exists in its correct form on a Dragon VDK disc. The retokening utilities must have a purpose that includes getting the retokened file onto the target machine - that's what I am trying to do.

Re: Dragon to CoCo

Posted: Thu May 13, 2021 5:58 pm
by Azerpy
I have explained how to transfer Basic files from coco to Dragon (or reverse) via Xroar and text files on Windows.

Have a look here, it's called "cross development"
https://vintageisthenewold.com/coco-cro ... nt-part-1/

If your coco BAS program can be loaded on Xroar emulating a coco, it can be tested, run and listed in a text file xxxx.txt (1).

Rename this file containing the ASCII version of the BAS program as xxxx.asc (modifying only the extension). You can load it directly with Xroar emulating now a Dragon. You can now test and modify it as a Dragon BAS Program.

To go to a real Dragon with MMC, you have to save with Xroar a cas file or a vdk file containing your Dragon BAS program.
And put it on the MMC card.
-----------------------
(1) in the same directory of xroar.exe, you have to create a text file named xroar.conf and containing the line
lp-file xxxx.txt
Xroar will create and fill the xxxx.txt with the listing.
LLIST is the Basic command to send the listing as for a printer.

Re: Dragon to CoCo

Posted: Fri May 14, 2021 8:02 am
by Azerpy
Hello again
Other ways using MMC.
The MMC extension board on a real Dragon or a real coco can work directly with BAS programs using MLOAD and MSAVE commands.
These files, specific of MMC, have .DGN and .CCO extensions.
The RETOKC and RETOKD commands is designed to convert them.
If you have a real Dragon and a real coco, you can begin with one and continue on the other after conversion.
You can enter and go out of the MMC system with cas ou disk file "containers" but these containers are specific to Dragon or coco.

Re: Dragon to CoCo

Posted: Fri May 14, 2021 4:10 pm
by raycomp
Getting closer - thanks Azerpy.
I have created a text.asc file. Run XRoar, loaded DragonDOS, inserted a VDK file, loaded text.asc, CLOAD and there it is and can be saved to the VDK file.
I have not tested the MMC .DGN & .CCO idea yet since it would be simplest to do the work in XRoar then copy the disc images to SD cards.
I have tried putting lp-file "test.txt" in xroar.conf, loading a BAS file and LLIST, in XRoar v0.34 it hung but in v0.36.2 it gives OK but nothing happens - no test.txt is created (v0.36 says lp-file has been fixed). If I create an empty test.txt in the XRoar folder it is not filled with the listing.
This is all under Windows 7 (disconnected from the net).

Re: Dragon to CoCo

Posted: Fri May 14, 2021 4:36 pm
by sorchard
v0.36.2 print to file works for me on my Win7 work laptop

A few things to watch out for:
- No quotes required around the file name
- The file is not flushed until xroar is closed
- The file is appended each time xroar is run so you need to delete the file when you are done with its contents

Re: Dragon to CoCo

Posted: Fri May 14, 2021 5:35 pm
by raycomp
Tried it on my Ubuntu system under Wine and it works.
I think everything is all in place now for me to develop my project.
If successful I'll be back to release the results.
Thanks for all the help.
Ray :D