Python script to package CP/M binary files

217 views
Skip to first unread message

Marco Maccaferri

unread,
Dec 10, 2017, 3:54:36 AM12/10/17
to RC2014-Z80
Hello,

This week I have received and assembled the RC2014 Pro kit, all worked perfectly, and now I have my first CP/M system.
I noticed that to upload binary programs we only have a windows application and since I'm using Linux, I wrote a small python script to do the packaging and transfer.

The attached script allows to package one or more files (wildcards supported) and send them to the serial port directly without the need to use a terminal program. By default it writes to stdout so it can be redirected to a file to produce a package like the windows app. There are options to set some delays to avoid data losses, and to fill the last bytes of the last sector (text files may want to end with CTRL-Z ASCII 26). Run without arguments to see a list of options.

Example usage:

./filepackage.py -p /dev/ttyS0 -c150 -t10 MBASIC.COM

Sends MBASIC.COM to serial port /dev/ttyS0 (on Linux, on Windows you can use COMx) with a command delay of 150 ms (delay added after sending the A:DOWNLOAD command) and a byte transfer delay of 10 ms (added after sending each pair of hex digits).

./filepackage.py MBASIC.COM

Write to stdout.

Let me know if you found bugs or missing things, Python is not my preferred language and took the occasion to learn a bit more about it.

Bye,
Marco.

filepackage.py

Spencer Owen

unread,
Dec 13, 2017, 6:38:47 AM12/13/17
to rc201...@googlegroups.com
Hi Marco,

I haven't had a chance to test this yet, but I'm sure it works great :)

Do you have this on GitHub so I can link to it from the RC2014 GitHub?  I'm sure it'll be useful for other people that might not see it in Google Groups.

Cheers

Spencer

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/2a371738-f183-46ad-9509-de549f56ffa9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages