Discussion:
[hercules-390] open source 3780 emulator
w.f.j.mueller@gsi.de [hercules-390]
2017-07-10 18:13:21 UTC
Permalink
Hi,

I'm looking for an open source 2780 or 3780 emulator. Reason behind is that I'd like to implement a program which acts as a bridge between the Hercules 2703 emulation over Telnet and BSC line emulation done in a different project (for the curious: a DU11 on a PDP11). The docs briefly state that 'all bytes are transferred as is'. But that's only half of the story, what about leading SYN or the two CRC check bytes. It be great to have a 2780 emulator code, as kind of reference implementation.

With thanks in advance, wfjm
kerravon86@yahoo.com.au [hercules-390]
2017-07-10 21:10:01 UTC
Permalink
Post by ***@gsi.de [hercules-390]
I'm looking for an open source 2780 o
r 3780 emulator.
You can find old C source here:

https://groups.yahoo.com/neo/groups/hercules-390/files

RJE80_029.zip


And newer Java source here:

https://groups.yahoo.com/neo/groups/turnkey-mvs/files

rje3780.src.zip


BFN. Paul.
w.f.j.mueller@gsi.de [hercules-390]
2017-07-11 18:43:03 UTC
Permalink
https://groups.yahoo.com/neo/groups/hercules-390/files https://groups.yahoo.com/neo/groups/hercules-390/files
RJE80_029.zip
Hi Paul,

exactly what I was looking for. I was mostly wondering how the CRC after ETX was implemented. And from the source I deduced that in the Hercules emulation case simply none is send. I had also a look into the 2703 part of Hercules, here again no CRC is generated. The real 2703 added on transmit a two byte CRC after ETB or ETX, and checked a two byte CRC after ETB or ETX on receive. The CRC bytes went over the BSC line, but were not visible to the CPU. The Hercules 2703 apparently doesn't add/check CRC, so a frame really ends with an ETX. That's probably why rje80.c starts with "This program will not work with "real" bisync hardware".


With best regards, Walter
w.f.j.mueller@gsi.de [hercules-390]
2017-07-16 15:54:51 UTC
Permalink
Hi Paul,

I've tried the code from RJE80_029.zip on a 64bit linux system. It compiles with a boat-load of warnings and core dumps immediately. Reason is that some essential headers are missing, therefore some functions are implicitly declared. That might have worked in the 32 bit days, today it doesn't. There was also a bug in the handling of the '-d' qualifier, which also lead to a core dump. And last but not least was the code injecting the contents of rje80.rc only in the windows ifdef, not in the linux section. Fixed also that, and two minor issues causing warnings. The diff is appended. After these fixes rje80 works, the proviso comes in next posting.

With best regards, Walter

------------------------------------
diff rje80.c.orig rje80.c
15a16
#include <arpa/inet.h>
20a22,24
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
220c224
< main(int argc, char *argv[])
---
int main(int argc, char *argv[])
239c243
< if (argc >= startar) {
---
if (argc > startar) {
243c247
< if (argc >= startar) {
---
if (argc > startar) {
357c361
< ttystr("EOT\r\n");
---
ttystr("EOT\r\n");
2175c2179
< sprintf(hexch, "%d%", (line_out_size - rc));
---
sprintf(hexch, "%d%%", (line_out_size - rc));
2387a2392,2397
if (macro_ctr < macro_size) {
buf[0] = macro[macro_ctr];
macro_ctr++;
return (1);
}
Tony Harminc tharminc@gmail.com [hercules-390]
2017-07-10 22:40:19 UTC
Permalink
Post by ***@gsi.de [hercules-390]
I'm looking for an open source 2780 or 3780 emulator. Reason behind is
that I'd like to implement a program which acts as a bridge between the
Hercules 2703 emulation over Telnet and BSC line emulation done in a
different project (for the curious: a DU11 on a PDP11). The docs briefly
state that 'all bytes are transferred as is'. But that's only half of the
story, what about leading SYN or the two CRC check bytes. It be great to
have a 2780 emulator code, as kind of reference implementation.
IIRC the RSCS that we have available (i.e. *not* the RSCS Networking
Program Product) can emulate a 2780/3780, and might provide an example. But
I may not be RC, of course.

Of course anything that can talk to a x780 also provides example code that
shows off the protocol to some extent. This would include JES2 and any
version of RSCS.

Tony H.
Continue reading on narkive:
Loading...