• Uploading binary files to Stefan Tramm's CP/M emulator

    From Paolo Amoroso@21:1/5 to All on Sun Sep 12 07:14:07 2021
    Is it possible to upload binary files to Stefan Tramm's CP/M emulator[1]? How?

    I'd like to transfer .COM files to execute them inside the emulator. Although I found a way of uploading files, it apparently doesn't work for binary ones.

    Here's what I do. After booting CP/M from the emulator, I drag&drop a .COM file from my desktop computer to the emulator's browser tab, which mounts the file as a paper tape. Next, I execute the command pip filename.com=rdr: But when I run the executable,
    CP/M drops out to the monitor and I get the message HALT without the program executing or producing output.

    I tried different .COM files but I get the same HALT message, which suggests the transfer process may not work for binary files. An article about the emulator[2] seems to imply so as, concerning the same process, it notes "Please keep in mind that CP/M
    is not 8-bit clean".

    Any suggestions for transferring binary files to the amulator?


    Paolo

    [1] https://www.tramm.li/i8080/index.html
    [2] https://www.pagetable.com/?p=457

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to paolo....@gmail.com on Sun Sep 12 08:47:50 2021
    paolo....@gmail.com schrieb am Sonntag, 12. September 2021 um 16:14:08 UTC+2:
    Any suggestions for transferring binary files to the amulator?

    Convert the binary file to Intel hex, then it can be send over not 8bit clean channels.
    Tool I'm using for z80pack is here:

    https://github.com/udo-munk/z80pack/tree/master/cpmsim/srctools

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to All on Sun Sep 12 10:05:26 2021
    Thanks, I'll try converting to Intel HEX. Once I have the HEX file into the emulator how to I convert it back to binary? Can CP/M execute a HEX file directly?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to All on Sun Sep 12 10:43:31 2021
    Never mind, I figured how to run Intel HEX files on CP/M and made some progress.

    I used bin2hex to convert a .com file to HEX, then dragged&dropped, mounted it as a paer tape to the emulator, and executed pip file.com=rdr: as described earlier in the thread. Then I executed load file and got the error ERROR: INVERTED LOAD ADDRESS,
    LOAD ADDRESS 0000. Trying to execute the .COM file generated by load returns the error ERROR: CANNOT OPEN SOURCE, LOAD ADDRESS 0100.

    I'm reasonably sure the original .com file works because I can run it with another CP/M emulator.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to Udo Munk on Sun Sep 12 12:23:06 2021
    Udo Munk schrieb am Sonntag, 12. September 2021 um 21:20:43 UTC+2:
    You need to do bin2hex -o 100 ..., CP/M programs start at 0100H and not 0.

    -o 0x100 that is.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to All on Sun Sep 12 12:20:42 2021
    You need to do bin2hex -o 100 ..., CP/M programs start at 0100H and not 0.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Schultz@21:1/5 to Paolo Amoroso on Mon Sep 13 14:54:54 2021
    On 9/12/21 9:14 AM, Paolo Amoroso wrote:
    Is it possible to upload binary files to Stefan Tramm's CP/M emulator[1]? How?


    I don't know about that system but when running my CP/M-68K emulation I
    just use cpmtools to copy files to the disk image.

    Being careful to not do this to an image which is marked as fixed and
    doing a ^C to make CP/M relog the disk image.


    --
    http://davesrocketworks.com
    David Schultz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to All on Mon Sep 13 12:39:57 2021
    Thanks Udo but even with bin2hex -o 0x100 I get a similar error in the emulator. However, using a different binary to HEX conversion tool[1] I was able to transfer .com files to the emulator as described earlier via the tape reader and pip.

    Once a HEX file is in the emulator, I can convert it back to .com with load filename.hex and run the result.

    [1] https://github.com/python-intelhex/intelhex

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to Udo Munk on Mon Sep 13 13:48:38 2021
    On Monday, September 13, 2021 at 10:40:06 PM UTC+2, Udo Munk wrote:
    Right, it won't accept hex numbers, so -o 256 will do.

    I confirm file processed with bin2hex -o 256 work with the CP/M emulator, thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to paolo....@gmail.com on Mon Sep 13 13:40:05 2021
    paolo....@gmail.com schrieb am Montag, 13. September 2021 um 21:39:58 UTC+2:
    Thanks Udo but even with bin2hex -o 0x100 I get a similar error in the emulator. However, using a different binary to HEX conversion tool[1] I was able to transfer .com files to the emulator as described earlier via the tape reader and pip.

    Once a HEX file is in the emulator, I can convert it back to .com with load filename.hex and run the result.

    Right, it won't accept hex numbers, so -o 256 will do.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)