• Courier emulation - the 80186 half already runs

    From Grzegorz Worona@2:484/101 to Eugene Subbotin on Sun Sep 20 11:55:40 2026
    Hello Eugene!

    A new subject line, and my apologies for it: my system sends CP437,
    which has no Cyrillic at all, so I can neither keep your subject nor
    quote you directly. I will paraphrase instead.

    On 13 September you asked Dmitry whether the Courier has ever been
    fully emulated in software, and whether that would cover only the AT
    commands or the DSP as well. Nobody answered the second half, so let
    me offer what little I know.

    The 80186 side already runs. Nil pointed at D-Modem earlier in this
    thread; the same author also published a Courier harness:

    https://github.com/cryan209/courier-emu

    I fed it a firmware image and it got as far as

    SDL Xmodem file transfer - (Y)es (N)o (T)est >

    on the emulated serial port. So the supervisor genuinely executes,
    which I did not expect before trying it.

    The DSP is not in that harness. But the part is a TMS320C52, ordinary
    C5x family, and MAME carries a working tms320c5x core. So both halves
    exist in emulated form today, in separate projects, and as far as I can
    tell nobody has put them together. What seems to be missing is not the processor on either side - it is the AIC between them and a model of
    the line.

    Which is where your own point lands. If the datapump ran in an
    emulator, its output would already be samples, and feeding those
    straight into G.711 would be the obvious thing to do. The extra
    conversion you want to avoid would simply never exist.

    Has anyone tried running the datapump itself rather than the
    supervisor? That is the part I would most like to hear about.

    Best regards,
    Grzegorz Worona (kombos)
    DEAD SOCKET, Warsaw - 2:484/101

    --- ENiGMA 1/2 v0.5.1-beta (linux; x64)
    * Origin: DEAD SOCKET CHURCH (2:484/101)
  • From Eugene Subbotin@2:5075/35 to Grzegorz Worona on Sun Sep 20 14:22:32 2026
    Hello Grzegorz!

    Sunday September 20 2026 11:55, you wrote to me:

    A new subject line, and my apologies for it: my system sends CP437,
    which has no Cyrillic at all, so I can neither keep your subject nor
    quote you directly. I will paraphrase instead.

    On 13 September you asked Dmitry whether the Courier has ever been
    fully emulated in software, and whether that would cover only the AT commands or the DSP as well. Nobody answered the second half, so let
    me offer what little I know.

    The 80186 side already runs. Nil pointed at D-Modem earlier in this thread; the same author also published a Courier harness:

    https://github.com/cryan209/courier-emu

    I fed it a firmware image and it got as far as

    SDL Xmodem file transfer - (Y)es (N)o (T)est >

    on the emulated serial port. So the supervisor genuinely executes,
    which I did not expect before trying it.

    The DSP is not in that harness. But the part is a TMS320C52, ordinary
    C5x family, and MAME carries a working tms320c5x core. So both halves exist in emulated form today, in separate projects, and as far as I
    can tell nobody has put them together. What seems to be missing is not
    the processor on either side - it is the AIC between them and a model
    of the line.

    Which is where your own point lands. If the datapump ran in an
    emulator, its output would already be samples, and feeding those
    straight into G.711 would be the obvious thing to do. The extra
    conversion you want to avoid would simply never exist.

    Has anyone tried running the datapump itself rather than the
    supervisor? That is the part I would most like to hear about.

    Thanks for the links, but unfortunately, they confirmed what I said: full emulation of the Courier does not yet exist. The reason is simple: the distributed firmware simply lacks the code for the datapump that runs on the TMS320C52. While an emulator for this chip does exist, the software component is unavailable. The Courier firmware contains the i80186-based portion, which includes calls to the datapump but not the datapump itself. For full functionality, the TMS320C52 firmware is required, and I haven't found that in the repository either.

    Eugene

    ... It's full of stars!
    --- GoldED+/BSD 2.0.0-b20260912 (NetBSD 11.0 Intel Xeon Icelake)
    * Origin: FireFox Station (2:5075/35)
  • From Grzegorz Worona@2:484/101 to Eugene Subbotin on Sun Sep 20 14:39:46 2026
    Hello Eugene!

    Thank you for the reply. On almost everything we agree, and on the
    missing piece you named - the AIC and a model of the line - I think
    you are exactly right. But on one point I have to disagree, gently,
    and I would rather show you than just assert it.

    That the firmware holds only the 80186 side, with calls into the
    datapump but not the datapump itself, is the common belief - I held
    it too, until I disassembled the image. It is not so.

    The TMS320C52 has no non-volatile memory of its own. So its program
    cannot live in the DSP - it has to be somewhere, and the only place
    left is the flash. At power-up the 80186 streams the DSP image into
    the DSP program memory over the host-download port, and only then does
    the DSP start executing. This is the ordinary C5x bootstrap; the part
    simply cannot come up any other way.

    And the image is right there in the firmware, at file offset
    0x29140..0x44634 of the decoded flash (111860 bytes). It is not one
    flat blob. It is a resident plus three overlays that the 80186 pages
    in on demand:

    code 5 resident DSP addr 0x8000 ~56 KB base image
    code 6 overlay DSP addr 0x9d00 ~25 KB loaded at V.32/V.34
    code 7 overlay DSP addr 0xb000 ~15 KB higher tiers
    code 8 overlay DSP addr 0xdc00 ~15 KB x2 / V.90

    So both processors' code exists in the distribution today, in the one
    image. What is genuinely absent is not a program - it is the AIC
    (TLC32040/44) between the DSP and the line, and a model of the loop
    itself. That is where your point lands, and I agree completely: get
    the AIC and a line model right, and the datapump's output is already
    samples, ready for G.711 with no extra conversion.

    I would still love to know whether anyone has run the datapump under
    the C5x core rather than the supervisor. That is the experiment I keep
    coming back to.

    Best regards,
    Grzegorz Worona

    --- ENiGMA 1/2 v0.5.1-beta (linux; x64)
    * Origin: DEAD SOCKET CHURCH (2:484/101)
  • From Eugene Subbotin@2:5075/35 to Grzegorz Worona on Sun Sep 20 16:45:20 2026
    Hello Grzegorz!

    Sunday September 20 2026 14:39, you wrote to me:

    Thank you for the reply. On almost everything we agree, and on the
    missing piece you named - the AIC and a model of the line - I think
    you are exactly right. But on one point I have to disagree, gently,
    and I would rather show you than just assert it.

    That the firmware holds only the 80186 side, with calls into the
    datapump but not the datapump itself, is the common belief - I held
    it too, until I disassembled the image. It is not so.

    The TMS320C52 has no non-volatile memory of its own. So its program
    cannot live in the DSP - it has to be somewhere, and the only place
    left is the flash. At power-up the 80186 streams the DSP image into
    the DSP program memory over the host-download port, and only then does
    the DSP start executing. This is the ordinary C5x bootstrap; the part simply cannot come up any other way.

    Oh, now that is very interesting information. If the datapump code exists in the firmware file, things will be much easier. I hope the emulator's author adds it to the project. I took a quick look at the code, and there is already some groundwork laid for handling the DSP and datapump. Overall, I like this USR Courier reverse-engineering project.

    Eugene

    ... It's full of stars!
    --- GoldED+/BSD 2.0.0-b20260912 (NetBSD 11.0 Intel Xeon Icelake)
    * Origin: FireFox Station (2:5075/35)