[Coco] MESSin it up

John R. Hogerhuis jhoger at pobox.com
Wed May 4 21:30:29 EDT 2005


On Wed, 2005-05-04 at 13:42 -0700, tim lindner wrote:
> tim lindner <tlindner at ix.netcom.com> wrote:
> 
> > Also name the file MATRIX.BAS, just in case.
> 
> I don't know if imgtool will convert line endings, but the file needs to
> also have 0x0d line endings (that same used for Macintosh text files).
> 

I don't know if it will either, but that was the problem, thanks.

Here is cocotxt.c which will do the conversion:

----

#include <stdio.h>

void main (void)
{
   char ch;

   while ((ch = getchar ()) != EOF)
      putchar ((ch == 0x0a) ? 0x0d : ch);
}


----

so until someone shows an easier way, this kind of thing works and could
be put into a script:


./imgtool create coco_dmk_rsdos MATRIX.DSK
cocotxt < MATRIX.TXT > CCMAT.TXT
./imgtool put coco_dmk_rsdos MATRIX.DSK ./CCMAT.TXT --ascii=ascii


xmess.x11 coco3 
hit Scroll Lock
Tab,
then File manager, set the disk manually then escape out of the menu
Scroll lock so escape doesn't dump you out

LOAD "CCMAT.TXT"
RUN



I tried to supply the floppy disk image on the command line, but it
segfaults:

xmess.x11 coco3 -flop ./MATRIX.DSK

Any ideas?


Thanks,

-- John.




More information about the Coco mailing list